diff --git a/.dockerignore b/.dockerignore index ef9d46b..e56a2cd 100644 --- a/.dockerignore +++ b/.dockerignore @@ -27,5 +27,3 @@ docker-compose*.yml /esdata /secrets /.impeccable -/backend/reports -/backend/bin diff --git a/.github/workflows/go-backend.yml b/.github/workflows/go-backend.yml deleted file mode 100644 index f15f1d5..0000000 --- a/.github/workflows/go-backend.yml +++ /dev/null @@ -1,114 +0,0 @@ -name: Go backend -on: - push: - branches: [main] - paths: ['Dockerfile*', 'docker-compose*.yml', '.dockerignore', 'public/**', 'gulpfile.js', 'backend/**', 'src/core/**', 'src/queue/**', 'src/server/**', 'src/config.ts', 'package*.json', '.github/workflows/go-backend.yml'] - pull_request: - paths: ['Dockerfile*', 'docker-compose*.yml', '.dockerignore', 'public/**', 'gulpfile.js', 'backend/**', 'src/core/**', 'src/queue/**', 'src/server/**', 'src/config.ts', 'package*.json', '.github/workflows/go-backend.yml'] -permissions: - contents: read -jobs: - verify: - runs-on: ubuntu-latest - timeout-minutes: 20 - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-go@v5 - with: - go-version-file: backend/go.mod - cache-dependency-path: backend/go.sum - - uses: actions/setup-node@v4 - with: - node-version: 24 - cache: npm - - run: npm ci --no-audit --fund=false - - name: Formatting and static checks - working-directory: backend - run: | - test -z "$(gofmt -l cmd internal)" - go vet ./... - - name: Integration and race tests - run: backend/scripts/test-integration.sh - - name: Output compatibility - env: - SESSION_SECRET: synthetic-ci-session - run: | - cd backend - go build -o "$RUNNER_TEMP/go-contract" ./cmd/contract - cd .. - export GO_CONTRACT_BINARY="$RUNNER_TEMP/go-contract" - node backend/contracts/routes.cjs --check - node backend/contracts/cache-metrics.cjs --check - node backend/contracts/error-log.cjs --check - node backend/contracts/queue-metrics.cjs --check - node backend/contracts/stats-history.cjs --check - node backend/contracts/stats-window.cjs --check - node backend/contracts/query-values.cjs --check - node backend/contracts/monitoring-query.cjs --check - node backend/contracts/admin-query.cjs --check - node backend/contracts/file-query.cjs --check - node backend/contracts/file-search.cjs --check - node backend/contracts/folder-listing.cjs --check - node backend/contracts/folder-paths.cjs --check - node backend/contracts/preview-query.cjs --check - node backend/contracts/preview-hints.cjs --check - node backend/contracts/preview-branches.cjs --check - node backend/contracts/preview-branch-order.cjs --check - node backend/contracts/user-search.cjs --check - node backend/contracts/cache-report-state.cjs --check - node backend/contracts/readme-decoding.cjs --check - node backend/contracts/compression.cjs --check - node backend/contracts/json-http.cjs --check - node backend/contracts/differential.cjs - node backend/contracts/file-types.cjs - node backend/contracts/resources.cjs --check - node backend/contracts/validation.cjs --check - node backend/contracts/options.cjs --check - node backend/contracts/dates.cjs --check - node backend/contracts/reactivation.cjs --check - node backend/contracts/oauth-tokens.cjs --check - node backend/contracts/oauth-profile.cjs --check - node backend/contracts/github-responses.cjs --check - node backend/contracts/github-quota.cjs --check - node backend/contracts/worker-queues.cjs --check - node backend/contracts/blob-index.cjs --check - node backend/contracts/content-verification.cjs --check - node backend/contracts/legacy-source-paths.cjs --check - node backend/contracts/shared-result-key.cjs --check - node backend/contracts/shared-http.cjs --check - node backend/contracts/file-metadata.cjs --check - node backend/contracts/download-headers.cjs --check - node backend/contracts/github-pagination.cjs --check - node backend/contracts/conferences.cjs --check - node backend/contracts/conference-dates.cjs --check - node backend/contracts/conference-output.cjs --check - node backend/contracts/conference-options.cjs --check - node backend/contracts/admin-filters.cjs --check - node backend/contracts/admin-casting.cjs --check - node backend/contracts/admin-dates.cjs --check - node backend/contracts/admin-pagination.cjs --check - node backend/contracts/admin-csv.cjs --check - node backend/contracts/user-membership.cjs --check - node backend/contracts/admin-user.cjs --check - node backend/contracts/user-defaults.cjs --check - node backend/contracts/quota.cjs --check - node backend/contracts/token-names.cjs --check - node backend/contracts/project-names.cjs --check - node backend/contracts/dashboard-cursors.cjs --check - node backend/contracts/dashboard-limits.cjs --check - node backend/contracts/dashboard-cursor-output.cjs --check - node backend/contracts/dashboard-filters.cjs --check - node backend/contracts/dashboard-pipeline.cjs --check - node backend/contracts/document-cleanup.cjs --check - node backend/contracts/webhook-http.cjs --check - - name: Reachable dependency vulnerabilities - working-directory: backend - run: go run golang.org/x/vuln/cmd/govulncheck@v1.9.0 ./... - - name: Runtime image - run: docker build -t anonymous-github-go:ci . - - name: Default deployment smoke test - run: python3 backend/scripts/test-deployment.py anonymous-github-go:ci - - name: Node rollback image and native dependencies - run: | - docker build -f Dockerfile.node -t anonymous-github-node:rollback-ci . - docker run --rm --network none -i --entrypoint node anonymous-github-node:rollback-ci < backend/scripts/test-node-rollback.cjs diff --git a/Dockerfile b/Dockerfile index 7008d68..6d82a0a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,29 +1,42 @@ # syntax=docker/dockerfile:1.7 -FROM node:24-slim AS assets + +# Stage 1: install all deps (with cache mount so npm cache survives across builds) +FROM node:22-slim AS deps WORKDIR /app -COPY package.json package-lock.json gulpfile.js ./ -RUN --mount=type=cache,target=/root/.npm npm ci --no-audit --fund=false +COPY package.json package-lock.json ./ +RUN --mount=type=cache,id=npm-all,target=/root/.npm,sharing=locked \ + npm ci --prefer-offline --no-audit --fund=false + +# Stage 2: build TypeScript + gulp assets. Source changes only invalidate from here. +FROM node:22-slim AS build +WORKDIR /app +COPY --from=deps /app/node_modules ./node_modules +COPY package.json package-lock.json tsconfig.json gulpfile.js ./ COPY public ./public COPY src ./src -RUN npm run build:ui +RUN npm run build -FROM golang:1.27.3-bookworm AS build -WORKDIR /src -COPY backend/go.mod backend/go.sum ./ -RUN --mount=type=cache,target=/go/pkg/mod go mod download -COPY backend ./ -RUN --mount=type=cache,target=/go/pkg/mod --mount=type=cache,target=/root/.cache/go-build CGO_ENABLED=0 go build -trimpath -ldflags='-s -w' -o /anonymous-server ./cmd/server - -FROM debian:bookworm-slim -LABEL science.4open.owner-alert-protocol="recipient-v2" -RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates && rm -rf /var/lib/apt/lists/* && useradd --uid 10001 --create-home anonymous +# Stage 3: install production deps on the runtime's libc. Native optional +# dependencies such as zstd must select musl binaries for the Alpine runtime. +FROM node:22-alpine AS prod-deps WORKDIR /app -COPY --from=build /anonymous-server /usr/local/bin/anonymous-server -COPY --from=build /src/licenses /usr/share/licenses/anonymous-github -COPY --from=assets --chown=10001:10001 /app/public ./public -RUN mkdir /app/repositories && chown 10001:10001 /app/repositories -USER 10001:10001 -ENV PORT=5000 PUBLIC_DIR=/app/public FOLDER=/app/repositories COOKIE_SECURE=true GOMEMLIMIT=768MiB -HEALTHCHECK --interval=30s --timeout=5s --start-period=20s CMD ["/usr/local/bin/anonymous-server", "healthcheck"] +COPY package.json package-lock.json ./ +RUN --mount=type=cache,id=npm-prod,target=/root/.npm,sharing=locked \ + npm ci --omit=dev --prefer-offline --no-audit --fund=false + +# Stage 4: minimal runtime +FROM node:22-alpine AS runtime +LABEL science.4open.owner-alert-protocol="recipient-v2" +ENV NODE_ENV=production +ENV PORT=5000 EXPOSE 5000 -ENTRYPOINT ["/usr/local/bin/anonymous-server"] +WORKDIR /app + +COPY --from=prod-deps /app/node_modules ./node_modules +RUN node -e "const assert = require('node:assert/strict'); const zstd = require('@mongodb-js/zstd'); (async () => { const input = Buffer.from('native compression smoke test'); const compressed = await zstd.compress(input, 3); assert.deepEqual(await zstd.decompress(compressed), input); })().catch(error => { console.error(error); process.exit(1); });" +COPY --from=build /app/build ./build +COPY --from=build /app/public ./public +COPY package.json ./package.json +COPY healthcheck.js ./healthcheck.js + +CMD ["node", "--max-old-space-size=2048", "./build/server/index.js"] diff --git a/Dockerfile.node b/Dockerfile.node deleted file mode 100644 index f9df006..0000000 --- a/Dockerfile.node +++ /dev/null @@ -1,39 +0,0 @@ -# syntax=docker/dockerfile:1.7 - -# Stage 1: install all deps (with cache mount so npm cache survives across builds) -FROM node:22-slim AS deps -WORKDIR /app -COPY package.json package-lock.json ./ -RUN --mount=type=cache,id=npm-all,target=/root/.npm,sharing=locked \ - npm ci --prefer-offline --no-audit --fund=false - -# Stage 2: build TypeScript + gulp assets. Source changes only invalidate from here. -FROM node:22-slim AS build -WORKDIR /app -COPY --from=deps /app/node_modules ./node_modules -COPY package.json package-lock.json tsconfig.json gulpfile.js ./ -COPY public ./public -COPY src ./src -RUN npm run build - -# Stage 3: prod-only deps. Independent of source so it caches well. -FROM node:22-slim AS prod-deps -WORKDIR /app -COPY package.json package-lock.json ./ -RUN --mount=type=cache,id=npm-prod,target=/root/.npm,sharing=locked \ - npm ci --omit=dev --prefer-offline --no-audit --fund=false - -# Keep the runtime libc consistent with native dependencies installed above. -FROM node:22-slim AS runtime -ENV NODE_ENV=production -ENV PORT=5000 -EXPOSE 5000 -WORKDIR /app - -COPY --from=prod-deps /app/node_modules ./node_modules -COPY --from=build /app/build ./build -COPY --from=build /app/public ./public -COPY package.json ./package.json -COPY healthcheck.js ./healthcheck.js - -CMD ["node", "--max-old-space-size=2048", "./build/server/index.js"] diff --git a/README.md b/README.md index f90bd3b..d2972b8 100644 --- a/README.md +++ b/README.md @@ -68,10 +68,6 @@ These tokens cannot access GitHub previews, file downloads, or admin routes. ## Self-hosting -Docker now runs the Go backend, including streaming and background workers. See the [Go deployment and cutover guide](backend/README.md#default-deployment) before upgrading an existing installation. It covers queue handoff, storage permissions, staging checks and the preserved Node rollback stack. A full production staging rehearsal is still required before cutover. - -The following Node instructions also support the CLI, asset build and rollback backend. - Local installation requires Node.js 22.15 or newer in the 22.x series, 24.x, or 26 or newer. Run `npm ci` and `npm run build` to install and build. `npm run dev` uses Node's watch mode; `npm run build:ui` rebuilds browser assets. @@ -117,8 +113,6 @@ PORT=5000 DB_USERNAME= DB_PASSWORD= AUTH_CALLBACK=http://localhost:5000/github/auth -SESSION_SECRET= -COOKIE_SECURE=false ``` - `GITHUB_TOKEN` — create one at with the `repo` scope. @@ -132,12 +126,9 @@ the [GitHub App setup guide](docs/github-app-setup.md). **3. Start the server** ```bash -install -d -m 0750 -o 10001 -g 10001 repositories -docker compose up -d --build +docker-compose up -d ``` -The storage command requires permission to set ownership. For an existing storage directory, apply your ownership or ACL policy without replacing its contents. Use `COOKIE_SECURE=true` with HTTPS in production. - **4. Open** . The port can be changed in `docker-compose.yml`; putting Anonymous GitHub behind nginx is recommended for HTTPS. For an optional remote, hidden, delayed MongoDB replica and backup source, see diff --git a/backend/README.md b/backend/README.md deleted file mode 100644 index 49fa19c..0000000 --- a/backend/README.md +++ /dev/null @@ -1,630 +0,0 @@ -# Go backend - -This directory implements the API, authentication, repository processing, file serving, storage adapters and background jobs in Go. The existing browser application remains JavaScript. Node is used to build browser assets, run differential tests and perform offline data migration; it is absent from the runtime image. - -The root Docker deployment runs Go. The Node backend remains available through the explicit rollback configuration. Do not switch production based only on route registration or the synthetic benchmarks below. Live OAuth callbacks, installation changes, existing database upgrades, and browser flows need validation against an isolated staging copy. - -## Build and test - -Use Go 1.27.3, Docker, and the repository's installed Node dependencies for differential checks. - -```sh -cd backend -go build -o ../anonymous-server ./cmd/server -go build -o ../go-contract ./cmd/contract -go build -o ../go-benchmark ./cmd/benchmark -go test ./... -./scripts/test-integration.sh -cd .. -GO_CONTRACT_BINARY="$PWD/go-contract" node backend/contracts/differential.cjs -GO_CONTRACT_BINARY="$PWD/go-contract" node backend/contracts/file-types.cjs -SESSION_SECRET=synthetic-test node backend/contracts/resources.cjs --check -node backend/contracts/routes.cjs --check -node backend/contracts/cache-metrics.cjs --check -node backend/contracts/cache-report-state.cjs --check -node backend/contracts/readme-decoding.cjs --check -node backend/contracts/compression.cjs --check -node backend/contracts/json-http.cjs --check -node backend/contracts/validation.cjs --check -node backend/contracts/options.cjs --check -node backend/contracts/dates.cjs --check -node backend/contracts/reactivation.cjs --check -node backend/contracts/oauth-tokens.cjs --check -node backend/contracts/oauth-profile.cjs --check -node backend/contracts/github-responses.cjs --check -node backend/contracts/github-quota.cjs --check -node backend/contracts/worker-queues.cjs --check -node backend/contracts/blob-index.cjs --check -node backend/contracts/content-verification.cjs --check -node backend/contracts/legacy-source-paths.cjs --check -node backend/contracts/shared-result-key.cjs --check -node backend/contracts/shared-http.cjs --check -SESSION_SECRET=synthetic-test node backend/contracts/file-metadata.cjs --check -node backend/contracts/download-headers.cjs --check -node backend/contracts/github-pagination.cjs --check -node backend/contracts/conferences.cjs --check -node backend/contracts/conference-output.cjs --check -node backend/contracts/conference-options.cjs --check -node backend/contracts/admin-filters.cjs --check -node backend/contracts/admin-pagination.cjs --check -node backend/contracts/admin-csv.cjs --check -node backend/contracts/user-membership.cjs --check -node backend/contracts/admin-user.cjs --check -node backend/contracts/user-defaults.cjs --check -node backend/contracts/quota.cjs --check -node backend/contracts/token-names.cjs --check -node backend/contracts/project-names.cjs --check -node backend/contracts/dashboard-cursors.cjs --check -node backend/contracts/dashboard-limits.cjs --check -node backend/contracts/dashboard-cursor-output.cjs --check -node backend/contracts/dashboard-filters.cjs --check -node backend/contracts/dashboard-pipeline.cjs --check -node backend/contracts/document-cleanup.cjs --check -node backend/contracts/webhook-http.cjs --check -GO_BENCHMARK_BINARY="$PWD/go-benchmark" node backend/contracts/benchmark.cjs -``` - -The contract scripts accept paths/environment documented in their source; they compare the current TypeScript implementation with the Go contract executable. Integration tests use disposable Docker services, random database names and synthetic credentials. Plain `go test` skips database integration unless its test environment variables are provided. `scripts/test-integration.sh` supplies them and runs the race detector. - -Build the application image from the repository root: - -```sh -docker build -t anonymous-github-go:local . -``` - -Exclude local database dumps and unrelated large directories from the build context. The runtime runs as UID/GID 10001 and needs writable repository storage and temporary space. Both Compose configurations add a read-only root filesystem, dropped capabilities, process/memory limits and a health check. - -The separate `.github/workflows/go-backend.yml` workflow runs formatting, static checks, integration/race tests, output comparisons, vulnerability scanning and the image build. - -## Configuration - -The backend reads environment variables, not `.env` files itself. Compose loads the environment file. Preserve the existing `SESSION_SECRET`, `CREDENTIAL_KEYS`, and `CREDENTIAL_ACTIVE_KEY_ID` to retain sessions and encrypted GitHub grants. It supports the existing MongoDB, Redis, OAuth, GitHub App and S3 variable names in `internal/server/config.go`. - -For local execution, set `PUBLIC_DIR` to the root `public` directory and `FOLDER` to repository storage. Set `MONGODB_URI` explicitly when testing. `MONGODB_DATABASE` defaults to `production`; a database path in the URI takes precedence. Local HTTP testing requires `COOKIE_SECURE=false`; production behind HTTPS requires `true`. - -`TRUST_PROXY` supports hop counts, IPs/CIDRs, and the existing named ranges. Configure it for the actual proxy topology; forwarded headers from untrusted peers are ignored. GitHub App private keys can come from `GITHUB_APP_PRIVATE_KEY_FILE` or the existing environment variable. - -Anonymization defaults to one child process, a queue of 16, and a 512 MiB weighted admission budget. `ANONYMIZATION_WORKERS` permits up to four workers; `ANONYMIZATION_MEMORY_MB` controls admission. A child receives no server credentials. Its 384 MiB Go heap target is a soft limit; the container memory limit is the hard boundary. Input is capped at 100 MiB, output at 400 MiB, and execution at 15 seconds. Large concurrent downloads also consume temporary storage. - -## Verified behavior - -Implementation verification is complete under the documented policy of preserving supported functionality without reproducing TypeScript bugs. The final full backend race suite, 64 CI contract commands, static checks and isolated deployment smoke test passed. Beta is healthy. Production-data cutover and shipping additional provider adapters remain separate operational work. See `reports/implementation-completion-audit.json` for requirement-by-requirement evidence and limits. - -Reports in `reports/` record the comparison and benchmark results. `reports/compatibility-audit.json` records the 64-command CI contract run, race/integration results, static checks, source fingerprints and rollback-image checks. `reports/implementation-completion-audit.json` maps the implementation requirements to their verification evidence. Its limits distinguish automated evidence from pending live staging validation: - -- 499 exact differential cases cover text, paths, invalid UTF-8 bytes, regex behavior, self-links and cross-language encrypted credentials. -- 7,876 file classification cases compare the installed Node MIME database and binary heuristic with Go. -- Integration and race tests exercise creation, tree publication, anonymized file output, access control, scoped and expired tokens, banned sessions, App permission restrictions and revocation during token issuance. -- A hardened non-root container passed HTTP smoke checks and browser rendering of a Markdown script-injection fixture. -- Tests reject truncated upstream content, unsafe raw-content redirects, filesystem traversal and symlink escapes. S3 protocol tests cover atomic publication and deletion boundaries. -- All 112 mounted TypeScript API routes are extracted from the router AST into `contracts/routes.json`. CI regenerates the inventory in check mode and verifies the first matching Go route template, so a generic route cannot conceal a missing specific endpoint. Healthcheck and webhook dispatch are exercised through HTTP. This checks dispatch, not every status code and JSON response. `/api/admin/cache` reports Go cache events with the TypeScript time windows, latency buckets and row schema. Fifteen contracts execute the TypeScript report to check window coercion and bucket definitions. -- `govulncheck` found zero reachable vulnerabilities and zero vulnerabilities in imported packages. It reported four advisories in required modules outside the packages used by this application; see `reports/govulncheck.txt`. - -GitHub HTTP responses are mocked in automated integration tests. S3 tests use an HTTP protocol fixture rather than a production provider. Those tests do not establish compatibility with every provider configuration. - -## Request performance monitoring - -Go now collects request duration, first-byte latency, encoded response bytes, interruption, 5xx and slow-request counts. Labels are registered route templates or fixed fallbacks; raw repository IDs, filenames and query strings are excluded. A 512-group buffer flushes every 15 seconds into the existing `performance:v1` Redis minute-hash format with two-hour retention. Reports aggregate API and retained streamer history over 15 or 60 minutes, including histogram upper bounds and first-byte counts. Uncertain failed writes are dropped rather than replayed, and Redis outages report monitoring unavailable. HTTP response streaming and compression remain unchanged. - -The focused race/integration command is `GO_BINARY=/path/to/go backend/scripts/test-integration.sh -run 'TestRequestMetric|TestBackendIntegration/request_performance_history'`. It checks histogram bounds, encoded bytes, HEAD, cancellation, route-label privacy, bounded buffering, Redis failure handling, cross-instance history and time-window selection. Go process samples are collected at most once every 15 seconds, with process CPU deltas, RSS/heap, cgroup memory limits, active requests, worker activity and process-owned TCP socket states. Redis retains live instances for 90 seconds and a bounded runtime series for two hours; reports exclude stale instances. Go event-loop measurements are explicitly unavailable, and the UI handles nullable values. Every HTTP response has a generated UUID `X-Request-ID`; incoming API request IDs are ignored. Structured completion logs use that ID, fixed route labels, status, encoded bytes and accumulated work-stage durations. Slow and interrupted requests log at warning level; successful health checks are quiet. Raw paths, query strings, authorization headers and panic details are excluded. Legacy source/transformed cache hits and misses also enter the performance report, independently of detailed cache-monitoring configuration. - -Request-scoped stages measure repository lookup, source authorization, provider body reads, shared-cache lookup/fill, worker admission waits and worker execution. Cache hits do not count as worker executions or cache fills. Slot and memory admission waits are separate samples. Labels are fixed and provider-independent; background jobs do not enter HTTP stage metrics. Go has no separate streamer-header stage. These metrics are deployed to beta. The full race-enabled backend suite, 160 UI tests, live OAuth/App import checks and browser metrics checks passed; see `reports/compatibility-audit.json` and `reports/shadow-performance-browser-validation.json`. - -## Admin activity history - -The admin overview always reads the last 30 UTC days and computes fresh current totals, independently of the public statistics cache and `days` query parameter. Its optional history and error-summary reads preserve the overview when those telemetry reads fail. Public and admin history use the same UTC-day merge: replace the first row belonging to today, retain other rows in stable date order, and never mutate cached totals or source rows. Twenty fixtures extracted from TypeScript cover non-midnight snapshots, duplicates, leap days and timezone boundaries. An isolated integration test seeds a stale public cache and verifies fresh admin totals, the fixed window, and malformed optional error telemetry. - -## Public statistics caches - -Current totals use a one-entry local cache and the shared TypeScript Redis key `perf:home-stats:v1`. A renewable, ownership-checked Redis lease coalesces fills across instances. Redis read or write failures fall back to MongoDB results; cache I/O has bounded timeouts. History has a 16-entry FIFO cache keyed by UTC day and normalized window. Both local caches coalesce concurrent fills, retain successful results for one hour, and retry failures immediately. Returned maps are copied so callers cannot mutate cached results. - -Twenty-eight extracted TypeScript contracts cover plain and repeated `days` parameters, integer prefixes, zero, negatives, hexadecimal values and the 365-day cap. Isolated integration tests cover shared-cache reuse, malformed data, a competing lease, denied writes, unavailable Redis and UTC rollover. Public history also uses bounded Express-compatible query normalization. Its 1,274 differential fixtures cover repeated and indexed arrays, nested objects, mixed values, malformed escapes, prototype-like names and parser limits. Other query consumers still require an audit before claiming application-wide query parity. History returns every snapshot in the selected date range; it does not cap the result at 366 rows. An integration fixture verifies 400 distinct timestamps on one day plus current and future snapshots. - -## Queue metric charts - -Queue history accepts the TypeScript ranges `1h`, `6h`, `24h` and `7d`, and returns the selected string in `range`. Unrecognized strings retain that response value and use the one-hour window. Inherited range-object names such as `toString` preserve TypeScript's empty-series behavior. Reports contain one point per minute, including zero-valued empty minutes. Successful reads are cached for 30 seconds across at most 12 queue/window combinations; Redis read failures return an empty chart and are not cached. Worker durations round to the nearest millisecond and clamp negatives to zero. Minute hashes retain the TypeScript seven-day-plus-one-hour TTL. - -`contracts/queue-metrics.cjs --check` executes the actual TypeScript recorder and reader against deterministic Redis fixtures. Seventeen contracts and Redis integration tests cover the windows, output shape, rounding, cache expiry, queue isolation, failure recovery and retention. `check-shadow-auth.cjs --bootstrap-admin --app --monitoring-only` verifies the live admin charts without importing a repository or requiring upstream GitHub requests. - -Queue overview cards include 24-hour completed/failed totals from the same minute history. Go process samples advertise the actual running job loops for each queue; the overview counts fresh API instances and reports the first instance's concurrency, matching the TypeScript field meaning. Graceful shutdown removes the instance from live samples when Redis is available; unclean exits age out after 90 seconds. Paused loops still count as workers. Delayed jobs include their actual `availableAt` as `delayUntil`, and started/finished jobs expose `processedOn`/`finishedOn` timestamps. - -## Admin error monitoring - -The Go error ring retains 5,000 entries and uses the TypeScript severity buckets, noisy-error exclusions, hourly level/module/code counters and 48-hour counter TTL. Routine 401/403/404 errors and the TypeScript allowlisted client errors contribute to counters without filling the recent-entry ring. Slow and interrupted HTTP requests contribute warning records with generated request IDs and fixed route labels. Unknown errors retain generic codes; raw upstream messages, credentials, paths and query strings are excluded. - -A 128-entry in-memory buffer shares the 15-second performance flush lifecycle. Admin error reads flush pending entries before querying Redis. Overflow and failed batches increment the process-local dropped count; uncertain writes are not replayed. Clearing error history removes the ring, Redis dropped counter and hourly keys, preserving unrelated keys. As in TypeScript, the process-local dropped count is cumulative. Clearing refuses more than 10,000 hourly keys, and pagination offsets saturate at JavaScript's largest safe integer. `LOG_LEVEL` accepts debug/info/warn/error, with the same production/development defaults as TypeScript. - -`contracts/error-log.cjs --check` verifies 40 fixtures extracted from the actual TypeScript classifier and error-list pagination expressions. Integration tests cover ring retention, malformed legacy entries, counters, TTL, cancellation warnings and clearing on isolated Redis infrastructure. - -## Provider adapters - -`internal/provider` defines repository access, metadata, commits, trees, file readers, public URLs and self-link prefixes. Optional `FileMetadata` supports per-file recovery from truncated trees. Optional `Discovery` and `Documents` interfaces cover repository lists/branches/readmes and normalized snippets/pull requests. `Discovery.List` receives `provider.ListRequest{OwnerID, Force}` so each adapter can implement its own cache and refresh policy. A fixture adapter verifies that the HTTP route forwards refresh requests independently of GitHub. The shared lifecycle, MongoDB publication, anonymization and file/ZIP handlers use these interfaces. GitHub protocol calls live in the GitHub adapter; stored ZIP repositories use the archive adapter. - -Register another adapter with `server.New(config, store, adapter)`. Implement `provider.Repositories` and any optional capabilities you need. Its `Branch` method must resolve an actual branch, not a same-named tag, and return `provider.ErrBranchNotFound` only after establishing that the branch is absent. Authorization and temporary upstream failures must remain distinct. The registry rejects duplicate IDs and typed-nil adapters, and captures each adapter ID once. Lookups, ordering and advertised capabilities use that registered name even if an adapter later reports a different ID; extensions cannot replace built-in authentication by changing their ID during registration. Implementations live within the backend module because the interfaces are under `internal/`. - -Create a repository with the existing `POST /api/repo` body and add `source.provider`, for example: - -```json -{"repoId":"example","fullName":"team/subgroup/project","source":{"provider":"your-forge","branch":"main","commit":"opaque-revision"},"terms":["Alice"],"options":{"expirationMode":"never","link":true}} -``` - -The adapter resolves immutable repository IDs and returns an opaque, server-owned access binding. Request bodies cannot supply credentials, bindings, upstream API URLs or immutable IDs. Third-party bindings are stored in `providerAccess`; GitHub retains `githubAccess`. Existing GitHub source types without a provider field keep working. Unknown providers and unsupported capabilities fail explicitly. Updating a resource cannot switch its provider. Discovery and save operations validate the adapter’s declared provider and binding; metadata must contain a name and immutable ID and must agree with the connected repository ID. HTTP tests inject mismatched adapter responses and verify that they create neither cached repository metadata nor anonymous resources. - -Reconnect saves require the owner, the unchanged repository name and the preview's external repository ID. Presence of `reconnectRepositoryId` triggers validation even when its JSON value is null. GitHub previews use positive numeric `gh_` IDs; other providers retain their own opaque IDs under their registered prefix. Invalid requests are rejected before provider calls. The returned repository identity must match the preview before branch or commit resolution and before cache writes. Missing branches return `branch_not_specified`; authorization, rate-limit and upstream failures retain their provider error category and reset time. Tests exercise the save handler's null case, preflight rejection, immutable-ID mismatches, wrapped branch failures and a successful opaque-ID reconnect. - -Authenticated discovery endpoints are: - -- `GET /api/providers`: registered IDs and capabilities. -- `GET /api/providers/:provider/repositories`: repositories accessible to the current user. -- `GET /api/providers/:provider/repository/metadata?name=team/subgroup/project`. -- `GET /api/providers/:provider/repository/branches?name=team/subgroup/project`. -- `GET /api/providers/:provider/repository/readme?name=team/subgroup/project&branch=main`. -- `GET /api/providers/:provider/gist/:id` and `/api/providers/:provider/pr/:id?name=team/subgroup/project`: source previews. - -Source metadata, branch and README previews accept `anonymizedRepoId`. Shared routes verify local owner/coauthor/admin access and the requested provider/name before using the saved owner's binding. Provider authorization still runs on every preview. Metadata identity must match the saved immutable ID; branch and README lookups use the resolved name after a rename. `reconnect=1` is owner-only, rejects archived resources and selects a new binding using the saved connection kind. It returns preview metadata without changing the anonymous resource. A non-GitHub integration fixture covers coauthor access, revoked grants, replacement identities, unchanged saved bindings and unauthorized requests making no provider calls. The legacy `repositoryID` query selects a cached metadata record. It supplies an optional `ConnectRequest.RepositoryID` from that record's provider-scoped external ID, never a credential or client-supplied immutable ID. Adapters must authorize the hinted identity; the shared route rejects a conflicting connection or metadata identity. A missing cache record falls back to name-based connection, and `reconnect=1` ignores the hint. Saved-source identities cannot be overridden by a conflicting hint. If a legacy saved identity cannot be recovered, a hint is rejected rather than assigning a new identity to the owner's binding. Tests cover opaque IDs, GitHub OAuth rename resolution, App connection identity, malformed/cross-provider hints, revocation and explicit reconnect. GitHub preview metadata uses an optional `RepositoryPreviews` capability. Ordinary requests reuse a stored snapshot only after upstream access and identity checks. `force=1`, `reconnect=1` and cache misses fetch current fields, including the Pages branch/path. Cached reads do not rewrite metadata and therefore cannot overwrite a concurrent refresh. Pages 403/404 responses preserve any existing page source; other failures prevent cache publication. Providers without this optional capability continue returning fresh metadata. The optional `DiscoveryPreviews` capability provides branch-list and README cache behavior. GitHub reuses nonempty branch lists, refreshes them when forced, and retains stored README text by branch name as TypeScript does. README reads select the requested branch, the metadata default branch, or `master`, and fetch by the selected commit. Missing branches and README failures return `readme_not_available`; empty README text is fetched again. Preview routes still verify current upstream repository access before serving cached discovery data. Cache revision checks prevent a late branch refresh from replacing newer data, and README writes match both branch name and commit. Integration tests cover normal and forced reads, branch output with cached README text, defaults, error statuses, access denial and concurrent cache changes. Providers without these optional cache capabilities keep their existing discovery behavior. - -Existing GitHub routes remain available. Gist/PR creation also accepts `source.provider` and uses the adapter's `ConnectDocument` and `Document` methods. Normalize document payloads to the existing saved schema before returning them. An immutable repository ID returned in `ConnectDocument`’s `Access.Ref.ID` is persisted as a server-owned source field and passed back on edits, downloads and refreshes. Adapters must retain an existing ID; replacing or dropping it is rejected. Client-supplied immutable IDs are ignored. Providers without document support return `provider_capability_not_supported`. - -Adapters can return or wrap `provider.ErrNotFound`, `ErrAccessDenied`, `ErrRateLimited`, `ErrUpstream`, `ErrBranchNotFound` and `ErrCapability` without importing the server package. These map to stable public codes and HTTP statuses; wrapper text and upstream response bodies are not exposed. `provider.RateLimitError{ResetAt: instant}` carries an optional reset time, serialized as Unix milliseconds. The same categories are retained in document and terminal preparation failures. Unknown errors remain generic server errors. - -Adapters must authorize access using the local owner and their saved binding, honor context cancellation, bound upstream responses, validate remote URLs/redirects and prevent credentials crossing hosts. Providers without `ContentVerifier` use `Entry.Size` as a minimum downloaded size in both shared-cache fills and admission fallback. Providers with a verifier own size interpretation, including pointer-versus-payload differences; their `Open` method must detect truncated upstream responses even when cache verification is bypassed. `SelfLinks` contains trusted literal repository URL prefixes, most specific first. An empty slice disables source-link rewriting. File paths still pass shared traversal validation; file processing retains size, output and worker limits. No new provider credentials or endpoints are accepted from public requests. - -The test provider uses nested namespaces and opaque revisions. Integration tests exercise repository creation, preparation, transformed files, ZIPs, unchanged-commit renames, refresh, removal, document creation and previews, denied private reads, revocation, unsupported capabilities and attempted provider switching. It makes no GitHub requests. This is an extension contract test, not a shipped GitLab/Bitbucket integration. Login, OAuth, installation webhooks, claims and GitHub coauthor lookup remain provider-specific; a new provider must supply its own credential connection flow. - -## TypeScript output contracts - -`contracts/resources.cjs` runs the actual TypeScript classes and generates 1,048 fixtures: 1,024 public gist/PR combinations across all eight output flags, plus 24 private repository/gist/PR responses across lifecycle states. `resource_contract_test.go` compares Go output to those fixtures. CI regenerates them in memory with `--check` to catch TypeScript drift. To intentionally update the contract, run the script without `--check`, review the fixture changes, then run Go tests. - -This fixed absent-field versus null handling, gist field filtering, empty arrays, coauthor fields, and sizes for non-ready repositories. File search omits SHA fields and rejects slash-containing queries, matching TypeScript. Folder counts roll up original paths before anonymizing and summing collisions. Rate-limited repository responses retain `resetAt`. - -Public gist/PR options now refresh documents older than 24 hours when updates are enabled, and recover non-ready documents older than five minutes. Owners bypass these public refresh checks, matching TypeScript. Recovery preserves the existing gist 425 and PR 404 response for the triggering request; the next request sees the published result. Integration tests cover update opt-out, revoked access and removal during an upstream download. Revision checks prevent refresh from resurrecting removed content. - -Repository public options recover stale non-ready states after five minutes, preserving queued jobs and inactive lifecycle states. Automatic source updates run from options requests rather than file reads. A short database claim prevents overlapping refreshes and is released after success or failure, so transient upstream failures do not suppress retries for a day. Tests cover fresh/stale states, duplicate views, failed-grant retries, changed commits and concurrent removal. ZIP `HEAD` requests return headers without provider access or transformation; disabling downloads blocks administrators as well. - -GitHub branch resolution paginates branch lists and fetches commit metadata by the resolved immutable revision. Confirmed missing branches transition the repository to `error` with `branch_not_found`, detach its old tree and retire that generation. Authorization failures preserve the saved tree. Tree publication requires an unexpired staging lease; cleanup retires leases before deleting rows and discovers late inserts through staging markers. Legacy rows without generation IDs are retired too. Content cleanup honors TypeScript generation prefixes and retirement markers, removes obsolete legacy cache files, and preserves current generations and ZIP originals. - -Manual repository refresh uses a five-minute lease, rejects active/waiting preparation jobs, removes terminal jobs before retry, and leaves ready repositories unchanged when the branch commit has not changed. Refresh writes require the same lease and repository revision. Changed revisions detach and retire old tree/cache generations before enqueueing replacement work. If reset or enqueue fails, only that refresh may mark its preparation as `preparation_interrupted`; concurrent removal and replacement leases remain protected. Integration tests inject a MongoDB enqueue rejection and verify that retry succeeds. - -Expiration extension permits queued/downloading resources, matching TypeScript. Repository extension preserves the saved commit and queues reactivation only for expired repositories; gist/PR extension downloads synchronously. Gist/PR create, update and explicit refresh now return after publication, and create/update return the full private document. Settings edits retain the original source identity. Document deletion completes before returning `removed`; a repeated delete returns 410. An explicit owner-authorized document refresh can restore it, while concurrent lifecycle changes during a fetch remain revision-protected. Repository deletion remains queued, as in the current TypeScript route. Removal retries are allowed while removal or expiration is in progress; already removed repositories return `is_removed` with 410. Tests cover ten initial states, ownership, file/path cleanup, and retry after an injected enqueue failure. Both administrative cache deletion and cache jobs change the cache revision before deleting stored bytes. Successful file, ZIP and project-page content reads clear `isReseted`, refresh `statusDate` and clear the old status message, matching TypeScript. They leave size recomputation to tree preparation. Concurrent reads tolerate this bookkeeping update, while content publication checks retain lifecycle, tree, settings, access, anonymization and cache-revision guards. Tests cover failed access, concurrent transformed reads and a newer reset or removal during a read. Repository enqueue failures from save/reactivation use the same guarded `preparation_interrupted` recovery. Unchanged-source settings saves preserve queued/downloading/error states and existing preparation jobs without requiring upstream credentials. Expired or removed snapshots are reactivated only with a future expiration or `never`; otherwise their inactive state remains unchanged. The TypeScript reactivation helper supplies 60 contracts, exercised through HTTP with a revoked non-GitHub grant. - -`contracts/validation.cjs` extracts the actual TypeScript validator declarations with the TypeScript parser. Its 90 fixtures cover required-field precedence, resource IDs, commit syntax and PR number formats. Go unit tests compare the validator results, and integration tests exercise rejected requests through HTTP. Edit authorization precedes body validation. An omitted provider ID on an existing resource retains that provider’s revision format; explicit provider switches are rejected. PR numeric strings such as `1.0` and `0x10` retain their numeric value. CI detects drift in both output and validation fixtures. `contracts/options.cjs` adds 126 option contracts using the actual route update functions and Mongoose schemas, checked through both Go unit tests and HTTP/database integration. Each resource keeps its own option fields; repository page sources retain only branch and path. Falsy expiration inputs are omitted. Truthy expiration inputs use JavaScript Date construction, including named months, overflow days, arrays, numeric milliseconds and year 0001. Shared resource access and list expiry treat year 0001 and the Unix epoch as stored dates for repositories, gists and pull requests. HTTP responses serialize native Go and MongoDB dates with JavaScript’s UTC millisecond format, including extended years and null for out-of-range dates. `contracts/dates.cjs` checks 213 native JavaScript date outputs. Option integration tests compare HTTP output as well as stored values. Date-looking strings remain unchanged. Typed provider maps, slices, arrays and ordered BSON documents also normalize native dates; byte slices and custom JSON encoders retain their wire representations. Boolean options match Mongoose’s explicit casts for null, booleans, 0/1 and the strings `true`, `false`, `0`, `1`, `yes` and `no`. Unsupported boolean inputs return `invalid_options`. Invalid resource options return 400 on both creates and edits, with no partial writes. This deliberately differs from TypeScript/Mongoose, whose creates can return 500 and whose edits can silently omit invalid fields. Valid expiration-mode and page-source strings retain Mongoose scalar/document-ID casts; empty page-source objects are consistently omitted. The isolated database differential tests compare valid persistence and independently enforce atomic rejection of invalid input. Numeric and boolean terms are cast to strings before storage, including JavaScript decimal/exponent formatting and negative-zero normalization. The option contracts also compare transformed text against the TypeScript anonymizer. Null terms, objects and nested arrays are rejected; TypeScript can persist null terms but then fails when compiling them. Go retains bounded request/term sizes; malformed types that trigger TypeScript runtime exceptions receive structured validation errors. - -These fixtures cover the listed contracts, not every possible API response or live authentication flow. Production cutover still requires the staging checks below. - -## Performance results - -Three alternating fresh Node and Go processes ran each fixture. The median measures transformation only, excluding startup, compilation, network, database and child-process overhead. Output SHA-256 hashes agree. - -- 2 MB numeric input, 47 absent terms: Node 7.44 ms, Go 2.25 ms; Go 3.31 times faster. -- 100 MB numeric input, 47 absent terms: Node 234.29 ms, Go 117.23 ms; Go 2.00 times faster. -- 50 MB with sparse replacements: Node 509.48 ms, Go 593.56 ms; Go 1.17 times slower. -- 22 MB with 1.2 million replacements: Node 373.11 ms, Go 503.78 ms; Go 1.35 times slower. - -These results do not support an overall speedup claim. The archive HTTP benchmark below measures one full-server workload. Shared-cache serving, external provider latency, cold start and GitHub rate-limit usage still need separate workload measurements. Raw repository content is cached through the shared provider layer on filesystem or S3 storage. Cache identities include provider, immutable repository ID, commit, blob revision, tree generation and cache revision. Cached reads still authorize access. Fills have a 120-second deadline, a 64-request process limit, Redis coordination, bounded atomic writes and lifecycle checks before and after publication. Retirement markers and admin cache revisions reject late fills. Tests cover repeated and concurrent reads, revocation, truncated cache entries, short downloads, revision changes and removal during a fill. ZIP originals bypass this cache. Go uses its own cache-key namespace, so the first read after cutover can still fetch upstream. Redis caches anonymous path indexes, and installation tokens are cached within their expiry and local revocation revision. - -### Full-server archive HTTP benchmark - -Run `GO_BINARY=/path/to/go backend/scripts/benchmark-http.sh --output=backend/reports/http-archive-benchmark.json` from the repository root. Add `--quick` for a smoke run. The script builds the Go executable, transpiles the current TypeScript to JavaScript, starts disposable MongoDB/Redis containers and launches the actual server entrypoints. Each process receives a new database, storage directory and synthetic credential keys. Local environment files and production credentials are not inherited. The temporary Node layout includes the normal queue processors and required emoji module. - -Four archive fixtures cover changed text, absent terms in a 2 MiB file, JavaScript word boundaries and 2 MiB binary content. Every successful response must match its expected SHA-256. Each runtime uses one anonymization worker and a 512 MiB admission budget. Three fresh-process rounds alternate runtime order. Each round measures seven distinct cold repository lookups, warms one repository, then sends 100 requests at concurrency 1 and 100 at concurrency 8. Cold means a new repository/cache identity, not a cold operating-system page cache. HTTP uses loopback keep-alive connections and identity encoding. Distinct forwarded client IPs prevent per-client slowdown from dominating the workload; both servers explicitly trust only loopback proxy traffic. - -The report contains individual latency samples, throughput, p95 time to first byte, approximate process-tree CPU and RSS sampled every 10 ms. CPU accounting includes waited-for worker processes and waits for post-response page-view writes to drain. RSS includes live child workers discovered across all OS threads; a short-lived peak between samples can be missed. MongoDB, Redis and load-generator resources are excluded. Runtime versions, source/binary/script hashes, CPU details and cgroup limits identify the run. These are complete archive file-route measurements on a development host. They do not measure shared-cache gzip, external provider authorization/network latency, S3, startup time or production capacity. - -The recorded run in `reports/http-archive-benchmark.json` checked 4,410 successful file responses across 21 successful fixture runs. At concurrency 8, median throughput across three rounds was: - -- 64 KiB changed text: Node 49.65 requests/s, Go 99.83 requests/s, a 2.01× increase. Median per-round p95 fell from 209.84 to 88.19 ms. -- 128 KiB JavaScript-boundary regex: Node 12.19 requests/s, Go 80.52 requests/s, a 6.61× increase. Median per-round p95 fell from 952.03 to 104.97 ms. -- 2 MiB binary: Node 37.19 requests/s, Go 49.07 requests/s, a 1.32× increase. Median per-round p95 fell from 305.57 to 282.82 ms. - -These ratios apply only to this archive workload and these implementations. The report also retains cold samples, concurrency-1 results, CPU and sampled process-tree RSS. Run `node backend/scripts/render-http-benchmark.cjs` to regenerate the interactive `reports/http-archive-benchmark.html` comparison from the JSON. No production capacity estimate follows from this development-host run. - -The current TypeScript baseline fails the large-text fixture with HTTP 500: its Mongoose term array cannot be cloned into the anonymization worker. The benchmark records this known `DataCloneError` as a failed baseline and reports no speedup for it. Other errors or any output mismatch fail the run. A minimal reproduction using the actual repository model confirms that `structuredClone({terms: model.options.terms})` throws while cloning a copied plain array succeeds. The benchmark does not patch that baseline. - -### Regex optimization - -A separate before/after run of the Go implementation measured 920 to 600 ms for sparse replacements and 876 to 454 ms for dense replacements. Allocation volume stayed approximately unchanged on these fixtures. The absent-term fixtures improved by 1.41 to 2.11 times. See `reports/regex-optimization.json` for samples and source hashes. Differences between benchmark runs reflect timing variability; compare versions within the same run. - -The implementation uses a byte lookup table for ASCII letter detection, avoids redundant classification during case folding, and translates fallback rune positions incrementally. The 2.2 MB Unicode fallback fixtures allocated about 16.6 MB per operation instead of 59.8 MB, a 72% reduction. This measures allocation volume, not peak memory. - -Expanded tests also found and fixed five pre-existing output mismatches caused by the fallback library's Unicode word boundaries. Explicit JavaScript-compatible assertions restore the intended output. This correction has a cost: the boundary-bearing fallback fixture took 442 ms versus 385 ms before; the lookaround-only fixture improved from 338 to 262 ms. Regex timeouts, output limits and rule ordering remain in force. - -To compare builds, run `backend/contracts/regex-benchmark.cjs` with `GO_BASELINE_BINARY` and `GO_BENCHMARK_BINARY` pointing to their respective `cmd/benchmark` executables. The script checks output hashes before reporting results. `BenchmarkDenseReplacements`, `BenchmarkFallbackOffsets` and `BenchmarkFallbackLookaround` provide Go profiling targets. - -App token responses are validated consistently at callback, grant persistence and refresh. `contracts/oauth-tokens.cjs` extracts the actual TypeScript exchange function and supplies 33 cases covering token types, lifetimes and upstream statuses. Fractional lifetimes are preserved; values that would overflow Go durations are rejected. Token responses must be complete JSON within 64 KiB. Grant replacement clears stale refresh locks and absent expiry/refresh fields, and invalidates cached repository discovery. Integration tests verify encrypted replacement and that invalid responses leave the existing credential revision unchanged. HTTP callback tests cover new and existing accounts, signed-session rotation, replay, cross-session state, expiry, cancellation, wrong callback type and changed authenticated/upstream identities. GitHub numeric IDs retain JavaScript’s decimal string format rather than scientific notation for ordinary large IDs. Username reuse alone cannot link a different upstream identity. Refresh tests cover concurrent callers sharing one token rotation, revocation and newer login winning over an in-flight refresh, and cancellation releasing only its own lock. GitHub API requests and token exchange have a 20-second deadline. `contracts/github-responses.cjs` checks 44 status/header combinations against the actual TypeScript client, including an empty `Retry-After` header. Malformed, trailing and oversized API JSON responses are rejected with stable errors; response bodies are closed without exposing their contents. Refresh-lock cleanup uses a separate five-second context so request cancellation does not strand the lock. These tests use synthetic tokens and a mocked upstream; live OAuth/App callback validation remains a staging requirement. - -Signed GitHub webhooks accept bodies up to 2 MiB. Installation IDs must be JSON numbers within JavaScript's safe-integer range; numeric strings, fractions and unsafe integers cannot change installation state. Authorization-revocation events ignore missing or falsy sender IDs and reconcile every matching account, without the former 100-account cap. Isolated database tests cover signature tampering, foreign App IDs, deletion blocking, the body-size boundary and replay across 101 working grants. - -Installation reconciliation shares one implementation between webhook delivery and background retries. Successful reconciliation updates account ID, login and type, applies JavaScript truthiness to suspension state, records the check time and replaces the pending revision. The update requires the original revision, so replayed responses and responses arriving after a newer deletion cannot restore access or overwrite metadata. Database tests cover these races and verify that upstream failures, foreign App responses and missing account objects leave the installation blocked and pending. - -App-grant reconciliation replaces the revision when revoking a grant and never clears a concurrent revocation. When reconciliation refreshes a token, successful verification clears the pending flag on the revision carrying that exact token; it does not leave the refreshed grant inaccessible until the next retry. Database tests cover working and rejected tokens, refresh success/failure, upstream outages, a newer login during verification and concurrent revocation with or without a revision change. - -`contracts/webhook-http.cjs` executes the actual TypeScript webhook router through Express and records 78 HTTP contracts. Go tests compare statuses and JSON errors for malformed and primitive JSON, event-specific null handling, content types, disabled Apps, invalid signatures and the exact 2 MiB boundary. Oversized bodies return 413. Parser-generated HTML error pages are not reproduced; Go returns structured JSON errors. Compressed webhook bodies support gzip, deflate, Brotli and Zstandard. Signature verification uses decompressed bytes, with a 2 MiB output limit. Tests include corrupt/truncated streams, compressed-byte signatures, unsupported encodings and exact decoded-size boundaries. Go additionally limits wire input to 8 MiB and Zstandard decoder memory/window to 32 MiB. Brotli uses the pure-Go `github.com/andybalholm/brotli` decoder; Zstandard uses the existing `klauspost/compress` dependency. - -The GitHub connection summary selects GitHub credentials explicitly, so additional providers cannot hide those grants behind a credential-list limit. Repository and pull-request summaries include all matching records rather than stopping at 10,000, while other providers remain excluded from GitHub migration controls. OAuth connection state reads the stored encrypted token, matching TypeScript; malformed envelopes fail instead of appearing connected. App failures retain safe API error codes and suspension flags use JavaScript truthiness. Database tests cover twelve unrelated provider grants, 10,001 records of each resource type, foreign/removed/other-owner exclusions, upstream failures and malformed credentials. - -Connection summaries project only display fields and stream resource rows into the response, avoiding a second slice of complete database documents. Credential-state reads select provider/revoked fields; stored-token reads select only the encrypted access token. A MongoDB command monitor checks the actual replies during the 20,002-resource test and verifies that large synthetic payloads, duplicated source tokens and private binding metadata are absent. This reduces unnecessary data transfer and decoding; it is not an end-to-end throughput benchmark. - -GitHub connection migration resolves existing App bindings by immutable repository ID, verifies commits/PRs at the resolved name, and saves renamed sources. Shared repository names/URLs update only when their cached external ID matches. Preview requests leave both resource and cache records unchanged. Stale PR downloads become eligible after five minutes; fresh downloads remain busy. Migration compares the original BSON source and full binding, preserving embedded-field order and rejecting concurrent binding changes even without a revision bump. Integration tests cover public-read renames, replacement identities, previews, stale/fresh PRs, status-date races and strict ID types. Other providers remain excluded from this GitHub-specific operation. - -App installation flows can suggest a private repository using an existing OAuth grant, falling back to the App user grant when OAuth is absent. Existing owner installations lead to organization/user settings; new installations receive suggested owner and repository IDs. Invisible repositories fall back to the generic installation page. Setup callbacks consume and persist removal of state before validation, reject repeated state/installation-ID query values, and clear discovery data only after a valid owned flow. Tests cover settings targets, suggestions, fallback credentials, wrong owners, expiry, replay, repeated parameters and navigation-only callbacks without state. Upstream installation responses remain mocked; live browser/App setup is a staging gate. - -App OAuth flows persist installation intent and the validated repository suggestion in their session-bound state. Successful callbacks redirect to installation using that saved intent; callback parameters cannot replace it. App login defaults to `/connections` for authenticated users and `/dashboard` for anonymous users. Repeated state/code parameters are rejected before token exchange, and disabling new App connections blocks their callbacks. Database/Redis integration tests cover these round trips, default/unsafe return destinations, repeated query values and consumed state on rejected callbacks. - -App OAuth profile validation has 28 contracts extracted from the actual TypeScript callback predicate. GitHub profile IDs must be JSON safe integers, and login values must pass the same truthiness check before account lookup. Numeric strings, fractional/unsafe IDs and falsy logins return `github_app_reconnect_required` (403). Callback integration tests verify that each rejected profile leaves the user collection and grants unchanged, does not authenticate the session, and consumes its OAuth state, including a numeric-string ID matching an existing account. - -Repository connection selection uses TypeScript's stored OAuth-token semantics and returns `github_oauth_required` when that grant is missing. Public App repository IDs must be JSON safe integers before binding or reauthorization; strings and fractional IDs cannot pass through numeric coercion. Persisted bindings accept BSON integer representations but reject malformed IDs, and public-read bindings reject any installation-ID field, including explicit null. Integration tests cover missing/corrupt OAuth grants, stored-token selection, safe-integer boundaries, malformed upstream/stored identities and changed identities during public reauthorization. - -Installation-token access retries pending installation reconciliation before checking blocked state, matching TypeScript's recovery path. Minted tokens require a nonempty string token and a parseable expiry; invalid responses are neither returned nor cached. The cache resets at 1,000 entries and reuses tokens only when more than a minute remains. Integration tests verify retry-on-access, durable state after upstream failure, per-read user authorization on cache hits, installation blocks, scoped permissions, invalid issuance responses and cache capacity/expiry. Non-string token/expiry fields are rejected explicitly rather than coerced. - -Conference listings and member views no longer silently truncate at 10,000 records, and removal processes members beyond the former 100,000-row limit. Capacity integration tests create 10,001 conferences and 100,001 members, checking complete unique output, expiry of the final conference, and cleanup of the last member despite partial failure from preceding archived members. These limits are separate from the explicit per-repository file-count bound. - -Conference listings discover pending membership transitions in bounded batches of up to 500 IDs, projecting only transition endpoints. Only affected conferences run the existing guarded replay and reload path. A command-monitored 10,001-conference test requires 22 `find` commands when no transitions are pending. Additional checks replay a transition across batch boundaries, preserve original billing timestamps and leave unrelated pending events untouched. This is a database-query-count improvement, not a production latency benchmark. - -Failed-job retries capture the complete selected snapshot using projected job metadata, prepare each eligible resource, and transition jobs individually with a failed-state guard. A resource or job write failure does not stop other retries; returned counts include only successful transitions. Jobs becoming active remain active, and failures arriving after the snapshot are left for a later retry. Integration tests place a valid preparation job beyond 100,000 earlier records, inject database validation failures, and verify resource state, active-job isolation, action isolation and snapshot boundaries. Unsupported preparation kinds remain failed rather than being reported as successfully retried. - -## Compatibility decisions and remaining validation - -MongoDB document formats, AES-GCM envelopes, session signatures, Redis session keys, immutable GitHub identity bindings and maintenance-token scopes are retained. New jobs use a separate MongoDB `gojobs` collection. The offline handoff tool imports existing BullMQ jobs through its public API; Go runtime workers do not read BullMQ Redis internals. Staged tree publication uses revision checks, and maintenance retries cleanup and pending webhook reconciliation. - -The following differences are deliberate or require staging review: - -- Plaintext legacy GitHub tokens are not read. Complete the existing credential migration before cutover. -- An unbound legacy account is not linked automatically by matching its GitHub username. Existing authenticated owners need an administrator-verified identity recovery procedure. The old username-only linking behavior is unsafe. -- Repository claims require upstream admin permission or existing local ownership; public read permission alone is insufficient. -- Markdown project pages use the existing browser renderer in a sandbox without `allow-same-origin`. Rendering now requires JavaScript; a plaintext fallback is provided. -- Go file ETags use a separate namespace. Existing caches will revalidate. Archive contents are generated afresh; compressed ZIP bytes and timestamps are not expected to match Node. -- Regex terms are limited to 1,000, each at most 8,192 bytes. General regex matching rejects more than one million matches. API-specific term limits can be stricter. Oversized inputs fail rather than silently returning partial output. -- Runtime/performance administration reflects the Go process and worker pool. It does not recreate Node process metrics or every historical per-route/per-stage series. The Linux overview supplies the existing browser fields for normalized one-minute CPU load, host memory, process RSS and root-filesystem usage. These preserve the TypeScript host-level meanings; they are not container quota utilization. Unsupported platform measurements are null. The overview also preserves rolling 24-hour active/new repository and new-user counts using the same timestamp fields as TypeScript, regardless of resource status. Integration fixtures cover recent, old and missing dates, including recently created removed repositories. -- Repository membership changes carry a durable `conferenceMembership` event until both conference histories are updated. Drain these events before rollback to Node; Node does not replay them. Existing histories are preserved rather than inferred from repository status. -- Existing repository rename/reconnect cases, legacy cache retirement, account recovery, conference billing, all admin filters, browser rendering and exact error/output parity are not exhaustively validated. These are production cutover gates, not covered by the route dispatch test. - -Conference option persistence has 58 contracts from the actual TypeScript form helper and Mongoose schema. Boolean and string casts, null/empty dates, omitted or empty options, unknown fields and rejected types are checked through Go unit tests and HTTP/database tests. Non-owner responses retain the option representation and omit billing. Conference form validation has 121 contracts extracted from the TypeScript validator. Both creates and edits validate plans and required billing fields in the same order. Editing restores `ready` status and preserves the saved ID, owners, plan, billing and repository history. HTTP integration tests cover rejected edits without mutation, edits of ready/expired/removed conferences, creation and method-specific missing-conference errors. An additional 54 actual TypeScript/Mongoose contracts verify start/end Date construction and persistence. Legacy date strings, overflow dates, arrays, numeric milliseconds and coercion failures use the shared JavaScript date parser. Expiration options follow Mongoose casting, including numeric strings outside the year range and rejected booleans. Invalid stored dates/options return the TypeScript save error, 500 internal_error, without mutating the document. ISO date-only input is parsed as UTC. Listing conferences expires overdue ready conferences before returning, as in TypeScript. Expiry uses open membership records, overrides repository-level `never` expiration, and preserves already inactive statuses and timestamps. Integration tests cover ten repository states and closed or absent membership records. Conference removal waits for file, path-index and storage cleanup before returning. It attempts all open members, preserves archived repositories and closed memberships, and reports partial failure while keeping the conference removed. Tests cover owner authorization, synchronous cleanup, partial failure and repeated removal. History reconciliation preserves BSON document order in its compare-and-swap guard. `contracts/conference-output.cjs` adds 288 exact output cases from TypeScript, covering fractional rates, closed and open intervals, future additions/removals, conference-end caps, missing rates and long date ranges. Billing uses JavaScript millisecond arithmetic and operation order, including null for non-finite totals. Year 0001 is a valid conference end or membership removal date, not a missing-date sentinel. HTTP/database expiry and removal checks preserve memberships closed at year 0001 or the Unix epoch. Repository saves update membership history immediately for any provider. Joining opens an entry, switching closes the prior entry, leaving records a removal date, and rejoining resets the first existing entry as TypeScript does. An unchanged conference preserves its billing date and does not prevent settings edits after the conference expires. HTTP/database tests cover these transitions. A pending membership event is saved atomically with the repository revision. Failed history writes are replayed on later saves, conference reads or maintenance using the original timestamp. Strictly increasing save timestamps and event IDs protect newer transitions from stale replay. Fault-injection integration tests reject conference writes, recover both histories without shifting billing dates, and verify that delayed replay cannot undo a later move. Pending events have a sparse index. - -Admin list filters have 111 contracts extracted from the TypeScript route handlers. They cover literal search escaping, owner/conference/date filters, status flags and query output shape. Unknown owners return no repositories. Conference status flags apply, and the repository preparing filter includes preparing/downloading entries. Storage totals appear only on repository responses. HTTP integration tests cover status selection, unknown owners, administrator access and credential exclusion. Another 138 TypeScript contracts cover pagination and sorting. Admin lists parse extended query values with JavaScript integer-prefix and Number rounding behavior, including signed decimal/hexadecimal values and arrays. Page numbers no longer have the former one-million cap. Limit retains TypeScript's upper bound of 1,000. Negative limits use MongoDB's single-batch find behavior for repository/conference lists and fail for the user aggregation. Negative skips fail instead of silently using a default. Sort/direction/CSV selection require scalar values as in TypeScript. The sort pattern is compiled once and rejects operator-prefixed fields and trailing newlines. HTTP tests verify ordered pages, bracketed values, large pages, invalid MongoDB pagination, administrator access and CSV bypass of pagination. Extended filters retain distinct find/count and aggregation semantics, covered below. CSV exports have 45 exact TypeScript output contracts covering empty/minimal rows, leading whitespace, quotes, commas, line breaks, Unicode, dates and numeric formatting. Go matches the empty repository header, filename quoting and lack of a trailing newline. Exports retain the 50,000-row limit and credential exclusion. - -User repository membership has 12 contracts extracted from TypeScript. Owner, stable GitHub coauthor identity and legacy username entries with absent/null/empty IDs are shared by user lists, dashboard queries and admin user repository lists. Legacy fallback uses one matching coauthor entry and does not override a conflicting stable ID. User repository/gist/PR lists and admin user repository lists mark overdue ready rows as expiring, then reload affected records. Integration tests cover coauthor visibility, inactive states, a concurrent expiration extension and deletion. - -Admin account mutations have HTTP/database coverage for missing users, non-admin denial, immediate promote/demote effects, ban/activation and removed-account activation. Banning attempts every eligible owned repository and continues after individual update/enqueue failures, reporting only successful queue submissions. Failed enqueues retain `removing` for retry; already removing/removed repositories and coauthor-only resources are excluded. Activation changes status without reconstructing erased identity data or tokens. A MongoDB queue validator injects failure to verify partial-success behavior and cleanup retry. - -Admin user details populate cached repository references in their saved order, preserve duplicates and omit missing references. Eight contracts use the actual TypeScript serializer and Mongoose population/defaults. Responses include identity metadata, saved defaults, project names and token-use dates while excluding tokens and credential envelopes. Contracts cover null/default metadata; HTTP tests cover authorization, populated output, provider identity and non-mutating reads. Cached repository metadata now records its provider in `source`, preventing new non-GitHub records from receiving the GitHub display default. - -Saved user defaults have 38 Mongoose update-cast contracts and four read contracts. They cover scalar/array terms, string and boolean casts, nulls, omitted defaults and unknown fields. The defaults endpoint retains its schema’s string-valued `page`, separately from repository option validation. HTTP tests compare stored values and subsequent reads and verify that rejected casts leave prior defaults unchanged. The signed-in profile omits an absent photo and retains an explicit null photo. - -Quota accounting has 40 cache-validity contracts and an exact selection-filter contract from TypeScript. It counts owned, ready, non-expired repositories, uses valid positive-file or computed-empty caches, and aggregates uncached file sizes in one MongoDB query across current tree generations. Results are cached only while status, tree generation and file-metadata revision still match. Integration tests cover cached/uncached and empty sizes, expired/other-owner exclusions, legacy trees, repeat reads and stale-cache-write rejection. - -GitHub user search uses TypeScript's two-UTF-16-unit query minimum. Regression tests cover ASCII, accented characters, CJK, combining characters and supplementary-plane characters, and verify that short queries return an empty array before credential lookup or upstream access. - -Combined GitHub discovery preserves OAuth ordering and lets App metadata replace duplicate IDs without moving their positions. Any App discovery failure discards all partial App results and permits independently connected OAuth discovery; without OAuth, the failure is returned. This fallback applies only to discovery, never resource authorization. Database integration tests cover both connections separately and together, installation and repository failures, partial-result rejection, suspended/foreign installations and connection-specific credentials. Pagination limits return an error instead of silently returning an incomplete list. OAuth-only discovery reuses saved repository references unless the list is empty or `force=1` is requested. It reuses existing metadata rows, returns fresh metadata on refresh, omits missing references, and preserves an existing list on upstream failure. A discovery revision prevents in-flight responses from undoing grant replacement, disconnect or account removal. Cache integration tests cover these transitions, including invalidation during a fetch. Existing metadata is loaded in one query; only new rows require inserts. - -Coauthor management applies method-specific permissions: list access uses owner/coauthor/admin membership, adding requires owner/admin, and removal also permits the matched coauthor's stable identity or legacy username. Unauthorized mutations return 401; unauthorized reads return 403. HTTP tests cover inactive repository states, case-insensitive repository lookup, stable-ID and legacy self-removal, absent targets and persisted response output. Stable IDs prevent reused usernames from claiming another identity. Mutation guards preserve the original BSON array so embedded field order does not produce false concurrent-update conflicts. - -Admin API-token names have 22 contracts extracted from the TypeScript route, including falsy defaults, array/object stringification, JavaScript whitespace, long names and rejected shadowed `toString` properties. Token lists reload current records so the response includes the request's last-used timestamp. Creation and listing return `user_not_found` if the account disappears after authentication. Integration tests verify hash-only storage, plaintext disclosure only on creation, admin-only access, immediate revocation, repeated deletion and malformed-ID error parity. - -Private project names have 37 contracts extracted from TypeScript's validator. Inputs require strings, lengths use UTF-16 units, and trimming/control-character rules match JavaScript. Naming requires membership in the user's dashboard, including stable-ID repository coauthors; admin access alone does not grant membership. HTTP/database tests cover separate names for owner and coauthor, denial for unrelated admins and document coauthors, exact artifact-ID matching, list expiry, and clearing both the user map and dashboard-name record. Names remain outside shared artifact records and the handler does not depend on the source provider. - -Dashboard-name reconciliation streams existing names and artifact-ID projections, with MongoDB writes in batches of 250. It has no collection-size cap and does not load artifact bodies for backfill. Integration tests reconcile 603 private names across batch boundaries, repair stale entries, backfill missing entries, repeat safely, recover an empty-map clear and preserve other users' names. Membership includes stable-ID repository coauthors and excludes unrelated artifacts. A process-local cache matches TypeScript's five-minute TTL after completion and 64-entry FIFO bound. Concurrent requests share in-flight work, failed calculations can be retried, and successful private-name writes invalidate the cache before the dashboard-name write. Tests cover TTL, capacity, concurrency, cancellation, panic cleanup, in-flight invalidation, cached database reads and refresh after invalidation. - -Dashboard cursors have 1,968 contracts evaluated through the actual TypeScript pipeline builder. Non-date sort values must be strings or numbers; objects cannot enter MongoDB predicates. Sort and tie-break types are checked without coercion. The decoder accepts padded/standard base64 and whitespace as Node does. Date values normalize supported ISO strings, numeric milliseconds, null and booleans before querying. HTTP tests exercise the contracts and page through provider-independent repository records without duplicates. Dashboard date strings now use the shared ISO/legacy parser verified against the installed TypeScript pipeline; dashboard filters have 28 contracts evaluated through the TypeScript pipeline and BSON serializer. Search uses JavaScript whitespace and a 256-UTF-16-unit bound, including replacement of a split surrogate when encoded for MongoDB. Repeated query values follow TypeScript string/array semantics. HTTP tests cover Unicode search boundaries, literal regex characters, repeated filters and provider-independent repository data. Emitted cursors have 28 exact-byte contracts from the TypeScript encoding expression, including field order, HTML characters, literal backslashes, Unicode line separators, numeric values and millisecond dates with extended years. HTTP pagination compares emitted cursors with TypeScript-generated fixtures. Dashboard page limits have 53 contracts extracted from both TypeScript pagination expressions. Go matches flooring, clamping, defaults, radix and exponent syntax, repeated query values and JavaScript whitespace. HTTP tests verify each case's page size and continuation behavior. - -The dashboard aggregation builder has 2,103 complete-pipeline contracts from the actual TypeScript function. They compare projections, owner membership, private-name lookup, expiry, attention, sort fallbacks, filters, cursor predicates, facets and page bounds together. Multi-key sort order is checked separately so JSON object comparison cannot hide an ordering change. Raw query fixtures also cover indexed arrays, nested objects, malformed escaping and string-conversion failures. The handler preserves JavaScript truthiness, strict scalar attention checks, native array type filters and invalid empty-array cursors. The HTTP handler uses this tested builder; database integration tests continue to exercise execution and pagination. These contracts cover their supplied query cases, not every possible legacy date string or malformed stored record. - -Legacy user resource lists and the admin user-repository view return the complete membership set, matching TypeScript rather than silently stopping at 10,000 rows. Database integration tests create 10,001 records for each resource type and verify unique results, private-name output and expiry beyond the former boundary. The repository case includes a stable-ID coauthor record and checks the admin view as well. The separate dashboard endpoint retains its bounded cursor pagination. - -Account removal scrubs duplicated legacy credentials from every owned artifact, including already-removed tombstones, without rewriting their removal timestamps. An isolated database integration test makes both upstream grant revocations fail and verifies mandatory local deletion of all provider credentials, private names and the session, plus profile anonymization and token removal. Other owners' records and shared organization installations remain unchanged. Owned content is removed synchronously in repository/PR/gist order before grant revocation and account anonymization. Archived repositories stop deletion with the account still active. Storage failures leave a durable removing state and preserve the account, grants and session for retry. A second isolated integration test injects a closed-storage failure, retries cleanup, verifies file/path-index and embedded-payload removal before revocation, and preserves coauthor-only repositories. These fixtures do not establish production storage or live upstream revocation compatibility. - -Embedded-document cleanup has eight contracts executing the actual TypeScript `resetSate` methods. Gist removal/expiry clears files, comments, description and owner login while retaining visibility and dates. Pull-request cleanup clears body, title, diff, comments and base/head repository names, resets state/draft/merged flags and removes the merge date while retaining other metadata. Database tests apply each contract to both removal and expiry, including provider-specific metadata, and check repeated cleanup. - -Grant revocation reads the stored encrypted token directly, including expired or revoked App grants, without attempting refresh. Missing grants still clear local connection state. Upstream deletion has a 20-second deadline; 2xx, 404 and 422 permit local cleanup, while other statuses and transport failures preserve the local grant. Integration tests cover both OAuth and App grants across these outcomes, response-body closure, discovery-cache invalidation and isolation of OAuth fields during App disconnection. Legacy plaintext grants must be migrated before cutover as described below. - -Queue administration and workers share the same action groups, including expiry in the remove queue. Controls use opaque job IDs and retain each job's resource kind and provider-independent action. Missing jobs return 404 and active retries return 409. Single removal and forced queue emptying also remove active records, matching TypeScript; they do not cancel work already running. Worker lease checks prevent an old completion from updating a replacement queue record. Drain includes waiting and delayed jobs. Listings select up to 200 jobs per state, prioritize active work, and search both IDs and names. Integration tests cover these behaviors, document retries and cross-queue isolation. Queue storage remains separate from BullMQ and requires the cutover procedure below. - -GitHub installation, repository, branch and document-comment pagination uses a shared cancellable visitor without the former 1,000-page ceiling. App endpoints stop on a short page or an access-selection match. OAuth repository lists, branches and comments follow the next `Link` exactly, including opaque cursors and short or empty intermediate pages. A full page without a next link is final. HTTP 409 produces an empty page for these Octokit-backed lists only. The existing per-response byte limit still applies. Failed list requests do not publish partial results. Unit tests exercise page 1,001 for bare arrays and both App response envelopes, exact page boundaries, cancellation, early matches and upstream errors. Database tests select repositories beyond that boundary by name and immutable ID, verify that installation revocation still wins, and reject late upstream failures without falling back to public access. Another 38 contracts execute the installed Octokit paginator and compare returned IDs and requested URLs, including whitespace and relation parsing. Pagination links must use HTTPS on `api.github.com`, without user information, custom ports, fragments or unsafe paths; tests reject credential redirection attempts before a second request. These pagination details remain inside the GitHub adapter; other providers implement their own discovery protocol. - -## Isolated shadow rehearsal - -`compose.shadow.yml` runs a separate Go application, MongoDB, Redis and repository volumes on the development/backup server. It does not share production data, sessions, encrypted credentials, jobs or caches. The application and databases use an internal Docker network with no outbound access. A fixed-upstream Nginx gateway exposes only `127.0.0.1:5001`. Database ports are not published. This is an isolated rehearsal, not automatic production traffic mirroring. - -From the repository root: - -```sh -node backend/scripts/init-shadow.cjs -docker compose --env-file .env.go-shadow -f backend/compose.shadow.yml up -d --build --wait -node backend/scripts/check-shadow.cjs -``` - -The initializer creates owner-readable shadow-only secrets and preserves existing values on subsequent runs. `.env.go-shadow` is Git-ignored. The check first verifies network, storage, credentials and port isolation, then seeds a synthetic `shadow-demo` archive and checks nine exact anonymized responses, a ZIP response and public route/authentication behavior. View it at `http://127.0.0.1:5001/r/shadow-demo/`. From another computer, forward a local port over SSH to this server, for example `ssh -N -L 5001:127.0.0.1:5001 USER@SHADOW_SERVER`. - -Both GitHub login methods are disabled in the base stack. For the public beta deployment, `compose.shadow-beta.yml` enables legacy OAuth, secure cookies, the `https://beta.durieux.me/github/auth` callback and an outbound network for the Go application. MongoDB and Redis remain on the private network. Its gateway preserves HTTPS forwarding from Caddy, and Go trusts the two proxy hops. GitHub App login remains disabled. - -The beta OAuth client ID/secret are stored as `SHADOW_CLIENT_ID` and `SHADOW_CLIENT_SECRET` in `.env.go-shadow`; they are separate from production credentials. Keep using the overlay when restarting this deployment: - -```sh -docker compose --env-file .env.go-shadow -f backend/compose.shadow.yml -f backend/compose.shadow-beta.yml up -d --wait -node backend/scripts/check-shadow.cjs --beta -``` - -`shadow-beta.caddy` is installed at `/etc/caddy/conf.d/anonymous-go-beta.caddy` on this server. It routes beta to the loopback gateway and adds `X-Anonymous-Deployment: go-shadow-beta` so propagation can be checked without guessing from page appearance. The beta DNS previously reached the production origin; it was moved to this server for isolated testing. Production's application, callbacks and data are unchanged. The public demo is `https://beta.durieux.me/r/shadow-demo/`. The user completed legacy OAuth authorization. The resulting active account and live GitHub repository access have been checked. Production accounts and repositories are not imported into beta. - -`node backend/scripts/check-shadow-auth.cjs --bootstrap-admin` is a mutating beta check, intended only after explicit authorization to promote the sole active GitHub beta account. It verifies the isolated containers and database before granting admin access and adding a hashed temporary API key. It checks authenticated endpoints, API key issuance and revocation, secure session cookies, cookie-only authentication and logout invalidation, live provider discovery, repository creation and worker completion, exact anonymized README and ZIP output, removal and denial of removed content. ZIP verification uses Python 3 standard-library CRC and archive checks. Keys remain in memory and are revoked during cleanup; the account remains an admin. The script refuses ambiguous account selection and records sanitized results in `reports/shadow-authenticated-deployment.json`. It does not test private repositories, GitHub App installation flows, production-data migration or production rollback. - -The beta GitHub App overlay is `compose.shadow-app.yml`, applied after both shadow files. It enables App login alongside legacy OAuth, mounts `secrets/github-app-beta.pem` read-only and reads the `SHADOW_GITHUB_APP_*` settings from the ignored `.env.go-shadow`. The key is owned by runtime UID 10001 with mode 0400. Start this configuration with `docker compose --env-file .env.go-shadow -f backend/compose.shadow.yml -f backend/compose.shadow-beta.yml -f backend/compose.shadow-app.yml up -d --wait`. Use `node backend/scripts/check-shadow.cjs --app` for isolation, redirects and public output; add `--app` to the authenticated check for this deployment. These checks permit only the exact read-only beta key bind mount in addition to shadow volumes. Omitting the App overlay on a later `up` disables App login again. - -App 5594414 (`anonymous-github-beta`) authenticated successfully with its signing key. Its initial installation list was empty. Configure the App callback as `https://beta.durieux.me/github/app/callback` and webhook URL as `https://beta.durieux.me/github/app/webhook`. The webhook secret is stored as `SHADOW_GITHUB_APP_WEBHOOK_SECRET` in `.env.go-shadow`; configure that same value privately in GitHub. Signed local ping admission does not prove GitHub webhook delivery. The latest App deployment evidence and remaining user authorization/installation steps are in `reports/shadow-app-deployment.json`. - -The App was subsequently installed and authorized. `node backend/scripts/check-shadow-auth.cjs --bootstrap-admin --app-flow` explicitly selects `github-app` for the public `tdurieux/synctex-js` fixture, verifies the persisted App binding, compares its anonymized LICENSE with the immutable upstream source, checks ZIP CRC and the exact LICENSE entry, and removes the test resource. Results are in `reports/shadow-app-authenticated-deployment.json`. The live installation webhook initially returned 401 because GitHub had no signing secret. Setting the GitHub-side secret to match beta and retrying that delivery returned 204; Go persisted an unblocked installation with reconciliation complete. Private repositories and live revocation/suspension transitions have not been exercised. - - -For a later replay phase, first prepare sanitized fixtures with private bindings, tokens, account identities and pending jobs removed. Replay an explicit list of public read requests into the isolated stack and compare decoded output and latency. Do not mirror login callbacks, webhooks, uploads, authenticated requests or writes. Even public reads can update view counters or enqueue refresh work, so a shadow must never point to production MongoDB, Redis or writable repository storage. - -Stop this stack with `docker compose --env-file .env.go-shadow -f backend/compose.shadow.yml stop`. Its named volumes remain available for the next rehearsal. No production service needs to stop. - -## Default deployment - -The root `Dockerfile` and `docker-compose.yml` run Go. The API handles file streaming and background jobs in the same service; no Node streamer is needed. Browser assets still build with Node. The runtime uses UID 10001, a read-only root filesystem, a writable temporary filesystem, dropped capabilities and a 45-second shutdown grace period. Prepare repository-storage permissions for UID 10001 before startup. Shared-cache paths need writable mounts too when configured outside repository storage. - -For a new installation, configure `.env`, create storage with `install -d -m 0750 -o 10001 -g 10001 repositories` using an account permitted to set ownership, and run `docker compose up -d --build`. Use `APP_ENV_FILE` and `REPOSITORIES_DIR` to select another environment file or storage directory. The default exposed port is 5000. HTTPS is required with the default secure session cookies; set `COOKIE_SECURE=false` only for local HTTP development. - -For an existing installation, complete the cutover checks below first. The separate `backend/compose.yml` remains available for a staged proxy switch on port 5001. To use the root stack instead, stop the Node API and all streamers with `docker compose -f docker-compose.node.yml stop anonymous_github streamer`, then start `docker compose up -d --build anonymous_github`. Keep the same Compose project name so database volumes and networks remain attached. This does not remove stopped streamer containers. - -After building the image, run `python3 backend/scripts/test-deployment.py anonymous-github-go:local` to rehearse the root Compose configuration. The test uses synthetic credentials, random loopback ports and disposable volumes. It checks startup, runtime permissions, static routes and graceful shutdown without accessing deployment data. CI runs the same check. - -The preserved Node configuration is `Dockerfile.node` with `docker-compose.node.yml`; its image tag is separate from Go. It uses Debian for both dependency installation and runtime so native MongoDB compression modules load correctly. CI builds the rollback image and checks Zstandard and SQLite at runtime. After completing the rollback data checks below, build/start it with `docker compose -f docker-compose.node.yml up -d --build anonymous_github streamer`. Stop Go first. GitHub App mounts use `docker-compose.github-app.yml` for Go and `docker-compose.node.github-app.yml` for Node. - -## Cutover - -1. Take restorable MongoDB, Redis and repository-storage snapshots. Rehearse restoring them to an isolated staging environment. Keep staging OAuth callbacks and webhooks separate from production. -2. On the staging copy, run the existing Node credential migration verifier. If legacy credentials remain, follow that tool's maintenance-mode procedure while all writers are stopped. Do not print key material or tokens. -3. Validate startup against the copied indexes and data, FS/S3 permissions for UID 10001, OAuth and App callbacks, session continuity, token scopes, revocation, representative large repositories, Git LFS, uploads, PRs, gists, conferences and browser project pages. Compare JSON and file output for representative production fixtures. Benchmark complete HTTP requests and memory under expected concurrency. -4. Before production cutover, block new writes, then either drain BullMQ or use the offline handoff below. Stop the Node API, all streamers, workers and scheduled writers before switching runtimes. Do not run both job implementations against the same data. Keep MongoDB, Redis and backup services running. Do not use `down --volumes` or `--remove-orphans`. -5. Set `GO_BACKEND_NETWORK` to the existing database Docker network and `GO_ENV_FILE` to the environment file. Grant UID 10001 access to repository storage using your existing ownership/ACL policy. Check configuration without printing interpolated secrets using `docker compose -f backend/compose.yml config --quiet`. -6. Start with `docker compose -f backend/compose.yml up -d --build`. The default listener is localhost port 5001. Verify health and authenticated/public smoke tests before switching the reverse proxy. Reopen writes only after the checks succeed. - -The Go image can also run behind the existing load balancer without Compose. All replicas must share MongoDB, Redis, credentials and repository storage. `/healthcheck` verifies the HTTP process; it is not a database readiness probe. - -## Rollback - -Stop Go and its workers before starting Node. For a lossless rollback after Go has accepted writes, drain pending `conferenceMembership` events, inspect pending `gojobs`, reconcile resource states, and enqueue corresponding work through Node's supported queue APIs. Never edit BullMQ Redis internals. Preserve the new file generations and encrypted credentials. The browser renderer remains compatible with the existing asset build. - -A snapshot rollback discards writes accepted after the snapshot. Choose that only as an explicit recovery decision. Rehearse rollback in staging, including private names, conference histories, newly published trees, removal jobs and sessions. Do not assume changing the container image alone reverses data changes. - -### Cache telemetry - -`CACHE_MONITORING_ENABLED` defaults to true. Go records provider-independent source cache hits, misses, fills, stored bytes, fill waits, admission bypasses and failures. Per-repository raw-cache reads use TypeScript's `legacy_source_hit` and `legacy_source_miss` labels and byte counts. Shared-cache reads use `source_hit` and `source_miss`, so the report does not mix the two cache paths. Request traffic is classified as file, website, ZIP, monitor or background; client-supplied telemetry labels are ignored. Events contain no paths, repository names, IDs, tokens or anonymization terms. - -Recording uses a mutex-protected buffer capped at 512 minute/event/traffic groups. A worker flushes every five seconds with a three-second database deadline. MongoDB aggregates counts across instances; TTL indexes retain minute data for 48 hours and hourly data for 30 days. The admin report flushes local pending events, supports the same 15-minute, one-hour, one-day and seven-day windows, and sends `Cache-Control: no-store`. Concurrent flushes return an unavailable report instead of accumulating blocked requests. Failed batches are discarded without replay; the dropped count is a conservative upper bound if a write partially succeeded. Graceful shutdown flushes pending events. - -The report returns the configured shared-cache state, filesystem support and live source/result budget summaries. Statistics remain visible when event monitoring is disabled, matching TypeScript. Missing optional caches produce null summaries; an unreadable cache index returns the generic unavailable response without partial statistics or internal error details. Shared decision and compression events enter the Go metrics buffer. The offline telemetry importer preserves TypeScript history in the Go report. - -To transfer cache telemetry, stop the Node processes that write the shared cache and flush their pending metrics before shutdown. Use the original `telemetry.sqlite` with its adjacent WAL files, or a consistent SQLite backup. Copying only the database file while writers are running can omit committed history. Run from the repository root with its Node dependencies installed: - -```sh -export MONGODB_URI='mongodb://127.0.0.1:27017' -export MONGODB_DATABASE='anonymous_github' -export CACHE_TELEMETRY_FILE='/absolute/shared-cache/telemetry.sqlite' -node backend/scripts/migrate-cache-telemetry.cjs dry-run -NODE_CACHE_WRITERS_STOPPED=1 node backend/scripts/migrate-cache-telemetry.cjs apply -``` - -The dry run validates the full read-only SQLite snapshot and prints row counts and its digest without writing to MongoDB. Apply requires the explicit stopped-writer acknowledgement. Import runs in batches of 500 with a two-million-row limit. A single manifest in `gocacheimports` binds the destination to this snapshot; a different snapshot is rejected. Interrupted runs can be resumed with the same source, and completed replays do not restore expired rows. This imports one deployment's shared telemetry database, not multiple independent histories. Retain the manifest until the migration is retired. - -Imported counters use separate IDs in `gocachemetrics`, so concurrent Go events add to the report without replacing historical totals. Minute/hour buckets, latency buckets, dropped counts and original expiration times are preserved. Only known event and traffic labels are accepted, including TypeScript's `inspected_changed`, `inspected_unchanged`, `inspected_passthrough` and `inspected_binary` events and `legacy_source_hit` / `legacy_source_miss`; health hostnames and process IDs are hashed. The importer leaves SQLite unchanged. The integration rehearsal generates history using the actual TypeScript telemetry module, verifies all four Go report windows, resumes an interrupted import, checks concurrent retries and rejects changed or malformed snapshots. - -### Transformed-file cache - -Text-file requests now reuse successful worker outputs. Keys include a SHA-256 digest of the actual input, matcher version, normalized anonymization options, provider-specific self links, mask, hostname, repository identity and revision. Provider authorization and current repository revision are checked before reading source data and again before returning transformed output, including cache hits. Failed transformations are not cached. - -Each Go process maintains a private temporary directory with a one-hour TTL, at most 128 entries, a 512 MiB retained-data budget and a 128 MiB per-entry admission limit. Identical concurrent requests share one worker result. Existing worker admission limits also bound input spooling and cache-copy concurrency. Cache failures fall back to transformation; malformed or truncated entries are discarded and repaired. Cache reset, removal, expiration and generation cleanup invalidate local entries. Maintenance prunes idle entries, and shutdown removes the directory. Replicas have separate caches; revision checks prevent reuse after a change handled by another replica. - -The cache reports `legacy_result_hit` and `legacy_result_miss` through the admin telemetry endpoint. Integration tests cover byte-identical cached output, changed bytes under an unchanged provider revision, settings changes, reset, revoked access and eight concurrent reads launching one worker. This implements the legacy transformed-output fallback. Shared result-cache decisions are implemented separately below. - -### Worker-cache measurements and cancellation - -Run `go run ./cmd/cache-benchmark` from `backend/` to measure cold and warm worker paths. The command launches the actual isolated worker, runs seven samples per mode, hashes every output, and fails on an output mismatch or a worker launch during the warm phase. Cold samples remove that fixture's cached result before each run. Timings include input spooling/hashing, cache publication or copying, output reading/hashing, and cleanup. - -The recorded development-host run in `reports/transformed-cache-benchmark.jsonl` measured these medians: 60 KB text, 15.13 ms cold / 3.28 ms warm (4.61×); 2 MiB with absent terms, 139.43 / 78.16 ms (1.78×); 2 MiB with replacements, 258.84 / 95.90 ms (2.70×); and 128 KiB JavaScript-boundary input, 58.41 / 6.17 ms (9.46×). Each warm fixture launched zero workers. These are seven sequential samples on a shared development host, not a TypeScript comparison or an HTTP throughput measurement. Provider access, authorization, MongoDB and Redis are excluded. - -Input spooling, cache copying and cache publication check cancellation between reads. Canceled operations release admission slots and remove partial output. An arbitrary blocking `io.Reader` must still supply its own interruption mechanism; network readers retain their request context. Real-worker tests verify that tighter output limits cannot reuse larger cached output, failed transformations are not cached, and mask changes select a different result. - -### GitHub README decoding - -GitHub README previews apply the same `Buffer.from(content, encoding).toString("utf-8")` behavior as TypeScript. Contracts extracted from the actual TypeScript expression cover permissive standard/URL-safe base64, missing padding, ignored characters, invalid UTF-8 replacement, hexadecimal prefixes, UTF-16 unit narrowing and encoding aliases. This decoder belongs to the GitHub adapter; other providers continue returning normalized text through `Discovery.Readme`. - -Invalid encodings and unsupported content shapes become `readme_not_available` (404) at the preview endpoint and do not overwrite a valid cached README. Decoded byte buffers, including array-like allocations and UTF-16 encoding expansion, are capped at 32 MiB (UTF-8 replacement text can be up to three times that size) to prevent a tiny upstream JSON object from requesting unbounded memory. This is an intentional bound beyond Node's permissive Buffer constructor. Integration tests verify decoded HTTP text, cached reads, branch JSON output and cache preservation on decode failure. - -### HTTP response compression - -Eligible API and static responses negotiate Brotli (quality 4), gzip or deflate using the TypeScript middleware's preference rules. Known-length responses below 1 KiB stay uncompressed; unknown-length streams can compress immediately. `Vary: Accept-Encoding` is retained even for eligible responses below the threshold. `Cache-Control: no-transform`, existing non-identity content encodings, HEAD requests and noncompressible MIME types prevent compression. Repository file routes remain excluded, and the GitHub webhook stays before the compression middleware, matching TypeScript's mount order. - -The wrapper streams through bounded compressor buffers, preserves flushing and response-controller access, removes stale content lengths, and propagates cancellation and write failures. It does not buffer an entire streamed response. JSON responses provide their encoded length before header commitment so the threshold applies correctly. MIME compressibility data is generated from the installed `mime-db`, including explicit false entries. - -`contracts/compression.cjs` runs 117 HTTP cases through Express with the actual compression options extracted from `src/server/index.ts`. Go tests compare negotiated encoding, Vary, content length, status and decoded body hashes. Compressed bytes may differ between compressor implementations; decoded output must match. Additional tests exercise static responses through `Server.ServeHTTP`, webhook exclusion, flushing, failed writers, cancellation and HTTP/2. - -### JSON output and conditional responses - -JSON responses now use compact output and strong ETags derived from the transmitted JSON bytes. The shared response path handles GET/HEAD/QUERY freshness, weak validators, validator lists, wildcards, `Cache-Control: no-cache`, and If-None-Match precedence over If-Modified-Since. It strips entity headers and bodies for 204/304 responses and suppresses HEAD bodies. File revalidation uses the same validator matching rules. Authentication, local permissions and provider authorization still run before returning 304; integration tests cover unauthenticated users, strangers and revoked provider access. - -Sixty-six HTTP fixtures run through Express with the application's strong-ETag setting and compare status, body, content type, length and ETag. JSON U+2028/U+2029 handling matches JSON.stringify without changing literal backslash escapes. Go map keys retain deterministic sorting, so tags are computed from Go's actual response order rather than assuming TypeScript insertion order. - -Non-finite numeric values serialize as null. Invalid provider values or cyclic/excessively nested data produce a structured 500 before committing a successful status; internal encoder errors are not exposed. Response normalization caps nesting at 100 levels to bound recursive processing, and custom JSON encoders still receive normal serialization error handling. Maintenance-token creation defers its 201 status until encoding succeeds. Failed network writes abort the response instead of appending an error document to partial JSON. - -Response recovery tracks header commitment beneath compression, including routes that bypass compression. Panics before final headers return a generic 500 and discard stale file/download headers. Panics or route errors after headers abort the connection, matching Express finalhandler, without appending JSON or completing a truncated compressed stream. Real HTTP tests cover plain and gzip streams, explicit aborts, flush-only responses, and recovery after informational 103 headers. Panic values are never included in the error response or request-panic log. - -### Provider quota delays in background jobs - -Preparation jobs that receive a provider quota error enter `delayed` until the reset instant. The admin API reports them as delayed, and maintenance enqueue cannot reset their deadline. Quota delays do not consume the three ordinary failure attempts or increment completed/failed queue metrics. Repository status becomes `queue` with the existing `rate_limited:` message, so the public response retains its retry time. Missing or expired reset times use a one-minute fallback. Resource revision checks protect concurrent removal/reconnect, and job lease checks protect replacement workers. Successful retries clear the quota message and stale job error fields. - -Adapters can return `provider.RateLimitError{ResetAt: ...}` or `provider.ErrRateLimited`; they do not need GitHub-specific job logic. The GitHub adapter supplies reset times from `X-RateLimit-Reset` and `Retry-After`, taking the later valid instant. Its existing public error code stays unchanged. Integration tests exercise repeated quota delays on the last ordinary retry, delayed claim eligibility, stale leases, concurrent removal, successful publication and the actual worker loop with a non-GitHub adapter. - -Go uses a separate queue. Existing BullMQ work can be imported with the offline handoff tool below; starting Go alone does not migrate it. - -### Shared provider quota gates - -`internal/quotagate` stores provider/scoped reset times in Redis and a bounded 2,048-entry local fallback. Scope keys are SHA-256 hashes of an unambiguous provider/scope pair. Redis contains only the hash and reset timestamp. Atomic updates retain the latest reset under concurrent writers; expiry releases scopes automatically. Redis failures preserve observed local limits and permit unknown scopes, matching TypeScript's best-effort quota coordination. Cancellation stops the caller before an upstream request. - -GitHub API, blob and raw-file requests check the gate before dispatch. Quota responses extend it; a known limit returns the existing 429 error immediately, allowing background jobs to release their slot and enter the delayed queue. This differs from TypeScript's in-request sleep: Go does not hold an HTTP request open for a long provider cooldown. Existing resource authorization still runs and a quota gate never authorizes access. Blob quota errors no longer trigger another request through raw fallback. - -App-user scopes survive access-token renewal, installation scopes span repository-scoped token renewal, and App scopes survive JWT renewal. OAuth tokens use their digest as the scope; anonymous calls share the anonymous scope. Credential-to-scope registrations store token digests and are bounded to 2,048 entries. Go uses its own hashed Redis namespace and imports active TypeScript `gh_rate_gate:` records when a credential is used. It checks both the token-hash key and the applicable installation/App-user key, preserving the latest valid reset. Imported records survive in Go after the legacy keys expire or are removed; later TypeScript extensions are picked up on subsequent checks. Legacy records are never changed or deleted by Go, and a shorter legacy delay cannot shorten a Go gate. - -Other adapters can construct `quotagate.New(store.Redis)`, call `Current(ctx, providerID, scope)` before upstream requests, and call `Extend(ctx, providerID, scope, reset)` after quota responses. Choose the scope from server-owned credential/account metadata, not an HTTP caller's scope parameter. Return `provider.RateLimitError{ResetAt: reset}` when gated so the shared job scheduler handles the delay. Distinct providers remain isolated even if their scope strings are identical. - -Tests cover concurrent max-reset updates through real Redis, independent instances, provider/credential isolation, expiry, malformed stored timestamps, local fallback after Redis failure, cancellation, memory bounds, token rotation and suppressed upstream requests. These gates coordinate known limits; they do not serialize requests that were already in flight when the first quota response arrived. - -Legacy quota import needs no credential export or Redis-wide scan. It uses the server's existing authenticated credential binding. Ten contracts execute the TypeScript token-key function and registration scope expressions, covering ordinary credentials, anonymous requests, installations, App users and Unicode tokens. Integration tests seed those exact Redis keys and verify suppressed HTTP calls, import persistence across Go instances and renewed credentials, unchanged legacy values/expiries, max-reset handling, cancellation and expiry. Malformed, noninteger, expired and out-of-range timestamps are ignored. The bridge is one-way: new Go quota observations are not written back into TypeScript's namespace. BullMQ jobs still require a separate handoff. - -### Offline BullMQ handoff - -`node backend/scripts/migrate-bullmq.cjs` defaults to a dry run. Run it from a checkout with `npm ci` dependencies installed. Set `MONGODB_URI`, `MONGODB_DATABASE`, `REDIS_HOSTNAME` and `REDIS_PORT` to the same services and database used by the application. The database name is required explicitly. The command reads the application's three queue names through the installed BullMQ library and never decodes or edits private Redis job records. - -1. Block new writes and take verified MongoDB/Redis/storage backups. Run `node backend/scripts/migrate-bullmq.cjs pause`. It pauses the three BullMQ queues and Go queue controls. Already running jobs are not cancelled. -2. Let active jobs finish, then stop all Node and Go producers, workers, streamers and scheduled writers. A paused queue still accepts new jobs, so pausing alone is insufficient. The tool checks for connected BullMQ workers, active Go jobs and unpaused queues; those checks cannot prove that every external producer has stopped. -3. Run `node backend/scripts/migrate-bullmq.cjs dry-run`. Review the job counts, resource-transition count and source digest. No job/resource/checkpoint documents are written by a dry run. Resolve conflicting existing Go work before applying. -4. Run `node backend/scripts/migrate-bullmq.cjs apply`. Require a successful exit and `complete: true`. If interrupted, keep both runtimes stopped and rerun the same command. A process killed outright can retain its migration lock for up to one minute. The snapshot digest must remain unchanged; investigate a changed snapshot instead of deleting the checkpoints. -5. Start Go with its queues still paused, inspect the imported queue and resource states, and run the staging smoke checks. Resume Go queues through the admin controls once those checks pass. Keep the Node queues paused. Retain their records and backups until the cutover is accepted. - -Each source job gets its own stable Go ID and import checkpoint, including duplicate jobs for one repository. Waiting order, priorities, future availability, attempt counts, fixed/exponential backoff and configured retry limits are retained. Failed history is imported as failed; its public error is sanitized to `job_failed`, and raw payload fields, exception text and stack traces are not copied. Missing repositories produce failed jobs rather than recreated resources. Live preparation jobs transition eligible resources to `preparing`; live removal requests transition them to `removing`. Removal wins when both actions are pending. Terminal resources are not revived by preparation jobs. Resource changes use revision guards. The ordinary Go enqueue path recognizes imported live jobs and does not add duplicate maintenance work. - -`gojobimports` records the frozen source digest and each resource/job checkpoint. A retry after an interrupted write completes the checkpoint without resetting an existing Go job. Completed checkpoints also prevent jobs deleted later by an administrator from being recreated. An atomic Redis lease prevents simultaneous import commands. Source queue jobs are never removed or resumed by the tool. Custom backoff functions, jitter, LIFO, dependency flows and recurring schedules are rejected explicitly; the current application does not create these, and they need a separate design if introduced. - -Before Go workers run, rollback can use the verified pre-cutover backup and paused source queues. After Go has processed imported work or accepted writes, resuming the retained BullMQ snapshot would replay work. Stop Go and reconcile queue/resource changes using the rollback procedure above; retaining the source snapshot does not make that later rollback automatic. - -The integration suite creates real BullMQ jobs in disposable Redis, imports them into disposable MongoDB, injects interruption after resource and job writes, and then runs Go workers against a non-GitHub provider. It covers duplicates, priority order, delayed eligibility, retry success/exhaustion, completed-checkpoint replay prevention, sanitized history and unsafe preconditions. This is an automated rehearsal, not evidence of a production cutover. - -Imported failed removal jobs receive an automatic recovery pass at Go worker startup, matching TypeScript's startup recovery intent. A paused startup pass remains pending until maintenance observes that the queue has resumed. It leaves active jobs and unrelated failed jobs alone and records `migration.removalRecovered` so periodic maintenance cannot repeatedly reset an exhausted imported job. A later process startup can retry it again, as TypeScript does. Normal cleanup maintenance still handles resources already in `removing`. - -Both automatic and admin-requested retries recheck the resource immediately before cleanup. An imported removal can recover an `error` resource only when its anonymization date is absent or no newer than the source job, or when its current owner is still banned. Already removed resources are not revived. Without a current owner ban, restored ready resources and newer preparation errors are left alone. MongoDB date comparisons retain TypeScript's treatment of null/string values. Revision checks also protect owner transfers, provider-binding replacement and anonymization-date changes during the claim. Tests cover single, bulk and automatic retries, pause/resume behavior, stale requests and a real failed BullMQ removal imported and completed by a Go worker. - -Repository removal and expiry snapshot exact storage object names and MongoDB row IDs, then verify the resource revision before deleting. Duplicate workers cannot recursively delete a newer generation published after restoration. Deletions are retryable and batched in groups of 1,000 for S3 and MongoDB; filesystem deletion never descends into a captured path that has become a directory. The snapshot uses the existing 100,000-object storage-list bound and a 1,000,000-row bound per collection. Exceeding either bound leaves the resource pending cleanup and reports an error rather than deleting a partial snapshot. Empty filesystem directories can remain. This relies on Go's immutable content generation paths and read-only archive originals; Node workers and external storage writers must remain stopped after cutover. A regression test pauses a worker logically after snapshot capture, completes removal and restoration through another worker, and verifies that repeated stale cleanup preserves the new content and rows. - -Go runs independent worker pools matching TypeScript: 3 download workers, 5 removal/expiry workers and 5 cache workers per process. Each pool observes only its own pause key and claims only its queue's actions. Downloads cannot occupy cleanup slots. Pausing leaves in-flight work running and prevents subsequent claims once workers observe the pause; resuming wakes idle workers within the one-second polling interval. `RunJobs` returns after cancellation has stopped all its worker loops. The TypeScript worker-capacity contract and an integration test with blocked non-GitHub downloads and blocked S3 deletions verify all three capacities, pause isolation, resumption and shutdown. Cache reset snapshots exact file names before changing its cache revision, so delayed deletion cannot erase newly fetched content under that revision. Its snapshot uses the storage listing limit of 100,000 objects; larger caches require cleanup before retry. The S3 integration test publishes a file under the new revision while deletion is blocked, then verifies that it survives. - -The Go executable handles SIGINT and SIGTERM by cancelling queue work and stopping new HTTP connections, then allowing up to 30 seconds for in-flight HTTP requests and worker loops to finish. It closes the anonymization cache, storage and database only after both have stopped. A bind failure starts no workers and exits with status 1. An unexpected HTTP server stop also cancels workers and drains requests. If the grace period expires, it closes HTTP connections and exits with status 1 without closing shared dependencies underneath unfinished work. The Compose service allows 45 seconds before a forced container stop, leaving time for metric flushing and database disconnect after a successful drain. Tests cover requests finishing during drain, blocked workers, grace expiry, bind failure, unexpected listener closure, and clean SIGINT/SIGTERM exits from the built binary against disposable MongoDB/Redis. - -Shared-cache index migration is under implementation in `internal/blobcache`. Its SQLite schema is generated from the actual TypeScript `BlobCache` constructor, including accounting triggers. Go can open TypeScript-created indexes, backfill older indexes without summary counters, exchange transformation decisions with Node, and report the same statistics. The Go driver is pure Go, preserving the CGO-free build. The source-cache methods are connected to provider content serving when enabled. Shared transformed-content decisions and decoded output serving are connected when enabled. The process-local transformed cache remains the fallback. Stored-gzip HTTP negotiation is implemented for shared-cache file responses. - -Shared blob reads support TypeScript's Git and SHA-256 digest paths, aliases, identity files, decoded gzip and stored gzip bytes. Readers acquire two-minute SQLite leases and renew every 30 seconds; EOF, errors, cancellation and close release them. Cache shutdown closes active readers before its filesystem root and database. A Node eviction test verifies that Go's pins protect an open blob and that releasing the reader permits eviction. Reads stay inside an `os.Root`, reject non-regular files, defer gzip initialization until first use, and bound decoded output to the recorded size. Missing or damaged payloads invalidate only the captured publication filename, preserving a replacement for the same digest. Unlike TypeScript's size-only open check, Go also discards blobs after detected gzip corruption or decoded-size mismatch. Reader renewal fails closed if its lease is missing or expired. These methods remain provider-neutral; authorization is the caller's responsibility and must precede lookup. - -Shared-cache maintenance now recovers expired publishers, expires reader leases, prunes old decisions/history, and evicts unpinned blobs in access order. It retains TypeScript's 512-candidate eviction limit and 256-row decision/history expiry batches. Expired fills are read in batches of 256 and recovered within one transaction; published or temporary files are removed before reservations are released. A failed unlink retains the reservation for retry, including temporary-spool failures that TypeScript currently ignores. Indexed publications remain intact. Hourly orphan scans stream directory entries in groups of 128, reject a symlinked scan root, do not traverse nested symlinks, and stop beyond 64 directory levels. Scans preserve both indexed filenames and files belonging to live publishers; failed scans release their own scheduling claim for retry. Tests compare Go and Node eviction results, exercise strict expiry boundaries and batch limits, protect active readers and publishers, and inject cleanup failures. A process-crash rehearsal kills a real Node publisher after rename but before indexing, recovers its payload and reservation in Go, and verifies that Node can refill the same key afterward. When the shared source cache is enabled, the server runs maintenance at startup and once per minute, with a 30-second deadline. Shutdown cancels and joins maintenance before closing the cache. - -Shared-cache fills now reserve disk space, coordinate producers through SQLite leases, bound input size, compute Git/SHA-256 proofs, and publish identity or gzip blobs with content deduplication. Provider adapters supply an optional verifier; without one, content uses SHA-256. A verifier can select either computed digest but cannot publish a different content hash. Publication journals commit before rename, and a temporary reader pin protects the result until its caller acquires a reader. Cancellation closes upstream streams; producers and verifiers must honor their context. Cache shutdown cancels fills and joins cleanup. Transactions retry a busy writer lock for up to two seconds before running their callback; callbacks with filesystem side effects are never replayed. Reader release retries within its one-second cleanup deadline, with lease expiry as fallback. - -Fill tests cover oversized streams and hints, verifier failures, incorrect digests, disk/budget admission, timeouts, lost leases, shutdown during producer/read/verification, concurrent cache instances, deduplication, and cleanup of reservations and temporary files. A separate Node process reads Go-published Git identity and SHA-256 gzip blobs and waits for an in-progress Go fill without invoking its own producer. Fill admission currently requires Linux disk-allocation accounting; other platforms return `disk_accounting_not_supported`. Metrics are exposed through a nonblocking observer callback for fills, hits/misses, reuse, eviction, compression and decompression. The observer must not call back into the cache. The source APIs are connected to HTTP content serving when enabled. This does not establish complete backend parity or an HTTP performance improvement. - -Providers can optionally implement `provider.ContentVerifier` to bind downloaded bytes to their immutable entry revisions. It receives cache-computed Git SHA, SHA-256 and size, and returns a verified content digest. Authorization remains separate and mandatory before cache access. The GitHub adapter accepts matching Git content directly; otherwise it fetches the original Git blob as a bounded LFS pointer, checks its Git hash, version, payload SHA-256 and size, and returns the payload's SHA-256 identity. Pointer verification has a 30-second deadline and a 1,024-byte limit, closes streams on cancellation, participates in quota gating, and does not follow redirects or raw-content fallbacks. Twenty-three contracts extracted from TypeScript cover ordinary blobs, LFS fields, duplicate fields, line-ending differences, hash/size failures and pointer limits. Additional tests cover cancellation, bounded reads, upstream failures and request restrictions. The shared-source serving adapter invokes this capability. The legacy raw-cache path used when shared caching is disabled does not invoke it. - -Set `SHARED_CACHE_ENABLED=true` with filesystem storage to use the shared source cache. Go reads the TypeScript `SHARED_CACHE_PATH`, `SHARED_CACHE_BYTES`, `SHARED_CACHE_MAX_FILE_BYTES`, `SHARED_CACHE_GZIP`, `SHARED_CACHE_GZIP_MIN_SAVING`, `SHARED_CACHE_FREE_BYTES` and `SHARED_CACHE_LOW_WATER` settings with the same defaults. S3 and archive originals retain their existing storage paths. Provider reads authorize before lookup and again before returning a hit or completed fill, with lifecycle checks rejecting removal or revision changes during download. Admission failures fall back to an upstream stream bounded by the request, a 120-second deadline and the normal file-size limit. Other errors propagate. GitHub supplies its verified Git revision as a globally reusable alias. Providers with opaque revisions use a namespace containing provider, repository identity, commit, path and cache lifecycle; they can optionally implement `ContentIdentity` alongside `ContentVerifier` when their revisions prove a globally reusable identity. Cache events retain request traffic classification through the metrics buffer. Integration tests exercise non-GitHub HTTP reads, hits, revocation before and during fills, lifecycle changes and budget fallback. Verified legacy-file promotion and decoded shared transformed-output serving are implemented. Stored-gzip HTTP negotiation is implemented for shared-cache file responses. - -Shared-source misses can promote existing Go raw-cache files, TypeScript generation-based files, or pre-generation flat files. Promotion requires `ContentVerifier`; providers without one fetch upstream rather than treating file location or size as proof. Cache paths use the TypeScript JSON serialization and generation hash, with 18 contracts extracted from the actual path expressions. A rejected legacy proof or failed legacy read retries once from upstream, with access/lifecycle checks before that download. Admission bypass always downloads upstream and never serves unverified legacy bytes. Legacy files remain unchanged for rollback. Twenty-four integration cases cover three layouts with valid, corrupt and short files, providers without verification, admission fallback, revoked access, and revocation/removal during verification. The `source_legacy_promotion` metric records promotion attempts, matching TypeScript. - -With shared caching enabled, `SHARED_CACHE_DECISIONS` defaults to true and `SHARED_CACHE_RESULT_BYTES` defaults to 512 MiB. Result objects are bounded by the smaller of the source object limit and one eighth of the result budget. The result cache uses TypeScript's default compression saving and low-water thresholds and joins source-cache maintenance/shutdown. Changed output uses a SHA-256 result blob; byte-identical output and binary content save a decision pointing back to the source, without storing a duplicate. Misses run the existing isolated Go worker with its input/output and deadline limits. Admission failures preserve the original source stream for the existing transformation fallback. Decision hits still recheck provider access and repository lifecycle before returning output. Missing result bytes trigger a new transformation. - -Decision keys follow TypeScript's `anonymizer-v2` hashing algorithm, checked by 12 extracted contracts, and include source digest, path, generation, cache revision, rewrite options, mask, hostname and text extensions. Go adds explicit `sourceURLs` to represent provider-specific rewrite rules. This distinguishes Go decisions from old Node decisions lacking that field, so the first Go transformation can still miss the decision cache after cutover; blob formats remain shared. Integration tests verify changed/unchanged/binary output, zero worker starts on warm reads through a second cache connection, no redundant unchanged blobs, missing-result recovery, revoked access, cache reset and admission fallback. The file route selects stored-gzip or decoded readers using the shared HTTP response path described below. - -Concurrent shared-cache initialization retries `SQLITE_BUSY` across connection setup, WAL selection and transactional schema/backfill, with a five-second overall deadline and short SQLite waits. Only idempotent initialization SQL is replayed; publication callbacks with filesystem side effects still run at most once. Tests repeat eight simultaneous openers and verify that canceling a blocked initialization leaves an existing decision intact. - -Six contracts extracted from the TypeScript admin cache handler cover disabled caching, source-only and source/result caches, S3, and failures of either cache index. Integration tests compare live blob/decision counts, pinned readers and budgets with telemetry history, and exercise the HTTP endpoint with monitoring disabled. Anonymous and non-admin requests receive 401; administrators receive `Cache-Control: no-store`. Cache-index failure returns HTTP 200 with `available: false` and the same generic reason as TypeScript. - -Shared-cache file responses now follow the installed TypeScript `accepts`/`negotiator` behavior for gzip and identity, including quality values, wildcards, quoted parameters and rejected requests. Stored gzip is sent byte-for-byte with its stored length; decoded identity uses the original length. Identity-stored content stays identity when allowed, even with a gzip preference. If identity is forbidden but gzip is accepted, Go compresses that stream while serving it. Responses set `Vary: Accept-Encoding` and `Accept-Ranges: none`; requests accepting neither supported representation receive an empty 406. The public file route returns HEAD metadata before shared-cache negotiation. It does not read source bytes, populate caches, launch transformation workers or count a view, even when the client rejects all encodings. Shared caching uses weak ETags and `Vary: Accept-Encoding` on HEAD and conditional responses. Authorization precedes negotiation, and original/result reader leases remain pinned while a stored representation is opened. Source or result admission fallback retains the existing streaming behavior. - -The HTTP contract suite executes TypeScript's actual `sendSharedContent` and compares 108 GET/HEAD responses, including content length, encoding, Vary, range headers and decoded bytes. It seeds real Node cache files and checks that Go sends the stored gzip bytes without recompression. Database integration tests exercise the public file route with a non-GitHub provider, changed output, warm gzip/identity reads, metadata-only HEAD, GET 406 responses, no extra warm workers, revoked access and lease cleanup. - -The file metadata suite runs the actual TypeScript public route to capture 115 HEAD and conditional-response contracts. Go integration tests compare MIME types, weak/strong validator behavior, cache headers, sandbox policies and attachment selection with shared caching on and off. Sandbox classification includes MIME aliases and XML suffix types, and applies before 304 responses. Known text filenames without a MIME mapping use `text/plain` on HEAD. Empty `download=` retains the inline policy. Tests assert zero upstream opens, worker starts, cache blobs/decisions and page-view increments, and reject revoked grants before HEAD or conditional responses. - -File and ZIP downloads use the installed Express filename-header format, including ASCII fallbacks, UTF-8 extended filenames, quoted characters and literal percent escapes. A 277-case contract suite compares actual Express attachment headers, including every byte-range character and supplementary Unicode characters. Control characters are encoded rather than inserted into headers. Public-route tests compare exact attachment headers on HEAD and 304 responses, and preserve the octet-stream MIME fallback for unknown download extensions. Manual file-route 304 responses retain the attachment MIME type as Express does. Go uses the lowercase header spelling to avoid HTTP/1 suppression of that metadata; protocol tests verify one Content-Type header and no response body on HTTP/1 and HTTP/2. JSON responses retain their existing entity-header stripping rules. - -Shared-source admission fallback retains EOF and read failures after closing its download context. MIME sniffing can consume an initial EOF; subsequent reads must still see EOF rather than cancellation. Generic-provider fallback rejects bodies shorter than `Entry.Size`, while allowing larger bodies within the existing limit. Source read failures retain a typed error through input spooling: truncated text returns `storage_write_size_mismatch` with HTTP 502, other text input-read failures return `file_not_available` with HTTP 502, and term/worker failures keep the existing 422 response. Error details are not exposed. Budget and object-limit integration cases cover short/empty text, short binary data, failed reads, complete/expanded bodies, provider-owned size semantics, exactly-once closure, no failed-output worker starts, empty cache reservations and correct view counts. - -App login, OAuth callbacks and installation routes now use parsed query types for strict scalar checks. Mixed scalar/bracketed state or code values are rejected before token exchange; array/object error values cancel authorization. Installation suggestions ignore non-scalar IDs and repository names, and setup rejects non-scalar state rather than treating it as absent. The 1,274 Express fixtures check scalar shape and truthiness as well as string conversion. Focused integration tests assert no upstream calls for invalid OAuth callbacks. `node backend/scripts/check-shadow-oauth-query.cjs` verifies beta rejection and consumed-state replay with fresh anonymous sessions; it keeps state/cookies out of reports and verifies the sessions remain unauthenticated. Pending OAuth attempts are indexed by session and authorization provider. Redis scripts atomically replace earlier attempts and consume the current attempt before checking callback state, including missing or bracket-only state. A foreign browser cannot consume another browser's attempt, and App and legacy OAuth keep separate pending slots. Superseded flow records are deleted; pending indexes and records expire after ten minutes. In-flight logins started before this storage change must restart, while existing authenticated sessions remain valid. Integration coverage includes simultaneous callbacks consuming a flow exactly once. - -OAuth lifecycle validation can use `node backend/scripts/check-shadow-oauth-query.cjs --local` when this server cannot resolve public DNS. This connects to the local HTTPS proxy while preserving the beta hostname and certificate verification, and records that access mode in the report. It does not prove public-DNS reachability. The latest lifecycle change passed all 50 contract commands and the full backend race suite; disabled-provider callback checks now run before pending-flow consumption. Focused integration tests verify that disabled App, disabled new connections and disabled legacy OAuth return 503, retain the pending attempt and allow its use after re-enabling. - -Performance and cache telemetry queries share bounded numeric-window parsing after Express-compatible query conversion. Decimal, exponent, hexadecimal, binary and octal forms select the same windows as TypeScript; bracketed arrays and conversion errors preserve its behavior. Thirty-five extracted TypeScript window fixtures cover these paths. Performance reports still select only 15 or 60 minutes, and cache reports retain their existing supported windows and fallback. - -Queue metrics, queue overview search/selection and error-log pagination use the shared extended query parser. Empty arrays retain JavaScript truthiness, queue selection preserves repeated-value coercion, and error offsets/limits accept bracketed values with existing numeric bounds. Twenty-nine extracted TypeScript fixtures and database integration cases cover these behaviors; the beta monitoring script also checks their public HTTP output using its temporary admin key. - -File download flags now use parsed-value truthiness: empty arrays and objects request an attachment, while an empty scalar retains inline handling. Preview and repository-list `force` flags follow TypeScript loose equality, so `force[]=1` refreshes; `reconnect` remains a strict scalar check. Fifty-three extracted query fixtures and provider-independent file metadata, discovery and authorized preview tests cover these distinctions. `node backend/scripts/check-shadow-file-query.cjs` performs read-only HEAD checks against the synthetic beta repository. Other preview binding, cache-hint and branch inputs remain part of the query audit. - -Preview credential selection requires a scalar `anonymizedRepoId` to use a saved resource. Mixed scalar/array inputs follow the caller's connection path. New connection choices must be scalar; GitHub accepts only its two explicit choices, while other providers retain their own opaque names. Saved previews ignore query-supplied connection choices and use the authorized owner binding. Seventeen extracted TypeScript fixtures, provider-probe integration tests and live beta rejection checks cover these rules. Cache-hint, branch and generic repository-name query handling remain in the audit. - -File search now parses extended query values, measures the trimmed query in UTF-16 code units and applies Unicode lowercasing compatible with the covered JavaScript cases. Twenty-two fixtures extracted from the TypeScript route and search method cover dotted I, Greek sigma, emoji, whitespace, literal search and malformed query shapes. Integration tests compare HTTP result bodies and verify archived repositories remain inaccessible even for short or malformed queries. Errors retain Go's stricter no-store cache policy. Search metadata retains the existing TypeScript repository-status policy rather than revalidating provider grants per request; file-content authorization has separate coverage. File listings, search and counts now scan a MongoDB cursor without the former 100,000-row cap. The cursor projects name/path/size, reads batches of 256 and closes on completion, cancellation or errors. Search stops at 500 matches. Connected TypeScript search-index ordering and path resolution still require parity review. - -The large-tree integration fixture inserts 100,001 files and verifies that the final row appears in folder listings, search and counts; it also checks the 500-result search limit. This proves the former truncation boundary is removed. It does not establish a throughput improvement: sparse searches still scan the tree and anonymize paths per request, unlike TypeScript's persisted search index. - -Folder listing requires a scalar path query, accepts original paths and resolves default-mask/custom-replacement paths to one original directory. Exact original paths take precedence over replacement collisions, with transformed collisions resolved in original path/name order. The resolved directory is applied to the MongoDB query before reading rows. Listings now include TypeScript's eight-character SHA-1 of the stored SHA for non-empty files; zero-length files and directories omit it. Four fixtures extracted from the TypeScript projection function verify output, alongside provider-independent path integration tests. Truncated-tree recovery and trailing-separator edge cases still need review. The file-content index is audited separately from folder listing. - -File-content lookup now tries original paths before the transformed index. The index reads all rows through a sorted cursor and retains the first transformed collision in original path/name order. Its versioned cache key includes metadata revision, source commit and anonymization date; publication checks lock ownership atomically. Integration coverage includes original-path precedence, metadata/commit changes, stale builders and a transformed lookup beyond 100,000 rows. The Redis index streams batches with a 500-row cap and a 1 MiB byte target instead of retaining the complete index in Go. A row exceeding the byte target is written alone. It has no total encoded-size guard or fixed build deadline: the request context and renewed 60-second ownership lease bound each build. Atomic HSETNX batches retain the first sorted collision, including across batches. A staging sequence rejects a lost temporary hash rather than publishing a partial index. The 10-second competing-builder wait and 10-minute published-cache TTL remain. Lookups read readiness and the requested entry atomically. An evicted index is rebuilt once; repeated eviction returns a retryable 503, while a real miss in a complete current index remains 404. Lock release completes before retry, and repository revision changes return 409. Redis storage/expiry differs from TypeScript’s MongoDB index; matching internal storage is not itself a compatibility requirement. Truncated-file recovery, lifecycle publication fences and complete cache invalidation parity remain to verify. - -Path lookup now verifies its repository snapshot before returning either an original or transformed row. Index builders check the same snapshot before and after Redis publication. The check covers metadata, tree generation, terms, commit, anonymization date, settings, content-cache revision, provider-grant revision and terminal status. Changes return repository_changed rather than exposing a row from the retired snapshot. Status-date-only cache bookkeeping does not invalidate paths. MongoDB and Redis are not a single transaction: an old revision's key can briefly remain after a concurrent change, but successful reads recheck the database and reject that snapshot. Unused versioned keys expire normally. This does not replace content-provider authorization. - -Truncated-file recovery uses optional provider.FileMetadata, implemented by the GitHub adapter with commit-pinned Contents API requests. Shared code limits recovery to recorded truncated folders and paths unchanged by anonymization, validates returned metadata, and checks authorization before and after the lookup. Persisted rows carry metadataPending until a revision-checked update invalidates path and size caches. Exact-path retries finish pending invalidation. Upstream permission failures remain errors rather than being hidden as missing files. Folder recovery edge cases remain to audit; the new path primarily covers migrated truncated-tree records. - -New pending recovery rows also retain the repository snapshot that produced them, excluding the metadata revision that completion itself changes. A retry discards a still-pending row whose commit, settings or grant snapshot is no longer current and returns repository_changed. The next request can fetch current metadata. This guards interrupted recovery across repository changes; imported pending rows without provenance retain the legacy retry behavior. - -The minute maintenance cycle now scans metadataPending rows through a cursor backed by a partial index. It finishes invalidation for current and legacy-generation rows, removes pending rows with missing repositories or retired generations/statuses, and continues after individual failures. The row-level pending predicate prevents a stale cursor from deleting already-completed work. Maintenance can invalidate metadata for archived repositories, while public lookups still reject archived content. Recovery provenance checks discard new pending rows from stale source snapshots. Focused tests cover these states and confirm archived lookups stay blocked. - -Providers can implement optional PartialTrees.TreeWithTruncation to return entries and incomplete directory paths together. The empty path marks the root. Shared preparation validates these paths and publishes truncatedFolders with the new tree generation; existing adapters can continue implementing only Repositories.Tree. GitHub keeps available entries when a non-recursive directory response remains truncated and records that directory instead of failing the entire import. The former 100,000-entry rejection is removed from GitHub traversal and shared preparation. Isolated tests import 100,001 files and cover incomplete root/child responses. This still uses an in-memory tree snapshot; no constant-memory import or throughput improvement is claimed. - -GitHub submodule commit entries are retained as entries without file sizes, rather than being dropped. The partial-tree integration test verifies their presence and verifies that the public options endpoint anonymizes truncated folder names. - -Folder resolution now uses Node-compatible POSIX dirname/basename behavior for its exact lookup, including trailing and repeated separators. Eighteen Node-derived contracts and HTTP listing tests cover this behavior. Paths that do not trigger mask/custom-replacement resolution remain exact directory queries. Resolved rows complete pending metadata invalidation when needed, and an index miss can use the existing guarded per-file recovery path, matching the TypeScript lookup used by folder listing. Recovery validates a relative path before contacting any provider. This does not add upstream directory discovery: GitHub's recovery capability returns regular-file metadata only. - -Adapter wrappers must account for optional Go interfaces when embedding another adapter. Overriding Tree alone does not override an inherited TreeWithTruncation method, which preparation prefers when available. Implement the optional method explicitly or embed the narrower Repositories interface when the wrapper owns tree behavior. The partial-tree test adapter is separate from the common fixture so retry, rate-limit and worker-capacity wrappers exercise their own Tree overrides. - -The full backend race suite passed after the path/tree changes, including worker retry, quota-delay and independent-queue tests. All 55 CI fixture checks and both differential commands passed: 499 behavior cases, three cross-language credential cases and 7,876 file-type cases. Formatting and go vet passed. Govulncheck found no reachable vulnerabilities or affected imported packages, but reported four module-only advisories in unused x/crypto SSH/OpenPGP packages. See fullValidationAfterPathAndTreeParity in reports/compatibility-audit.json for source fingerprints and evidence. Remaining query and index-limit findings are current-state findings; historical findings are retained separately. - -Preview cache IDs now use the extended query parser and explicit-ID casting checked against the installed Mongoose model. Repeated/bracketed ID lists, wrapped _id values, uppercase hexadecimal IDs and legacy 12-character ASCII IDs retain their casting behavior. Invalid casts return a generic internal_error, and scalar reconnect=1 bypasses the hint. The lookup still rejects cross-provider records and requires upstream authorization/identity checks. Operator-shaped objects are deliberately rejected instead of forwarding arbitrary query selectors to MongoDB; this is a stricter compatibility boundary. Sixteen Mongoose contracts and provider-hint integration tests cover the supported inputs. - -README preview branch queries now use extended-query parsing and JavaScript-compatible string coercion before reaching a provider. Missing or empty scalar branches retain the default; singleton arrays select their value, repeated values join with commas, and a truthy array containing an empty string returns readme_not_available instead of silently selecting the default. Twelve contracts extracted from the TypeScript README method cover selection. Integration tests verify cached output, authorization before malformed-branch handling, and opaque branch names for another provider. For GitHub, selection is deferred until branch discovery succeeds. Empty branch lists return readme_not_available without coercing the query, and discovery errors take precedence. - -Legacy GitHub user search now preserves the extended-query value through the route's length gate and credential lookup. Singleton arrays return an empty list; larger arrays and ordinary objects reach credential lookup before failing Octokit's string requirement. Objects with a length property use JavaScript numeric comparison. Scalar searches retain UTF-16 length and Octokit's treatment of literal plus signs as search separators. Twenty-four contracts execute the actual TypeScript callback with the installed Octokit endpoint serializer; integration tests check upstream query values and returned user fields. This route remains GitHub-specific, with no change to provider interfaces. - -The TypeScript repository/PR preview routes take repository names from path parameters, not a name query. Go's generic provider name query is an extension, so its scalar behavior is not a TypeScript parity gap. - -Admin status flags now use extended-query loose equality, search rejects truthy non-string values before owner lookup, and role=admin requires a scalar value. The 111 actual-route filter contracts include bracketed/repeated values, malformed objects and missing-owner ordering. Repository and conference results use MongoDB Find with the existing credential-excluding projection; user results retain aggregation for repoCount. Three installed Node-driver contracts verify negative-limit single-batch semantics, and integration tests exercise these behaviors. Admin date parsing is covered by the date contracts described below. - -The optional SelectedReadmePreviews capability accepts a BranchMatch callback from shared routing. Adapters discover branches first and evaluate the callback against branch names; query objects and Express semantics stay in server code. GitHub implements it alongside the existing DiscoveryPreviews interface, which remains available to other adapters. Nine contracts execute the actual TypeScript README method to check malformed input against populated/empty branch lists and discovery failures. Integration tests compare those errors and call ordering, retain cached-read authorization checks, and exercise the new capability with an opaque-name non-GitHub provider. - -Admin owner, user-status and repository-conference predicates now use explicit Mongoose-compatible string-field casting. Find/count/CSV filters support repeated values, wrapped string IDs and the installed schema's field operators; unsupported operators and invalid casts fail. The echoed filter retains Mongoose's nested operator mutations, while aggregation uses the original snapshot. This distinction can produce different totals and result counts for arrays, or reject scalar operator values in JSON mode even when CSV succeeds. The 117 model-casting contracts and 27 database differential cases execute the actual Mongoose models and TypeScript callbacks against isolated records to verify these cases. The latter requires Node and the repository npm dependencies during integration tests; the deployed Go server does not use Node. Operator predicates remain inside administrator-only routes and cannot become top-level MongoDB commands. - -Admin date ranges now use extended-query truthiness and deferred string coercion, including malformed-value errors after the missing-owner short circuit. ISO forms support normalized day overflow, 24:00, extended years, millisecond truncation and JavaScript time clipping. Legacy forms support numeric/month-name dates, comments, time and timezone names using V8 parsing rules. The 632 contracts execute TypeScript parseDateRange; 44 database differential cases now include date selection and CSV filtering. Parsing is verified for the current UTC deployment. Alternate local timezones are not covered. The V8 BSD license is retained in licenses/V8-LICENSE and copied into the runtime image. Dashboard cursors also use the shared date-string parser. - -The dashboard cursor contracts apply the date corpus to anonymizeDate, descending lastView and options.expirationDate. HTTP tests retain the original cursor checks and exercise representative legacy/array dates. Boundary tests verify that normalized ISO, named and array dates select the same next repository without duplicating the previous record. Numeric, null and boolean date conversions retain their existing behavior. Conference form dates use the shared JavaScript Date constructor behavior; validation, persistence and billing contracts cover the supported inputs. - -Transformed-path indexing validates pending recovered metadata before publication. Valid rows complete recovery and rebuild under the new metadata revision; stale recovery snapshots are rejected with `repository_changed`. The cache namespace is versioned to discard indexes built without these checks. Regression tests cover both cases through the non-GitHub provider fixture. Compatibility means preserving supported behavior, not reproducing TypeScript bugs. - -Gist and pull-request source previews now use the same connection-query validation as repository previews. Repeated and object-shaped connection choices return `invalid_connection` before provider access. Custom provider scalar connection names remain supported. The remaining direct incoming query reads select names on generic provider routes; legacy GitHub routes use path parameters. See `reports/query-consumer-audit.json`. - -Persisted-date checks distinguish valid timestamps from absent or malformed values. Year-0001 dates remain usable for stale-record recovery, refresh, content generation identity, conference transition replay, job timestamps, and source commit dates. Repository lastUpdateDate selects the latest valid stored date without using year 0001 as a lower bound. Missing or invalid refresh timestamps do not trigger automatic recovery. - -Replacement-heavy ASCII transforms now avoid full-file lowercase copies and repeated output classification. A monotonic case-insensitive finder retains ordered replacement and uses a bounded fallback for dense false candidates. Three-run paired medians improved the 50 MB sparse case from 592 to 270 ms and the 22 MB dense case from 394 to 190 ms, with roughly 50% and 38% lower allocated bytes. A separate same-machine Node comparison measured Go at 346 versus 488 ms and 226 versus 387 ms. Absent-term timings varied and were slower than the Go baseline in the paired run; these are synthetic transform measurements, not HTTP throughput claims. See `reports/replacement-path-validation.json` and its linked benchmark reports. - -### GitHub permission freshness - -`GITHUB_PERMISSION_CACHE_SECONDS` defaults to `0` (check GitHub each time) and accepts 0–3600. The beta App overlay sets 3600. Successful repository access/visibility checks can be reused until that fixed deadline; hits never extend it, and failures are not cached. This permits GitHub permission changes without a processed webhook to take up to an hour to become visible on beta. Local account status, credential revocation/reconciliation and installation blocks are still checked on every access. Installation webhook revisions, changed user tokens and binding revisions select new cache entries. The process-local cache holds at most 10,000 hashed keys and clears on restart or capacity; installation tokens retain their own expiry and scope validation. This setting does not cache the full authorization result or change other providers. - -### Directory counts and website file lookup - -Folder counts now group file rows by original directory in MongoDB, accumulate ancestor totals, then anonymize each distinct folder once. Empty files still count; directory rows do not. Counts for colliding anonymized folders are added together. - -Website file requests first use a targeted MongoDB lookup for unchanged, mask-free paths without custom replacements. That path verifies the anonymized name, duplicate originals, descendants and the active snapshot. Successful ordinary-path proofs are cached for up to ten minutes in a bounded 1,000-entry process cache keyed by the repository path revision; cache hits still validate the live snapshot. Other file requests use the revision-bound Redis path index rather than scanning and anonymizing the whole file tree on every read. Index v5 records duplicate anonymized paths and parents containing colliding children, so `/w/` continues to reject ambiguous paths even across index-build batches. The legacy file endpoint retains its existing first-match behavior. Website lookups validate the repository snapshot on cache hits, rebuild after eviction and settings changes, and retain provider authorization before content delivery. The first lookup of a masked/custom path can still pay the index-build cost; directory/index-page rendering retains the full listing fallback. - -### ZIP memory - -MongoDB connections default to Snappy wire compression. The driver's zstd encoder pool can retain hundreds of MiB of windows on machines with many CPUs, including during per-entry ZIP authorization queries. An explicit `compressors` option in the MongoDB URI overrides the default. ZIP payloads still use Deflate. - -ZIP downloads read projected file metadata in batches of 128, with no file-count truncation. They reuse one Deflate writer and one 32 KiB copy buffer. File bodies and transformed results remain disk-backed; the ZIP central directory and duplicate-name set still grow with the number of entries. Each entry retains content authorization and revision checks. Cursor errors and cancellation abort the response rather than finalizing an incomplete archive. - -### Streaming upstream archives into ZIP downloads - -GitHub ZIP downloads now use one commit-pinned [tarball request](https://docs.github.com/en/rest/repos/contents#download-a-repository-archive-tar), consumed incrementally. `provider.Archives` is an optional capability; other providers and uploaded archives retain the existing per-file path. The GitHub adapter permits HTTPS redirects only to GitHub API/codeload hosts and strips the API credential on the codeload redirect. Its body deadline is 30 minutes, including client backpressure. - -Three stages download and verify an entry, transform it, and compress its output into the client ZIP. Two unbuffered handoffs bound the pipeline to one downloading input, one transforming entry and one output being sent. Slow clients stop further preparation. The existing eight-transfer admission limit and worker memory limits still apply. Source entries use a reused 32 KiB copy buffer and temporary disk files, never a whole-repository spool. Regex transformation still requires an individual complete text file; it does not run on arbitrary byte chunks. ZIP central-directory and duplicate-path metadata grow with the entry count. - -Git blob hashes are verified before transformation. Symlinks become regular files containing their Git blob target text; links are never followed. LFS pointers, export-subst differences and export-ignore omissions use the normal provider file path to preserve output. Missing metadata from truncated trees is resolved against the same commit. Output authorization and repository revisions are checked after preparation and before every entry is released. Cancellation, corrupt gzip/truncated input, invalid paths and duplicate anonymized names abort the response and clean up both stages; a corrupt stream is never finalized as a valid ZIP. - -The integration test deliberately pauses the upstream before the second file and requires the first ZIP payload to reach the client before releasing it. It also checks cancellation, temporary-file cleanup, corrupted input, repository revocation, archive export exceptions, and zero blob requests for an ordinary streamed archive. This path requests an upstream archive on each download; the earlier local ZIP memory benchmark does not measure GitHub network latency. - -ZIP requests have a 30-minute overall deadline. Other API requests retain their two-minute deadline. ZIP socket writes renew a one-minute write deadline on every write/flush, so an active slow transfer can outlive the HTTP server's ordinary two-minute write timeout while a stalled socket still expires. Tests cover an expired server write deadline between ZIP entries and a client that stops reading entirely. Stream failures now log a fixed stage and reason with the request ID, distinguishing client cancellation, request expiry, I/O timeouts and preparation failures without exposing source paths, URLs or credentials. - -Anonymization workers now release execution slots and memory reservations as soon as the child has exited and its output is on disk, including cache hits. Output file handles remain valid until the caller's cleanup. A slow reader therefore cannot hold the only worker slot and cause another transform to hit the 30-second admission timeout. Request transfer limits and the ZIP pipeline's unbuffered handoffs still bound outstanding output files. The worker test keeps multiple cold/cached outputs open with one configured worker and verifies that both execution and memory admission are available before cleanup. - -Authenticated browser sessions persist for 30 days and renew on activity at most once per day, giving a 29–30 day idle lifetime. Redis expiry and the Secure/HttpOnly/SameSite=Lax cookie are renewed together. Existing valid session cookies upgrade on their next authenticated request. Renewal uses compare-and-set so it cannot resurrect a logged-out session or overwrite concurrent session changes. Account status is still checked on every request. Anonymous OAuth sessions remain browser-session cookies with a 24-hour Redis lifetime; OAuth state still expires after ten minutes. Preserve the session secret and Redis volume across deployments. diff --git a/backend/cmd/benchmark/main.go b/backend/cmd/benchmark/main.go deleted file mode 100644 index 101051a..0000000 --- a/backend/cmd/benchmark/main.go +++ /dev/null @@ -1,60 +0,0 @@ -package main - -import ( - "context" - "crypto/sha256" - "encoding/hex" - "encoding/json" - "fmt" - "github.com/tdurieux/anonymous_github/backend/internal/anonymize" - "os" - "runtime" - "strings" - "time" -) - -func main() { - terms := []string{"first.last", "user@example.org", "dept.example.edu", "lab.io", "project.org", "Author X. Name"} - for i := 0; i < 41; i++ { - terms = append(terms, fmt.Sprintf("Researcher%d", i)) - } - row := "123,456,78.91234,-45.123456\n" - fixtures := []struct { - name string - input func() string - terms []string - }{ - {"2 MB CSV, 47 absent terms", func() string { return strings.Repeat(row, 70000) }, terms}, - {"100 MB CSV, 47 absent terms", func() string { return strings.Repeat(row, 3600000) }, terms}, - {"50 MB CSV, sparse matches", func() string { - return "first.last\n" + strings.Repeat(row, 1800000) + "\nhttps://host/user@example.org" - }, terms}, - {"22 MB text, 1.2 million replacements", func() string { return strings.Repeat("Alice 123 first.last,45.678,-23.456\n", 600000) }, append([]string{"Alice"}, terms...)}, - } - for _, f := range fixtures { - input := f.input() - start := time.Now() - e, err := anonymize.New(anonymize.Options{Terms: f.terms}, anonymize.Context{Mask: "XXXX"}) - if err != nil { - panic(err) - } - compile := time.Since(start) - var before, after runtime.MemStats - runtime.ReadMemStats(&before) - ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) - start = time.Now() - out, err := e.Transform(ctx, input, anonymize.MaxOutput) - elapsed := time.Since(start) - cancel() - runtime.ReadMemStats(&after) - result := map[string]any{"runtime": runtime.Version(), "name": f.name, "inputBytes": len(input), "compileMs": float64(compile.Microseconds()) / 1000, "matchMs": float64(elapsed.Microseconds()) / 1000, "allocatedBytes": after.TotalAlloc - before.TotalAlloc} - if err != nil { - result["error"] = err.Error() - } else { - result["outputBytes"] = len(out.Content) - digest := sha256.Sum256([]byte(out.Content)) - result["sha256"] = hex.EncodeToString(digest[:]) - } - json.NewEncoder(os.Stdout).Encode(result) - } -} diff --git a/backend/cmd/cache-benchmark/main.go b/backend/cmd/cache-benchmark/main.go deleted file mode 100644 index 581da57..0000000 --- a/backend/cmd/cache-benchmark/main.go +++ /dev/null @@ -1,111 +0,0 @@ -// cache-benchmark measures complete worker/cache operations, including input -// spooling, output reads and cleanup. It makes no HTTP or database requests. -package main - -import ( - "context" - "crypto/sha256" - "encoding/hex" - "encoding/json" - "fmt" - "io" - "os" - "runtime" - "sort" - "strings" - "time" - - "github.com/tdurieux/anonymous_github/backend/internal/anonymize" -) - -type sample struct { - Mode string `json:"mode"` - MedianMs float64 `json:"medianMs"` - P95Ms float64 `json:"p95Ms"` - SamplesMs []float64 `json:"samplesMs"` - WorkerStarts uint64 `json:"workerStarts"` -} - -func main() { - if len(os.Args) > 1 && os.Args[1] == "anonymization-worker" { - os.Exit(anonymize.RunProcess()) - } - if err := run(); err != nil { - fmt.Fprintln(os.Stderr, err) - os.Exit(1) - } -} -func run() error { - executable, err := os.Executable() - if err != nil { - return err - } - fixtures := []struct { - name, input string - terms []string - }{ - {"small text", strings.Repeat("hello Alice and Bob\n", 3000), []string{"Alice", "Bob"}}, - {"2 MiB absent terms", strings.Repeat("0123456789abcdef\n", 123362), []string{"Alice", "Researcher", "user@example.org"}}, - {"2 MiB replacements", strings.Repeat("Alice met Bob\n", 149797), []string{"Alice", "Bob"}}, - {"128 KiB JavaScript boundary", strings.Repeat("éAliceé Alice\n", 8192), []string{"\\bAlice\\b"}}, - } - for _, fixture := range fixtures { - pool := anonymize.NewPool(executable, 1) - request := anonymize.ProcessRequest{Options: anonymize.Options{Terms: fixture.terms}, Context: anonymize.Context{Mask: "XXXX", Hostname: "anonymous.test"}, MaxOutput: anonymize.MaxOutput, CacheScope: "benchmark-revision", CacheOwner: "benchmark"} - var expected string - var outputBytes int64 - execute := func() (float64, error) { - ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second) - defer cancel() - start := time.Now() - file, _, cleanup, err := pool.Process(ctx, strings.NewReader(fixture.input), request) - if err != nil { - return 0, err - } - digest := sha256.New() - n, err := io.Copy(digest, file) - cleanup() - elapsed := float64(time.Since(start)) / float64(time.Millisecond) - if err != nil { - return 0, err - } - hash := hex.EncodeToString(digest.Sum(nil)) - if expected != "" && hash != expected { - return 0, fmt.Errorf("%s output mismatch", fixture.name) - } - expected, outputBytes = hash, n - return elapsed, nil - } - samples := []sample{} - for _, mode := range []string{"cold", "warm"} { - result := sample{Mode: mode, SamplesMs: []float64{}} - before := pool.Stats()["workerStarts"].(uint64) - for i := 0; i < 7; i++ { - if mode == "cold" { - pool.RemoveResults("benchmark") - } - elapsed, err := execute() - if err != nil { - pool.Close() - return err - } - result.SamplesMs = append(result.SamplesMs, elapsed) - } - result.WorkerStarts = pool.Stats()["workerStarts"].(uint64) - before - if mode == "warm" && result.WorkerStarts != 0 { - pool.Close() - return fmt.Errorf("warm cache launched a worker") - } - sorted := append([]float64(nil), result.SamplesMs...) - sort.Float64s(sorted) - result.MedianMs, result.P95Ms = sorted[len(sorted)/2], sorted[len(sorted)-1] - samples = append(samples, result) - } - pool.Close() - result := map[string]any{"fixture": fixture.name, "runtime": runtime.Version(), "os": runtime.GOOS, "arch": runtime.GOARCH, "cpuCount": runtime.NumCPU(), "measuredAt": time.Now().UTC().Format(time.RFC3339), "inputBytes": len(fixture.input), "outputBytes": outputBytes, "outputSHA256": expected, "samples": samples, "medianSpeedup": samples[0].MedianMs / samples[1].MedianMs, "scope": "single sequential worker/cache path; excludes HTTP, MongoDB, Redis, provider access, and authorization"} - if err := json.NewEncoder(os.Stdout).Encode(result); err != nil { - return err - } - } - return nil -} diff --git a/backend/cmd/contract/main.go b/backend/cmd/contract/main.go deleted file mode 100644 index 1e12a86..0000000 --- a/backend/cmd/contract/main.go +++ /dev/null @@ -1,90 +0,0 @@ -// contract exposes the implementation to the differential test runner. It has -// no database/network access and never accepts filesystem paths from input. -package main - -import ( - "bufio" - "context" - "encoding/base64" - "encoding/json" - "fmt" - "github.com/tdurieux/anonymous_github/backend/internal/anonymize" - "github.com/tdurieux/anonymous_github/backend/internal/filetype" - "github.com/tdurieux/anonymous_github/backend/internal/security" - "os" - "time" -) - -type request struct { - Operation string `json:"operation"` - Filename string `json:"filename"` - Content string `json:"content"` - Options anonymize.Options `json:"options"` - Context anonymize.Context `json:"context"` - Keys string `json:"keys"` - Active string `json:"active"` - Owner string `json:"owner"` - Provider string `json:"provider"` - Purpose string `json:"purpose"` - Envelope security.Envelope `json:"envelope"` -} - -func run(r request) (any, error) { - if r.Operation == "classify" { - data, e := base64.StdEncoding.DecodeString(r.Content) - return map[string]bool{"text": filetype.Text(r.Filename, data)}, e - } - if r.Operation == "encrypt" || r.Operation == "decrypt" { - c, err := security.NewCipher(r.Keys, r.Active) - if err != nil { - return nil, err - } - if r.Operation == "encrypt" { - return c.Encrypt(r.Content, r.Owner, r.Provider, r.Purpose) - } - value, err := c.Decrypt(r.Envelope, r.Owner, r.Provider, r.Purpose) - return map[string]string{"content": value}, err - } - e, err := anonymize.New(r.Options, r.Context) - if err != nil { - return nil, err - } - ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) - defer cancel() - if r.Operation == "bytes" { - data, err := base64.StdEncoding.DecodeString(r.Content) - if err != nil { - return nil, err - } - out, changed, err := e.Bytes(ctx, data, anonymize.MaxOutput) - return map[string]any{"content": base64.StdEncoding.EncodeToString(out), "changed": changed}, err - } - if r.Operation == "path" { - s, err := e.Path(ctx, r.Content) - return map[string]string{"content": s}, err - } - return e.Transform(ctx, r.Content, anonymize.MaxOutput) -} -func main() { - scanner := bufio.NewScanner(os.Stdin) - scanner.Buffer(make([]byte, 65536), anonymize.MaxInput+1024*1024) - enc := json.NewEncoder(os.Stdout) - enc.SetEscapeHTML(false) - for scanner.Scan() { - var r request - if json.Unmarshal(scanner.Bytes(), &r) != nil { - enc.Encode(map[string]string{"error": "invalid_request"}) - continue - } - result, err := run(r) - if err != nil { - enc.Encode(map[string]string{"error": err.Error()}) - } else { - enc.Encode(result) - } - } - if scanner.Err() != nil { - fmt.Fprintln(os.Stderr, "request_too_large") - os.Exit(1) - } -} diff --git a/backend/cmd/server/lifecycle.go b/backend/cmd/server/lifecycle.go deleted file mode 100644 index 5b92803..0000000 --- a/backend/cmd/server/lifecycle.go +++ /dev/null @@ -1,67 +0,0 @@ -package main - -import ( - "context" - "errors" - "log/slog" - "net" - "net/http" - "time" -) - -var errListen = errors.New("listener_start_failed") -var errServe = errors.New("http_server_failed") -var errShutdownTimeout = errors.New("shutdown_grace_period_exceeded") - -// The caller may close shared dependencies only when drained is true. On a -// timeout it must terminate the process: a handler or worker may still use them. -func serveAndDrain(ctx context.Context, server *http.Server, jobs func(context.Context), grace time.Duration) (drained bool, result error) { - if ctx.Err() != nil { - return true, nil - } - listener, err := net.Listen("tcp", server.Addr) - if err != nil { - return true, errListen - } - slog.Info("Go backend listening", "address", listener.Addr().String()) - workers, cancelWorkers := context.WithCancel(ctx) - defer cancelWorkers() - jobsDone := make(chan struct{}) - go func() { defer close(jobsDone); jobs(workers) }() - serveDone := make(chan error, 1) - go func() { serveDone <- server.Serve(listener) }() - select { - case <-ctx.Done(): - case err := <-serveDone: - if ctx.Err() == nil || !errors.Is(err, http.ErrServerClosed) { - result = errServe - } - serveDone = nil - } - cancelWorkers() - shutdown, cancelShutdown := context.WithTimeout(context.Background(), grace) - defer cancelShutdown() - httpDone := make(chan error, 1) - go func() { httpDone <- server.Shutdown(shutdown) }() - for jobsDone != nil || httpDone != nil || serveDone != nil { - select { - case <-jobsDone: - jobsDone = nil - case err := <-httpDone: - if err != nil { - server.Close() - return false, errShutdownTimeout - } - httpDone = nil - case err := <-serveDone: - if !errors.Is(err, http.ErrServerClosed) { - result = errServe - } - serveDone = nil - case <-shutdown.Done(): - server.Close() - return false, errShutdownTimeout - } - } - return true, result -} diff --git a/backend/cmd/server/lifecycle_test.go b/backend/cmd/server/lifecycle_test.go deleted file mode 100644 index f4b2ca6..0000000 --- a/backend/cmd/server/lifecycle_test.go +++ /dev/null @@ -1,190 +0,0 @@ -package main - -import ( - "context" - "errors" - "io" - "net" - "net/http" - "testing" - "time" -) - -type drainResult struct { - drained bool - err error -} - -func TestServeDrainsRequestsAndWorkers(t *testing.T) { - ctx, cancel := context.WithCancel(context.Background()) - defer cancel() - requestStarted := make(chan struct{}) - releaseRequest := make(chan struct{}) - requestDone := make(chan struct{}) - workersCancelled := make(chan struct{}) - releaseWorkers := make(chan struct{}) - address := make(chan string, 1) - server := &http.Server{Addr: "127.0.0.1:0", BaseContext: func(l net.Listener) context.Context { address <- l.Addr().String(); return context.Background() }, Handler: http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - defer close(requestDone) - close(requestStarted) - select { - case <-releaseRequest: - io.WriteString(w, "complete") - case <-r.Context().Done(): - t.Error("request cancelled before graceful drain") - } - })} - result := make(chan drainResult, 1) - go func() { - drained, err := serveAndDrain(ctx, server, func(ctx context.Context) { <-ctx.Done(); close(workersCancelled); <-releaseWorkers }, 3*time.Second) - result <- drainResult{drained, err} - }() - defer server.Close() - url := "http://" + waitValue(t, address) - response := make(chan string, 1) - go func() { - client := http.Client{Timeout: 4 * time.Second} - r, err := client.Get(url) - if err != nil { - response <- err.Error() - return - } - defer r.Body.Close() - b, err := io.ReadAll(r.Body) - if err != nil { - response <- err.Error() - return - } - response <- string(b) - }() - waitValue(t, requestStarted) - cancel() - waitValue(t, workersCancelled) - select { - case got := <-result: - t.Fatal("returned with live request and worker", got) - case <-time.After(30 * time.Millisecond): - } - close(releaseRequest) - waitValue(t, requestDone) - if got := waitValue(t, response); got != "complete" { - t.Fatal(got) - } - select { - case got := <-result: - t.Fatal("returned before worker stopped", got) - case <-time.After(30 * time.Millisecond): - } - close(releaseWorkers) - got := waitValue(t, result) - if !got.drained || got.err != nil { - t.Fatal(got) - } -} - -func TestServeTimeoutDoesNotPermitDependencyClose(t *testing.T) { - for _, blocked := range []string{"request", "worker"} { - t.Run(blocked, func(t *testing.T) { - ctx, cancel := context.WithCancel(context.Background()) - defer cancel() - address := make(chan string, 1) - entered := make(chan struct{}) - workerExited := make(chan struct{}) - releaseWorker := make(chan struct{}) - defer close(releaseWorker) - requestCancelled := make(chan struct{}) - server := &http.Server{Addr: "127.0.0.1:0", BaseContext: func(l net.Listener) context.Context { address <- l.Addr().String(); return context.Background() }, Handler: http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - close(entered) - <-r.Context().Done() - close(requestCancelled) - })} - result := make(chan drainResult, 1) - go func() { - drained, err := serveAndDrain(ctx, server, func(ctx context.Context) { - defer close(workerExited) - <-ctx.Done() - if blocked == "worker" { - <-releaseWorker - } - }, 80*time.Millisecond) - result <- drainResult{drained, err} - }() - defer server.Close() - url := "http://" + waitValue(t, address) - if blocked == "request" { - go func() { - client := http.Client{Timeout: 2 * time.Second} - r, err := client.Get(url) - if err == nil { - r.Body.Close() - } - }() - waitValue(t, entered) - } - cancel() - got := waitValue(t, result) - if got.drained || !errors.Is(got.err, errShutdownTimeout) { - t.Fatal(got) - } - if blocked == "request" { - waitValue(t, requestCancelled) - waitValue(t, workerExited) - } - }) - } -} - -func TestServeBindFailureStartsNoWorkers(t *testing.T) { - listener, err := net.Listen("tcp", "127.0.0.1:0") - if err != nil { - t.Fatal(err) - } - defer listener.Close() - called := false - drained, err := serveAndDrain(context.Background(), &http.Server{Addr: listener.Addr().String()}, func(context.Context) { called = true }, time.Second) - if !drained || !errors.Is(err, errListen) || called { - t.Fatal(drained, err, called) - } -} - -func TestServeCancelledBeforeStartup(t *testing.T) { - ctx, cancel := context.WithCancel(context.Background()) - cancel() - drained, err := serveAndDrain(ctx, &http.Server{Addr: "invalid"}, func(context.Context) { t.Error("worker started after cancellation") }, time.Second) - if !drained || err != nil { - t.Fatal(drained, err) - } -} - -func waitValue[T any](t *testing.T, ch <-chan T) T { - t.Helper() - select { - case value := <-ch: - return value - case <-time.After(5 * time.Second): - t.Fatal("timed out waiting for lifecycle event") - var zero T - return zero - } -} - -func TestServeUnexpectedCloseStopsWorkers(t *testing.T) { - address := make(chan string, 1) - server := &http.Server{Addr: "127.0.0.1:0", BaseContext: func(l net.Listener) context.Context { address <- l.Addr().String(); return context.Background() }} - defer server.Close() - stopped := make(chan struct{}) - result := make(chan drainResult, 1) - go func() { - drained, err := serveAndDrain(context.Background(), server, func(ctx context.Context) { <-ctx.Done(); close(stopped) }, time.Second) - result <- drainResult{drained, err} - }() - waitValue(t, address) - if err := server.Close(); err != nil { - t.Fatal(err) - } - got := waitValue(t, result) - if !got.drained || !errors.Is(got.err, errServe) { - t.Fatal(got) - } - waitValue(t, stopped) -} diff --git a/backend/cmd/server/logging_test.go b/backend/cmd/server/logging_test.go deleted file mode 100644 index 8b2afea..0000000 --- a/backend/cmd/server/logging_test.go +++ /dev/null @@ -1,23 +0,0 @@ -package main - -import ( - "context" - "log/slog" - "testing" -) - -func TestLoggingThreshold(t *testing.T) { - original := slog.Default() - defer slog.SetDefault(original) - for _, row := range []struct { - env, level string - want slog.Level - }{{"production", "", slog.LevelInfo}, {"development", "", slog.LevelDebug}, {"production", "WARN", slog.LevelWarn}, {"production", "error", slog.LevelError}, {"production", "invalid", slog.LevelInfo}} { - t.Setenv("NODE_ENV", row.env) - t.Setenv("LOG_LEVEL", row.level) - configureLogging() - if !slog.Default().Enabled(context.Background(), row.want) || slog.Default().Enabled(context.Background(), row.want-1) { - t.Fatal(row) - } - } -} diff --git a/backend/cmd/server/main.go b/backend/cmd/server/main.go deleted file mode 100644 index dbc4e11..0000000 --- a/backend/cmd/server/main.go +++ /dev/null @@ -1,95 +0,0 @@ -package main - -import ( - "context" - "github.com/tdurieux/anonymous_github/backend/internal/anonymize" - "github.com/tdurieux/anonymous_github/backend/internal/server" - "log/slog" - "net/http" - "os" - "os/signal" - "strings" - "syscall" - "time" -) - -func main() { - if len(os.Args) == 2 && os.Args[1] == "anonymization-worker" { - os.Exit(anonymize.RunProcess()) - } - if len(os.Args) == 2 && os.Args[1] == "healthcheck" { - client := http.Client{Timeout: 3 * time.Second} - port := os.Getenv("PORT") - if port == "" { - port = "5000" - } - response, e := client.Get("http://127.0.0.1:" + port + "/healthcheck") - if e != nil { - os.Exit(1) - } - response.Body.Close() - if response.StatusCode != 200 { - os.Exit(1) - } - return - } - os.Exit(run()) -} - -func configureLogging() { - level := slog.LevelInfo - if os.Getenv("NODE_ENV") != "production" { - level = slog.LevelDebug - } - switch strings.ToLower(os.Getenv("LOG_LEVEL")) { - case "debug": - level = slog.LevelDebug - case "info": - level = slog.LevelInfo - case "warn": - level = slog.LevelWarn - case "error": - level = slog.LevelError - } - slog.SetDefault(slog.New(slog.NewTextHandler(os.Stderr, &slog.HandlerOptions{Level: level}))) -} -func run() int { - configureLogging() - ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM) - defer stop() - config, err := server.LoadConfig() - if err != nil { - slog.Error("configuration rejected", "error", err.Error()) - return 1 - } - store, err := server.Connect(ctx, config) - if err != nil { - slog.Error("startup failed", "error", err.Error()) - return 1 - } - drained := true - defer func() { - if drained { - cleanup, cancel := context.WithTimeout(context.Background(), 5*time.Second) - defer cancel() - store.Close(cleanup) - } - }() - app, err := server.New(config, store) - if err != nil { - slog.Error("startup failed", "error", err.Error()) - return 1 - } - defer func() { - if drained { - app.Close() - } - }() - httpServer := &http.Server{Addr: config.Address, Handler: app, ReadHeaderTimeout: 5 * time.Second, ReadTimeout: 30 * time.Second, WriteTimeout: 2 * time.Minute, IdleTimeout: 60 * time.Second, MaxHeaderBytes: 32 * 1024} - drained, err = serveAndDrain(ctx, httpServer, app.RunJobs, 30*time.Second) - if err != nil { - slog.Error("server stopped", "error", err.Error()) - return 1 - } - return 0 -} diff --git a/backend/cmd/server/signal_integration_test.go b/backend/cmd/server/signal_integration_test.go deleted file mode 100644 index 18ccfe6..0000000 --- a/backend/cmd/server/signal_integration_test.go +++ /dev/null @@ -1,110 +0,0 @@ -package main - -import ( - "bufio" - "context" - "encoding/base64" - "net" - "net/http" - "os" - "os/exec" - "strings" - "syscall" - "testing" - "time" - - "github.com/tdurieux/anonymous_github/backend/internal/server" - "go.mongodb.org/mongo-driver/v2/bson" -) - -func TestExecutableSignalsIntegration(t *testing.T) { - binary, uri, address := os.Getenv("GO_TEST_SERVER_BINARY"), os.Getenv("GO_TEST_MONGODB_URI"), os.Getenv("GO_TEST_REDIS_ADDR") - if binary == "" || uri == "" || address == "" { - t.Skip("requires built server and disposable MongoDB/Redis") - } - if !strings.HasPrefix(uri, "mongodb://127.0.0.1:") || !strings.HasPrefix(address, "127.0.0.1:") { - t.Fatal("requires local disposable services") - } - host, port, err := net.SplitHostPort(address) - if err != nil { - t.Fatal(err) - } - for _, signal := range []syscall.Signal{syscall.SIGINT, syscall.SIGTERM} { - t.Run(signal.String(), func(t *testing.T) { - ctx, cancel := context.WithTimeout(t.Context(), 20*time.Second) - defer cancel() - database := "signal_test_" + bson.NewObjectID().Hex() - store, err := server.Connect(ctx, server.Config{MongoURI: uri, Database: database, RedisAddress: address}) - if err != nil { - t.Fatal(err) - } - defer store.Close(context.Background()) - defer store.DB.Drop(context.Background()) - key := base64.StdEncoding.EncodeToString(make([]byte, 32)) - command := exec.CommandContext(ctx, binary) - command.Env = []string{"PORT=0", "MONGODB_URI=" + uri, "MONGODB_DATABASE=" + database, "REDIS_HOSTNAME=" + host, "REDIS_PORT=" + port, "SESSION_SECRET=synthetic-signal-test", "CREDENTIAL_KEYS={\"test\":\"" + key + "\"}", "CREDENTIAL_ACTIVE_KEY_ID=test", "FOLDER=" + t.TempDir(), "PUBLIC_DIR=" + t.TempDir(), "CACHE_MONITORING_ENABLED=false", "STORAGE=filesystem"} - stderr, err := command.StderrPipe() - if err != nil { - t.Fatal(err) - } - if err := command.Start(); err != nil { - t.Fatal(err) - } - ready := make(chan string, 1) - go func() { - scanner := bufio.NewScanner(stderr) - for scanner.Scan() { - _, suffix, ok := strings.Cut(scanner.Text(), "address=") - if ok { - select { - case ready <- strings.Trim(suffix, "\""): - default: - } - } - } - }() - exited := make(chan error, 1) - go func() { exited <- command.Wait(); close(exited) }() - defer func() { - command.Process.Kill() - select { - case <-exited: - case <-time.After(5 * time.Second): - t.Error("server process did not exit") - } - }() - var bound string - select { - case bound = <-ready: - case err := <-exited: - t.Fatal("startup failed", err) - case <-ctx.Done(): - t.Fatal(ctx.Err()) - } - _, httpPort, err := net.SplitHostPort(bound) - if err != nil { - t.Fatal(bound, err) - } - client := http.Client{Timeout: time.Second} - response, err := client.Get("http://127.0.0.1:" + httpPort + "/healthcheck") - if err != nil { - t.Fatal(err) - } - response.Body.Close() - if response.StatusCode != 200 { - t.Fatal(response.StatusCode) - } - if err := command.Process.Signal(signal); err != nil { - t.Fatal(err) - } - select { - case err := <-exited: - if err != nil { - t.Fatal("signal did not exit cleanly", err) - } - case <-ctx.Done(): - t.Fatal("signal shutdown stalled") - } - }) - } -} diff --git a/backend/compose.shadow-app.yml b/backend/compose.shadow-app.yml deleted file mode 100644 index 90ce2d4..0000000 --- a/backend/compose.shadow-app.yml +++ /dev/null @@ -1,21 +0,0 @@ -# Add after compose.shadow.yml and compose.shadow-beta.yml for beta App testing. -services: - app: - environment: - GITHUB_PERMISSION_CACHE_SECONDS: "3600" - GITHUB_APP_ENABLED: "true" - GITHUB_APP_NEW_CONNECTIONS: "true" - GITHUB_APP_ID: ${SHADOW_GITHUB_APP_ID:?Set beta App ID} - GITHUB_APP_CLIENT_ID: ${SHADOW_GITHUB_APP_CLIENT_ID:?Set beta App client ID} - GITHUB_APP_CLIENT_SECRET: ${SHADOW_GITHUB_APP_CLIENT_SECRET:?Set beta App client secret} - GITHUB_APP_SLUG: ${SHADOW_GITHUB_APP_SLUG:?Set beta App slug} - GITHUB_APP_PRIVATE_KEY_FILE: /run/secrets/github-app-beta.pem - GITHUB_APP_CALLBACK: https://beta.durieux.me/github/app/callback - GITHUB_APP_WEBHOOK_SECRET: ${SHADOW_GITHUB_APP_WEBHOOK_SECRET:?Set beta webhook secret} - volumes: - - type: bind - source: ../secrets/github-app-beta.pem - target: /run/secrets/github-app-beta.pem - read_only: true - bind: - create_host_path: false diff --git a/backend/compose.shadow-beta.yml b/backend/compose.shadow-beta.yml deleted file mode 100644 index f5629e3..0000000 --- a/backend/compose.shadow-beta.yml +++ /dev/null @@ -1,19 +0,0 @@ -# HTTPS/OAuth overlay for the isolated shadow. Keeps all shadow data volumes. -services: - app: - environment: - APP_HOSTNAME: beta.durieux.me - AUTH_CALLBACK: https://beta.durieux.me/github/auth - COOKIE_SECURE: "true" - TRUST_PROXY: "2" - GITHUB_OAUTH_ENABLED: "true" - GITHUB_APP_ENABLED: "false" - GITHUB_APP_NEW_CONNECTIONS: "false" - CLIENT_ID: ${SHADOW_CLIENT_ID:?Set beta OAuth credentials in .env.go-shadow} - CLIENT_SECRET: ${SHADOW_CLIENT_SECRET:?Set beta OAuth credentials in .env.go-shadow} - networks: [default, outbound] - gateway: - volumes: - - ./shadow-beta-nginx.conf:/etc/nginx/nginx.conf:ro -networks: - outbound: {} diff --git a/backend/compose.shadow.yml b/backend/compose.shadow.yml deleted file mode 100644 index 140b15a..0000000 --- a/backend/compose.shadow.yml +++ /dev/null @@ -1,101 +0,0 @@ -# Isolated rehearsal only. Never attach production volumes, databases or Redis. -# docker compose --env-file .env.go-shadow -f backend/compose.shadow.yml up -d --build -name: anonymous-go-shadow -services: - app: - image: anonymous-github-go:shadow - build: - context: .. - dockerfile: Dockerfile - init: true - restart: unless-stopped - stop_grace_period: 45s - read_only: true - tmpfs: ["/tmp:size=2147483648,mode=1777"] - mem_limit: 3g - pids_limit: 128 - cap_drop: [ALL] - security_opt: [no-new-privileges:true] - volumes: [shadow_repositories:/app/repositories] - environment: - PORT: "5000" - NODE_ENV: production - SESSION_SECRET: ${SHADOW_SESSION_SECRET:?Generate .env.go-shadow first} - CREDENTIAL_KEYS: ${SHADOW_CREDENTIAL_KEYS:?Generate .env.go-shadow first} - CREDENTIAL_ACTIVE_KEY_ID: shadow-v1 - MONGODB_URI: mongodb://shadow:${SHADOW_DB_PASSWORD:?Generate .env.go-shadow first}@mongodb:27017/shadow?authSource=admin - REDIS_HOSTNAME: redis - STORAGE: filesystem - FOLDER: /app/repositories - PUBLIC_DIR: /app/public - APP_HOSTNAME: localhost:5001 - COOKIE_SECURE: "false" - GITHUB_OAUTH_ENABLED: "false" - GITHUB_APP_ENABLED: "false" - GITHUB_APP_NEW_CONNECTIONS: "false" - GOMEMLIMIT: 768MiB - ANONYMIZATION_MEMORY_MB: "512" - SHARED_CACHE_ENABLED: "true" - SHARED_CACHE_BYTES: "1073741824" - SHARED_CACHE_RESULT_BYTES: "536870912" - depends_on: - mongodb: {condition: service_healthy} - redis: {condition: service_healthy} - logging: - driver: json-file - options: {max-size: 10m, max-file: "3"} - gateway: - image: nginx:alpine - user: "101:101" - entrypoint: [nginx, -g, "daemon off;"] - restart: unless-stopped - read_only: true - tmpfs: [/tmp] - mem_limit: 64m - pids_limit: 32 - cap_drop: [ALL] - security_opt: [no-new-privileges:true] - ports: ["127.0.0.1:5001:8080"] - volumes: ["./shadow-nginx.conf:/etc/nginx/nginx.conf:ro"] - networks: [default, ingress] - depends_on: - app: {condition: service_healthy} - healthcheck: - test: [CMD, wget, -q, -O, /dev/null, "http://127.0.0.1:8080/api/healthcheck"] - interval: 5s - timeout: 5s - retries: 10 - mongodb: - image: mongo:7 - restart: unless-stopped - mem_limit: 1g - environment: - MONGO_INITDB_ROOT_USERNAME: shadow - MONGO_INITDB_ROOT_PASSWORD: ${SHADOW_DB_PASSWORD:?Generate .env.go-shadow first} - volumes: [shadow_mongodb:/data/db, shadow_mongodb_config:/data/configdb] - command: [mongod, --wiredTigerCacheSizeGB, "0.25", --quiet] - healthcheck: - test: [CMD, mongosh, --quiet, --eval, "db.adminCommand({ping:1}).ok"] - interval: 5s - timeout: 5s - retries: 20 - redis: - image: redis:7-alpine - restart: unless-stopped - mem_limit: 256m - command: [redis-server, --maxmemory, 128mb, --maxmemory-policy, noeviction, --appendonly, "yes"] - volumes: [shadow_redis:/data] - healthcheck: - test: [CMD, redis-cli, ping] - interval: 5s - timeout: 3s - retries: 20 -networks: - default: - internal: true - ingress: {} -volumes: - shadow_repositories: - shadow_mongodb: - shadow_mongodb_config: - shadow_redis: diff --git a/backend/compose.test.yml b/backend/compose.test.yml deleted file mode 100644 index ddd136d..0000000 --- a/backend/compose.test.yml +++ /dev/null @@ -1,10 +0,0 @@ -# Isolated infrastructure for backend integration tests; never uses production volumes. -services: - mongo: - image: mongo:7 - ports: ["127.0.0.1::27017"] - tmpfs: ["/data/db"] - redis: - image: redis:7-alpine - ports: ["127.0.0.1::6379"] - command: ["redis-server", "--save", "", "--appendonly", "no"] diff --git a/backend/compose.yml b/backend/compose.yml deleted file mode 100644 index fbfbfbe..0000000 --- a/backend/compose.yml +++ /dev/null @@ -1,40 +0,0 @@ -# Opt-in Go backend on the existing database network. Stop Node API and -# streamers before starting this service against the same database. -services: - go-backend: - image: anonymous-github-go:${GO_IMAGE_TAG:-local} - build: - context: .. - dockerfile: Dockerfile - init: true - restart: unless-stopped - stop_grace_period: 45s - env_file: ${GO_ENV_FILE:-../.env} - environment: - PORT: "5000" - REDIS_HOSTNAME: redis - DB_HOSTNAME: mongodb - COOKIE_SECURE: "true" - GOMEMLIMIT: 768MiB - ANONYMIZATION_MEMORY_MB: "512" - ports: - - "127.0.0.1:${GO_EXPOSED_PORT:-5001}:5000" - volumes: - - ../repositories:/app/repositories - read_only: true - tmpfs: - - /tmp:size=2147483648,mode=1777 - mem_limit: 3g - pids_limit: 128 - cap_drop: [ALL] - security_opt: [no-new-privileges:true] - networks: [existing] - logging: - driver: json-file - options: - max-size: "25m" - max-file: "4" -networks: - existing: - external: true - name: ${GO_BACKEND_NETWORK:?Set GO_BACKEND_NETWORK to the existing database network} diff --git a/backend/contracts/admin-casting-database.cjs b/backend/contracts/admin-casting-database.cjs deleted file mode 100644 index 0c40948..0000000 --- a/backend/contracts/admin-casting-database.cjs +++ /dev/null @@ -1,39 +0,0 @@ -'use strict'; -// Runs only against the isolated integration database supplied by the Go test. -const fs=require('node:fs'),vm=require('node:vm'),ts=require('typescript'),assert=require('node:assert/strict'); -require('ts-node/register/transpile-only'); -const mongoose=require('mongoose'); -const User=require('../../src/core/model/users/users.model').default; -const Repo=require('../../src/core/model/anonymizedRepositories/anonymizedRepositories.model').default; -const Conf=require('../../src/core/model/conference/conferences.model').default; -(async()=>{ - const uri=process.env.GO_TEST_MONGODB_URI,db=process.env.ADMIN_CAST_DATABASE; - assert(/^admin_cast_[0-9a-f]{24}$/.test(db||''));assert(['127.0.0.1','localhost'].includes(new URL(uri).hostname)); - const connection=await mongoose.createConnection(uri,{dbName:db}).asPromise(); - try { - const models=[User,Repo,Conf].map(m=>connection.model(m.modelName,m.schema,m.collection.name)); - const [users,repos,conferences]=models; - const id=n=>new mongoose.Types.ObjectId(n.toString(16).padStart(24,'0')); - await users.collection.insertMany([{_id:id(1),username:'alpha',dateOfEntry:new Date('2024-03-01T00:00:00Z'),status:'active',isAdmin:true},{_id:id(2),username:'beta',dateOfEntry:new Date('2023-01-01T00:00:00Z'),status:'banned',isAdmin:false}]); - await repos.collection.insertMany([{_id:id(11),repoId:'one',anonymizeDate:new Date('2024-03-01T00:00:00Z'),status:'ready',owner:id(1),conference:'alpha',size:{storage:3}},{_id:id(12),repoId:'two',anonymizeDate:new Date('2023-01-01T00:00:00Z'),status:'ready',owner:id(2),conference:'beta',size:{storage:5}}]); - const tree=ts.createSourceFile('admin.ts',fs.readFileSync('src/server/routes/admin.ts','utf8'),ts.ScriptTarget.Latest,true); - const helpers=['escapeRegex','isSafeSortField','parseSort','parseDateRange','csvEscape','sendCsv'].map(name=>tree.statements.find(s=>ts.isFunctionDeclaration(s)&&s.name?.text===name).getText(tree)).join('\n'); - const app=require('express')();app.set('query parser','extended');const parse=app.get('query parser fn'); - const cases=[]; - for(const kind of ['users','repos']){ - const route=tree.statements.find(s=>ts.isExpressionStatement(s)&&ts.isCallExpression(s.expression)&&s.expression.arguments[0]?.text==='/'+kind); - const mod={exports:{}};vm.runInNewContext(ts.transpile(helpers+'\nmodule.exports='+route.expression.arguments[1].getText(tree),{target:ts.ScriptTarget.ES2022}),{module:mod,Date,AnonymizedRepositoryModel:repos,UserModel:users,ConferenceModel:conferences}); - const queries=kind==='users'?['status[]=active','status=active&status=banned','status[_id]=active','status[$in]=active','status[$exists]=yes','status[$regex]=^act','status[$eq][_id]=active','status[$in][]=active','status[a]=active','status[$unknown]=x','status[]=active&format=csv']:['conference[]=alpha','conference=alpha&conference=beta','conference[_id]=alpha','conference[$in]=alpha','conference[$exists]=yes','conference[$eq][_id]=alpha','conference[$in][]=alpha','conference[a]=alpha','owner[]=alpha','owner=alpha&owner=beta','owner[_id]=alpha','owner[$in]=alpha','owner[$regex]=^alp','owner[a]=alpha','owner=missing&conference[a]=invalid','conference[]=alpha&format=csv']; - queries.push('dateFrom[]=2024-02-30','dateTo=2024-02-29T24:00:00Z','dateFrom=March%201%202024','dateFrom=2024-03-01T01:00:00%2B02:00','dateFrom=0001-01-01','dateFrom[toString]=x','dateTo[toString]=x','dateFrom[]=2024-02-30&format=csv'); - if(kind==='repos')queries.push('owner=missing&dateFrom[toString]=x'); - for(const query of queries){ - let output,csv;const headers={}; - try{await mod.exports({query:parse(query)},{json:value=>{output=value},setHeader:(k,v)=>{headers[k]=v},send:value=>{csv=value}}); - if(output){output=JSON.parse(JSON.stringify(output));output.results=output.results.map(r=>r._id);output.statusCounts.sort((a,b)=>String(a._id).localeCompare(String(b._id)));} - cases.push({kind,query,output,csv}); - }catch(e){cases.push({kind,query,error:true,errorMessage:e.message})} - } - } - process.stdout.write(JSON.stringify(cases)); - }finally{await connection.close()} -})().catch(e=>{console.error(e.message);process.exitCode=1}); diff --git a/backend/contracts/admin-casting.cjs b/backend/contracts/admin-casting.cjs deleted file mode 100644 index 65f040d..0000000 --- a/backend/contracts/admin-casting.cjs +++ /dev/null @@ -1,20 +0,0 @@ -'use strict'; -const fs=require('node:fs'),assert=require('node:assert/strict'); -require('ts-node/register/transpile-only'); -const User=require('../../src/core/model/users/users.model').default; -const Repo=require('../../src/core/model/anonymizedRepositories/anonymizedRepositories.model').default; -const app=require('express')();app.set('query parser','extended');const parse=app.get('query parser fn'); -const inputs=['','x=','x=active','x[]=active','x=active&x=banned','x[1]=active','x[0][0]=active','x[_id]=active','x[a]=active','x[toString]=active','x[$eq]=active','x[$ne]=banned','x[$in][]=active&x[$in][]=banned','x[$in]=active','x[$nin][]=banned','x[$all][]=active','x[$gt]=a','x[$gte]=a','x[$lt]=z','x[$lte]=z','x[$exists]=true','x[$exists]=false','x[$exists]=1','x[$exists]=yes','x[$exists]=no','x[$exists]=bad','x[$exists][]=true','x[$type]=string','x[$type][]=string&x[$type][]=2','x[$type][a]=x','x[$regex]=act.*&x[$options]=i','x[$not][$eq]=active','x[$not]=active','x[$not][$not][$eq]=active','x[$unknown]=x','x[$eq][]=active','x[$eq][_id]=active','x[$in][0][_id]=active','x[a]=active&x[$eq]=active']; -const cases=[]; -for(const [field,Model] of [['username',User],['status',User],['conference',Repo]])for(const input of inputs){ - const query=input.replace(/(^|&)x/g,(_,prefix)=>prefix+field),value=parse(query)[field]; - const row={field,query,present:!!value}; - if(value){ - const raw={[field]:value};row.raw=JSON.parse(JSON.stringify(raw)); - try{row.casted=JSON.parse(JSON.stringify(Model.find(raw).cast(Model)));row.rawAfter=JSON.parse(JSON.stringify(raw))}catch(e){row.error=true} - } - cases.push(row); -} -const file='backend/internal/server/testdata/admin-casting.json',output=JSON.stringify(cases,null,2)+'\n'; -if(process.argv.includes('--check'))assert.equal(fs.readFileSync(file,'utf8'),output);else fs.writeFileSync(file,output); -console.log(cases.length+' actual Mongoose admin casting contracts verified'); diff --git a/backend/contracts/admin-csv.cjs b/backend/contracts/admin-csv.cjs deleted file mode 100644 index 0978f24..0000000 --- a/backend/contracts/admin-csv.cjs +++ /dev/null @@ -1,28 +0,0 @@ -const fs=require('node:fs');const vm=require('node:vm');const assert=require('node:assert/strict');const ts=require('typescript'); -(async()=>{ - const path='src/server/routes/admin.ts';const tree=ts.createSourceFile(path,fs.readFileSync(path,'utf8'),ts.ScriptTarget.Latest,true); - const helpers=['escapeRegex','isSafeSortField','parseSort','parseDateRange','csvEscape','sendCsv'].map(name=>{const node=tree.statements.find(s=>ts.isFunctionDeclaration(s)&&s.name?.text===name);assert.ok(node);return node.getText(tree)}).join('\n'); - const now='2030-01-02T12:00:00.000Z';class FixedDate extends Date{constructor(...args){super(...(args.length?args:[now]))}} - const rich={repoId:'sample',username:'sample',conferenceID:'sample',name:'Conference',status:'ready',statusMessage:'Message',anonymizeDate:'2029-04-03T01:02:03.456Z',lastView:'2029-05-01T00:00:00.000Z',dateOfEntry:'2028-01-01T00:00:00.000Z',startDate:'2029-01-01T00:00:00.000Z',endDate:'2031-01-01T00:00:00.000Z',pageView:1.5,size:{storage:2.5},source:{repositoryName:'team/subgroup/project',branch:'main',commit:'opaque:revision',accessToken:'synthetic-secret'},options:{terms:['one','two']},emails:[{email:'chair@example.test'}],isAdmin:true,price:0.125,repositories:[{id:'one'},{id:'two'}],conference:'Conference',apiTokens:[{tokenHash:'synthetic-secret'}]}; - const samples=[{name:'empty',rows:[]},{name:'minimal',rows:[{}]},{name:'rich',rows:[rich]}]; - for(const value of [' leading','trailing ','a,b','say "hi"','line\nnext','line\rnext','back\\slash','é😀'])samples.push({name:`text/${JSON.stringify(value)}`,rows:[{...rich,name:value,username:value,repoId:value,statusMessage:value}]}); - for(const value of ['0001-01-01T00:00:00.000Z','2029-01-01T01:00:00+01:00',null])samples.push({name:`date/${value}`,rows:[{...rich,anonymizeDate:value,lastView:value,dateOfEntry:value,startDate:value,endDate:value}]}); - samples.push({name:'multiple',rows:[rich,{}, {...rich,pageView:1e21,size:{storage:1e20},price:1e-7}]}); - const cases=[]; - for(const kind of ['repos','users','conferences']) { - const route=tree.statements.find(s=>ts.isExpressionStatement(s)&&ts.isCallExpression(s.expression)&&s.expression.expression.getText(tree)==='router.get'&&s.expression.arguments[0]?.text===`/${kind}`); - const code=ts.transpileModule(`${helpers}\nmodule.exports=${route.expression.arguments[1].getText(tree)}`,{compilerOptions:{target:ts.ScriptTarget.ES2022,module:ts.ModuleKind.CommonJS}}).outputText; - for(const sample of samples) { - const chain={lean:async()=>sample.rows};chain.sort=chain.limit=()=>chain; - const model={find:()=>chain};const mod={exports:{}}; - vm.runInNewContext(code,{module:mod,Date:FixedDate,AnonymizedRepositoryModel:model,UserModel:model,ConferenceModel:model}); - const headers={};let body; - await mod.exports({query:{format:'csv'}},{setHeader:(key,value)=>headers[key]=value,send:value=>body=value}); - assert.equal(typeof body,'string');assert.ok(!body.includes('synthetic-secret')); - cases.push({name:`${kind}/${sample.name}`,kind,rows:sample.rows,expected:body,headers}); - } - } - const output=JSON.stringify(cases,null,2)+'\n';const target='backend/internal/server/testdata/admin-csv.json'; - if(process.argv.includes('--check'))assert.equal(fs.readFileSync(target,'utf8'),output,'TypeScript CSV output changed');else fs.writeFileSync(target,output); - console.log(`${cases.length} TypeScript CSV contracts ${process.argv.includes('--check')?'verified':'generated'}`); -})().catch(error=>{console.error(error);process.exitCode=1}); diff --git a/backend/contracts/admin-dates.cjs b/backend/contracts/admin-dates.cjs deleted file mode 100644 index 2bfdbf1..0000000 --- a/backend/contracts/admin-dates.cjs +++ /dev/null @@ -1,17 +0,0 @@ -'use strict'; -const fs=require('node:fs'),ts=require('typescript'),assert=require('node:assert/strict'); -const source=ts.createSourceFile('admin.ts',fs.readFileSync('src/server/routes/admin.ts','utf8'),ts.ScriptTarget.Latest,true); -const method=source.statements.find(n=>ts.isFunctionDeclaration(n)&&n.name?.text==='parseDateRange'); -const parseRange=new Function(ts.transpile(method.getText(source)+';return parseDateRange;',{target:ts.ScriptTarget.ES2022}))(); -const app=require('express')();app.set('query parser','extended');const parse=app.get('query parser fn'); -const values=['','invalid','0000','0001-01-01','2024','2024-02','2023-02-29','2024-02-30','2024-02-31','2024-02-32','2024-00-01','2024-13-01','2024-01-00','2024-01-01','2024T00:00','2024-02T00:00','2024-01-01t00:00z',' 2024-01-01 ','2024-01-01T00:00Z ','2024-01-01T00:00Z\0ignored','+010000-01-01','-000001-01-01','-000000-01-01','+275760-09-13','+275760-09-14','-271821-04-20','-271821-04-19']; -for(const date of ['2024-02-29','2023-02-29','2024-02-30'])for(const clock of ['00:00','12:34:56','12:34:56.1','12:34:56.123456789','24:00','24:00:00.001','25:00','12:60','12:34:60'])for(const zone of ['Z','+02:30','-0330',''])values.push(date+'T'+clock+zone); -for(const value of ['0','1','12','13','31','32','49','50','99','100','000000-01-01','-000000-02-03','-000000-01-01T00:00Z','1/2/03','2024/02/30','2024.02.29','Jan 5','5 January 2024','Tue, 05 Mar 2024 12:34:56 GMT','March 5, 2024 12:30 PM','2024-01-01 12:34:56','2024-01-01 12:34:56.1234 GMT+0200','2024-01-01 (comment)','(comment) 2024-01-01','garbage 2024-01-01','garbage2024-01-01','2024-01-01 garbage','2024-01-01 GMT-8','2024-01-01 12::30','2024-01-01 12:30:40 EST','999999999999999999999999'])values.push(value); -for(const date of ['2024-02-29','2023-02-30','0001-01-01','-000000-02-03','01/02/03','32/01/02','Jan 5','5 March 49','December 31 99','2024,1,2']) - for(const time of ['',' 12:34',' 12:34:56.000123',' 12:34:56.999999999999',' 24:00',' 12:00 AM',' 12:00 PM',' 0:00 PM',' 13:00 PM']) - for(const zone of ['',' GMT',' UTC+01:30',' EST',' +0130'])values.push(date+time+zone); -for(const suffix of [' ','\t','\n','\uFEFF',' (ignored)',' garbage','\0ignored'])values.push('2024-01-01'+suffix); -const queries=['',...values.map(v=>'dateFrom='+encodeURIComponent(v)), 'dateFrom[]=2024-02-29','dateFrom[0]=2024-02-29','dateFrom=2024-02-29&dateFrom=2024-03-01','dateFrom[]=','dateFrom[x]=x','dateFrom[toString]=x','dateFrom=invalid&dateTo[]=2024-03-01','dateTo[toString]=x']; -const cases=queries.map(query=>{try{return {query,expected:parseRange({query:parse(query)},'date')}}catch{return {query,error:true}}}); -const file='backend/internal/server/testdata/admin-dates.json',output=JSON.stringify(cases,null,2)+'\n';if(process.argv.includes('--check'))assert.equal(fs.readFileSync(file,'utf8'),output);else fs.writeFileSync(file,output); -console.log(cases.length+' actual TypeScript admin date/coercion contracts verified'); diff --git a/backend/contracts/admin-filters.cjs b/backend/contracts/admin-filters.cjs deleted file mode 100644 index 97d6bfb..0000000 --- a/backend/contracts/admin-filters.cjs +++ /dev/null @@ -1,39 +0,0 @@ -const fs=require('node:fs'); -const vm=require('node:vm'); -const assert=require('node:assert/strict'); -const ts=require('typescript'); -(async()=>{ - const path='src/server/routes/admin.ts'; - const tree=ts.createSourceFile(path,fs.readFileSync(path,'utf8'),ts.ScriptTarget.Latest,true); - const helpers=['escapeRegex','isSafeSortField','parseSort','parseDateRange'].map(name=>{ - const declaration=tree.statements.find(s=>ts.isFunctionDeclaration(s)&&s.name?.text===name);assert.ok(declaration,name);return declaration.getText(tree); - }).join('\n'); - const app=require('express')();app.set('query parser','extended');const parse=app.get('query parser fn'); - const cases=[]; - for(const kind of ['repos','users','conferences']) { - const statement=tree.statements.find(s=>ts.isExpressionStatement(s)&&ts.isCallExpression(s.expression)&&s.expression.expression.getText(tree)==='router.get'&&s.expression.arguments[0]?.text===`/${kind}`); - assert.ok(statement,kind); - const handler=statement.expression.arguments[1]; - const code=ts.transpileModule(`${helpers}\nmodule.exports=${handler.getText(tree)}`,{compilerOptions:{target:ts.ScriptTarget.ES2022,module:ts.ModuleKind.CommonJS}}).outputText; - const queries=[{},...['ready','error','expired','removed','preparing'].map(flag=>({[flag]:'true'})),{ready:'true',preparing:'true',expired:'true',removed:'true',error:'true'},{ready:'false',status:'archived'},{owner:'exists'},{owner:'missing'},{owner:'missing',search:'private',conference:'ignored',ready:'true'},{conference:'conf'},{search:'Alice'},{search:'a-b, c# [x].*'},{search:'line\n\t\uFEFF\u0085'},{dateFrom:'2030-01-01',dateTo:'2031-01-01'},{dateFrom:'invalid',dateTo:'2030-02-03T01:02:03.456Z'},{role:'admin',status:'active'},{search:'test',owner:'exists',conference:'conf',ready:'true',error:'true',dateFrom:'2029-01-01'}]; - const inputs=queries.map(query=>({query})); - for(const rawQuery of ['ready[]=true','ready=true&ready=false','ready[0]=true','ready[x]=true','ready[toString]=true','error[]=true&preparing[]=true&removed[]=true&expired[]=true','search[]=Alice','search=Alice&search=Bob','search[x]=Alice','search[toString]=Alice','search=','search=%F0%9F%98%80','role[]=admin','role=admin&role=user','role[x]=admin','role=admin','search[]=x&owner=missing','search=x&ready[toString]=true']) inputs.push({rawQuery,query:parse(rawQuery)}); - for(const input of inputs) { - const {query}=input; - const chain={countDocuments:async()=>0,exec:async()=>[],then:resolve=>resolve([])}; - for(const name of ['skip','sort','limit','lean'])chain[name]=()=>chain; - const model={find:()=>chain,aggregate:async()=>[],findOne:async()=>query.owner==='exists'?{_id:'owner-id'}:null}; - const mod={exports:{}}; - vm.runInNewContext(code,{module:mod,Date,AnonymizedRepositoryModel:model,UserModel:model,ConferenceModel:model}); - let output; - try { - await mod.exports({query},{json:value=>{output=value;}}); - assert.ok(output); - cases.push({kind,...input,expected:output.query,missingOwner:kind==='repos'&&query.owner==='missing'}); - } catch {cases.push({kind,...input,error:true});} - } - } - const target='backend/internal/server/testdata/admin-filters.json';const output=JSON.stringify(cases,null,2)+'\n'; - if(process.argv.includes('--check'))assert.equal(fs.readFileSync(target,'utf8'),output,'TypeScript admin filters changed');else fs.writeFileSync(target,output); - console.log(`${cases.length} TypeScript admin filter contracts ${process.argv.includes('--check')?'verified':'generated'}`); -})().catch(error=>{console.error(error);process.exitCode=1}); diff --git a/backend/contracts/admin-pagination.cjs b/backend/contracts/admin-pagination.cjs deleted file mode 100644 index e4b532b..0000000 --- a/backend/contracts/admin-pagination.cjs +++ /dev/null @@ -1,36 +0,0 @@ -const fs=require('node:fs');const vm=require('node:vm');const assert=require('node:assert/strict');const ts=require('typescript'); -const path='src/server/routes/admin.ts';const tree=ts.createSourceFile(path,fs.readFileSync(path,'utf8'),ts.ScriptTarget.Latest,true); -const helpers=['isSafeSortField','parseSort'].map(name=>{const node=tree.statements.find(s=>ts.isFunctionDeclaration(s)&&s.name?.text===name);assert.ok(node);return node.getText(tree)}).join('\n'); -const app=require('express')();app.set('query parser','extended');const parse=app.get('query parser fn'); -const cases=[]; -for(const kind of ['repos','users','conferences']) { - const route=tree.statements.find(s=>ts.isExpressionStatement(s)&&ts.isCallExpression(s.expression)&&s.expression.expression.getText(tree)==='router.get'&&s.expression.arguments[0]?.text===`/${kind}`); - const declarations=route.expression.arguments[1].body.statements.filter(s=>ts.isVariableStatement(s)&&s.declarationList.declarations.some(d=>['page','limit'].includes(d.name.getText(tree)))); - assert.equal(declarations.length,2); - const mod={exports:{}}; - const code=ts.transpileModule(`${helpers}\nmodule.exports=(req)=>{${declarations.map(s=>s.getText(tree)).join('\n')}return {page,limit,sort:parseSort(req)}}`,{compilerOptions:{target:ts.ScriptTarget.ES2022,module:ts.ModuleKind.CommonJS}}).outputText; - vm.runInNewContext(code,{module:mod}); - const queries=[{},...['','0','-1','-20suffix','-0x10','2','2.9','2e3','+12suffix',' 17 ','0x10','0Xff','0b10','0007','0xg','junk','\uFEFF12','\u008512','10000','999999999999999999999999999999'].map(value=>({page:value,limit:value})),...['_id','repoId','size.storage','status','$where','a b','a/b','a;drop','status\n','status\r\n','', ['status','_id']].map(sort=>({sort,direction:'asc'})),{sort:'status',direction:['asc','desc']},{sort:'status',direction:'ASC'},{page:['3','4'],limit:['2','3']}]; - for(const query of queries) { - const expected=mod.exports({query}); - cases.push({kind,query,expected}); - } - for(const rawQuery of ['page[]=3&limit[]=2','page[1]=3&page[0]=2','page[x]=2','page[toString]=x','limit[toString]=x','sort[]=status&direction[]=asc','sort=status&sort[x]=foo','format[]=csv','format=csv','direction=asc&direction=desc']) { - try { cases.push({kind,rawQuery,expected:mod.exports({query:parse(rawQuery)})}); } - catch { cases.push({kind,rawQuery,error:true}); } - } -} -const output=JSON.stringify(cases,null,2)+'\n';const target='backend/internal/server/testdata/admin-pagination.json'; -if(process.argv.includes('--check'))assert.equal(fs.readFileSync(target,'utf8'),output,'TypeScript admin pagination changed');else fs.writeFileSync(target,output); -console.log(`${cases.length} TypeScript admin pagination contracts ${process.argv.includes('--check')?'verified':'generated'}`); -// The repository/conference routes use find rather than aggregation. Verify -// the installed driver's negative-limit command behavior, not an inferred -// aggregate equivalent. -const {FindOperation}=require('mongodb/lib/operations/find'); -const {MongoDBNamespace}=require('mongodb/lib/utils'); -for(const limit of [-1,-10,-1001]) { - let command; - new FindOperation(null,new MongoDBNamespace('fixture','rows'),{}, {limit,skip:0}).executeCallback({command:(_ns,value,_options,callback)=>{command=value;callback(null,{})}},null,()=>{}); - assert.equal(command.limit,-limit);assert.equal(command.singleBatch,true); -} -console.log('3 installed MongoDB driver negative-limit contracts verified'); diff --git a/backend/contracts/admin-query.cjs b/backend/contracts/admin-query.cjs deleted file mode 100644 index b90f28c..0000000 --- a/backend/contracts/admin-query.cjs +++ /dev/null @@ -1,15 +0,0 @@ -'use strict'; -const fs=require('node:fs'),ts=require('typescript'),assert=require('node:assert/strict'); -const source=ts.createSourceFile('admin.ts',fs.readFileSync('src/server/routes/admin.ts','utf8'),ts.ScriptTarget.Latest,true); -function find(n,p){if(p(n))return n;let result;ts.forEachChild(n,c=>{result ||= find(c,p)});return result} -const route=path=>find(source,n=>ts.isCallExpression(n)&&n.expression.getText(source)==='router.get'&&n.arguments[0]?.text===path); -const expr=(node,name)=>find(node,n=>ts.isVariableDeclaration(n)&&n.name.getText(source)===name).initializer.getText(source); -const ranges=expr(source,'RANGE_MINUTES');const metrics=route('/queues/metrics'),errors=route('/errors'); -const queueSelect=new Function('req',`const RANGE_MINUTES=${ranges};const queueName=${expr(metrics,'queueName')};if(!['download','remove','cache'].includes(queueName))return {error:'queue_not_found'};const range=${expr(metrics,'range')};const minutes=${expr(metrics,'minutes')};return {queue:queueName,range,minutes:typeof minutes==='number'?minutes:0};`); -const logger=ts.createSourceFile('logger.ts',fs.readFileSync('src/core/logger.ts','utf8'),ts.ScriptTarget.Latest,true); -const max=find(logger,n=>ts.isVariableDeclaration(n)&&n.name.getText(logger)==='ERROR_LOG_MAX').initializer.getText(logger); -const errorSelect=new Function('req',`const ERROR_LOG_MAX=${max};const offset=${expr(errors,'offset')};const limit=${expr(errors,'limit')};return {offset:Math.min(Number.MAX_SAFE_INTEGER,offset),limit};`); -const app=require('express')();app.set('query parser','extended');const parse=app.get('query parser fn'); -const input={queue:['','queue[]=cache','queue[]=','queue=cache&queue=remove','queue[x]=cache','queue=unknown&range[toString]=x','range[]=','range[]=24h','range[1]=7d&range[0]=1h','range[x]=24h','range[toString]=x','queue[toString]=x',...['toString','constructor','__proto__','hasOwnProperty','valueOf','toLocaleString'].map(x=>'range='+x)],errors:['','offset[]=2&limit[]=7','offset[1]=2&offset[0]=7','offset[x]=3','limit[x]=3','offset=&offset=2&limit=7&limit=9','offset[]=&limit[]=','offset[toString]=3','limit[toString]=3','offset=-2&limit=-2','offset=0x10&limit=0x10']}; -const output={};for(const [kind,queries] of Object.entries(input))output[kind]=queries.map(query=>{try{return{query,...(kind==='queue'?queueSelect:errorSelect)({query:parse(query)})}}catch{return{query,error:'invalid_query_value'}}}); -const file='backend/internal/server/testdata/admin-query.json',text=JSON.stringify(output,null,2)+'\n';if(process.argv.includes('--check'))assert.equal(fs.readFileSync(file,'utf8'),text);else fs.writeFileSync(file,text);console.log(`${output.queue.length+output.errors.length} TypeScript admin query contracts verified`); diff --git a/backend/contracts/admin-user.cjs b/backend/contracts/admin-user.cjs deleted file mode 100644 index 4f78a5b..0000000 --- a/backend/contracts/admin-user.cjs +++ /dev/null @@ -1,34 +0,0 @@ -const fs=require('node:fs');const vm=require('node:vm');const assert=require('node:assert/strict');const ts=require('typescript'); -(async()=>{ - const now='2030-01-01T12:00:00.000Z';Date.now=()=>new Date(now).getTime(); - require('ts-node/register/transpile-only');const mongoose=require('mongoose'); - const UserModel=mongoose.model('admin_user_contract',require('../../src/core/model/users/users.schema.ts').default); - const RepositoryModel=mongoose.model('Repository',require('../../src/core/model/repositories/repositories.schema.ts').default); - const path='src/core/User.ts';const tree=ts.createSourceFile(path,fs.readFileSync(path,'utf8'),ts.ScriptTarget.Latest,true); - const cls=tree.statements.find(s=>ts.isClassDeclaration(s)&&s.name?.text==='User');const method=cls.members.find(s=>ts.isMethodDeclaration(s)&&s.name.getText(tree)==='toJSON');assert.ok(method); - const mod={exports:{}};vm.runInNewContext(ts.transpileModule(`module.exports=function() ${method.body.getText(tree)}`,{compilerOptions:{target:ts.ScriptTarget.ES2022}}).outputText,{module:mod}); - const uid='111111111111111111111111',rid='222222222222222222222222',rid2='333333333333333333333333',missing='444444444444444444444444'; - const base={_id:uid,username:'sample',dateOfEntry:now}; - const repo={_id:rid,externalId:'forge:opaque-id',name:'team/subgroup/project',source:'fixture',url:'https://forge.test/team/subgroup/project',dateOfEntry:now,size:123,defaultBranch:'main',pageSource:{branch:'docs',path:'/'},branches:[{_id:'555555555555555555555555',name:'main',commit:'opaque:revision',readme:'Readme'}]}; - const inputs=[ - ['minimal',base,[]], - ['defaults',{_id:uid,username:'sample'},[]], - ['rich',{...base,photo:'https://avatar.test',isAdmin:true,status:'banned',externalIDs:{github:'123'},accessTokenDates:{github:now},emails:[{_id:'666666666666666666666666',email:'owner@example.test',default:true}],projectNames:{'repo:example':'Project'},default:{terms:['Alice'],options:{expirationMode:'never',image:false,page:'docs'}},__v:2,accessTokens:{github:'synthetic-secret'},apiTokens:[{tokenHash:'synthetic-secret'}]},[]], - ['populated',{...base,repositories:[rid,rid2]},[repo,{_id:rid2,name:'minimal'}]], - ['missing-reference',{...base,repositories:[missing,rid]},[repo]], - ['duplicate-references',{...base,repositories:[rid,rid]},[repo]], - ['null-fields',{...base,isAdmin:null,status:null,default:null,emails:null,externalIDs:null,projectNames:null,repositories:null},[]], - ['empty-maps',{...base,externalIDs:{},accessTokenDates:{},projectNames:{},default:{options:{}}},[]], - ]; - const cases=[]; - for(const [name,user,repositories]of inputs){ - const document=UserModel.hydrate(user); - RepositoryModel.find=(query)=>({exec:async()=>repositories.filter(r=>query._id.$in.map(String).includes(r._id)).map(r=>RepositoryModel.hydrate(r))}); - await UserModel.populate(document,{path:'repositories',model:RepositoryModel}); - const expected=mod.exports.call({_model:document}); - cases.push({name,user,repositories,expected}); - } - const output=JSON.stringify({now,cases},null,2)+'\n';const target='backend/internal/server/testdata/admin-user.json'; - if(process.argv.includes('--check'))assert.equal(fs.readFileSync(target,'utf8'),output,'TypeScript admin user output changed');else fs.writeFileSync(target,output); - console.log(`${cases.length} TypeScript populated user contracts ${process.argv.includes('--check')?'verified':'generated'}`); -})().catch(error=>{console.error(error);process.exitCode=1}); diff --git a/backend/contracts/benchmark.cjs b/backend/contracts/benchmark.cjs deleted file mode 100644 index 9a6959b..0000000 --- a/backend/contracts/benchmark.cjs +++ /dev/null @@ -1,17 +0,0 @@ -// Compare the same synthetic inputs in fresh Node and Go processes. Run from repository root. -const {spawnSync}=require('node:child_process'); -const fs=require('node:fs'); -if(process.argv[2]==='node') { - require('ts-node/register/transpile-only'); - const {ContentAnonimizer}=require('../../src/core/anonymize-utils'); - const {createHash}=require('node:crypto'); - const terms=['first.last','user@example.org','dept.example.edu','lab.io','project.org','Author X. Name',...Array.from({length:41},(_,i)=>`Researcher${i}`)]; - const row='123,456,78.91234,-45.123456\n'; - const fixtures=[['2 MB CSV, 47 absent terms',()=>row.repeat(70000),terms],['100 MB CSV, 47 absent terms',()=>row.repeat(3600000),terms],['50 MB CSV, sparse matches',()=>`first.last\n${row.repeat(1800000)}\nhttps://host/user@example.org`,terms],['22 MB text, 1.2 million replacements',()=> 'Alice 123 first.last,45.678,-23.456\n'.repeat(600000),['Alice',...terms]]]; - for(const [name,fixture,rules] of fixtures){const input=fixture();let t=performance.now();const engine=new ContentAnonimizer({terms:rules});const compileMs=performance.now()-t;t=performance.now();try{const output=engine.anonymize(input);const matchMs=performance.now()-t;console.log(JSON.stringify({runtime:process.version,name,inputBytes:Buffer.byteLength(input),outputBytes:Buffer.byteLength(output),compileMs,matchMs,sha256:createHash('sha256').update(output).digest('hex')}))}catch(e){console.log(JSON.stringify({name,error:e.message}))}} -} else { - const go=process.env.GO_BENCHMARK_BINARY;if(!go)throw new Error('GO_BENCHMARK_BINARY required'); - const samples=[];for(let run=0;run<3;run++)for(const runtime of run%2?['go','node']:['node','go']){const child=runtime==='node'?spawnSync(process.execPath,[__filename,'node'],{encoding:'utf8',timeout:120000}):spawnSync(go,[],{encoding:'utf8',timeout:120000});if(child.status!==0)throw new Error(child.stderr||String(child.error));for(const line of child.stdout.trim().split('\n'))samples.push({run,implementation:runtime,...JSON.parse(line)})} - const med=a=>a.sort((a,b)=>a-b)[Math.floor(a.length/2)];const comparison=[...new Set(samples.map(v=>v.name))].map(name=>{const n=samples.filter(v=>v.name===name&&v.implementation==='node'),g=samples.filter(v=>v.name===name&&v.implementation==='go');if([...n,...g].some(v=>v.error)||new Set([...n,...g].map(v=>v.sha256)).size!==1)throw new Error(`output mismatch: ${name}`);const nodeMs=med(n.map(v=>v.matchMs)),goMs=med(g.map(v=>v.matchMs));return {name,nodeMedianMs:nodeMs,goMedianMs:goMs,speedup:nodeMs/goMs,sha256:n[0].sha256}}); - console.log(JSON.stringify({measuredAt:new Date().toISOString(),method:'Three fresh processes per runtime, alternating order; transform only, excludes compilation, I/O, child startup and fixture generation. Synthetic data, not production load.',comparison,samples},null,2)); -} diff --git a/backend/contracts/blob-index.cjs b/backend/contracts/blob-index.cjs deleted file mode 100644 index 217a414..0000000 --- a/backend/contracts/blob-index.cjs +++ /dev/null @@ -1,23 +0,0 @@ -const fs = require('node:fs'); -const os = require('node:os'); -const path = require('node:path'); -const assert = require('node:assert/strict'); -process.env.SESSION_SECRET ||= 'synthetic-blob-index'; -require('ts-node/register/transpile-only'); -const config = require('../../src/config').default; -config.CACHE_MONITORING_ENABLED = false; -const {BlobCache} = require('../../src/core/blob-cache'); -const root = fs.mkdtempSync(path.join(os.tmpdir(), 'go-blob-schema-')); -let cache; -try { - cache = new BlobCache({root, budget: 65536, maxObject: 4096}); - const rows = cache.db.prepare(`SELECT type,name,sql FROM sqlite_master WHERE sql IS NOT NULL AND name NOT LIKE 'sqlite_%' - ORDER BY CASE type WHEN 'table' THEN 0 WHEN 'index' THEN 1 ELSE 2 END,name`).all(); - assert.ok(rows.some(row => row.name === 'summary')); - const sql = '-- Generated from src/core/blob-cache.ts by backend/contracts/blob-index.cjs.\n' + rows.map(row => - row.sql.replace(/^CREATE (TABLE|INDEX|TRIGGER) (?!IF NOT EXISTS)/, 'CREATE $1 IF NOT EXISTS ') + ';').join('\n') + '\n'; - const target = 'backend/internal/blobcache/schema.sql'; - if (process.argv.includes('--check')) assert.equal(fs.readFileSync(target, 'utf8'), sql, 'TypeScript cache schema changed'); - else fs.writeFileSync(target, sql); - console.log(`${rows.length} TypeScript cache schema objects verified`); -} finally { cache?.close(); fs.rmSync(root, {recursive: true, force: true}); } diff --git a/backend/contracts/cache-metrics.cjs b/backend/contracts/cache-metrics.cjs deleted file mode 100644 index 87794e6..0000000 --- a/backend/contracts/cache-metrics.cjs +++ /dev/null @@ -1,31 +0,0 @@ -// Run the TypeScript report against a deterministic database protocol fixture. -const fs = require('node:fs'); -const vm = require('node:vm'); -const ts = require('typescript'); -const assert = require('node:assert/strict'); -const source = fs.readFileSync('src/core/cache-observability.ts', 'utf8'); -const code = ts.transpileModule(source, {compilerOptions:{module:ts.ModuleKind.CommonJS,target:ts.ScriptTarget.ES2022}}).outputText; -const cases = []; -for (const input of [undefined, '', '15', '60', '1440', '10080', '30', ' 15 ', '1.5e1', '0xf', '0b1111', '15.0', '15x', ['15'], ['15','60']]) { - let selection; - class DatabaseSync { - exec() {} - prepare(sql) { return { - run() {}, - get: () => ({dropped:3}), - all: (...args) => { selection=args; return []; }, - }; } - } - const module={exports:{}}; - const config={CACHE_MONITORING_ENABLED:true,SHARED_CACHE_PATH:'/synthetic'}; - const dependencies={os:{hostname:()=> 'synthetic'},'node:sqlite':{DatabaseSync},fs:{mkdirSync(){}},path:require('node:path'),'../config':{default:config},'./request-monitoring':{cacheTraffic:()=> 'background'}}; - class FixedDate extends Date { static now() { return 1800000000000; } } - vm.runInNewContext(code,{exports:module.exports,module,require:name=>{assert.ok(dependencies[name],name);return dependencies[name]},Date:FixedDate,process:{pid:1},setInterval(){},clearInterval(){}}); - const report=module.exports.cacheMetricsReport(Number(input)); - cases.push({input:input===undefined?null:input,windowMinutes:report.windowMinutes,period:selection[0],cutoff:selection[1],buckets:report.latencyBucketsMs}); -} -const target='backend/internal/server/testdata/cache-metrics.json'; -const output=JSON.stringify(cases,null,2)+'\n'; -if(process.argv.includes('--check')) assert.equal(fs.readFileSync(target,'utf8'),output); -else fs.writeFileSync(target,output); -console.log(`${cases.length} TypeScript cache report contracts ${process.argv.includes('--check')?'verified':'generated'}`); diff --git a/backend/contracts/cache-report-state.cjs b/backend/contracts/cache-report-state.cjs deleted file mode 100644 index b082cda..0000000 --- a/backend/contracts/cache-report-state.cjs +++ /dev/null @@ -1,27 +0,0 @@ -const fs=require('node:fs'),vm=require('node:vm'),ts=require('typescript'),assert=require('node:assert/strict'); -const file='src/server/routes/admin.ts',tree=ts.createSourceFile(file,fs.readFileSync(file,'utf8'),ts.ScriptTarget.Latest,true); -let handler; -function visit(n){if(ts.isCallExpression(n)&&n.expression.getText(tree)==='router.get'&&n.arguments[0]?.text==='/cache')handler=n.arguments[1].getText(tree);ts.forEachChild(n,visit);} -visit(tree);assert.ok(handler); -const code=ts.transpileModule(`module.exports=${handler}`,{compilerOptions:{module:ts.ModuleKind.CommonJS,target:ts.ScriptTarget.ES2022}}).outputText; -const states=[ - {name:'disabled',enabled:false,storage:'filesystem'}, - {name:'source only',enabled:true,storage:'filesystem',source:true}, - {name:'source and results',enabled:true,storage:'filesystem',source:true,results:true}, - {name:'s3',enabled:true,storage:'s3'}, - {name:'source unavailable',enabled:true,storage:'filesystem',source:true,sourceError:true}, - {name:'results unavailable',enabled:true,storage:'filesystem',source:true,results:true,resultError:true}, -]; -(async()=>{ - const rows=[]; - for(const input of states){ - const fixture={exports:{}};let expected,headers={}; - const stats={blobs:0,originalBytes:0,storedBytes:0,allocatedBytes:0,activeReaders:0,decisions:0,reservedBytes:0,budgetBytes:65536,maxObjectBytes:4096,oldestAccess:null}; - vm.runInNewContext(code,{module:fixture,config:{SHARED_CACHE_ENABLED:input.enabled,STORAGE:input.storage},cacheMetricsReport:()=>({available:false,reason:'Monitoring is disabled',rows:[]}),sharedBlobCache:()=>input.source?{stats(){if(input.sourceError)throw Error('private path');return stats}}:undefined,resultBlobCache:()=>input.results?{stats(){if(input.resultError)throw Error('private path');return stats}}:undefined}); - await fixture.exports({query:{}},{set(k,v){headers[k]=v},json(v){expected=v}}); - rows.push({input,expected,headers}); - } - const target='backend/internal/server/testdata/cache-report-state.json',data=JSON.stringify(rows,null,2)+'\n'; - if(process.argv.includes('--check'))assert.equal(fs.readFileSync(target,'utf8'),data);else fs.writeFileSync(target,data); - console.log(`${rows.length} TypeScript cache report state contracts ${process.argv.includes('--check')?'verified':'generated'}`); -})().catch(e=>{console.error(e);process.exitCode=1}); diff --git a/backend/contracts/compression.cjs b/backend/contracts/compression.cjs deleted file mode 100644 index 2c0a2f4..0000000 --- a/backend/contracts/compression.cjs +++ /dev/null @@ -1,39 +0,0 @@ -const fs=require('node:fs'); -const vm=require('node:vm'); -const assert=require('node:assert/strict'); -const http=require('node:http'); -const zlib=require('node:zlib'); -const crypto=require('node:crypto'); -const express=require('express'); -const compression=require('compression'); -const ts=require('typescript'); -const tree=ts.createSourceFile('index.ts',fs.readFileSync('src/server/index.ts','utf8'),ts.ScriptTarget.Latest,true); -let argument; -function visit(node){if(ts.isCallExpression(node)&&node.expression.getText(tree)==='compression')argument=node.arguments[0].getText(tree);ts.forEachChild(node,visit)} -visit(tree);assert.ok(argument); -const options=vm.runInNewContext(ts.transpileModule(`(${argument})`,{compilerOptions:{target:ts.ScriptTarget.ES2022}}).outputText,{compression}); -const cases=[]; -function add(overrides){cases.push({name:`compression-${cases.length}`,path:'/api/example',method:'GET',type:'application/json',size:2048,accept:'gzip',...overrides})} -for(const accept of ['', 'gzip','br','deflate','identity','*','gzip, br','deflate, gzip','identity, gzip','GZIP','gzip;q=0','*;q=0','gzip;q=0,*','gzip;q=0.5,identity;q=1','gzip;q=1,br;q=.5','deflate;q=.5,gzip;q=.5','deflate;q=1,identity;q=1','unknown','gzip;q=NaN','gzip;q=1junk','gzip;q=-1','gzip;q=2','gzip;Q=0','gzip;q =0','gzip;q=0,gzip;q=1','gzip;q=1,gzip;q=0','br;q=0,*;q=.5','gzip;q=Infinity','gzip;q=0.1; q=1'])add({accept}); -for(const type of ['','text/plain','Text/HTML; charset=UTF-8','application/json','application/problem+json','application/javascript','application/octet-stream','application/pdf','image/png','image/svg+xml','font/woff2','text/event-stream','application/unknown','application/example+xml','text/x-unknown'])for(const size of [0,10,1023,1024])add({type,size}); -for(const control of ['no-transform','public, no-transform','NO-TRANSFORM','no-transform=1','x-no-transform','public, no-transform , max-age=60'])add({control}); -for(const path of ['/api/repo/x/file/a','/api/repo/x/y/file/a','/api/repo/x/files','/api/repo/x/file','/w/x/index.html'])add({path}); -for(const stream of [true,false])for(const size of [0,10,2048])add({stream,size}); -for(const vary of ['Origin','accept-encoding','*','Origin, Accept-Language'])add({vary}); -for(const preset of ['identity','custom','gzip'])add({preset}); -for(const method of ['HEAD'])for(const size of [10,2048])add({method,size}); -for(const status of [204,304])add({status}); -const app=express();app.use(compression(options)); -let active; -app.use((req,res)=>{const c=active;res.statusCode=c.status||200;if(c.type)res.setHeader('Content-Type',c.type);if(c.control)res.setHeader('Cache-Control',c.control);if(c.vary)res.setHeader('Vary',c.vary);if(c.preset)res.setHeader('Content-Encoding',c.preset);const body=Buffer.alloc(c.size,120);if(!c.stream)res.setHeader('Content-Length',body.length);if(c.stream){res.write(body);res.end()}else res.end(body)}); -(async()=>{const server=app.listen(0,'127.0.0.1');await new Promise(r=>server.once('listening',r));try{ - for(const c of cases){active=c;const result=await new Promise((resolve,reject)=>{const req=http.request({host:'127.0.0.1',port:server.address().port,path:c.path,method:c.method,headers:c.accept?{'accept-encoding':c.accept}:{}},res=>{const chunks=[];res.on('data',x=>chunks.push(x));res.on('end',()=>resolve({headers:res.headers,status:res.statusCode,wire:Buffer.concat(chunks)}));res.on('error',reject)});req.on('error',reject);req.end()}); - let body=result.wire;const encoding=result.headers['content-encoding']||''; - if(body.length&&(!c.preset||c.preset==='identity')){if(encoding==='gzip')body=zlib.gunzipSync(body);if(encoding==='deflate')body=zlib.inflateSync(body);if(encoding==='br')body=zlib.brotliDecompressSync(body)} - c.expected={status:result.status,encoding,vary:result.headers.vary||'',length:result.headers['content-length']||'',bodyBytes:body.length,sha256:crypto.createHash('sha256').update(body).digest('hex')}; - } -}finally{server.close()} -const files={'backend/internal/server/testdata/compression.json':cases,'backend/internal/filetype/compressible.json':Object.fromEntries(Object.entries(require('mime-db')).filter(([,v])=>v.compressible!==undefined).map(([k,v])=>[k,v.compressible]).sort(([a],[b])=>ab?1:0))}; -for(const [target,value]of Object.entries(files)){const serialized=JSON.stringify(value,null,2)+'\n';if(process.argv.includes('--check'))assert.equal(fs.readFileSync(target,'utf8'),serialized);else fs.writeFileSync(target,serialized)} -console.log(`${cases.length} TypeScript compression HTTP contracts ${process.argv.includes('--check')?'verified':'generated'}`) -})().catch(e=>{console.error(e);process.exitCode=1}); diff --git a/backend/contracts/conference-dates.cjs b/backend/contracts/conference-dates.cjs deleted file mode 100644 index 16f647a..0000000 --- a/backend/contracts/conference-dates.cjs +++ /dev/null @@ -1,18 +0,0 @@ -'use strict'; -const fs=require('node:fs'),vm=require('node:vm'),assert=require('node:assert/strict'),ts=require('typescript'); -require('ts-node/register/transpile-only');const mongoose=require('mongoose'); -const schema=require('../../src/core/model/conference/conferences.schema').default; -const Model=mongoose.model('conference_date_contract',schema); -const source=ts.createSourceFile('conference.ts',fs.readFileSync('src/server/routes/conference.ts','utf8'),ts.ScriptTarget.Latest,true); -const apply=source.statements.find(n=>ts.isFunctionDeclaration(n)&&n.name?.text==='applyConferenceForm'); -const mod={exports:{}};vm.runInNewContext(ts.transpile(apply.getText(source)+';module.exports=applyConferenceForm',{target:ts.ScriptTarget.ES2022,module:ts.ModuleKind.CommonJS}),{module:mod,exports:{},Date}); -const values=['March 1 2031','2031-02-30','0001-01-01','0000-01-01','-000001-01-01','+010000-01-01','2031-01-01T24:00:00Z','2031-01-01T01:00:00+02:00','invalid','',null,false,true,0,1,1.5,-1.5,1924992000000,'1924992000000',8640000000000001,{}, {toString:'bad'}, {valueOf:1},[],['2031','1','1'],[1],[null]]; -const cases=[]; -for(const field of ['startDate','endDate'])for(const value of values){ - const body={name:'Conference',startDate:'2031-01-01',endDate:'2032-01-01',[field]:value}; - const row={body}; - try{const doc=new Model();mod.exports(doc,body,true);const err=doc.validateSync();if(err)row.error=true;else row.expected={startDate:doc.startDate.toISOString(),endDate:doc.endDate.toISOString()}}catch{row.error=true} - cases.push(row); -} -const file='backend/internal/server/testdata/conference-dates.json',output=JSON.stringify(cases,null,2)+'\n';if(process.argv.includes('--check'))assert.equal(fs.readFileSync(file,'utf8'),output);else fs.writeFileSync(file,output); -console.log(cases.length+' actual TypeScript/Mongoose conference date contracts verified'); diff --git a/backend/contracts/conference-options.cjs b/backend/contracts/conference-options.cjs deleted file mode 100644 index 8438bf0..0000000 --- a/backend/contracts/conference-options.cjs +++ /dev/null @@ -1,38 +0,0 @@ -const fs = require('node:fs'); -const vm = require('node:vm'); -const assert = require('node:assert/strict'); -const ts = require('typescript'); -require('ts-node/register/transpile-only'); -const mongoose = require('mongoose'); -const schema = require('../../src/core/model/conference/conferences.schema.ts').default; -const Model = mongoose.model('conference_options_contract', schema); -const path = 'src/server/routes/conference.ts'; -const tree = ts.createSourceFile(path, fs.readFileSync(path, 'utf8'), ts.ScriptTarget.Latest, true); -const declaration = tree.statements.find(s => ts.isFunctionDeclaration(s) && s.name?.text === 'applyConferenceForm'); -assert.ok(declaration); -const code = ts.transpileModule(`${declaration.getText(tree)};module.exports=applyConferenceForm`, {compilerOptions:{target:ts.ScriptTarget.ES2022,module:ts.ModuleKind.CommonJS}}).outputText; -const moduleObject = {exports:{}}; -vm.runInNewContext(code,{module:moduleObject,exports:{},Date}); -const cases=[]; -function add(name, options, present=true) { - const body={name:'Conference',startDate:'2030-01-01',endDate:'2031-01-01'}; - if(present)body.options=options; - const document=new Model({options:{image:true,link:true,expirationMode:'never'}}); - moduleObject.exports(document,body,false); - const error=document.validateSync(); - const expected={}; - if(!error && document.toObject().options !== undefined) expected.options=document.toObject().options; - cases.push({name,body,rejected:!!error,expected}); -} -add('absent',undefined,false); -add('null',null); -add('empty',{}); -for(const value of [true,false,null,0,1,'0','1','true','false','yes','no','',2,'False',[],{}])add(`flags/${JSON.stringify(value)}`,Object.fromEntries(['update','image','pdf','notebook','link','page'].map(key=>[key,value]))); -for(const value of [null,'','2030-04-03','2030-04-03T12:34:56.789Z','invalid','March 1 2030','2030-02-29','2030-02-28T24:00:00Z','0001-01-01','1700000000000','275761','275760','-271821','1e12','0x100000','Infinity',['2030','3','1'],[],{}, {toString:'bad'},0,1700000000000,1.5,-1.5,false,1e16])add(`date/${JSON.stringify(value)}`,{expirationDate:value}); -for(const value of [null,'never',0,true,{},[]])add(`mode/${JSON.stringify(value)}`,{expirationMode:value}); -add('unknown',{terms:['private'],pageSource:{branch:'main'},download:true,unknown:'discard'}); -for(const value of [[],false,true,0,1,'bad'])add(`root/${JSON.stringify(value)}`,value); -const target='backend/internal/server/testdata/conference-options.json'; -const output=JSON.stringify(cases,null,2)+'\n'; -if(process.argv.includes('--check'))assert.equal(fs.readFileSync(target,'utf8'),output,'TypeScript conference option contract changed');else fs.writeFileSync(target,output); -console.log(`${cases.length} TypeScript conference option contracts ${process.argv.includes('--check')?'verified':'generated'}`); diff --git a/backend/contracts/conference-output.cjs b/backend/contracts/conference-output.cjs deleted file mode 100644 index 03f8b05..0000000 --- a/backend/contracts/conference-output.cjs +++ /dev/null @@ -1,46 +0,0 @@ -const fs = require('node:fs'); -const vm = require('node:vm'); -const assert = require('node:assert/strict'); -const ts = require('typescript'); -const path = 'src/core/Conference.ts'; -const tree = ts.createSourceFile(path, fs.readFileSync(path, 'utf8'), ts.ScriptTarget.Latest, true); -const declaration = tree.statements.find(s => ts.isClassDeclaration(s) && s.name?.text === 'Conference'); -const method = declaration.members.find(s => ts.isMethodDeclaration(s) && s.name.getText(tree) === 'toJSON'); -assert.ok(method); -const now = '2030-03-01T12:34:56.789Z'; -class FixedDate extends Date { constructor(...args) { super(...(args.length ? args : [now])); } } -const code = ts.transpileModule(`module.exports = function() ${method.body.getText(tree)}`, {compilerOptions: {target: ts.ScriptTarget.ES2022}}).outputText; -const moduleObject = {exports: {}}; -vm.runInNewContext(code, {module: moduleObject, Date: FixedDate}); -const cases = []; -const histories = [ - [{addDate:'0000-01-01T00:00:00.000Z', removeDate:'0001-01-01T00:00:00.000Z'}], - [{addDate:'0000-01-01T00:00:00.000Z'}], - [{addDate:'1969-01-01T00:00:00.000Z', removeDate:'1970-01-01T00:00:00.000Z'}], - [], - [{addDate:'2030-01-01T00:00:00.000Z'}], - [{addDate:'2030-01-01T01:23:45.678Z', removeDate:'2030-02-02T03:04:05.006Z'}], - [{addDate:'2031-01-01T00:00:00.000Z'}], - [{addDate:'2030-02-01T00:00:00.000Z', removeDate:'2029-01-01T00:00:00.000Z'}], - [{addDate:'1000-01-01T00:00:00.000Z'}], - [{addDate:'2030-01-01T00:00:00.000Z', removeDate:null}], - [{addDate:'2030-01-01T00:00:00.000Z', removeDate:'2031-01-01T00:00:00.000Z'}], - [{addDate:'2030-01-01T00:00:00.000Z', removeDate:'2030-01-02T00:00:00.000Z'}, {addDate:'2030-01-03T00:00:00.001Z'}, {addDate:'2029-12-31T23:59:59.999Z'}], -]; -for (const rate of [0, 0.5, 3, 0.123456789, null, undefined]) { - for (const endDate of ['0001-01-01T00:00:00.000Z','2030-01-15T00:00:00.000Z', now, '2031-01-01T00:00:00.000Z']) { - histories.forEach((history, i) => { - const record = {conferenceID:'billing', name:'Conference', status:'ready', startDate:'2029-01-01T00:00:00.000Z', endDate, plan:{pricePerRepository:rate, quota:{size:500}}, billing:{name:'Chair',email:'chair@example.test'}, options:{image:true,link:false}, url:'https://conference.example.test', owners:['private-owner'], private:'must-not-appear', repositories:structuredClone(history)}; - const model = structuredClone(record); - model.startDate = new Date(model.startDate); model.endDate = new Date(model.endDate); - model.repositories.forEach(r => { r.addDate = new Date(r.addDate); if (r.removeDate) r.removeDate = new Date(r.removeDate); }); - const expected = moduleObject.exports.call({_data:model}); - cases.push({name:`rate=${rate}/end=${endDate}/history=${i}`, record, expected}); - }); - } -} -const output = JSON.stringify({now, cases}, null, 2) + '\n'; -const target = 'backend/internal/server/testdata/conference-output.json'; -if (process.argv.includes('--check')) assert.equal(fs.readFileSync(target, 'utf8'), output, 'TypeScript conference output changed'); -else fs.writeFileSync(target, output); -console.log(`${cases.length} TypeScript conference output contracts ${process.argv.includes('--check') ? 'verified' : 'generated'}`); diff --git a/backend/contracts/conferences.cjs b/backend/contracts/conferences.cjs deleted file mode 100644 index a19417d..0000000 --- a/backend/contracts/conferences.cjs +++ /dev/null @@ -1,53 +0,0 @@ -// Run the actual TypeScript form validator with a fixed clock. -const fs = require('node:fs'); -const vm = require('node:vm'); -const assert = require('node:assert/strict'); -const ts = require('typescript'); -const path = 'src/server/routes/conference.ts'; -const tree = ts.createSourceFile(path, fs.readFileSync(path, 'utf8'), ts.ScriptTarget.Latest, true); -const validator = tree.statements.find(s => ts.isFunctionDeclaration(s) && s.name?.text === 'validateConferenceForm'); -const plans = tree.statements.find(s => ts.isVariableStatement(s) && s.declarationList.declarations.some(d => d.name.getText(tree) === 'plans')); -assert.ok(validator && plans); -const now = '2030-01-01T00:00:00.000Z'; -class FixedDate extends Date { constructor(...args) { super(...(args.length ? args : [now])); } } -class AnonymousError extends Error { constructor(code, options) { super(code); this.status = options.httpStatus; } } -const code = ts.transpileModule(`${plans.getText(tree)}\n${validator.getText(tree)}\nmodule.exports = validateConferenceForm;`, {compilerOptions: {target: ts.ScriptTarget.ES2022, module: ts.ModuleKind.CommonJS}}).outputText; -const moduleObject = {exports: {}}; -vm.runInNewContext(code, {module: moduleObject, AnonymousError, Date: FixedDate}); -const base = {name: 'Conference', conferenceID: 'conference-test', startDate: '2031-01-01', endDate: '2031-02-01', plan: {planID: 'free_conference'}}; -const cases = []; -function add(name, change) { - const body = structuredClone(base); change(body); - let expected = null; - try { moduleObject.exports(body); } - catch (e) { expected = e instanceof AnonymousError ? {code:e.message,status:e.status} : {code:'internal_error',status:500}; } - cases.push({name, body, expected}); -} -add('valid', () => {}); -for (const field of ['name', 'conferenceID', 'startDate', 'endDate']) { - for (const value of [null, '', false, 0]) add(`${field}/${JSON.stringify(value)}`, b => { b[field] = value; }); - add(`${field}/missing`, b => { delete b[field]; }); -} -add('precedence/all', b => { for (const field of ['name', 'conferenceID', 'startDate', 'endDate']) delete b[field]; }); -add('start after end', b => { b.startDate = '2032-01-01'; }); -add('end in past', b => { b.startDate = '2020-01-01'; b.endDate = '2021-01-01'; }); -add('end equals now', b => { b.startDate = '2029-01-01'; b.endDate = now; }); -add('unknown plan', b => { b.plan.planID = 'unknown'; }); -for (const planID of ['premium_conference', 'unlimited_conference']) { - const billing = {name: 'Chair', email: 'chair@example.test', address: 'Address', city: 'City', zip: '000', country: 'Country'}; - add(`${planID}/valid`, b => { b.plan.planID = planID; b.billing = billing; }); - add(`${planID}/missing billing`, b => { b.plan.planID = planID; }); - add(`${planID}/empty billing`, b => { b.plan.planID = planID; b.billing = {}; }); - for (const field of Object.keys(billing)) { - for (const value of [null, '', false, 0, ' ']) add(`${planID}/${field}/${JSON.stringify(value)}`, b => { b.plan.planID = planID; b.billing = {...billing, [field]: value}; }); - } -} -for(const field of ['startDate','endDate'])for(const value of ['March 1 2031','2031-02-30','0001-01-01','2031-01-01T24:00:00Z','invalid',{}, {toString:'bad'},[],['2031','1','1'],1,1924992000000,true,8640000000000001])add(`${field}/date/${JSON.stringify(value)}`,b=>{b[field]=value}); -add('invalid start before expired end',b=>{b.startDate='invalid';b.endDate='2020-01-01'}); -add('coercion before plan',b=>{b.startDate={toString:'bad'};b.plan.planID='invalid'}); -add('invalid date after plan',b=>{b.startDate='invalid';b.plan.planID='invalid'}); -const target = 'backend/internal/server/testdata/conferences.json'; -const output = JSON.stringify({now, cases}, null, 2) + '\n'; -if (process.argv.includes('--check')) assert.equal(fs.readFileSync(target, 'utf8'), output, 'TypeScript conference validation changed'); -else fs.writeFileSync(target, output); -console.log(`${cases.length} TypeScript conference form contracts ${process.argv.includes('--check') ? 'verified' : 'generated'}`); diff --git a/backend/contracts/content-verification.cjs b/backend/contracts/content-verification.cjs deleted file mode 100644 index b366f96..0000000 --- a/backend/contracts/content-verification.cjs +++ /dev/null @@ -1,52 +0,0 @@ -const fs = require('node:fs'); -const vm = require('node:vm'); -const assert = require('node:assert/strict'); -const {createHash} = require('node:crypto'); -const {Readable} = require('node:stream'); -const ts = require('typescript'); -const source = 'src/core/source/GitHubStream.ts'; -const tree = ts.createSourceFile(source, fs.readFileSync(source, 'utf8'), ts.ScriptTarget.Latest, true); -let expression; -function visit(node) { - if (ts.isVariableDeclaration(node) && node.name.getText(tree)==='verify' && node.initializer?.getText(tree).includes('invalid_blob_hash')) expression=node.initializer.getText(tree); - ts.forEachChild(node, visit); -} -visit(tree); assert.ok(expression); -const code=ts.transpileModule(`module.exports=function(expected){return ${expression}}`, {compilerOptions:{module:ts.ModuleKind.CommonJS,target:ts.ScriptTarget.ES2022}}).outputText; -const fixture={exports:{}}; -vm.runInNewContext(code,{module:fixture,Buffer,createHash,setTimeout,clearTimeout}); -const git = value => createHash('sha1').update(`blob ${Buffer.byteLength(value)}\0`).update(value).digest('hex'); -const payload='verified LFS bytes'; -const proof={gitSha:git(payload),sha256:createHash('sha256').update(payload).digest('hex'),size:Buffer.byteLength(payload)}; -const header='version https://git-lfs.github.com/spec/v1\n'; -const oid=`oid sha256:${proof.sha256}`; -const size=`size ${proof.size}`; -const pointer=header+oid+'\n'+size+'\n'; -const inputs=[ - ['ordinary', '', proof.gitSha], ['lfs',pointer], ['no final newline',pointer.trimEnd()], - ['wrong pointer hash',pointer,'0'.repeat(40)], ['wrong oid',pointer.replace(proof.sha256,'0'.repeat(64))], - ['wrong size',pointer.replace(size,'size 1')], ['wrong version',pointer.replace('/v1','/v2')], - ['missing oid',header+size], ['missing size',header+oid], ['uppercase oid',pointer.replace(proof.sha256,proof.sha256.toUpperCase())], - ['negative size',pointer.replace(size,'size -1')], ['plus size',pointer.replace(size,'size +18')], - ['leading zeros',pointer.replace(size,'size 000'+proof.size)], ['space after size',pointer.replace(size,size+' ')], - ['duplicate oid',pointer+'oid sha256:'+'0'.repeat(64)+'\n'], ['duplicate size',pointer+'size 1\n'], - ['CRLF header',pointer.replaceAll('\n','\r\n')], ['CRLF fields',header+oid+'\r\n'+size+'\r\n'], - ['unicode line separator',header+oid+'\u2028'+size+'\u2029'], ['extra fields',pointer+'ext-example hello\n'], - ['at limit',pointer+'x'.repeat(1024-Buffer.byteLength(pointer))], ['over limit',pointer+'x'.repeat(1025-Buffer.byteLength(pointer))], - ['oversize integer',pointer.replace(size,'size 999999999999999999999999999999')] -]; -(async()=>{ - const rows=[]; - for (const [name,pointer,revision=git(pointer)] of inputs) { - const row={name,pointer,revision,proof}; - let fetched=0; - const verify=fixture.exports.call({data:{getToken:async()=> 'synthetic'},downloadFile:()=>{fetched++;return Readable.from([Buffer.from(pointer)]);}}, {sha:revision}); - try { row.expected=await verify(proof); } catch(error) { row.error=error.message; } - row.fetched=fetched;rows.push(row); - } - const target='backend/internal/server/testdata/content-verification.json'; - const serialized=JSON.stringify(rows,null,2)+'\n'; - if(process.argv.includes('--check')) assert.equal(fs.readFileSync(target,'utf8'),serialized); - else fs.writeFileSync(target,serialized); - console.log(`${rows.length} TypeScript content verification contracts ${process.argv.includes('--check')?'verified':'generated'}`); -})().catch(error=>{console.error(error);process.exitCode=1;}); diff --git a/backend/contracts/dashboard-cursor-output.cjs b/backend/contracts/dashboard-cursor-output.cjs deleted file mode 100644 index fe9bd85..0000000 --- a/backend/contracts/dashboard-cursor-output.cjs +++ /dev/null @@ -1,10 +0,0 @@ -const fs=require('node:fs'),assert=require('node:assert/strict'),{Types}=require('mongoose'); -const source=fs.readFileSync('src/server/routes/dashboard-summary.ts','utf8'); -const expression=source.match(/const cursor = hasMore \? ([\s\S]*?) : null;/)[1]; -const encode=new Function('query','last',`return ${expression}`); -const values=['plain','<>&','"\\\n\t','é😀','\u2028\u2029','\\u2028','\\\\u2029','\\\u2028',0,-0,1,-1,1e-7,1e-6,1e20,1e21,1.23456789,null,true,false]; -const id='abcdefabcdefabcdefabcdef'; -const cases=values.map(value=>({sort:'_label',value,type:'repo',id,expected:encode({sort:'_label'},{_sort:value,_type:'repo',_id:new Types.ObjectId(id)})})); -for(const value of [0,1,-1,1700000000123,-62135596800000,253402300800000])cases.push({sort:'-anonymizeDate',value,date:true,type:'pr',id,expected:encode({sort:'-anonymizeDate'},{_sort:new Date(value),_type:'pr',_id:new Types.ObjectId(id)})}); -for(const [index,value] of ['cursor-a','cursor-b'].entries()){const id='eeddcc00000000000000000'+(index+1);cases.push({sort:'_name',value,type:'repo',id,http:true,expected:encode({sort:'_name'},{_sort:value,_type:'repo',_id:new Types.ObjectId(id)})});} -const path='backend/internal/server/testdata/dashboard-cursor-output.json',output=JSON.stringify(cases,null,2)+'\n';if(process.argv.includes('--check'))assert.equal(fs.readFileSync(path,'utf8'),output);else fs.writeFileSync(path,output);console.log(`${cases.length} exact TypeScript cursor encodings verified`); diff --git a/backend/contracts/dashboard-cursors.cjs b/backend/contracts/dashboard-cursors.cjs deleted file mode 100644 index d8222c6..0000000 --- a/backend/contracts/dashboard-cursors.cjs +++ /dev/null @@ -1,22 +0,0 @@ -const fs=require('node:fs'),assert=require('node:assert/strict'),ts=require('typescript'),{Types}=require('mongoose'); -const source=fs.readFileSync('src/server/routes/dashboard-summary.ts','utf8'); -const body=source.slice(source.indexOf('const fields:'),source.indexOf('export async function dashboardSummary')); -class AnonymousError extends Error{} -const exportsObject={};new Function('exports','Types','PullRequest','Gist','DashboardName','AnonymousError',ts.transpile(body,{target:ts.ScriptTarget.ES2020,module:ts.ModuleKind.CommonJS}))(exportsObject,Types,{collection:{name:'prs'}},{collection:{name:'gists'}},{collection:{name:'names'}},AnonymousError); -const user={id:'111111111111111111111111',repositoryMembership:()=>({$or:[{owner:'111111111111111111111111'}]})}; -const cases=[]; -function add(sort,payload,transform=x=>x,http=true){const cursor=transform(Buffer.from(JSON.stringify(payload)).toString('base64url'));let expected,rejected=false;try{const pipeline=exportsObject.dashboardPipeline(user,{sort,cursor});const clause=pipeline.at(-1).$facet.items[1].$match.$or[1];expected={sort,type:payload.type,id:payload.id,value:clause._sort};}catch{rejected=true}cases.push({sort,cursor,rejected,expected,http});} -for(const sort of ['_name','-pageView','anonymizeDate'])for(const value of ['abc',42,null,true,false,{},{$ne:null},[],['2020-01-02'],'2020-01-02T03:04:05Z','0001-01-01',0,8640000000000001])add(sort,{sort,type:'repo',id:user.id,value}); -for(const type of ['','other-forge',false,{},['repo']])add('_name',{sort:'_name',type,id:user.id,value:'abc'}); -for(const change of [{sort:'wrong'},{id:'bad'},{type:null},{value:undefined}])add('_name',{sort:'_name',type:'repo',id:user.id,value:'abc',...change}); -for(const transform of [x=>x+'=',x=>' \n'+x+'\n',x=>x.replace(/-/g,'+').replace(/_/g,'/')])add('_name',{sort:'_name',type:'repo',id:user.id,value:'text'},transform); -const app=require('express')();app.set('query parser','extended');const parse=app.get('query parser fn'); -const dates=JSON.parse(fs.readFileSync('backend/internal/server/testdata/admin-dates.json','utf8')); -for(const sort of ['anonymizeDate','-lastView','options.expirationDate']) { - for(const row of dates) { - const query=parse(row.query);const value=query.dateFrom??query.dateTo; - if(value!==undefined)add(sort,{sort,type:'repo',id:user.id,value},x=>x,false); - } - for(const value of ['March 1 2024','2024-02-30','2024-02-29T24:00:00Z','-000000-02-03',['2024','3','1'],'2024-03-01T01:00:00+02:00','2024-03-01t00:00z','2024-03-01T00:00Z\0ignored'])add(sort,{sort,type:'repo',id:user.id,value}); -} -const path='backend/internal/server/testdata/dashboard-cursors.json',output=JSON.stringify(cases,null,2)+'\n';if(process.argv.includes('--check'))assert.equal(fs.readFileSync(path,'utf8'),output);else fs.writeFileSync(path,output);console.log(`${cases.length} TypeScript dashboard cursor contracts verified`); diff --git a/backend/contracts/dashboard-filters.cjs b/backend/contracts/dashboard-filters.cjs deleted file mode 100644 index bfbfae9..0000000 --- a/backend/contracts/dashboard-filters.cjs +++ /dev/null @@ -1,9 +0,0 @@ -const fs=require('node:fs'),assert=require('node:assert/strict'),ts=require('typescript'),{Types}=require('mongoose'),{BSON}=require('bson'); -const source=fs.readFileSync('src/server/routes/dashboard-summary.ts','utf8'); -const body=source.slice(source.indexOf('const fields:'),source.indexOf('export async function dashboardSummary')); -class AnonymousError extends Error{} -const exportsObject={};new Function('exports','Types','PullRequest','Gist','DashboardName','AnonymousError',ts.transpile(body,{target:ts.ScriptTarget.ES2020,module:ts.ModuleKind.CommonJS}))(exportsObject,Types,{collection:{name:'prs'}},{collection:{name:'gists'}},{collection:{name:'names'}},AnonymousError); -const user={id:'111111111111111111111111',repositoryMembership:()=>({$or:[{owner:'111111111111111111111111'}]})}; -const queries=[{}, {type:'repo'}, {type:'pr'}, {type:'gist'}, {type:'unknown'}, {type:['repo','gist']},{attention:'true'},{attention:'false'},{attention:['true','true']},...['','ready','ready,removed','invalid','ready,,error,ready'].map(statuses=>({statuses})),{statuses:['ready','removed']},{statuses:['','']},...['plain',' text ','[a].*+?^${}()|\\','\ufefftext\ufeff','\u0085text\u0085','é'.repeat(256)+'tail','😀'.repeat(128)+'tail','a'.repeat(255)+'😀','a'.repeat(254)+'😀tail'].map(q=>({q})),{q:['first','second']},{q:['','']},{q:[' first','second ']}]; -const cases=queries.map(query=>{const pipeline=exportsObject.dashboardPipeline(user,query);const filter=pipeline.at(-1).$facet.filtered[0].$match;return {query,expected:BSON.deserialize(BSON.serialize(filter))};}); -const path='backend/internal/server/testdata/dashboard-filters.json',output=JSON.stringify(cases,null,2)+'\n';if(process.argv.includes('--check'))assert.equal(fs.readFileSync(path,'utf8'),output);else fs.writeFileSync(path,output);console.log(`${cases.length} TypeScript dashboard filter contracts verified`); diff --git a/backend/contracts/dashboard-limits.cjs b/backend/contracts/dashboard-limits.cjs deleted file mode 100644 index 8da22ac..0000000 --- a/backend/contracts/dashboard-limits.cjs +++ /dev/null @@ -1,7 +0,0 @@ -const fs=require('node:fs'),assert=require('node:assert/strict'); -const source=fs.readFileSync('src/server/routes/dashboard-summary.ts','utf8'); -const expressions=[...source.matchAll(/const limit = (.*);/g)].map(x=>x[1]);assert.equal(expressions.length,2);assert.equal(expressions[0],expressions[1]); -const calculate=new Function('query',`return ${expressions[0]}`); -const values=[[],['1','2'],['',''],['2',''],...['',' ','0','-0','1','-1','2.9','-0.1','0.1','100','101','999999999999999999999999','1e2','1e-2','1e999','-1e999','1e-9999','0x2','0Xff','0x','0xgg','0xfffffffffffffffffffffffffffff','0xffffz','0b10','0B101','0b12','0o10','0O10','0o8','-0x2','+0x2','Infinity','+Infinity','-Infinity','Inf','NaN','true','null','1_0','0x1p2','.5','+.5','1.','01','1e','2suffix','\ufeff2\ufeff','\u00852\u0085','\n2\t'].map(x=>[x])]; -const cases=values.map(values=>({values,expected:calculate({limit:values.length===0?undefined:values.length===1?values[0]:values})})); -const path='backend/internal/server/testdata/dashboard-limits.json',output=JSON.stringify(cases,null,2)+'\n';if(process.argv.includes('--check'))assert.equal(fs.readFileSync(path,'utf8'),output);else fs.writeFileSync(path,output);console.log(`${cases.length} TypeScript dashboard limit contracts verified`); diff --git a/backend/contracts/dashboard-pipeline.cjs b/backend/contracts/dashboard-pipeline.cjs deleted file mode 100644 index b5ef7d9..0000000 --- a/backend/contracts/dashboard-pipeline.cjs +++ /dev/null @@ -1,20 +0,0 @@ -const fs=require('node:fs'),assert=require('node:assert/strict'),ts=require('typescript'),{Types}=require('mongoose'),{BSON}=require('bson'); -const source=fs.readFileSync('src/server/routes/dashboard-summary.ts','utf8'); -const body=source.slice(source.indexOf('const fields:'),source.indexOf('export async function dashboardSummary')); -class AnonymousError extends Error{} -const exportsObject={};new Function('exports','Types','PullRequest','Gist','DashboardName','AnonymousError',ts.transpile(body,{target:ts.ScriptTarget.ES2020,module:ts.ModuleKind.CommonJS}))(exportsObject,Types,{collection:{name:'anonymizedpullrequests'}},{collection:{name:'anonymizedgists'}},{collection:{name:'dashboardnames'}},AnonymousError); -const user={id:'111111111111111111111111',repositoryMembership:()=>({$or:[{owner:'111111111111111111111111'}]})}; -const now='2026-01-02T03:04:05.000Z'; -const queries=[{},...['_name','_label','status','anonymizeDate','lastView','pageView','options.expirationDate'].flatMap(sort=>[{sort},{sort:'-'+sort}]),{sort:'invalid'},{sort:['_name','_label']}]; -for(const c of JSON.parse(fs.readFileSync('backend/internal/server/testdata/dashboard-filters.json','utf8')))queries.push(c.query); -for(const c of JSON.parse(fs.readFileSync('backend/internal/server/testdata/dashboard-limits.json','utf8')))queries.push(c.values.length?{limit:c.values.length===1?c.values[0]:c.values}:{}); -for(const c of JSON.parse(fs.readFileSync('backend/internal/server/testdata/dashboard-cursors.json','utf8')))queries.push({sort:c.sort,cursor:c.cursor}); -const app=require('express')();app.set('query parser','extended');const parse=app.get('query parser fn'); -const rawQueries=['type[]=repo','type[0]=repo','type[]=repo&type[]=gist','type[x]=repo','attention[]=true','attention=true','statuses[]=','statuses[]=ready&statuses[]=removed','statuses[1]=ready&statuses[0]=error','statuses[x]=ready','q[]=first&q[]=second','q[x]=text','q=%FF','sort[]=','sort[]=_name','sort[1]=_name&sort[0]=status','sort[x]=_name','limit[]=2','limit[0]=2','limit[1]=2&limit[0]=1','limit[x]=2','cursor[]=','cursor[x]=3','cursor[toString]=3','sort[toString]=3','limit[toString]=3','type[toString]=3','statuses[toString]=3','q[toString]=3']; -for(const c of JSON.parse(fs.readFileSync('backend/internal/server/testdata/dashboard-cursors.json','utf8')).slice(0,8)) rawQueries.push('sort='+encodeURIComponent(c.sort)+'&cursor[]='+encodeURIComponent(c.cursor)); -const cases=queries.map(query=>({query})).concat(rawQueries.map(rawQuery=>({rawQuery,query:parse(rawQuery)}))).map(({query,rawQuery},i)=>{try{ - const pipeline=BSON.deserialize(BSON.serialize({pipeline:exportsObject.dashboardPipeline(user,query,new Date(now))})).pipeline; - const sortOrder=Object.keys(pipeline.at(-1).$facet.items.find(stage=>stage.$sort).$sort); - return {name:`case-${i}`,query,rawQuery,expected:pipeline,sortOrder}; -}catch(error){return{name:`case-${i}`,query,rawQuery,error:error instanceof TypeError?"invalid_query_value":error.message}}}); -const path='backend/internal/server/testdata/dashboard-pipeline.json',output=JSON.stringify({now,owner:user.id,cases},null,2)+'\n';if(process.argv.includes('--check'))assert.equal(fs.readFileSync(path,'utf8'),output);else fs.writeFileSync(path,output);console.log(`${cases.length} complete TypeScript dashboard pipeline contracts verified`); diff --git a/backend/contracts/dates.cjs b/backend/contracts/dates.cjs deleted file mode 100644 index 820d29c..0000000 --- a/backend/contracts/dates.cjs +++ /dev/null @@ -1,17 +0,0 @@ -// Native JavaScript Date JSON output, including extended years and range limits. -const fs = require('node:fs'); -const assert = require('node:assert/strict'); -const values = [0, 1, -1, 1000, -1000, 1700000000123, -62167219200000, - -62167219200001, 253402300800000, -8640000000000000, 8640000000000000, - -8640000000000001, 8640000000000001]; -let state = 42; -for (let i = 0; i < 200; i++) { - state = (Math.imul(state, 1664525) + 1013904223) >>> 0; - values.push(Math.trunc((state / 2 ** 32 - 0.5) * 17280000000000000)); -} -const cases = values.map(milliseconds => ({milliseconds, expected: new Date(milliseconds).toJSON()})); -const output = JSON.stringify(cases, null, 2) + '\n'; -const target = 'backend/internal/server/testdata/dates.json'; -if (process.argv.includes('--check')) assert.equal(fs.readFileSync(target, 'utf8'), output, 'JavaScript date contract changed'); -else fs.writeFileSync(target, output); -console.log(`${cases.length} JavaScript date contracts ${process.argv.includes('--check') ? 'verified' : 'generated'}`); diff --git a/backend/contracts/differential.cjs b/backend/contracts/differential.cjs deleted file mode 100644 index ef93646..0000000 --- a/backend/contracts/differential.cjs +++ /dev/null @@ -1,75 +0,0 @@ -// Run from the repository root after building cmd/contract. Synthetic data only. -// GO_CONTRACT_BINARY=/path/to/contract node backend/contracts/differential.cjs -const assert = require('node:assert/strict'); -const { spawnSync } = require('node:child_process'); -const { randomBytes } = require('node:crypto'); -require('ts-node/register/transpile-only'); -const { ContentAnonimizer, anonymizePath } = require('../../src/core/anonymize-utils'); -const { createTokenCipher } = require('../../src/core/credential-crypto'); -const config = require('../../src/config').default; -config.ANONYMIZATION_MASK = 'XXXX'; config.APP_HOSTNAME = 'anonymous.test'; -const contexts = { mask: 'XXXX', hostname: 'anonymous.test' }; -const cases = []; -function fixture(content, terms, options = {}, operation = 'transform') { - cases.push({ operation, content, options: { terms, ...options }, context: contexts }); -} -for (const terms of [[], ['Alice'], ['Davo'], ['Davó'], ['Σ', 'Ж', '研究'], ['k', 's'], - ['Alice=>Bob', 'Bob=>$&'], ['first.last'], ['a-a'], ['(Alice)'], ['Alice(?= Smith)'], - ['(Alice)\\1'], ['a{1001}'], ['[a-z]+'], ['[invalid'], ['(a+)+'], ['=>'], [' ', 'Alice']]) { - for (const content of ['Alice ALICE alice Malice Alice2 éAlice Aliceé', 'Davo Davó DAVÓ Davoé éDavo', - 'Σ σ ς Ж ж 研究', 'k K K s S ſ', 'first.last firstXlast first\nlast first\rlast', - 'xa-a-a Alice Smith AliceAlice', 'https://example.org/Alice?q=1 and http://Alice.test/path', - 'plain text\r\n\u2028\u2029', '', 'aaab']) fixture(content, terms); -} -fixture('![Alice](photo.png "A title") and https://example.org/Alice', ['Alice'], {image: false, link: false}); -fixture('https://github.com/owner/repo/blob/main/Alice.txt https://github.com/owner/repository', ['Alice'], - {repoName: 'owner/repo', branchName: 'main', repoId: 'public-id'}); -fixture('src/Alice/first.last.txt', ['Alice', 'first.last'], {}, 'path'); -for (const bytes of [[0xff,0xfe,65,108,105,99,101],[0xe1,0x80,65,108,105,99,101],[0xed,0xa0,0x80,65,108,105,99,101],[0xf0,0x9f,0x92],[0x80,0x81],[0xef,0xbb,0xbf,65,108,105,99,101]]) { - for (const terms of [[],['Alice']]) fixture(Buffer.from(bytes).toString('base64'),terms,{},'bytes'); -} -for(const term of ['(?<=x)Alice','(?Alice)','Alice|Bob','^Alice$','\\bAlice\\b','a*','[😀]','\\d+','a{0,2}','a\\sb']) { - for(const content of ['xAlice Bob Alice\n','😀😀 Alice','a ab aaa b','a\r\nb','Alice\u2028Bob'])fixture(content,[term]); -} -// Exercise metadata invalidation, Unicode fallback offsets, and ordered masks. -for (const terms of [ - ['Alice=>Researcher0','Researcher0=>done'], ['Alice=>é','é=>done'], - ['x.=>a','ab=>done'], ['Alice=>ALICE'], ['(?<=😀)Alice=>X'], - ['(?=😀)=>X'], ['Alice(?=!)'], ['(?<=é)Alice'], ['a*=>😀'] -]) for (const input of ['Alice Alice!', 'x-b x-b', '😀Alice 😀Alice', '😀😀', 'éAlice Alice!', 'aaa é😀 Alice']) fixture(input,terms); -let randomState=48271; -const fragments=['Alice','ALICE','first.last','first\nlast','first\rlast','Researcher0','x-b','éAlice','😀','https://example.org/Alice',' ','.','\n']; -for(let i=0;i<200;i++) { - let content=''; - for(let j=0;j<24;j++) {randomState=(Math.imul(randomState,1664525)+1013904223)>>>0;content+=fragments[randomState%fragments.length]} - fixture(content,i%2?['Alice=>Researcher0','Researcher0=>é','first.last=>Alice']:['x.=>a','ab=>done','Alice(?=!)','(?<=😀)Alice']); -} -const input = cases.map(c => JSON.stringify(c)).join('\n') + '\n'; -const proc = spawnSync(process.env.GO_CONTRACT_BINARY, [], {input, encoding: 'utf8', maxBuffer: 16*1024*1024, timeout: 60000}); -assert.equal(proc.status, 0, proc.stderr || String(proc.error)); -const outputs = proc.stdout.trim().split('\n').map(JSON.parse); -assert.equal(outputs.length, cases.length); -const failures = []; -cases.forEach((c, index) => { - let expected; - try { - if(c.operation==='bytes'){const raw=Buffer.from(c.content,'base64');const a=new ContentAnonimizer(c.options);const text=raw.toString('utf8');const result=a.anonymize(text);expected={content:(a.wasAnonymized?Buffer.from(result):raw).toString('base64'),changed:a.wasAnonymized};} - else if (c.operation === 'path') expected = {content: anonymizePath(c.content, c.options.terms)}; - else { const a = new ContentAnonimizer(c.options); expected = {content: a.anonymize(c.content), changed: a.wasAnonymized}; } - } catch { expected = {error: true}; } - try { if (expected.error) assert.ok(outputs[index].error); else assert.deepEqual(outputs[index], expected); } - catch { failures.push({index, input: c, expected, actual: outputs[index]}); } -}); -const keys = JSON.stringify({v1: randomBytes(32).toString('base64')}); -const cipher = createTokenCipher(keys, 'v1'); -const cryptoCases = ['ordinary-owner', 'owner<&>\u2028\u2029', '研究']; -for (const owner of cryptoCases) { - const common = {keys, active:'v1', owner, provider:'github', content:'synthetic-secret', context:contexts}; - const encrypted = cipher.encrypt(common.content, owner, common.provider); - const p = spawnSync(process.env.GO_CONTRACT_BINARY, [], {encoding:'utf8', input: - JSON.stringify({...common, operation:'decrypt', envelope:encrypted})+'\n'+JSON.stringify({...common, operation:'encrypt'})+'\n'}); - assert.equal(p.status,0,p.stderr); const [decrypted, envelope] = p.stdout.trim().split('\n').map(JSON.parse); - assert.equal(decrypted.content,common.content);assert.equal(cipher.decrypt(envelope,owner,common.provider),common.content); -} -console.log(JSON.stringify({cases: cases.length, passed:cases.length-failures.length, failures, credentialCrossLanguageCases:cryptoCases.length},null,2)); -if (failures.length) process.exitCode=1; diff --git a/backend/contracts/document-cleanup.cjs b/backend/contracts/document-cleanup.cjs deleted file mode 100644 index 644c426..0000000 --- a/backend/contracts/document-cleanup.cjs +++ /dev/null @@ -1,17 +0,0 @@ -const fs=require('node:fs'),assert=require('node:assert/strict'),ts=require('typescript'); -async function main(){ - const cases=[]; - for(const [kind,file,field] of [['gist','Gist','gist'],['pr','PullRequest','pullRequest']]){ - const source=ts.createSourceFile(file+'.ts',fs.readFileSync(`src/core/${file}.ts`,'utf8'),ts.ScriptTarget.Latest,true); - const cls=source.statements.find(ts.isClassDeclaration),method=cls.members.find(m=>m.name?.getText(source)==='resetSate');assert.ok(method?.body); - const stub={updateOne:()=>({exec:async()=>{}})}; - const clear=new Function('AnonymizedGistModel','AnonymizedPullRequestModel',ts.transpile('async function clear(status, statusMessage) '+method.body.getText(source)+'\nreturn clear;',{target:ts.ScriptTarget.ES2020}))(stub,stub); - const rich={creationDate:'2020-01-01T00:00:00.000Z',updatedDate:'2026-01-02T03:04:05.000Z',providerMetadata:{revision:'opaque:1'},comments:[{author:'Private author',body:'Private comment'}]}; - const specific=kind==='gist'?{description:'Private description',ownerLogin:'Private owner',files:[{filename:'private',content:'Private file'}],isPublic:true}:{body:'Private body',title:'Private title',diff:'Private diff',baseRepositoryFullName:'private/base',headRepositoryFullName:'private/head',state:'open',draft:true,merged:true,mergedDate:'2025-01-01T00:00:00.000Z'}; - for(const input of [{},{...rich,...specific},{...rich,...specific,isPublic:false,mergedDate:null},{...rich,...specific,creationDate:null,updatedDate:null}]){ - const model={_id:'fixture',[field]:structuredClone(input)};await clear.call({_model:model});cases.push({kind,input,expected:model[field]}); - } - } - const path='backend/internal/server/testdata/document-cleanup.json',output=JSON.stringify(cases,null,2)+'\n';if(process.argv.includes('--check'))assert.equal(fs.readFileSync(path,'utf8'),output);else fs.writeFileSync(path,output);console.log(`${cases.length} actual TypeScript document cleanup contracts verified`); -} -main().catch(error=>{console.error(error);process.exitCode=1}); diff --git a/backend/contracts/download-headers.cjs b/backend/contracts/download-headers.cjs deleted file mode 100644 index 4edd45e..0000000 --- a/backend/contracts/download-headers.cjs +++ /dev/null @@ -1,14 +0,0 @@ -const fs=require('node:fs'),http=require('node:http'),assert=require('node:assert/strict'),express=require('express'); -const names=['report.txt','report with spaces.txt','résumé.pdf','研究.txt','😀.txt','a%20b.txt','a%2Gb.txt','a%ab.txt','a%FF.txt','a%.txt','a"b.txt','a\\b.txt','a;b.txt','a\r\nb.txt','a\0b.txt','a\tb.txt','!#$&+-.^_`|~.txt',"quote'paren().txt",'e\u0301.txt','repo-name.zip','']; -for(let i=0;i<256;i++)names.push('a'+String.fromCharCode(i)+'b.txt'); -const cases=names.map(name=>({name})); -(async()=>{ - const app=express();app.get('/',(req,res)=>{res.attachment(cases[Number(req.headers['x-fixture'])].name);res.end()}); - const server=app.listen(0,'127.0.0.1');await new Promise(r=>server.once('listening',r)); - try{for(let i=0;i{ - http.get({host:'127.0.0.1',port:server.address().port,path:'/',headers:{'x-fixture':String(i)}},res=>{res.resume();res.on('end',()=>{assert.equal(res.statusCode,200);resolve(res.headers['content-disposition'])});res.on('error',reject)}).on('error',reject); - })}finally{await new Promise(r=>server.close(r));} - const target='backend/internal/server/testdata/download-headers.json',data=JSON.stringify(cases,null,2)+'\n'; - if(process.argv.includes('--check'))assert.equal(fs.readFileSync(target,'utf8'),data);else fs.writeFileSync(target,data); - console.log(`${cases.length} Express download-header contracts ${process.argv.includes('--check')?'verified':'generated'}`); -})().catch(e=>{console.error(e);process.exitCode=1}); diff --git a/backend/contracts/error-log.cjs b/backend/contracts/error-log.cjs deleted file mode 100644 index 73e1504..0000000 --- a/backend/contracts/error-log.cjs +++ /dev/null @@ -1,19 +0,0 @@ -const fs=require('node:fs'),ts=require('typescript'),vm=require('node:vm'),assert=require('node:assert/strict'); -function parse(path){return ts.createSourceFile(path,fs.readFileSync(path,'utf8'),ts.ScriptTarget.Latest,true)} -function find(node,predicate){if(predicate(node))return node;let result;ts.forEachChild(node,child=>{result ||= find(child,predicate)});return result} -const logger=parse('src/core/logger.ts'),admin=parse('src/server/routes/admin.ts'); -const bucket=find(logger,n=>ts.isFunctionDeclaration(n)&&n.name?.text==='bucketFor'); -const max=find(logger,n=>ts.isVariableDeclaration(n)&&n.name.getText(logger)==='ERROR_LOG_MAX').initializer.getText(logger); -const noisy=find(logger,n=>ts.isVariableDeclaration(n)&&n.name.getText(logger)==='noisyCodes').initializer.getText(logger); -const route=find(admin,n=>ts.isCallExpression(n)&&n.expression.getText(admin)==='router.get'&&n.arguments[0]?.text==='/errors'); -const variable=name=>find(route,n=>ts.isVariableDeclaration(n)&&n.name.getText(admin)===name).initializer.getText(admin); -const code=ts.transpileModule(`${bucket.getText(logger)}\nconst ERROR_LOG_MAX=${max};const noisy=${noisy};function pagination(req){const offset=${variable('offset')};const limit=${variable('limit')};return {offset,limit};}`,{compilerOptions:{target:ts.ScriptTarget.ES2022}}).outputText; -const sandbox={};vm.createContext(sandbox);vm.runInContext(code,sandbox); -const result={max:vm.runInContext('ERROR_LOG_MAX',sandbox),classification:[],pagination:[],noisy:vm.runInContext('[...noisy]',sandbox)}; -for(const level of ['warn','error'])for(const status of [0,200,399,400,401,403,404,409,429,499,500,503])result.classification.push({level,status,bucket:sandbox.bucketFor({httpStatus:status},level)}); -for(const input of ['', '0','-1','-22','1','250','5000','5001','12suffix','1.5','1e3','0x10','+13',' 25 ','nonsense','9999999999999999'])result.pagination.push({input,...sandbox.pagination({query:{offset:input,limit:input}})}); -// Go intentionally saturates offsets at JS's largest safe integer. -for(const row of result.pagination)row.offset=Math.min(Number.MAX_SAFE_INTEGER,row.offset); -const output=JSON.stringify(result,null,2)+'\n',target='backend/internal/server/testdata/error-log.json'; -if(process.argv.includes('--check'))assert.equal(fs.readFileSync(target,'utf8'),output);else fs.writeFileSync(target,output); -console.log(`${result.classification.length+result.pagination.length} TypeScript error log contracts ${process.argv.includes('--check')?'verified':'generated'}`); diff --git a/backend/contracts/file-metadata.cjs b/backend/contracts/file-metadata.cjs deleted file mode 100644 index cb0c3b8..0000000 --- a/backend/contracts/file-metadata.cjs +++ /dev/null @@ -1,39 +0,0 @@ -// Exercise the actual public TypeScript route, including its early HEAD return. -const fs=require('node:fs'),vm=require('node:vm'),http=require('node:http'),assert=require('node:assert/strict'),ts=require('typescript'),express=require('express'); -require('ts-node/register/transpile-only'); -const {isTextFile}=require('../../src/core/anonymize-utils'); -const config={MAX_FILE_SIZE:100*1024*1024,SHARED_CACHE_ENABLED:false}; -let current, transfers=0; -class File { - constructor(){} - async originalPath(){return current.name} - isFileSupported(){return true} - async sha(){return 'blob'} - async size(){return 10} - async send(){transfers++;throw Error('unexpected source read')} -} -const fixture={exports:{}}; -const dependencies={express,'../../core/AnonymizedFile':{default:File},'../../core/AnonymousError':{default:Error},'./route-utils':{getRepo:async()=>({model:{source:{commit:'revision'},options:{}},isReady:async()=>true,countView:async()=>{throw Error('unexpected view')}}),handleError(error){throw error}},'./file-etag':{fileETag:()=> '"f-fixture"'},'../../config':{default:config},'mime-types':require('mime-types'),'../../core/anonymize-utils':{isTextFile}}; -const code=ts.transpileModule(fs.readFileSync('src/server/routes/file.ts','utf8'),{compilerOptions:{module:ts.ModuleKind.CommonJS,target:ts.ScriptTarget.ES2022}}).outputText; -vm.runInNewContext(code,{exports:fixture.exports,module:fixture,require:n=>{assert.ok(dependencies[n],n);return dependencies[n]},URL}); -const cases=[]; -for(const name of ['data.txt','script.ts','script.TS','LICENSE','Dockerfile','data.jsonl','unknown.mystery','page.shtml','drawing.svgz','schema.xsd','page.xhtml','style.xsl','mail.mhtml','mail.mht','mail.eml'])for(const shared of [false,true])for(const mode of ['head','reject-encoding','fresh'])cases.push({name,shared,mode,query:''}); -for(const query of ['?download=','?download=0','?download=1','?download=&download=','?download[]=','?download[x]=','?download[]=0','?download[0]=','?download=0&download[]=1'])cases.push({name:'page.shtml',shared:true,mode:'head',query}); -for(const name of ['résumé.pdf','研究.txt','😀.txt','a%20b.txt','a%2Gb.txt','a"b.txt','report with spaces.txt','unknown.mystery'])for(const mode of ['head','fresh'])cases.push({name,shared:true,mode,query:'?download=1'}); -(async()=>{ - const app=express();app.set('query parser','extended');app.use('/api/repo',fixture.exports.default); - const server=app.listen(0,'127.0.0.1');await new Promise(r=>server.once('listening',r)); - try{for(const c of cases){current=c;config.SHARED_CACHE_ENABLED=c.shared; - c.expected=await new Promise((resolve,reject)=>{ - const headers={'accept-encoding':c.mode==='reject-encoding'?'*;q=0':'gzip'}; - if(c.mode==='fresh')headers['if-none-match']='W/"f-fixture"'; - http.request({host:'127.0.0.1',port:server.address().port,path:'/api/repo/fixture/file/'+encodeURIComponent(c.name)+c.query,method:c.mode==='fresh'?'GET':'HEAD',headers},res=>{ - let bytes=0;res.on('data',b=>bytes+=b.length);res.on('error',reject);res.on('end',()=>resolve({status:res.statusCode,type:res.headers['content-type']||'',encoding:res.headers['content-encoding']||'',length:res.headers['content-length']||'',ranges:res.headers['accept-ranges']||'',vary:res.headers.vary||'',csp:res.headers['content-security-policy']||'',control:res.headers['cache-control']||'',nosniff:res.headers['x-content-type-options']||'',weak:res.headers.etag.startsWith('W/'),attachment:!!res.headers['content-disposition'],disposition:res.headers['content-disposition']||'',bytes})); - }).on('error',reject).end(); - }); - }}finally{await new Promise(r=>server.close(r));} - assert.equal(transfers,0); - const target='backend/internal/server/testdata/file-metadata.json',data=JSON.stringify(cases,null,2)+'\n'; - if(process.argv.includes('--check'))assert.equal(fs.readFileSync(target,'utf8'),data);else fs.writeFileSync(target,data); - console.log(`${cases.length} TypeScript file metadata contracts ${process.argv.includes('--check')?'verified':'generated'}`); -})().catch(e=>{console.error(e);process.exitCode=1}); diff --git a/backend/contracts/file-query.cjs b/backend/contracts/file-query.cjs deleted file mode 100644 index 25db031..0000000 --- a/backend/contracts/file-query.cjs +++ /dev/null @@ -1,13 +0,0 @@ -'use strict'; -const fs=require('node:fs'),ts=require('typescript'),assert=require('node:assert/strict'); -function source(path){return ts.createSourceFile(path,fs.readFileSync(path,'utf8'),ts.ScriptTarget.Latest,true)} -function find(n,p){if(p(n))return n;let result;ts.forEachChild(n,c=>{result ||= find(c,p)});return result} -const file=source('src/server/routes/file.ts'),preview=source('src/server/routes/repository-private.ts'),user=source('src/server/routes/user.ts'); -const download=find(file,n=>ts.isIfStatement(n)&&n.expression.getText(file)==='req.query.download').expression.getText(file); -const refresh=find(preview,n=>ts.isPropertyAssignment(n)&&n.name.getText(preview)==='force'&&n.initializer.getText(preview).includes('req.query.force')).initializer.getText(preview); -const force=find(user,n=>ts.isCallExpression(n)&&n.expression.getText(user)==='getAllRepositories').arguments[1].getText(user); -const select=new Function('req',`return {download:!!(${download}),force:(${force}),refresh:(${refresh})}`); -const app=require('express')();app.set('query parser','extended');const parse=app.get('query parser fn'); -const queries=['',...['download','force','reconnect'].flatMap(name=>['','1','0','true'].flatMap(value=>[name+'='+value,name+'[]='+value,name+'[0]='+value,name+'[x]='+value])), 'force=1&force[]=1','reconnect=1&reconnect[]=1','force[toString]=x','reconnect=1&force[toString]=x']; -const cases=queries.map(query=>{try{return {query,...select({query:parse(query)})}}catch{return {query,error:true}}}); -const filePath='backend/internal/server/testdata/file-query.json',output=JSON.stringify(cases,null,2)+'\n';if(process.argv.includes('--check'))assert.equal(fs.readFileSync(filePath,'utf8'),output);else fs.writeFileSync(filePath,output);console.log(`${cases.length} TypeScript file query contracts verified`); diff --git a/backend/contracts/file-search.cjs b/backend/contracts/file-search.cjs deleted file mode 100644 index 8b459a8..0000000 --- a/backend/contracts/file-search.cjs +++ /dev/null @@ -1,19 +0,0 @@ -'use strict'; -const fs=require('node:fs'),ts=require('typescript'),assert=require('node:assert/strict'); -function source(path){return ts.createSourceFile(path,fs.readFileSync(path,'utf8'),ts.ScriptTarget.Latest,true)} -function find(n,p){if(p(n))return n;let result;ts.forEachChild(n,c=>{result ||= find(c,p)});return result} -const routes=source('src/server/routes/repository-public.ts'),core=source('src/core/Repository.ts'); -const route=find(routes,n=>ts.isCallExpression(n)&&n.expression.getText(routes)==='router.get'&&n.arguments[0]?.text==='/:repoId/files/search'); -const declaration=find(route,n=>ts.isVariableDeclaration(n)&&n.name.getText(routes)==='query').getText(routes); -const condition=find(route,n=>ts.isIfStatement(n)&&n.expression.getText(routes).includes('query.length')).expression.getText(routes); -const select=new Function(ts.transpile(`return function(req){const ${declaration};if(${condition})return null;return query}`,{target:ts.ScriptTarget.ES2022} ))(); -const method=find(core,n=>ts.isMethodDeclaration(n)&&n.name.getText(core)==='searchFiles'); -const Subject=new Function('isConnected',ts.transpile(`class Subject { ${method.getText(core)} };return Subject`,{target:ts.ScriptTarget.ES2022}))(false); -const files=[{name:'éclair.txt',path:'docs',size:1},{name:'İ.txt',path:'',size:2},{name:'ΟΣ.txt',path:'greek/ΣΙ',size:3},{name:'😀.txt',path:'',size:4},{name:'[x].txt',path:'literal',size:5},{name:'README.md',path:'nested/docs',size:6}]; -const app=require('express')();app.set('query parser','extended');const parse=app.get('query parser fn'); -const queries=['',...['','a','é','İ','i\u0307','ΟΣ','οσ','ος','ΣΙ','😀',' [x] ','\ufeffREADME\ufeff','\u0085README\u0085','docs','nested/docs','%FF'].map(q=>'q='+encodeURIComponent(q)),'q[]=README','q=README&q=docs','q[x]=README','q[]=', 'q=README&q[]=docs']; -(async()=>{ - const repo=new Subject();repo.anonymizedFiles=async()=>files;const rows=[]; - for(const query of queries){try{const value=select({query:parse(query)});rows.push({query,expected:value===null?[]:await repo.searchFiles(value)})}catch{rows.push({query,error:true})}} - const file='backend/internal/server/testdata/file-search.json',output=JSON.stringify({files,cases:rows},null,2)+'\n';if(process.argv.includes('--check'))assert.equal(fs.readFileSync(file,'utf8'),output);else fs.writeFileSync(file,output);console.log(`${rows.length} actual TypeScript file search contracts verified`); -})().catch(error=>{console.error(error);process.exitCode=1}); diff --git a/backend/contracts/file-types.cjs b/backend/contracts/file-types.cjs deleted file mode 100644 index 8b170da..0000000 --- a/backend/contracts/file-types.cjs +++ /dev/null @@ -1,13 +0,0 @@ -const {spawnSync}=require('node:child_process'); -const assert=require('node:assert/strict'); -require('ts-node/register/transpile-only'); -const {isTextFile}=require('../../src/core/anonymize-utils'); -const mime=require('mime-types'); -const samples=[Buffer.alloc(0),Buffer.from('Alice\nhello world'),Buffer.from([0,1,2,3,4]),Buffer.from([0xff,0xfe,65,0]),Buffer.from('研究😀 Alice'),Buffer.from('%PDF-1.7\nAlice')]; -let state=1234567;const random=()=>{state=(Math.imul(state,1664525)+1013904223)>>>0;return state>>>24}; -const cases=[]; -for(const name of ['LICENSE','COPYING','Dockerfile','unknown','script.bat','script.cmd','item.mystery',...Object.keys(mime.types).map(x=>'file.'+x)])for(const raw of samples)cases.push({name,raw}); -for(let i=0;i<400;i++){const raw=Buffer.alloc(i%516);for(let j=0;jJSON.stringify({operation:'classify',filename:c.name,content:c.raw.toString('base64')})).join('\n')+'\n'; -const p=spawnSync(process.env.GO_CONTRACT_BINARY,[],{input,encoding:'utf8',maxBuffer:32*1024*1024,timeout:60000});assert.equal(p.status,0,p.stderr||String(p.error));const output=p.stdout.trim().split('\n').map(JSON.parse);assert.equal(output.length,cases.length);const failures=[]; -cases.forEach((c,i)=>{const expected=isTextFile(c.name,c.raw);if(output[i].text!==expected)failures.push({name:c.name,input:c.raw.toString('base64'),expected,actual:output[i]})});console.log(JSON.stringify({cases:cases.length,passed:cases.length-failures.length,failures},null,2));if(failures.length)process.exitCode=1; diff --git a/backend/contracts/folder-listing.cjs b/backend/contracts/folder-listing.cjs deleted file mode 100644 index f3ff067..0000000 --- a/backend/contracts/folder-listing.cjs +++ /dev/null @@ -1,10 +0,0 @@ -'use strict'; -const fs=require('node:fs'),ts=require('typescript'),assert=require('node:assert/strict'); -const file=ts.createSourceFile('Repository.ts',fs.readFileSync('src/core/Repository.ts','utf8'),ts.ScriptTarget.Latest,true); -const fn=file.statements.find(n=>ts.isFunctionDeclaration(n)&&n.name?.text==='anonymizeTreeRecursive'); -const run=new Function('compileTerms','anonymizePathCompiled','sha1',ts.transpile(fn.getText(file)+'; return anonymizeTreeRecursive;',{target:ts.ScriptTarget.ES2022}))(()=>[],s=>s,require('crypto-js/sha1')); -const files=[{name:'normal',path:'',size:12,sha:'abc'},{name:'missing-sha',path:'',size:1},{name:'empty',path:'',size:0,sha:'abc'},{name:'folder',path:''}]; -const output=JSON.stringify({files,expected:run(files,[],{includeSha:false})},null,2)+'\n'; -const dest='backend/internal/server/testdata/folder-listing.json'; -if(process.argv.includes('--check'))assert.equal(fs.readFileSync(dest,'utf8'),output);else fs.writeFileSync(dest,output); -console.log('4 actual TypeScript folder-listing output contracts verified'); diff --git a/backend/contracts/folder-paths.cjs b/backend/contracts/folder-paths.cjs deleted file mode 100644 index c49e148..0000000 --- a/backend/contracts/folder-paths.cjs +++ /dev/null @@ -1,7 +0,0 @@ -'use strict'; -const fs=require('node:fs'),assert=require('node:assert/strict'),path=require('node:path').posix; -const paths=['','alice','alice/','alice//','a//b/','/','//','///','./alice/','a/../b','//a/b','a///b//','a\\b','日本語/é/',' a / b ','/root/leaf','../x','a/./b']; -const cases=paths.map(requested=>{let directory=path.dirname(requested);if(directory==='.')directory='';if(directory.endsWith('/'))directory=directory.slice(0,-1);return {requested,directory,name:path.basename(requested)}}); -const file='backend/internal/server/testdata/folder-paths.json',output=JSON.stringify(cases,null,2)+'\n'; -if(process.argv.includes('--check'))assert.equal(fs.readFileSync(file,'utf8'),output);else fs.writeFileSync(file,output); -console.log(cases.length+' Node POSIX folder path contracts verified'); diff --git a/backend/contracts/github-pagination.cjs b/backend/contracts/github-pagination.cjs deleted file mode 100644 index 6adf37c..0000000 --- a/backend/contracts/github-pagination.cjs +++ /dev/null @@ -1,28 +0,0 @@ -const fs = require('node:fs'); -const assert = require('node:assert/strict'); -const {paginateRest} = require('@octokit/plugin-paginate-rest'); -(async () => { - const start = 'https://api.github.com/user/repos?page=1&per_page=100'; - const next = 'https://api.github.com/user/repos?after=opaque%2Bcursor&per_page=7'; - const cases = []; - const links = ['', `<${next}>; rel="next"`, `<${next}>;rel="next"`, `<${next}>;\t rel="next"`, `<${next}>;\u00a0rel="next"`, `<${next}>;\ufeffrel="next"`, `<${next}>;\u0085rel="next"`, `<${next}>; rel="prev"`, `<${next}>; rel="Next"`, `<${next}>; rel='next'`, `<${next}> ; rel="next"`, `<${start}>; rel="prev", <${next}>; rel="next"`]; - for (const count of [0, 1, 100]) for (const link of links) cases.push({name:`${count}/${JSON.stringify(link)}`, count, link, conflict:0}); - for (const conflict of [1,2]) cases.push({name:`conflict-on-${conflict}`, count:1, link:`<${next}>; rel="next"`, conflict}); - for (const c of cases) { - const urls = []; - const request = async ({url}) => { - urls.push(url); - assert.ok(urls.length <= 2); - if (urls.length === c.conflict) throw Object.assign(new Error('Conflict'), {status:409}); - return {status:200, headers:{link:urls.length === 1 ? c.link : ''}, data:Array.from({length:urls.length === 1 ? c.count : 1},()=>({id:urls.length}))}; - }; - request.endpoint = () => ({method:'GET', url:start, headers:{}}); - const result = await paginateRest({request}).paginate('GET /user/repos'); - c.expected = {urls, ids:result.map(row=>row.id)}; - } - const target='backend/internal/server/testdata/github-pagination.json'; - const output=JSON.stringify(cases,null,2)+'\n'; - if (process.argv.includes('--check')) assert.equal(fs.readFileSync(target,'utf8'),output,'Octokit pagination contract changed'); - else fs.writeFileSync(target,output); - console.log(`${cases.length} Octokit pagination contracts ${process.argv.includes('--check')?'verified':'generated'}`); -})().catch(error=>{console.error(error);process.exitCode=1;}); diff --git a/backend/contracts/github-quota.cjs b/backend/contracts/github-quota.cjs deleted file mode 100644 index 0a484e0..0000000 --- a/backend/contracts/github-quota.cjs +++ /dev/null @@ -1,51 +0,0 @@ -const fs = require('node:fs'); -const vm = require('node:vm'); -const assert = require('node:assert/strict'); -const ts = require('typescript'); -function source(path) { return ts.createSourceFile(path, fs.readFileSync(path, 'utf8'), ts.ScriptTarget.Latest, true); } -const contextPath = 'src/core/github-token-context.ts'; -const contextCode = ts.transpileModule(fs.readFileSync(contextPath, 'utf8'), {compilerOptions: {target: ts.ScriptTarget.ES2022, module: ts.ModuleKind.CommonJS}}).outputText; -const exportsObject = {}; -vm.runInNewContext(contextCode, {exports: exportsObject, require}); -const utilityTree = source('src/core/GitHubUtils.ts'); -let prefix; -function findPrefix(node) { - if (ts.isVariableDeclaration(node) && node.name.getText(utilityTree) === 'REDIS_GATE_PREFIX') { - assert.ok(ts.isStringLiteral(node.initializer)); prefix = node.initializer.text; - } - ts.forEachChild(node, findPrefix); -} -findPrefix(utilityTree); assert.equal(typeof prefix, 'string'); -const appTree = source('src/core/github-app.ts'); -const templates = []; -function findScope(node) { - if (ts.isPropertyAssignment(node) && node.name.getText(appTree) === 'quotaKey') templates.push(node.initializer.getText(appTree)); - ts.forEachChild(node, findScope); -} -findScope(appTree); -const installation = templates.find(text => text.includes('installation:')); -const appUser = templates.find(text => text.includes('app-user:')); -assert.ok(installation && appUser); -const cases = []; -for (const [index, token] of ['', 'synthetic-oauth', 'ghp_synthetic', 'github_pat_synthetic', 'synthetic-ü-🔑'].entries()) { - cases.push({name: `token-${index}`, token, scope: '', expected: [prefix + exportsObject.githubQuotaKey(token)]}); -} -for (const id of [1, 42, 9007199254740991]) { - const token = `synthetic-installation-${id}`; - const fallback = prefix + exportsObject.githubQuotaKey(token); - const quotaKey = vm.runInNewContext(installation, {binding: {installationId: id}}); - exportsObject.registerGitHubToken(token, {quotaKey}); - cases.push({name: `installation-${id}`, token, scope: `installation:123:${id}`, expected: [fallback, prefix + exportsObject.githubQuotaKey(token)]}); -} -for (const ownerId of ['000000000000000000000001', 'abcdefabcdefabcdefabcdef']) { - const token = `synthetic-app-user-${ownerId}`; - const fallback = prefix + exportsObject.githubQuotaKey(token); - const quotaKey = vm.runInNewContext(appUser, {ownerId}); - exportsObject.registerGitHubToken(token, {quotaKey}); - cases.push({name: `app-user-${ownerId}`, token, scope: quotaKey, expected: [fallback, prefix + exportsObject.githubQuotaKey(token)]}); -} -const target = 'backend/internal/server/testdata/github-quota.json'; -const output = JSON.stringify(cases, null, 2) + '\n'; -if (process.argv.includes('--check')) assert.equal(fs.readFileSync(target, 'utf8'), output, 'TypeScript quota keys changed'); -else fs.writeFileSync(target, output); -console.log(`${cases.length} TypeScript quota-key contracts ${process.argv.includes('--check') ? 'verified' : 'generated'}`); diff --git a/backend/contracts/github-responses.cjs b/backend/contracts/github-responses.cjs deleted file mode 100644 index 488fde3..0000000 --- a/backend/contracts/github-responses.cjs +++ /dev/null @@ -1,30 +0,0 @@ -const fs = require('node:fs'); -const vm = require('node:vm'); -const assert = require('node:assert/strict'); -const ts = require('typescript'); -(async () => { - const path = 'src/core/github-app.ts'; - const tree = ts.createSourceFile(path, fs.readFileSync(path, 'utf8'), ts.ScriptTarget.Latest, true); - const declaration = tree.statements.find(s => ts.isFunctionDeclaration(s) && s.name?.text === 'githubRequest'); - assert.ok(declaration); - const code = ts.transpileModule(declaration.getText(tree), {compilerOptions: {target: ts.ScriptTarget.ES2022, module: ts.ModuleKind.CommonJS}}).outputText; - const cases = []; - for (const status of [200, 204, 301, 400, 401, 403, 404, 422, 429, 500, 503]) { - for (const headers of [{}, {'retry-after': ''}, {'retry-after': '30'}, {'x-ratelimit-remaining': '0'}]) { - const oracle = {}; - const input = {name: `${status}/${JSON.stringify(headers)}`, status, headers, expected: null}; - vm.runInNewContext(code, {exports: oracle, AbortSignal, - appError: (code = 'github_app_reconnect_required', httpStatus = 403) => Object.assign(new Error(code), {httpStatus}), - fetch: async () => ({status, ok: status >= 200 && status < 300, headers: new Headers(headers), json: async () => ({ok: true})}), - }); - try { await oracle.githubRequest('/user', 'synthetic'); } - catch (error) { input.expected = {code: error.message, status: error.httpStatus}; } - cases.push(input); - } - } - const target = 'backend/internal/server/testdata/github-responses.json'; - const output = JSON.stringify(cases, null, 2) + '\n'; - if (process.argv.includes('--check')) assert.equal(fs.readFileSync(target, 'utf8'), output, 'TypeScript GitHub response contract changed'); - else fs.writeFileSync(target, output); - console.log(`${cases.length} TypeScript GitHub response contracts ${process.argv.includes('--check') ? 'verified' : 'generated'}`); -})().catch(error => { console.error(error); process.exitCode = 1; }); diff --git a/backend/contracts/json-http.cjs b/backend/contracts/json-http.cjs deleted file mode 100644 index 04028f8..0000000 --- a/backend/contracts/json-http.cjs +++ /dev/null @@ -1,18 +0,0 @@ -const fs=require('node:fs');const assert=require('node:assert/strict');const http=require('node:http');const express=require('express');const etag=require('etag'); -assert.match(fs.readFileSync('src/server/index.ts','utf8'),/app\.set\("etag", "strong"\)/); -const cases=[];const value={a:'<é>\u2028\u2029',z:42}; -function add(overrides){cases.push({name:`json-http-${cases.length}`,method:'GET',status:200,value,...overrides})} -const current=etag(JSON.stringify(value)); -for(const match of ['',current,'W/'+current,'"stale", '+current,'*','"stale"',current+', "other"','\t'+current])for(const method of ['GET','HEAD','POST','QUERY'])add({method,match}); -for(const control of ['no-cache','max-age=0, no-cache','NO-CACHE','no-cache=1','max-age=0'])add({match:current,control}); -for(const status of [201,204,205,304,400,401,403,500])for(const match of ['', '*'])add({status,match}); -for(const since of ['Wed, 01 Jan 2025 00:00:00 GMT','Tue, 31 Dec 2024 00:00:00 GMT','invalid'])add({since,modified:'Wed, 01 Jan 2025 00:00:00 GMT'}); -add({match:current,since:'invalid'});add({match:'"stale"',since:'Wed, 01 Jan 2030 00:00:00 GMT',modified:'Wed, 01 Jan 2025 00:00:00 GMT'}); -for(const value of [null,[],{},'literal \\u2028 then \u2028',true,0,{value:null}])add({value}); -add({preset:'"custom"',match:'W/"custom"'}); -const app=express();app.set('etag','strong');app.use((req,res)=>{const c=cases[Number(req.headers['x-fixture'])];if(c.modified)res.set('Last-Modified',c.modified);if(c.preset)res.set('ETag',c.preset);res.status(c.status).json(c.value)}); -(async()=>{const server=app.listen(0,'127.0.0.1');await new Promise(r=>server.once('listening',r));try{for(let i=0;i{const req=http.request({host:'127.0.0.1',port:server.address().port,path:'/',method:c.method,headers},res=>{const chunks=[];res.on('data',b=>chunks.push(b));res.on('end',()=>resolve({status:res.statusCode,etag:res.headers.etag||'',type:res.headers['content-type']||'',length:res.headers['content-length']||'',body:Buffer.concat(chunks).toString('utf8')}));res.on('error',reject)});req.on('error',reject);req.end()}); -}}finally{server.close()} -const target='backend/internal/server/testdata/json-http.json';const text=JSON.stringify(cases,null,2)+'\n';if(process.argv.includes('--check'))assert.equal(fs.readFileSync(target,'utf8'),text);else fs.writeFileSync(target,text);console.log(`${cases.length} Express JSON HTTP contracts ${process.argv.includes('--check')?'verified':'generated'}`); -})().catch(e=>{console.error(e);process.exitCode=1}); diff --git a/backend/contracts/legacy-source-paths.cjs b/backend/contracts/legacy-source-paths.cjs deleted file mode 100644 index cce3695..0000000 --- a/backend/contracts/legacy-source-paths.cjs +++ /dev/null @@ -1,38 +0,0 @@ -const fs=require('node:fs'); -const vm=require('node:vm'); -const assert=require('node:assert/strict'); -const {createHash}=require('node:crypto'); -const ts=require('typescript'); -const source='src/core/source/GitHubStream.ts'; -const tree=ts.createSourceFile(source,fs.readFileSync(source,'utf8'),ts.ScriptTarget.Latest,true); -let generation,cachePath; -function visit(node){ - if(ts.isVariableDeclaration(node)&&node.initializer){ - const name=node.name.getText(tree),value=node.initializer.getText(tree); - if(name==='generation'&&value.includes('this.data.cacheRevision'))generation=value; - if(name==='cachePath'&&value.includes('contentGenerationPrefix'))cachePath=value; - } - ts.forEachChild(node,visit); -} -visit(tree);assert.ok(generation&&cachePath); -const helper={exports:{}}; -vm.runInNewContext(ts.transpileModule(fs.readFileSync('src/core/content-generation.ts','utf8'),{compilerOptions:{module:ts.ModuleKind.CommonJS}}).outputText,{exports:helper.exports,require}); -const fixture={exports:{}}; -const code=ts.transpileModule(`module.exports=function(expected,filePath){const generation=${generation};return ${cachePath}}`,{compilerOptions:{module:ts.ModuleKind.CommonJS,target:ts.ScriptTarget.ES2022}}).outputText; -vm.runInNewContext(code,{module:fixture,createHash,contentGenerationPrefix:helper.exports.contentGenerationPrefix}); -const rows=[]; -for(const treeGeneration of [undefined,'generation:one','<>&\u2028\\u2028']){ - for(const anonymizeDate of [undefined,'2026-01-02T03:04:05.006Z']){ - for(const contentCacheRevision of [undefined,null,'revision:two']){ - const record={treeGeneration,anonymizeDate,contentCacheRevision}; - const commit='opaque:<>&\u2029',revision='blob:one',path='nested/Alice.txt'; - const cacheGeneration=`${treeGeneration||'legacy'}:${anonymizeDate?new Date(anonymizeDate).toISOString():''}`; - const expected=fixture.exports.call({data:{commit,cacheGeneration,cacheRevision:contentCacheRevision}},{sha:revision},path); - rows.push({record,commit,revision,path,expected}); - } - } -} -const target='backend/internal/server/testdata/legacy-source-paths.json'; -const serialized=JSON.stringify(rows,null,2)+'\n'; -if(process.argv.includes('--check'))assert.equal(fs.readFileSync(target,'utf8'),serialized);else fs.writeFileSync(target,serialized); -console.log(`${rows.length} TypeScript legacy source path contracts ${process.argv.includes('--check')?'verified':'generated'}`); diff --git a/backend/contracts/monitoring-query.cjs b/backend/contracts/monitoring-query.cjs deleted file mode 100644 index e43c510..0000000 --- a/backend/contracts/monitoring-query.cjs +++ /dev/null @@ -1,10 +0,0 @@ -'use strict'; -const fs=require('node:fs'),ts=require('typescript'),assert=require('node:assert/strict'); -function find(n,p){if(p(n))return n;let result;ts.forEachChild(n,c=>{result ||= find(c,p)});return result} -function windowExpression(path){const source=ts.createSourceFile(path,fs.readFileSync(path,'utf8'),ts.ScriptTarget.Latest,true);return find(source,n=>ts.isVariableDeclaration(n)&&n.name.getText(source)==='windowMinutes').initializer.getText(source)} -const performanceWindow=new Function('minutes','return '+windowExpression('src/core/performance-monitoring.ts')); -const cacheWindow=new Function('minutes','return '+windowExpression('src/core/cache-observability.ts')); -const app=require('express')();app.set('query parser','extended');const parse=app.get('query parser fn'); -const queries=['',...['','60',' 60 ','060','60.0','6e1','0x3c','0b111100','0o74','15','1440','10080','NaN','Infinity','-Infinity','+60','-60','60x','0x3c_','0xffffffffffffffffffff','\ufeff60','\u008560'].map(x=>'minutes='+encodeURIComponent(x)),'minutes[]=60','minutes[0]=60','minutes[1]=60','minutes[]=60&minutes[]=15','minutes[0][]=60','minutes[x]=60','minutes[toString]=60','minutes[]=','minutes=60&minutes[]=15','minutes[20]=60','minutes=60%FF','minutes=60%zz']; -const cases=queries.map(query=>{try{const minutes=Number(parse(query).minutes);return{query,performance:performanceWindow(minutes),cache:cacheWindow(minutes)}}catch{return{query,error:true}}}); -const file='backend/internal/server/testdata/monitoring-query.json',output=JSON.stringify(cases,null,2)+'\n';if(process.argv.includes('--check'))assert.equal(fs.readFileSync(file,'utf8'),output);else fs.writeFileSync(file,output);console.log(`${cases.length} TypeScript monitoring query contracts verified`); diff --git a/backend/contracts/oauth-profile.cjs b/backend/contracts/oauth-profile.cjs deleted file mode 100644 index 1e27d04..0000000 --- a/backend/contracts/oauth-profile.cjs +++ /dev/null @@ -1,16 +0,0 @@ -const fs=require('node:fs');const assert=require('node:assert/strict'); -const source=fs.readFileSync('src/server/routes/github-app.ts','utf8'); -const predicate=source.match(/if \((!Number\.isSafeInteger\(profile\.id\).*?)\) throw appError\(\);/)[1]; -const rejected=new Function('profile',`return ${predicate}`); -const cases=[]; -for(const id of [undefined,null,false,true,'42','',[],{},0,-1,1,1.5,-1.5,9007199254740991,-9007199254740991,9007199254740992,1e30]) { - const profile={login:'synthetic-login'};if(id!==undefined)profile.id=id; - cases.push({name:`id-${cases.length}`,profile,rejected:rejected(profile)}); -} -for(const login of [undefined,null,false,true,0,1,'','valid-login',[],{},['login']]) { - const profile={id:42};if(login!==undefined)profile.login=login; - cases.push({name:`login-${cases.length}`,profile,rejected:rejected(profile)}); -} -const path='backend/internal/server/testdata/oauth-profile.json',output=JSON.stringify(cases,null,2)+'\n'; -if(process.argv.includes('--check'))assert.equal(fs.readFileSync(path,'utf8'),output);else fs.writeFileSync(path,output); -console.log(`${cases.length} TypeScript App profile validation contracts verified`); diff --git a/backend/contracts/oauth-tokens.cjs b/backend/contracts/oauth-tokens.cjs deleted file mode 100644 index 5ab1873..0000000 --- a/backend/contracts/oauth-tokens.cjs +++ /dev/null @@ -1,30 +0,0 @@ -const fs = require('node:fs'); -const vm = require('node:vm'); -const assert = require('node:assert/strict'); -const ts = require('typescript'); -(async () => { - const path = 'src/core/github-app.ts'; - const tree = ts.createSourceFile(path, fs.readFileSync(path, 'utf8'), ts.ScriptTarget.Latest, true); - const declaration = tree.statements.find(s => ts.isFunctionDeclaration(s) && s.name?.text === 'exchangeAppToken'); - assert.ok(declaration); - const code = ts.transpileModule(declaration.getText(tree), {compilerOptions: {target: ts.ScriptTarget.ES2022, module: ts.ModuleKind.CommonJS}}).outputText; - const base = {access_token: 'synthetic-access', refresh_token: 'synthetic-refresh', expires_in: 3600, refresh_token_expires_in: 7200}; - const inputs = [{name: 'valid', tokens: base, status: 200}, {name: 'fractional', tokens: {...base, expires_in: 0.25}, status: 200}]; - for (const field of ['access_token', 'refresh_token']) for (const value of ['', null, 1, true, [], {}]) inputs.push({name: `${field}/${JSON.stringify(value)}`, tokens: {...base, [field]: value}, status: 200}); - for (const field of ['expires_in', 'refresh_token_expires_in']) for (const value of [null, 0, -1, '3600', true, [], {}]) inputs.push({name: `${field}/${JSON.stringify(value)}`, tokens: {...base, [field]: value}, status: 200}); - for (const status of [400, 401, 403, 429, 500]) inputs.push({name: `http/${status}`, tokens: base, status}); - for (const input of inputs) { - const oracle = {}; - vm.runInNewContext(code, {exports: oracle, config: {}, AbortSignal, - appError: (code = 'github_app_reconnect_required', httpStatus = 401) => Object.assign(new Error(code), {httpStatus}), - fetch: async () => ({status: input.status, ok: input.status >= 200 && input.status < 300, json: async () => input.tokens}), - }); - input.expected = null; - try { await oracle.exchangeAppToken({}); } catch (error) { input.expected = {code: error.message, status: error.httpStatus}; } - } - const target = 'backend/internal/server/testdata/oauth-tokens.json'; - const output = JSON.stringify(inputs, null, 2) + '\n'; - if (process.argv.includes('--check')) assert.equal(fs.readFileSync(target, 'utf8'), output, 'TypeScript OAuth token contract changed'); - else fs.writeFileSync(target, output); - console.log(`${inputs.length} TypeScript OAuth token contracts ${process.argv.includes('--check') ? 'verified' : 'generated'}`); -})().catch(error => { console.error(error); process.exitCode = 1; }); diff --git a/backend/contracts/options.cjs b/backend/contracts/options.cjs deleted file mode 100644 index 0234eee..0000000 --- a/backend/contracts/options.cjs +++ /dev/null @@ -1,68 +0,0 @@ -// Exercise the real route update functions and Mongoose schemas without a database. -const fs = require('node:fs'); -const vm = require('node:vm'); -const assert = require('node:assert/strict'); -const ts = require('typescript'); -process.env.SESSION_SECRET ||= 'synthetic-option-contract'; -require('ts-node/register/transpile-only'); -const mongoose = require('mongoose'); -const {ContentAnonimizer} = require('../../src/core/anonymize-utils'); -require('../../src/config').default.ANONYMIZATION_MASK = 'XXXX'; -const cases = []; -for (const [kind, route, helper, modelName] of [ - ['repo', 'repository', 'updateRepoModel', 'anonymizedRepositories'], - ['gist', 'gist', 'updateGistModel', 'anonymizedGists'], - ['pr', 'pullRequest', 'updatePullRequestModel', 'anonymizedPullRequests'], -]) { - const path = `src/server/routes/${route}-private.ts`; - const tree = ts.createSourceFile(path, fs.readFileSync(path, 'utf8'), ts.ScriptTarget.Latest, true); - const declaration = tree.statements.find(s => ts.isFunctionDeclaration(s) && s.name?.text === helper); - assert.ok(declaration, helper); - const code = ts.transpileModule(`${declaration.getText(tree)};module.exports=${helper}`, { - compilerOptions: {target: ts.ScriptTarget.ES2022, module: ts.ModuleKind.CommonJS}, - }).outputText; - const module = {exports: {}}; - vm.runInNewContext(code, {module, Date}); - const schema = require(`../../src/core/model/${modelName}/${modelName}.schema.ts`).default; - const Model = mongoose.model(`options_contract_${kind}`, schema); - const add = (name, options, terms = ['Alice', '']) => { - const body = {source: {branch: 'main', commit: 'abc'}, terms, options}; - const document = new Model(); - module.exports(document, body); - assert.equal(document.validateSync(), undefined, name); - const expected = document.toObject().options; - const input = 'Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep'; - const engine = new ContentAnonimizer({terms: expected.terms, image: true, link: true}); - cases.push({name: `${kind}/${name}`, kind, body, expected, input, output: engine.anonymize(input)}); - }; - add('empty', {}); - for (const [index, terms] of [ - [1, true, false, -42, 0], - [1e-6, 1e-7, 1e20, 1e21], - ['', false, 'Alice'], - [-0, 1.25, 9007199254740992], - ].entries()) add(`scalar-terms-${index}`, {}, terms); - for (const value of [true, false]) { - const all = Object.fromEntries(['update','image','pdf','notebook','link','page','title','body','comments','content','origin','username','date','diff','unknown'].map(key => [key, value])); - add(`all-${value}`, {...all, expirationMode: 'never', pageSource: {branch: 'docs', path: '/site', private: 'discard'}}); - } - for (const value of [null, 0, 1, '0', '1', 'true', 'false', 'yes', 'no']) { - const flags = Object.fromEntries(['update','image','pdf','notebook','link','page','title','body','comments','content','origin','username','date','diff'].map(key => [key, value])); - add(`boolean-coercion-${JSON.stringify(value)}`, flags); - } - for (const value of [null, '', false, 0, true, 1, -1.5, 1700000000123, '2026-06-01T12:30:00.000Z', '0001-01-01', 'March 1 2026', '2026-02-29', '2026-02-28T24:00:00Z', ['2026','3','1'], ['2026-03-01'], '2026-03-01T01:00:00+02:00']) add(`expiration-${value}`, {expirationDate: value}); - for (const value of ['', 'TRUE', 'False', ' yes ', 2, -1, [], {}]) { - const body = {source: {branch: 'main', commit: 'abc'}, terms: ['Alice'], options: {image: value}}; - const document = new Model(); - module.exports(document, body); - assert.ok(document.validateSync(), `unexpected accepted boolean ${JSON.stringify(value)}`); - cases.push({name: `${kind}/invalid-boolean-${JSON.stringify(value)}`, kind, body, rejected: true}); - } - add('page-source', {pageSource: {branch: 'docs', path: '/', arbitrary: 'discard'}}); - add('irrelevant-invalid-options', kind === 'repo' ? {diff: 'invalid', content: 123} : {page: 'invalid', pdf: 123}); -} -const target = 'backend/internal/server/testdata/options.json'; -const output = JSON.stringify(cases, null, 2) + '\n'; -if (process.argv.includes('--check')) assert.equal(fs.readFileSync(target, 'utf8'), output, 'TypeScript option contract changed'); -else fs.writeFileSync(target, output); -console.log(`${cases.length} TypeScript option contracts ${process.argv.includes('--check') ? 'verified' : 'generated'}`); diff --git a/backend/contracts/preview-branch-order.cjs b/backend/contracts/preview-branch-order.cjs deleted file mode 100644 index f04d70c..0000000 --- a/backend/contracts/preview-branch-order.cjs +++ /dev/null @@ -1,24 +0,0 @@ -'use strict'; -const fs=require('node:fs'),ts=require('typescript'),assert=require('node:assert/strict'); -const source=ts.createSourceFile('GitHubRepository.ts',fs.readFileSync('src/core/source/GitHubRepository.ts','utf8'),ts.ScriptTarget.Latest,true); -function find(n,p){if(p(n))return n;let result;ts.forEachChild(n,c=>{result ||=find(c,p)});return result} -const method=find(source,n=>ts.isMethodDeclaration(n)&&n.name.getText(source)==='readme'); -const code=ts.transpile('({'+method.getText(source)+'})',{target:ts.ScriptTarget.ES2022}); -const app=require('express')();app.set('query parser','extended');const parse=app.get('query parser fn'); -(async()=>{ - const cases=[]; - for(const mode of ['populated','empty','failure'])for(const query of ['branch[]=','branch[toString]=main','branch=missing']) { - const calls=[]; - class AnonymousError extends Error{constructor(code,options){super(code);this.httpStatus=options.httpStatus}} - const model={findOne:()=>({select:()=>{calls.push('lookup');return {branches:[]}}})}; - const instance=new Function('RepositoryModel','AnonymousError','return '+code)(model,AnonymousError); - instance._data={defaultBranch:'main'}; - instance.branches=async()=>{calls.push('branches');if(mode==='failure')throw new AnonymousError('repo_not_found',{httpStatus:503});return mode==='empty'?[]:[{name:'main',commit:'fixture',readme:'cached'}]}; - let error,status; - try{await instance.readme({branch:parse(query).branch,accessToken:'fixture'})}catch(e){error=e instanceof TypeError?'invalid_query_value':e.message;status=e.httpStatus||500} - assert(error);cases.push({mode,query,calls,error,status}); - } - const file='backend/internal/server/testdata/preview-branch-order.json',output=JSON.stringify(cases,null,2)+'\n'; - if(process.argv.includes('--check'))assert.equal(fs.readFileSync(file,'utf8'),output);else fs.writeFileSync(file,output); - console.log(cases.length+' actual TypeScript README discovery-order contracts verified'); -})().catch(e=>{console.error(e);process.exitCode=1}); diff --git a/backend/contracts/preview-branches.cjs b/backend/contracts/preview-branches.cjs deleted file mode 100644 index 8ea6fa5..0000000 --- a/backend/contracts/preview-branches.cjs +++ /dev/null @@ -1,14 +0,0 @@ -'use strict'; -const fs=require('node:fs'),ts=require('typescript'),assert=require('node:assert/strict'); -const source=ts.createSourceFile('GitHubRepository.ts',fs.readFileSync('src/core/source/GitHubRepository.ts','utf8'),ts.ScriptTarget.Latest,true); -function find(n,p){if(p(n))return n;let result;ts.forEachChild(n,c=>{result ||=find(c,p)});return result} -const method=find(source,n=>ts.isMethodDeclaration(n)&&n.name.getText(source)==='readme'); -const fallback=method.body.statements[0].getText(source); -const selected=find(method,n=>ts.isVariableDeclaration(n)&&n.name.getText(source)==='selected').getText(source); -const choose=new Function('opt','model',ts.transpile(fallback+'; const '+selected+'; return selected?.name;', {target:ts.ScriptTarget.ES2022})); -const app=require('express')();app.set('query parser','extended');const parse=app.get('query parser fn'); -const branches=['main','release','main,release','[object Object]'].map(name=>({name})); -const queries=['','branch=','branch=main','branch=release','branch[]=release','branch[0]=main','branch=main&branch=release','branch=main&branch[]=release','branch[]=','branch[x]=main','branch[toString]=main','branch=%20main%20']; -const cases=queries.map(query=>{try{return{query,selected:choose.call({_data:{defaultBranch:'main'}},{branch:parse(query).branch},{branches})??null}}catch{return{query,error:true}}}); -const file='backend/internal/server/testdata/preview-branches.json',output=JSON.stringify({branches,cases},null,2)+'\n';if(process.argv.includes('--check'))assert.equal(fs.readFileSync(file,'utf8'),output);else fs.writeFileSync(file,output); -console.log(cases.length+' actual TypeScript README branch contracts verified'); diff --git a/backend/contracts/preview-hints.cjs b/backend/contracts/preview-hints.cjs deleted file mode 100644 index 7e9005b..0000000 --- a/backend/contracts/preview-hints.cjs +++ /dev/null @@ -1,15 +0,0 @@ -'use strict'; -const fs=require('node:fs'),assert=require('node:assert/strict'); -require('ts-node/register/transpile-only'); -const Model=require('../../src/core/model/repositories/repositories.model').default; -const app=require('express')();app.set('query parser','extended');const parse=app.get('query parser fn'); -const id='507f1f77bcf86cd799439011'; -const queries=['','repositoryID=','repositoryID='+id,'repositoryID='+id.toUpperCase(),'repositoryID=abcdefghijkl','repositoryID=invalid','repositoryID[]='+id,'repositoryID='+id+'&repositoryID='+id,'repositoryID[2]='+id,'repositoryID[0][0]='+id,'repositoryID[_id]='+id,'repositoryID[x]='+id,'repositoryID[]=','repositoryID='+id+'&repositoryID[]=invalid','repositoryID[]=invalid&reconnect=1','repositoryID[]=invalid&reconnect[]=1']; -const cases=queries.map(query=>{ - const q=parse(query),value=q.reconnect==='1'?undefined:q.repositoryID; - if(!value)return {query,filter:null}; - try{return {query,filter:JSON.parse(JSON.stringify(Model.findById(value).cast(Model)))}}catch{return {query,error:true}} -}); -const file='backend/internal/server/testdata/preview-hints.json',output=JSON.stringify(cases,null,2)+'\n'; -if(process.argv.includes('--check'))assert.equal(fs.readFileSync(file,'utf8'),output);else fs.writeFileSync(file,output); -console.log(cases.length+' actual Mongoose preview hint contracts verified'); diff --git a/backend/contracts/preview-query.cjs b/backend/contracts/preview-query.cjs deleted file mode 100644 index 5433345..0000000 --- a/backend/contracts/preview-query.cjs +++ /dev/null @@ -1,11 +0,0 @@ -'use strict'; -const fs=require('node:fs'),ts=require('typescript'),assert=require('node:assert/strict'); -function find(n,p){if(p(n))return n;let result;ts.forEachChild(n,c=>{result ||= find(c,p)});return result} -const source=ts.createSourceFile('github-app.ts',fs.readFileSync('src/core/github-app.ts','utf8'),ts.ScriptTarget.Latest,true); -const fn=find(source,n=>ts.isFunctionDeclaration(n)&&n.name?.text==='selectRepositoryAccess'); -const condition=find(fn,n=>ts.isIfStatement(n)&&n.expression.getText(source).startsWith('choice !== undefined')).expression.getText(source); -const invalid=new Function('choice','return '+condition); -const app=require('express')();app.set('query parser','extended');const parse=app.get('query parser fn'); -const queries=['','connection=','connection=oauth','connection=github-app','connection=custom','connection=oauth&connection=github-app','connection[]=oauth','connection[0]=github-app','connection[x]=oauth','connection=oauth&connection[]=oauth','connection[]=github-app&connection=oauth','connection[toString]=oauth','connection=%6fauth','anonymizedRepoId=fixture','anonymizedRepoId[]=fixture','anonymizedRepoId=fixture&anonymizedRepoId[]=fixture','anonymizedRepoId=']; -const cases=queries.map(query=>{const parsed=parse(query);return{query,savedResource:typeof parsed.anonymizedRepoId==='string',invalidConnection:invalid(parsed.connection),choice:typeof parsed.connection==='string'?parsed.connection:''}}); -const file='backend/internal/server/testdata/preview-query.json',output=JSON.stringify(cases,null,2)+'\n';if(process.argv.includes('--check'))assert.equal(fs.readFileSync(file,'utf8'),output);else fs.writeFileSync(file,output);console.log(`${cases.length} TypeScript preview query contracts verified`); diff --git a/backend/contracts/project-names.cjs b/backend/contracts/project-names.cjs deleted file mode 100644 index 5ef31dd..0000000 --- a/backend/contracts/project-names.cjs +++ /dev/null @@ -1,15 +0,0 @@ -const fs=require('node:fs'),assert=require('node:assert/strict'),ts=require('typescript'); -const source=fs.readFileSync('src/server/routes/project-names.ts','utf8'); -const start=source.indexOf(' const body = input');const end=source.indexOf(' const type = String(body.type)',start); -assert.ok(start>=0&&end>start); -const validate=new Function('input','AnonymousError',ts.transpile(source.slice(start,end),{target:ts.ScriptTarget.ES2020})+'return body.name.trim();'); -class AnonymousError extends Error{} -const inputs=[{}, {type:'repo',id:'item',name:' Name '}]; -for(const field of ['type','id','name'])for(const value of [null,false,0,[],{},''])inputs.push({type:'repo',id:'item',name:'Name',[field]:value}); -for(const name of ['x'.repeat(100),'x'.repeat(101),'😀'.repeat(50),'😀'.repeat(51),'\ufeffName\ufeff','\u0085Name\u0085','\u009f','\tName','Name\n','\u007f','\u2028Name\u2029'])inputs.push({type:'repo',id:'item',name}); -for(const id of ['é'.repeat(250),'é'.repeat(251),'😀'.repeat(125),'😀'.repeat(126)])inputs.push({type:'gist',id,name:'Name'}); -inputs.push({type:'pr',id:'item',name:' '},{type:'other',id:'item',name:'Name'}); -const cases=inputs.map((body,i)=>{try{return{name:`case-${i}`,body,expected:validate(body,AnonymousError)}}catch{return{name:`case-${i}`,body,rejected:true}}}); -const path='backend/internal/server/testdata/project-names.json',output=JSON.stringify(cases,null,2)+'\n'; -if(process.argv.includes('--check'))assert.equal(fs.readFileSync(path,'utf8'),output);else fs.writeFileSync(path,output); -console.log(`${cases.length} TypeScript project-name contracts verified`); diff --git a/backend/contracts/query-values.cjs b/backend/contracts/query-values.cjs deleted file mode 100644 index 05700da..0000000 --- a/backend/contracts/query-values.cjs +++ /dev/null @@ -1,19 +0,0 @@ -'use strict'; -const fs=require('node:fs'),assert=require('node:assert/strict'); -const app=require('express')();app.set('query parser','extended'); -const parse=app.get('query parser fn'); -const queries=['','days=7','days=','days=7&days=2','days[]=7&days[]=30','days[1]=7&days[0]=2','days=3&days[]=7','days[]=7&days=3','days[1]=7&days=3','days[21]=7','days[x]=7','days=3&days[x]=7','days[x]=7&days=3','days[0][]=7','days[0]=3&days[0]=7','days[toString]=7','days[__proto__][x]=3','days[constructor][prototype][x]=3','days%5B%5D=3','days=7%ff','days=7%zz','days[=3','days[[x]]=3','days[x]ignored[y]=3','days[0][0][0][0][0][0]=3','days[19]=3','days[20]=3','days[01]=3','[days]=3','days[a=b]=7','days=3;other=7',Array(21).fill('days=3').join('&'),Array(21).fill('days[]=3').join('&'),Array(1000).fill('x=3').join('&')+'&days=7']; -const keys=['days','days[]','days[0]','days[1]','days[19]','days[20]','days[21]','days[x]','days[0][]','days[][x]','days[x][]','days[0][x]','days[1][x]','days[__proto__]','days[toString]','days[valueOf]','days[constructor]','other']; -const vals=['','7','2','-1','0x10','7suffix','%EF%BB%BF3','%FF','%zz','a+b'];let seed=48171;function next(n){seed=(Math.imul(seed,1664525)+1013904223)>>>0;return seed%n} -for(let i=0;i<700;i++){const parts=[];const count=1+next(10);for(let j=0;j{const parsed=parse(query).days;const shape={scalar:typeof parsed==='string',truthy:!!parsed};try{return{query,...shape,value:String(parsed)}}catch{return{query,...shape,error:true}}}); -const file='backend/internal/server/testdata/query-values.json',output=JSON.stringify(cases,null,2)+'\n'; -if(process.argv.includes('--check'))assert.equal(fs.readFileSync(file,'utf8'),output);else fs.writeFileSync(file,output); -console.log(`${cases.length} Express extended query contracts ${process.argv.includes('--check')?'verified':'generated'}`); diff --git a/backend/contracts/queue-metrics.cjs b/backend/contracts/queue-metrics.cjs deleted file mode 100644 index baf86e5..0000000 --- a/backend/contracts/queue-metrics.cjs +++ /dev/null @@ -1,24 +0,0 @@ -const fs=require('node:fs'),ts=require('typescript'),vm=require('node:vm'),assert=require('node:assert/strict'); -const admin=ts.createSourceFile('admin.ts',fs.readFileSync('src/server/routes/admin.ts','utf8'),ts.ScriptTarget.Latest,true); -function find(node,predicate){if(predicate(node))return node;let result;ts.forEachChild(node,child=>{result ||= find(child,predicate)});return result} -const ranges=find(admin,n=>ts.isVariableDeclaration(n)&&n.name.getText(admin)==='RANGE_MINUTES').getText(admin); -const route=find(admin,n=>ts.isCallExpression(n)&&n.expression.getText(admin)==='router.get'&&n.arguments[0]?.text==='/queues/metrics'); -const declaration=name=>find(route,n=>ts.isVariableDeclaration(n)&&n.name.getText(admin)===name).getText(admin); -const selection=ts.transpileModule(`const ${ranges};function select(req){const ${declaration('queueName')};const ${declaration('range')};const ${declaration('minutes')};return {queue:queueName,range,minutes};}`,{compilerOptions:{target:ts.ScriptTarget.ES2022}}).outputText; -const code=ts.transpileModule(fs.readFileSync('src/queue/queueMetrics.ts','utf8'),{compilerOptions:{module:ts.ModuleKind.CommonJS,target:ts.ScriptTarget.ES2022}}).outputText; -const now=1800000000000; -class FixedDate extends Date {static now(){return now}} -(async()=>{ - const result={now,ranges:[],durations:[]}; - for(const input of ['', '1h','6h','24h','7d','60','1440','garbage',' 24h ',['1h','7d']]){ - const sandbox={};vm.createContext(sandbox);vm.runInContext(selection,sandbox);const selected=sandbox.select({query:{range:input}}); - const writes=[];const redis={isOpen:true,on(){},connect(){return Promise.resolve()},multi(){const reads=[];return {hmGet(k){reads.push(k);return this},hIncrBy(...args){writes.push(args);return this},expire(){return this},async exec(){return reads.map(k=>k.endsWith(':'+now)?['2','1','11']:[null,null,null])}}}}; - const module={exports:{}};vm.runInNewContext(code,{module,exports:module.exports,Date:FixedDate,require:name=>name==='redis'?{createClient:()=>redis}:{default:{}}}); - const points=await module.exports.queryMetrics(selected.queue,selected.minutes); - result.ranges.push({input,...selected,count:points.length,first:points[0],last:points.at(-1)}); - if(input==='1h')for(const duration of [-2,0,0.49,0.5,1.49,1.5,2.5]){writes.length=0;await module.exports.recordMetric('download','completed',duration);result.durations.push({input:duration,ms:writes.find(x=>x[1]==='ms')[2]})} - } - const target='backend/internal/server/testdata/queue-metrics.json',output=JSON.stringify(result,null,2)+'\n'; - if(process.argv.includes('--check'))assert.equal(fs.readFileSync(target,'utf8'),output);else fs.writeFileSync(target,output); - console.log(`${result.ranges.length+result.durations.length} TypeScript queue metric contracts ${process.argv.includes('--check')?'verified':'generated'}`); -})().catch(e=>{console.error(e);process.exitCode=1}); diff --git a/backend/contracts/quota.cjs b/backend/contracts/quota.cjs deleted file mode 100644 index 6356d89..0000000 --- a/backend/contracts/quota.cjs +++ /dev/null @@ -1,20 +0,0 @@ -const fs=require('node:fs');const vm=require('node:vm');const assert=require('node:assert/strict');const ts=require('typescript'); -const path='src/server/routes/user.ts';const tree=ts.createSourceFile(path,fs.readFileSync(path,'utf8'),ts.ScriptTarget.Latest,true); -const route=tree.statements.find(s=>ts.isExpressionStatement(s)&&ts.isCallExpression(s.expression)&&s.expression.expression.getText(tree)==='router.get'&&s.expression.arguments[0]?.text==='/quota'); -let condition; -function visit(node){if(ts.isIfStatement(node)&&node.expression.getText(tree).startsWith('cached &&'))condition=node.expression.getText(tree);ts.forEachChild(node,visit)} -visit(route);assert.ok(condition); -const mod={exports:{}};vm.runInNewContext(`module.exports=(r)=>{const cached=r.size;return !!(${condition})}`,{module:mod}); -const now='2030-01-01T00:00:00.000Z';const cases=[]; -for(const size of [undefined,null,{}, {storage:0,file:0},{storage:0,file:1},{storage:9,file:2},{file:2},{storage:null,file:2},{storage:0,file:-1},{storage:0}])for(const sizeComputedAt of [undefined,null,'',now]){const row={size,sizeComputedAt};cases.push({row,expected:mod.exports(row)})} -const userPath='src/core/User.ts';const userTree=ts.createSourceFile(userPath,fs.readFileSync(userPath,'utf8'),ts.ScriptTarget.Latest,true); -const cls=userTree.statements.find(s=>ts.isClassDeclaration(s)&&s.name?.text==='User');const method=cls.members.find(s=>ts.isMethodDeclaration(s)&&s.name.getText(userTree)==='quotaRepositories');assert.ok(method); -class FixedDate extends Date{constructor(...args){super(...(args.length?args:[now]))}} -const model={find:filter=>({select:()=>({lean:()=>({exec:async()=>filter})})})};const oracle={exports:{}}; -vm.runInNewContext(ts.transpileModule(`module.exports=async function() ${method.body.getText(userTree)}`,{compilerOptions:{target:ts.ScriptTarget.ES2022}}).outputText,{module:oracle,Date:FixedDate,AnonymizedRepositoryModel:model}); -(async()=>{ - const filter=await oracle.exports.call({id:'owner'}); - const output=JSON.stringify({now,filter,cases},null,2)+'\n';const target='backend/internal/server/testdata/quota.json'; - if(process.argv.includes('--check'))assert.equal(fs.readFileSync(target,'utf8'),output,'TypeScript quota contract changed');else fs.writeFileSync(target,output); - console.log(`${cases.length} TypeScript quota cache contracts and selection filter ${process.argv.includes('--check')?'verified':'generated'}`); -})().catch(error=>{console.error(error);process.exitCode=1}); diff --git a/backend/contracts/reactivation.cjs b/backend/contracts/reactivation.cjs deleted file mode 100644 index 15f1dc2..0000000 --- a/backend/contracts/reactivation.cjs +++ /dev/null @@ -1,33 +0,0 @@ -const fs = require('node:fs'); -const vm = require('node:vm'); -const assert = require('node:assert/strict'); -const ts = require('typescript'); -require('ts-node/register/transpile-only'); -const {RepositoryStatus} = require('../../src/core/types'); -const path = 'src/server/routes/repository-private.ts'; -const tree = ts.createSourceFile(path, fs.readFileSync(path, 'utf8'), ts.ScriptTarget.Latest, true); -const name = 'shouldReactivateInactiveRepository'; -const declaration = tree.statements.find(s => ts.isFunctionDeclaration(s) && s.name?.text === name); -assert.ok(declaration, name); -const code = ts.transpileModule(declaration.getText(tree), {compilerOptions: {target: ts.ScriptTarget.ES2022, module: ts.ModuleKind.CommonJS}}).outputText; -const oracle = {}; -vm.runInNewContext(code, {exports: oracle, RepositoryStatus, Date}); -const now = new Date('2026-01-01T00:00:00.000Z'); -const cases = []; -for (const status of Object.values(RepositoryStatus)) { - for (const [label, options] of [ - ['never', {expirationMode: 'never'}], - ['future', {expirationMode: 'remove', expirationDate: new Date('2099-01-01T00:00:00.000Z')}], - ['past', {expirationMode: 'remove', expirationDate: new Date('2000-01-01T00:00:00.000Z')}], - ['missing', {}], - ['empty', {expirationMode: 'remove', expirationDate: null}], - ['boundary', {expirationMode: 'remove', expirationDate: now}], - ]) { - cases.push({name: `${status}/${label}`, status, options, now, expected: oracle[name]({status, options}, now)}); - } -} -const target = 'backend/internal/server/testdata/reactivation.json'; -const output = JSON.stringify(cases, null, 2) + '\n'; -if (process.argv.includes('--check')) assert.equal(fs.readFileSync(target, 'utf8'), output, 'TypeScript reactivation contract changed'); -else fs.writeFileSync(target, output); -console.log(`${cases.length} TypeScript reactivation contracts ${process.argv.includes('--check') ? 'verified' : 'generated'}`); diff --git a/backend/contracts/readme-decoding.cjs b/backend/contracts/readme-decoding.cjs deleted file mode 100644 index 9b3aebf..0000000 --- a/backend/contracts/readme-decoding.cjs +++ /dev/null @@ -1,32 +0,0 @@ -const fs = require('node:fs'); -const vm = require('node:vm'); -const assert = require('node:assert/strict'); -const ts = require('typescript'); -const source = 'src/core/source/GitHubRepository.ts'; -const tree = ts.createSourceFile(source, fs.readFileSync(source, 'utf8'), ts.ScriptTarget.Latest, true); -let expression; -function visit(node) { - if (ts.isVariableDeclaration(node) && node.name.getText(tree)==='readme' && node.initializer?.getText(tree).includes('Buffer.from')) expression=node.initializer.getText(tree); - ts.forEachChild(node,visit); -} -visit(tree);assert.ok(expression); -const code=ts.transpileModule(`module.exports=(ghRes)=>${expression}`,{compilerOptions:{module:ts.ModuleKind.CommonJS,target:ts.ScriptTarget.ES2022}}).outputText; -const moduleFixture={exports:{}}; -vm.runInNewContext(code,{module:moduleFixture,Buffer}); -const cases=[]; -function add(name,data) { - const row={name,data}; - try { row.expected=moduleFixture.exports({data}); } catch { row.error='readme_not_available'; } - cases.push(row); -} -for(const encoding of ['base64','BASE64','base64url']) for(const content of ['', 'a', 'ab', 'abc', 'abcd', 'SGVsbG8=', 'SG Vs\nbG8\r\t=', 'SG!V@sb#G8=', 'SGVsbG8====junk', '=SGVsbG8', 'SGV=sbG8', '-_8', '////', 'YWJjZA', 'YWJjZA\u0141', 'YWJjZA💡']) add(`${encoding}:${JSON.stringify(content)}`,{encoding,content}); -for(const bytes of [[0x80],[0xc0,0xaf],[0xe2,0x82],[0xe2,0x28,0xa1],[0xf0,0x9f,0x92],[0xed,0xa0,0x80],[0xf4,0x90,0x80,0x80],[0xef,0xbb,0xbf,65],[0xff,0xfe,0x61,0],[0,65,0xff]]) add(`utf8:${bytes}`,{encoding:'base64',content:Buffer.from(bytes).toString('base64')}); -for(const encoding of ['utf8','utf-8','UTF8','ascii','latin1','binary','ucs2','ucs-2','utf16le','utf-16le','hex','unknown','utf8 ','',null,42]) for(const content of ['Hello é😀','61ff62','616']) add(`${encoding}:${content}`,{encoding,content}); -for(const content of [null,42,true,[],[65,66,255],[257,-1,1.9,null,true,'258','0x43'],{type:'Buffer',data:[65,0,255]},{length:3,0:65,1:66},{length:'3',0:65},[{toString:null}],[[257]],{length:1,0:{toString:0}},{}]) add(`content:${JSON.stringify(content)}`,{content,encoding:'base64'}); -for(const content of ['\u0136\u0131','61\u0136\u0131','fFz1','61 62']) add(`hex narrowing:${content}`,{encoding:'hex',content}); -add('missing content',{encoding:'base64'});add('missing encoding',{content:'Hello é😀'}); -const target='backend/internal/server/testdata/readme-decoding.json'; -const serialized=JSON.stringify(cases,null,2)+'\n'; -if(process.argv.includes('--check')) assert.equal(fs.readFileSync(target,'utf8'),serialized); -else fs.writeFileSync(target,serialized); -console.log(`${cases.length} TypeScript README decoding contracts ${process.argv.includes('--check')?'verified':'generated'}`); diff --git a/backend/contracts/regex-benchmark.cjs b/backend/contracts/regex-benchmark.cjs deleted file mode 100644 index 55aff77..0000000 --- a/backend/contracts/regex-benchmark.cjs +++ /dev/null @@ -1,18 +0,0 @@ -// Run from any directory with GO_BASELINE_BINARY and GO_BENCHMARK_BINARY. -const {spawnSync}=require('node:child_process'); -const binaries={before:process.env.GO_BASELINE_BINARY,after:process.env.GO_BENCHMARK_BINARY}; -if(!binaries.before||!binaries.after)throw new Error('GO_BASELINE_BINARY and GO_BENCHMARK_BINARY required'); -const samples=[]; -for(let run=0;run<3;run++)for(const implementation of run%2?['after','before']:['before','after']){ - const child=spawnSync(binaries[implementation],[],{encoding:'utf8',timeout:120000}); - if(child.status!==0)throw new Error(child.stderr||String(child.error)); - for(const line of child.stdout.trim().split('\n'))samples.push({run,implementation,...JSON.parse(line)}); -} -const median=a=>a.sort((a,b)=>a-b)[Math.floor(a.length/2)]; -const comparison=[...new Set(samples.map(v=>v.name))].map(name=>{ - const before=samples.filter(v=>v.name===name&&v.implementation==='before'),after=samples.filter(v=>v.name===name&&v.implementation==='after'); - if([...before,...after].some(v=>v.error)||new Set([...before,...after].map(v=>v.sha256)).size!==1)throw new Error('output mismatch '+name); - const beforeMs=median(before.map(v=>v.matchMs)),afterMs=median(after.map(v=>v.matchMs)); - return {name,beforeMs,afterMs,speedup:beforeMs/afterMs,beforeAllocatedBytes:median(before.map(v=>v.allocatedBytes)),afterAllocatedBytes:median(after.map(v=>v.allocatedBytes)),sha256:before[0].sha256}; -}); -console.log(JSON.stringify({measuredAt:new Date().toISOString(),method:'Three fresh processes per version, alternating order; transform only, excludes compilation, I/O, child startup and fixture generation. Same-machine comparison against the Go implementation before regex optimization.',comparison,samples},null,2)); diff --git a/backend/contracts/resource-options-database.cjs b/backend/contracts/resource-options-database.cjs deleted file mode 100644 index 50c3a42..0000000 --- a/backend/contracts/resource-options-database.cjs +++ /dev/null @@ -1,37 +0,0 @@ -'use strict'; -// Actual route option helpers and Mongoose writes against an isolated test DB. -const fs=require('node:fs'),vm=require('node:vm'),ts=require('typescript'),assert=require('node:assert/strict'); -process.env.SESSION_SECRET ||= 'synthetic-option-oracle'; -require('ts-node/register/transpile-only'); -const mongoose=require('mongoose'); -(async()=>{ - const uri=process.env.GO_TEST_MONGODB_URI,db=process.env.RESOURCE_OPTIONS_DATABASE; - assert(/^resource_options_[0-9a-f]{24}$/.test(db||''));assert(['127.0.0.1','localhost'].includes(new URL(uri).hostname)); - const connection=await mongoose.createConnection(uri,{dbName:db}).asPromise(); - try { - const tree=ts.createSourceFile('route-utils.ts',fs.readFileSync('src/server/routes/route-utils.ts','utf8'),ts.ScriptTarget.Latest,true); - const errorHelper=tree.statements.find(s=>ts.isFunctionDeclaration(s)&&s.name?.text==='handleError'); - const errorModule={exports:{}}; - vm.runInNewContext(ts.transpile(errorHelper.getText(tree).replace(/^export\s+/, '')+';module.exports=handleError',{target:ts.ScriptTarget.ES2022}),{module:errorModule,Error,AnonymousError:require('../../src/core/AnonymousError').default,printError:()=>{}}); - const cases=[]; - for(const [kind,route,helper,modelName] of [['repo','repository','updateRepoModel','anonymizedRepositories'],['gist','gist','updateGistModel','anonymizedGists'],['pr','pullRequest','updatePullRequestModel','anonymizedPullRequests']]){ - const source=ts.createSourceFile(route,fs.readFileSync(`src/server/routes/${route}-private.ts`,'utf8'),ts.ScriptTarget.Latest,true); - const fn=source.statements.find(s=>ts.isFunctionDeclaration(s)&&s.name?.text===helper); - const mod={exports:{}};vm.runInNewContext(ts.transpile(fn.getText(source)+';module.exports='+helper,{target:ts.ScriptTarget.ES2022}),{module:mod,Date}); - const Model=connection.model(modelName,require(`../../src/core/model/${modelName}/${modelName}.schema.ts`).default); - const options=[{}, {image:'bad'}, {image:[]}, {image:{}}, {expirationDate:'bad'}, {expirationDate:[]}, {expirationDate:{}}, {expirationDate:{toString:'bad'}}, {expirationDate:1e16}, {expirationDate:'0001-01-01'}, {expirationDate:['2030','3','1']}, {image:'bad',expirationDate:'bad',link:false}, {image:true,link:false}, {expirationMode:0}, {expirationMode:true}, {expirationMode:{}}, {expirationMode:[]}, {expirationMode:{_id:'date'}}, {pageSource:{branch:1,path:false}}, {pageSource:{branch:{},path:'/'}}, {pageSource:{branch:[],path:{}}}, {pageSource:null}, {pageSource:true}, {pageSource:[]}, {pageSource:{unknown:'ignored'}}]; - for(const create of [true,false])for(const input of options){ - const body={terms:['Alice'],source:{branch:'main',commit:'abc'},options:input}; - const resourceId=new mongoose.Types.ObjectId().toHexString(); - let model=new Model({repoId:resourceId,gistId:resourceId,pullRequestId:resourceId,options:{terms:['before'],image:true,link:true,expirationDate:new Date('2040-01-01')}}); - if(!create){await model.save();model=await Model.findById(model._id)} - let error; - try {mod.exports(model,body);if(create)await model.save();else await Model.updateOne({_id:model._id},{$set:{options:model.options}}).exec();} - catch(e){let status;errorModule.exports(e,{status:n=>{status=n;return{json:value=>{error={status,...value}}}}});} - const stored=await Model.collection.findOne({_id:model._id}); - cases.push({kind,create,body,error,stored:stored?.options}); - } - } - process.stdout.write(JSON.stringify(cases)); - }finally{await connection.close()} -})().catch(e=>{console.error(e.message);process.exitCode=1}); diff --git a/backend/contracts/resources.cjs b/backend/contracts/resources.cjs deleted file mode 100644 index d6d3482..0000000 --- a/backend/contracts/resources.cjs +++ /dev/null @@ -1,34 +0,0 @@ -// The TypeScript implementation is the oracle. Run --check in CI to detect drift. -const fs = require('node:fs'); -const assert = require('node:assert/strict'); -require('ts-node/register/transpile-only'); -const config = require('../../src/config').default; -config.ANONYMIZATION_MASK = 'XXXX'; config.APP_HOSTNAME = 'anonymous.test'; -const Gist = require('../../src/core/Gist').default; -const PullRequest = require('../../src/core/PullRequest').default; -const Repository = require('../../src/core/Repository').default; -const flags = ['title','body','diff','content','comments','username','date','origin']; -const cases = []; -for (const kind of ['gist','pr']) for (const rich of [false,true]) for (let bits=0;bits<256;bits++) { - const options = {terms:['Alice'],link:true,image:true}; - flags.forEach((flag,index)=>options[flag]=!!(bits&(1< ('/'+a+'/'+b).replace(/\/+/g,'/').replace(/\/$/,'') || '/'; -function sourceFile(file) { - file=path.normalize(file); - if(modules.has(file)) return modules.get(file); - const tree=ts.createSourceFile(file,fs.readFileSync(file,'utf8'),ts.ScriptTarget.Latest,true); - const m={file,tree,imports:new Map(),aliases:new Map(),roots:new Set(),exports:new Map(),calls:[]}; - modules.set(file,m); - for(const node of tree.statements) { - if(ts.isImportDeclaration(node) && node.importClause && node.moduleSpecifier.text.startsWith('.')) { - const base=path.resolve(path.dirname(file),node.moduleSpecifier.text); - const target=fs.existsSync(base+'.ts')?base+'.ts':path.join(base,'index.ts'); - if(node.importClause.name) m.imports.set(node.importClause.name.text,{file:target,symbol:'default'}); - const bindings=node.importClause.namedBindings; - if(bindings && ts.isNamedImports(bindings)) for(const item of bindings.elements) m.imports.set(item.name.text,{file:target,symbol:(item.propertyName||item.name).text}); - } - if(ts.isExportAssignment(node)) m.exports.set('default',node.expression); - } - function walk(node) { - if(ts.isVariableDeclaration(node) && ts.isIdentifier(node.name) && node.initializer) { - const name=node.name.text,value=node.initializer; - if(ts.isIdentifier(value) || ts.isPropertyAccessExpression(value)) m.aliases.set(name,value); - if(ts.isCallExpression(value) && (value.expression.getText(tree)==='express.Router' || value.expression.getText(tree)==='express')) m.roots.add(name); - } - if(ts.isCallExpression(node) && ts.isPropertyAccessExpression(node.expression)) m.calls.push(node); - ts.forEachChild(node,walk); - } - walk(tree); - m.calls.sort((a,b)=>a.expression.name.pos-b.expression.name.pos); - return m; -} -function resolve(m,expression,seen=new Set()) { - if(ts.isIdentifier(expression)) { - const name=expression.text,key=m.file+':'+name; - if(seen.has(key)) throw new Error('cyclic router alias '+key); - seen.add(key); - if(m.aliases.has(name)) return resolve(m,m.aliases.get(name),seen); - if(m.imports.has(name)) { - const ref=m.imports.get(name),other=sourceFile(ref.file); - if(other.exports.has(ref.symbol)) return resolve(other,other.exports.get(ref.symbol),seen); - return resolve(other,ts.factory.createIdentifier(ref.symbol),seen); - } - return {module:m,symbol:name}; - } - if(ts.isObjectLiteralExpression(expression)) return {module:m,object:expression}; - if(ts.isPropertyAccessExpression(expression)) { - const object=resolve(m,expression.expression,seen); - if(object?.object) { - const property=object.object.properties.find(p=>p.name?.getText(object.module.tree)===expression.name.text); - if(property) return resolve(object.module,ts.isShorthandPropertyAssignment(property)?property.name:property.initializer,seen); - } - } - return null; -} -function receiver(m,expression) { - if(ts.isCallExpression(expression) && ts.isPropertyAccessExpression(expression.expression)) { - const result=receiver(m,expression.expression.expression); - if(expression.expression.name.text==='route') result.routePath=literal(expression.arguments[0],m); - return result; - } - return {root:resolve(m,expression)}; -} -function literal(node,m) { - assert.ok(node && (ts.isStringLiteral(node)||ts.isNoSubstitutionTemplateLiteral(node)),`nonliteral API route in ${m.file}: ${node?.getText(m.tree)}`); - return node.text; -} -const output=[]; -function mounted(m,symbol,prefix,stack=[]) { - const key=m.file+':'+symbol+':'+prefix; - assert.ok(!stack.includes(key),'cyclic router mount'); - for(const call of m.calls) { - const property=call.expression; - const target=receiver(m,property.expression); - if(!target.root || target.root.module!==m || target.root.symbol!==symbol) continue; - const verb=property.name.text; - if(verb==='use') { - if(!call.arguments[0] || !ts.isStringLiteral(call.arguments[0])) continue; - const subpath=join(prefix,call.arguments[0].text); - for(const argument of call.arguments.slice(1)) { - const imported=resolve(m,argument); - if(imported?.module.roots.has(imported.symbol)) mounted(imported.module,imported.symbol,subpath,[...stack,key]); - } - } else if(methods.has(verb)) { - const argument=target.routePath===undefined?call.arguments[0]:null; - // The main entry also serves SPA/static routes. Those are covered by the - // file/browser tests, rather than represented as API handler registrations. - if(argument && ts.isRegularExpressionLiteral(argument)) { - assert.equal(symbol,'app','API regex route needs an explicit contract'); - continue; - } - const routePath=join(prefix,target.routePath===undefined?literal(argument,m):target.routePath); - if(!/^\/(api|github|w)(\/|$)/.test(routePath)) continue; - const line=m.tree.getLineAndCharacterOfPosition(property.name.getStart(m.tree)).line+1; - output.push({method:verb.toUpperCase(),path:routePath,source:path.relative(process.cwd(),m.file),line,verification:'first matching Go handler; behavior verified separately'}); - } - } -} -const entry=sourceFile(path.resolve('src/server/index.ts')); -mounted(entry,'app',''); -assert.ok(output.length>90,'route extraction lost mounted routers'); -const target='backend/contracts/routes.json'; -const serialized=JSON.stringify(output,null,2)+'\n'; -if(process.argv.includes('--check')) assert.equal(fs.readFileSync(target,'utf8'),serialized,'TypeScript route inventory changed; regenerate and verify Go dispatch'); -else fs.writeFileSync(target,serialized); -console.log(`${output.length} mounted TypeScript API routes ${process.argv.includes('--check')?'verified':'generated'}`); diff --git a/backend/contracts/routes.json b/backend/contracts/routes.json deleted file mode 100644 index 88e135f..0000000 --- a/backend/contracts/routes.json +++ /dev/null @@ -1,786 +0,0 @@ -[ - { - "method": "POST", - "path": "/github/app/webhook", - "source": "src/server/routes/github-app.ts", - "line": 267, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "GET", - "path": "/github/app/login", - "source": "src/server/routes/github-app.ts", - "line": 40, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "GET", - "path": "/github/app/callback", - "source": "src/server/routes/github-app.ts", - "line": 56, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "GET", - "path": "/github/app/install", - "source": "src/server/routes/github-app.ts", - "line": 95, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "GET", - "path": "/github/app/setup", - "source": "src/server/routes/github-app.ts", - "line": 127, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "GET", - "path": "/github/connections", - "source": "src/server/routes/github-app.ts", - "line": 150, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "POST", - "path": "/github/connections/migrate", - "source": "src/server/routes/github-app.ts", - "line": 187, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "POST", - "path": "/github/connections/disconnect-oauth", - "source": "src/server/routes/github-app.ts", - "line": 246, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "GET", - "path": "/github/account-recovery", - "source": "src/server/routes/connection.ts", - "line": 193, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "GET", - "path": "/github/login", - "source": "src/server/routes/connection.ts", - "line": 198, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "GET", - "path": "/github/auth", - "source": "src/server/routes/connection.ts", - "line": 215, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "POST", - "path": "/github/login-token", - "source": "src/server/routes/connection.ts", - "line": 243, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "GET", - "path": "/api/maintenance/repositories/:repoId", - "source": "src/server/routes/maintenance.ts", - "line": 28, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "PATCH", - "path": "/api/maintenance/repositories/:repoId", - "source": "src/server/routes/maintenance.ts", - "line": 41, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "GET", - "path": "/api/user/maintenance-tokens", - "source": "src/server/routes/maintenance-tokens.ts", - "line": 19, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "POST", - "path": "/api/user/maintenance-tokens", - "source": "src/server/routes/maintenance-tokens.ts", - "line": 28, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "DELETE", - "path": "/api/user/maintenance-tokens/:id", - "source": "src/server/routes/maintenance-tokens.ts", - "line": 53, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "GET", - "path": "/api/admin/tokens", - "source": "src/server/routes/admin-tokens.ts", - "line": 18, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "POST", - "path": "/api/admin/tokens", - "source": "src/server/routes/admin-tokens.ts", - "line": 35, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "DELETE", - "path": "/api/admin/tokens/:id", - "source": "src/server/routes/admin-tokens.ts", - "line": 67, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "GET", - "path": "/api/admin/performance", - "source": "src/server/routes/admin.ts", - "line": 87, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "GET", - "path": "/api/admin/cache", - "source": "src/server/routes/admin.ts", - "line": 93, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "POST", - "path": "/api/admin/queue/:name/:repo_id", - "source": "src/server/routes/admin.ts", - "line": 180, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "DELETE", - "path": "/api/admin/queue/:name/:repo_id", - "source": "src/server/routes/admin.ts", - "line": 205, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "POST", - "path": "/api/admin/queue/:name/retry-failed", - "source": "src/server/routes/admin.ts", - "line": 233, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "POST", - "path": "/api/admin/queue/:name/drain", - "source": "src/server/routes/admin.ts", - "line": 254, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "POST", - "path": "/api/admin/queue/:name/pause", - "source": "src/server/routes/admin.ts", - "line": 265, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "POST", - "path": "/api/admin/queue/:name/resume", - "source": "src/server/routes/admin.ts", - "line": 276, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "POST", - "path": "/api/admin/queue/:name/empty", - "source": "src/server/routes/admin.ts", - "line": 287, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "POST", - "path": "/api/admin/queues/pause-all", - "source": "src/server/routes/admin.ts", - "line": 298, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "GET", - "path": "/api/admin/queues/metrics", - "source": "src/server/routes/admin.ts", - "line": 354, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "GET", - "path": "/api/admin/queues", - "source": "src/server/routes/admin.ts", - "line": 369, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "GET", - "path": "/api/admin/errors", - "source": "src/server/routes/admin.ts", - "line": 430, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "GET", - "path": "/api/admin/errors/stats", - "source": "src/server/routes/admin.ts", - "line": 475, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "DELETE", - "path": "/api/admin/errors", - "source": "src/server/routes/admin.ts", - "line": 606, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "GET", - "path": "/api/admin/overview", - "source": "src/server/routes/admin.ts", - "line": 636, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "GET", - "path": "/api/admin/stats", - "source": "src/server/routes/admin.ts", - "line": 821, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "GET", - "path": "/api/admin/repos", - "source": "src/server/routes/admin.ts", - "line": 850, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "DELETE", - "path": "/api/admin/repos/:repoId", - "source": "src/server/routes/admin.ts", - "line": 969, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "GET", - "path": "/api/admin/repos/:repoId/github", - "source": "src/server/routes/admin.ts", - "line": 984, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "GET", - "path": "/api/admin/users", - "source": "src/server/routes/admin.ts", - "line": 1077, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "GET", - "path": "/api/admin/users/:username", - "source": "src/server/routes/admin.ts", - "line": 1141, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "GET", - "path": "/api/admin/users/:username/repos", - "source": "src/server/routes/admin.ts", - "line": 1168, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "POST", - "path": "/api/admin/users/:username/ban", - "source": "src/server/routes/admin.ts", - "line": 1189, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "POST", - "path": "/api/admin/users/:username/activate", - "source": "src/server/routes/admin.ts", - "line": 1225, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "POST", - "path": "/api/admin/users/:username/promote", - "source": "src/server/routes/admin.ts", - "line": 1243, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "POST", - "path": "/api/admin/users/:username/demote", - "source": "src/server/routes/admin.ts", - "line": 1261, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "GET", - "path": "/api/admin/conferences", - "source": "src/server/routes/admin.ts", - "line": 1279, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "GET", - "path": "/api/options", - "source": "src/server/routes/option.ts", - "line": 5, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "GET", - "path": "/api/conferences/plans", - "source": "src/server/routes/conference.ts", - "line": 44, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "GET", - "path": "/api/conferences", - "source": "src/server/routes/conference.ts", - "line": 48, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "POST", - "path": "/api/conferences/{:conferenceID}", - "source": "src/server/routes/conference.ts", - "line": 163, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "GET", - "path": "/api/conferences/:conferenceID", - "source": "src/server/routes/conference.ts", - "line": 234, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "DELETE", - "path": "/api/conferences/:conferenceID", - "source": "src/server/routes/conference.ts", - "line": 272, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "GET", - "path": "/api/user/logout", - "source": "src/server/routes/user.ts", - "line": 27, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "GET", - "path": "/api/user", - "source": "src/server/routes/user.ts", - "line": 40, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "GET", - "path": "/api/user/dashboard", - "source": "src/server/routes/user.ts", - "line": 53, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "GET", - "path": "/api/user/quota", - "source": "src/server/routes/user.ts", - "line": 58, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "POST", - "path": "/api/user/project-name", - "source": "src/server/routes/user.ts", - "line": 134, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "GET", - "path": "/api/user/default", - "source": "src/server/routes/user.ts", - "line": 143, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "POST", - "path": "/api/user/default", - "source": "src/server/routes/user.ts", - "line": 153, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "DELETE", - "path": "/api/user", - "source": "src/server/routes/user.ts", - "line": 175, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "GET", - "path": "/api/user/anonymized_repositories", - "source": "src/server/routes/user.ts", - "line": 251, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "GET", - "path": "/api/user/anonymized_gists", - "source": "src/server/routes/user.ts", - "line": 269, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "GET", - "path": "/api/user/anonymized_pull_requests", - "source": "src/server/routes/user.ts", - "line": 284, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "GET", - "path": "/api/user/search/github-users", - "source": "src/server/routes/user.ts", - "line": 301, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "GET", - "path": "/api/user/all_repositories", - "source": "src/server/routes/user.ts", - "line": 336, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "GET", - "path": "/api/user/:username/all_repositories", - "source": "src/server/routes/user.ts", - "line": 347, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "GET", - "path": "/api/repo/:repoId/zip", - "source": "src/server/routes/repository-public.ts", - "line": 23, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "GET", - "path": "/api/repo/:repoId/files", - "source": "src/server/routes/repository-public.ts", - "line": 184, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "GET", - "path": "/api/repo/:repoId/files/counts", - "source": "src/server/routes/repository-public.ts", - "line": 204, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "GET", - "path": "/api/repo/:repoId/files/search", - "source": "src/server/routes/repository-public.ts", - "line": 256, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "GET", - "path": "/api/repo/:repoId/options", - "source": "src/server/routes/repository-public.ts", - "line": 275, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "GET", - "path": "/api/repo/:repoId/file/*path", - "source": "src/server/routes/file.ts", - "line": 65, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "POST", - "path": "/api/repo/claim", - "source": "src/server/routes/repository-private.ts", - "line": 71, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "POST", - "path": "/api/repo/:repoId/refresh", - "source": "src/server/routes/repository-private.ts", - "line": 144, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "POST", - "path": "/api/repo/:repoId/extend", - "source": "src/server/routes/repository-private.ts", - "line": 177, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "DELETE", - "path": "/api/repo/:repoId", - "source": "src/server/routes/repository-private.ts", - "line": 240, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "GET", - "path": "/api/repo/:owner/:repo", - "source": "src/server/routes/repository-private.ts", - "line": 267, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "GET", - "path": "/api/repo/:owner/:repo/branches", - "source": "src/server/routes/repository-private.ts", - "line": 286, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "GET", - "path": "/api/repo/:owner/:repo/readme", - "source": "src/server/routes/repository-private.ts", - "line": 310, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "GET", - "path": "/api/repo/:repoId", - "source": "src/server/routes/repository-private.ts", - "line": 343, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "POST", - "path": "/api/repo/:repoId", - "source": "src/server/routes/repository-private.ts", - "line": 490, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "POST", - "path": "/api/repo", - "source": "src/server/routes/repository-private.ts", - "line": 663, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "GET", - "path": "/api/repo/:repoId/coauthors", - "source": "src/server/routes/repository-private.ts", - "line": 773, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "POST", - "path": "/api/repo/:repoId/coauthors", - "source": "src/server/routes/repository-private.ts", - "line": 789, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "DELETE", - "path": "/api/repo/:repoId/coauthors/:username", - "source": "src/server/routes/repository-private.ts", - "line": 852, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "GET", - "path": "/api/pr/:pullRequestId/options", - "source": "src/server/routes/pullRequest-public.ts", - "line": 9, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "GET", - "path": "/api/pr/:pullRequestId/content", - "source": "src/server/routes/pullRequest-public.ts", - "line": 80, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "POST", - "path": "/api/pr/:pullRequestId/refresh", - "source": "src/server/routes/pullRequest-private.ts", - "line": 24, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "POST", - "path": "/api/pr/:pullRequestId/extend", - "source": "src/server/routes/pullRequest-private.ts", - "line": 43, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "DELETE", - "path": "/api/pr/:pullRequestId", - "source": "src/server/routes/pullRequest-private.ts", - "line": 83, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "GET", - "path": "/api/pr/:owner/:repository/:pullRequestId", - "source": "src/server/routes/pullRequest-private.ts", - "line": 104, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "GET", - "path": "/api/pr/:pullRequestId", - "source": "src/server/routes/pullRequest-private.ts", - "line": 130, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "POST", - "path": "/api/pr/:pullRequestId", - "source": "src/server/routes/pullRequest-private.ts", - "line": 218, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "POST", - "path": "/api/pr", - "source": "src/server/routes/pullRequest-private.ts", - "line": 254, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "GET", - "path": "/api/gist/:gistId/options", - "source": "src/server/routes/gist-public.ts", - "line": 9, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "GET", - "path": "/api/gist/:gistId/content", - "source": "src/server/routes/gist-public.ts", - "line": 82, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "POST", - "path": "/api/gist/:gistId/refresh", - "source": "src/server/routes/gist-private.ts", - "line": 23, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "POST", - "path": "/api/gist/:gistId/extend", - "source": "src/server/routes/gist-private.ts", - "line": 42, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "DELETE", - "path": "/api/gist/:gistId", - "source": "src/server/routes/gist-private.ts", - "line": 80, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "GET", - "path": "/api/gist/source/:gistId", - "source": "src/server/routes/gist-private.ts", - "line": 102, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "GET", - "path": "/api/gist/:gistId", - "source": "src/server/routes/gist-private.ts", - "line": 125, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "POST", - "path": "/api/gist/:gistId", - "source": "src/server/routes/gist-private.ts", - "line": 199, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "POST", - "path": "/api/gist", - "source": "src/server/routes/gist-private.ts", - "line": 234, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "POST", - "path": "/api/anonymize-preview", - "source": "src/server/routes/anonymize-preview.ts", - "line": 17, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "GET", - "path": "/api/message", - "source": "src/server/index.ts", - "line": 259, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "GET", - "path": "/api/healthcheck", - "source": "src/server/index.ts", - "line": 266, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "GET", - "path": "/api/stat", - "source": "src/server/index.ts", - "line": 269, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "GET", - "path": "/api/stat/history", - "source": "src/server/index.ts", - "line": 272, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "GET", - "path": "/w/:repoId/{*path}", - "source": "src/server/routes/webview.ts", - "line": 180, - "verification": "first matching Go handler; behavior verified separately" - }, - { - "method": "GET", - "path": "/w/:repoId", - "source": "src/server/routes/webview.ts", - "line": 181, - "verification": "first matching Go handler; behavior verified separately" - } -] diff --git a/backend/contracts/shared-http.cjs b/backend/contracts/shared-http.cjs deleted file mode 100644 index 2f4412c..0000000 --- a/backend/contracts/shared-http.cjs +++ /dev/null @@ -1,41 +0,0 @@ -const fs=require('node:fs'),vm=require('node:vm'),assert=require('node:assert/strict'); -const http=require('node:http'),zlib=require('node:zlib'),crypto=require('node:crypto'),stream=require('node:stream'); -const express=require('express'),ts=require('typescript'); -const fixture={exports:{}}; -let active; -const results={decision:()=>({digest:active.record.digest,changed:false})}; -const dependencies={zlib,crypto,stream,'stream/promises':require('node:stream/promises'),perf_hooks:require('node:perf_hooks'),'../config':{default:{ANONYMIZATION_MASK:'XXXX',APP_HOSTNAME:'anonymous.test',additionalExtensions:[]}},'./blob-cache':{resultBlobCache:()=>results,CacheAdmissionError:class extends Error{}},'./anonymize-utils':{},'./cache-observability':{observeCache(){}}}; -vm.runInNewContext(ts.transpileModule(fs.readFileSync('src/core/cached-response.ts','utf8'),{compilerOptions:{module:ts.ModuleKind.CommonJS,target:ts.ScriptTarget.ES2022}}).outputText,{module:fixture,exports:fixture.exports,require:name=>{assert.ok(dependencies[name],name);return dependencies[name]}}); -const cases=[]; -const accepts=['','gzip','identity','br','deflate','*','identity, gzip','gzip, identity','gzip;q=.5,identity;q=1','gzip;q=1,identity;q=.5','gzip;q=0','identity;q=0','*;q=0','gzip,identity;q=0','identity;q=0,br','gzip;q=0,*;q=1','*;q=0,gzip;q=1','gzip;q=NaN','gzip;q=-1','gzip;q=2','gzip;q=Infinity','gzip;q=1junk','gzip;q= 0.5','gzip;Q=0','gzip;q =0','gzip;q=0,gzip;q=1','gzip;q=1,gzip;q=0','gzip garbage','GZIP', 'unknown;q=-1,gzip',',,,gzip','gzip,,,','gzip;q="0"','gzip;q="0.5,identity;q=0"','gzip;q="\\0"','gzip;q="0','gzip;q=','gzip;q=;q=0','gzip;q=0;q=1','gzip;Q = "0.5"','gzip;broken;q=0','gzip garbage;q=-1','gzip;level="a,b;c";q=0','identity;q=0,*;q=.5']; -for(const store of ['identity','gzip'])for(const accept of accepts)cases.push({store,size:2250,accept,method:'GET'}); -for(const size of [0,17])for(const accept of ['','gzip','gzip,identity;q=0','*;q=0'])cases.push({store:'identity',size,accept,method:'GET'}); -for(const vary of ['Origin','accept-encoding','*','Origin, Accept-Language'])cases.push({store:'gzip',size:2250,accept:'gzip',method:'GET',vary}); -for(const store of ['identity','gzip'])for(const accept of ['','gzip','gzip,identity;q=0','*;q=0'])cases.push({store,size:2250,accept,method:'HEAD'}); -const app=express();app.use(async(req,res)=>{ - try{ - res.set('Content-Type','application/octet-stream');if(active.vary)res.set('Vary',active.vary); - const content=stream.Readable.from([active.body]);content.cachedBlob={record:active.record,store:active.store}; - assert.equal(await fixture.exports.sendSharedContent(content,res,{filePath:'file.bin'}),true); - }catch(error){console.error(error);res.destroy(error)} -}); -(async()=>{ - const server=app.listen(0,'127.0.0.1');await new Promise(r=>server.once('listening',r)); - try{for(const c of cases){ - const body=Buffer.alloc(c.size,120),wire=c.store==='gzip'?zlib.gzipSync(body):body; - const record={digest:'sha256-'+crypto.createHash('sha256').update(body).digest('hex'),encoding:c.store,size:body.length,stored:wire.length}; - const store={open:async(_digest,encoded)=>{const output=stream.Readable.from([encoded&&record.encoding==='gzip'?wire:body]);output.cachedBlob={record,store};return output}}; - active={body,record,store,vary:c.vary}; - const response=await new Promise((resolve,reject)=>{ - const request=http.request({host:'127.0.0.1',port:server.address().port,path:'/file',method:c.method,headers:c.accept?{'accept-encoding':c.accept}:{}},res=>{ - const chunks=[];res.on('data',chunk=>chunks.push(chunk));res.on('end',()=>resolve({headers:res.headers,status:res.statusCode,wire:Buffer.concat(chunks)}));res.on('error',reject); - });request.on('error',reject);request.end(); - }); - let decoded=response.wire;if(decoded.length&&response.headers['content-encoding']==='gzip')decoded=zlib.gunzipSync(decoded); - c.expected={status:response.status,encoding:response.headers['content-encoding']||'',length:response.headers['content-length']||'',vary:response.headers.vary||'',ranges:response.headers['accept-ranges']||'',bodyBytes:decoded.length,sha256:crypto.createHash('sha256').update(decoded).digest('hex')}; - if(c.store==='gzip'&&c.method==='GET'&&c.expected.encoding==='gzip'&&c.expected.status===200)c.expected.wire=wire.toString('base64'); - }}finally{server.close()} - const target='backend/internal/server/testdata/shared-http.json',data=JSON.stringify(cases,null,2)+'\n'; - if(process.argv.includes('--check'))assert.equal(fs.readFileSync(target,'utf8'),data);else fs.writeFileSync(target,data); - console.log(`${cases.length} TypeScript shared HTTP contracts ${process.argv.includes('--check')?'verified':'generated'}`); -})().catch(e=>{console.error(e);process.exitCode=1}); diff --git a/backend/contracts/shared-result-key.cjs b/backend/contracts/shared-result-key.cjs deleted file mode 100644 index 98b4cc8..0000000 --- a/backend/contracts/shared-result-key.cjs +++ /dev/null @@ -1,21 +0,0 @@ -const fs=require('node:fs'),vm=require('node:vm'),assert=require('node:assert/strict'); -const {createHash}=require('node:crypto');const ts=require('typescript'); -const file='src/core/cached-response.ts',tree=ts.createSourceFile(file,fs.readFileSync(file,'utf8'),ts.ScriptTarget.Latest,true); -const fn=tree.statements.find(n=>ts.isFunctionDeclaration(n)&&n.name?.text==='decisionKey');assert.ok(fn); -const configTree=ts.createSourceFile('src/config.ts',fs.readFileSync('src/config.ts','utf8'),ts.ScriptTarget.Latest,true); -let extensions;function visit(n){if(ts.isPropertyAssignment(n)&&n.name.getText(configTree)==='additionalExtensions')extensions=vm.runInNewContext(n.initializer.getText(configTree));ts.forEachChild(n,visit);}visit(configTree);assert.ok(extensions); -const config={additionalExtensions:extensions},fixture={exports:{}}; -vm.runInNewContext(ts.transpileModule(fn.getText(tree),{compilerOptions:{module:ts.ModuleKind.CommonJS,target:ts.ScriptTarget.ES2022}}).outputText,{exports:fixture.exports,config,createHash}); -const rows=[]; -for(const terms of [[],['Alice'],['é<>&\u2028','\\u2028']])for(const urls of [[],['https://forge.test/nested/project']])for(const revision of [undefined,'reset:two']){ - const record={repoId:'anonymous-one',treeGeneration:'generation',anonymizeDate:'2026-01-02T03:04:05.006Z',contentCacheRevision:revision}; - const row={path:'nested',name:'Alice.txt'}; - const options={terms,image:false,link:true,repoId:record.repoId,repoName:'team/subgroup/project',branchName:'main',sourceURLs:urls}; - const serialized={filePath:'nested/Alice.txt',cacheGeneration:'generation:2026-01-02T03:04:05.006Z',terms,cacheRevision:revision,image:false,link:true,repoId:options.repoId,repoName:options.repoName,branchName:options.branchName,sourceURLs:urls}; - const digest='sha256-'+'a'.repeat(64),mask='XX<>&\u2029',hostname='anonymous.test'; - config.ANONYMIZATION_MASK=mask;config.APP_HOSTNAME=hostname; - rows.push({record,row,options,digest,mask,hostname,expected:fixture.exports.decisionKey(digest,serialized)}); -} -const target='backend/internal/server/testdata/shared-result-key.json',data=JSON.stringify(rows,null,2)+'\n'; -if(process.argv.includes('--check'))assert.equal(fs.readFileSync(target,'utf8'),data);else fs.writeFileSync(target,data); -console.log(`${rows.length} TypeScript shared result key contracts ${process.argv.includes('--check')?'verified':'generated'}`); diff --git a/backend/contracts/stats-history.cjs b/backend/contracts/stats-history.cjs deleted file mode 100644 index c084e27..0000000 --- a/backend/contracts/stats-history.cjs +++ /dev/null @@ -1,17 +0,0 @@ -const fs=require('node:fs'),ts=require('typescript'),vm=require('node:vm'),assert=require('node:assert/strict'); -const source=ts.createSourceFile('dailyStatsSnapshot.ts',fs.readFileSync('src/server/dailyStatsSnapshot.ts','utf8'),ts.ScriptTarget.Latest,true); -const functions=['utcMidnight','mergeCurrentStatsIntoHistory'].map(name=>source.statements.find(n=>ts.isFunctionDeclaration(n)&&n.name?.text===name).getText(source)); -const sandbox={exports:{}};vm.createContext(sandbox);vm.runInContext(ts.transpileModule(functions.join('\n'),{compilerOptions:{module:ts.ModuleKind.CommonJS,target:ts.ScriptTarget.ES2022}}).outputText,sandbox); -const counts={nbRepositories:12,nbUsers:3,nbPageViews:99,nbPullRequests:2}; -const cases=[]; -for(const now of ['2026-11-03T00:00:00Z','2026-11-03T23:59:59.999Z','2024-02-29T12:00:00Z','2027-01-01T01:00:00+14:00']) { - const midnight=new Date(now);midnight.setUTCHours(0,0,0,0); - const at=ms=>new Date(midnight.getTime()+ms).toISOString(); - for(const dates of [[],[at(-86400000)],[at(12*3600000)],[at(13*3600000),at(12*3600000)],[at(86400000),at(-86400000),at(1)]]) { - const rows=dates.map((date,i)=>({date,nbRepositories:i,nbUsers:i,nbPageViews:i,nbPullRequests:i})); - cases.push({now,rows,current:counts,expected:sandbox.mergeCurrentStatsIntoHistory(rows,counts,new Date(now))}); - } -} -const target='backend/internal/server/testdata/stats-history.json',output=JSON.stringify(cases,null,2)+'\n'; -if(process.argv.includes('--check'))assert.equal(fs.readFileSync(target,'utf8'),output);else fs.writeFileSync(target,output); -console.log(`${cases.length} TypeScript history merge contracts ${process.argv.includes('--check')?'verified':'generated'}`); diff --git a/backend/contracts/stats-window.cjs b/backend/contracts/stats-window.cjs deleted file mode 100644 index d2fa569..0000000 --- a/backend/contracts/stats-window.cjs +++ /dev/null @@ -1,11 +0,0 @@ -const fs=require('node:fs'),ts=require('typescript'),vm=require('node:vm'),assert=require('node:assert/strict'); -function parse(path){return ts.createSourceFile(path,fs.readFileSync(path,'utf8'),ts.ScriptTarget.Latest,true)} -function find(node,predicate){if(predicate(node))return node;let result;ts.forEachChild(node,child=>{result ||= find(child,predicate)});return result} -const index=parse('src/server/index.ts'),stats=parse('src/server/dailyStatsSnapshot.ts'); -const call=find(index,n=>ts.isCallExpression(n)&&n.expression.getText(index)==='getStatsHistory'); -const count=find(stats,n=>ts.isVariableDeclaration(n)&&n.name.getText(stats)==='count').initializer.getText(stats); -const sandbox={};vm.createContext(sandbox);vm.runInContext(`function select(req){const days=${call.arguments[0].getText(index)};return ${count};}`,sandbox); -const cases=[undefined,'','0','-0','-1','-20','-0x10','-0x0','-+2','- 2','1','30','365','999','4.5','2e2','0x10','0b10','12suffix',' +23 ','+ 23','Infinity','NaN',['7','30'],['','7'],'\ufeff-2','\u00852','999999999999999999999999999999999'].map(input=>({input:input??null,expected:sandbox.select({query:{days:input}})})); -const target='backend/internal/server/testdata/stats-window.json',output=JSON.stringify(cases,null,2)+'\n'; -if(process.argv.includes('--check'))assert.equal(fs.readFileSync(target,'utf8'),output);else fs.writeFileSync(target,output); -console.log(`${cases.length} TypeScript statistics window contracts ${process.argv.includes('--check')?'verified':'generated'}`); diff --git a/backend/contracts/token-names.cjs b/backend/contracts/token-names.cjs deleted file mode 100644 index f6c614c..0000000 --- a/backend/contracts/token-names.cjs +++ /dev/null @@ -1,9 +0,0 @@ -const fs=require('node:fs');const assert=require('node:assert/strict'); -const source=fs.readFileSync('src/server/routes/admin-tokens.ts','utf8'); -const expression=source.match(/const name = (.*);/)[1]; -const nameFor=new Function('req',`return ${expression}`); -const inputs=[undefined,null,false,true,0,1,-1,1e21,[],[null],['Alice','Bob'],[[1,null],false],{}, {name:'ignored'}, {toString:'shadow'}, [{toString:null}], '', ' Alice ', '\ufeffAlice\ufeff', '\u0085Alice\u0085','x'.repeat(300),'é'.repeat(200)]; -const cases=inputs.map((value,i)=>{const body=value===undefined?{}:{name:value};try{return {name:`case-${i}`,body,expected:nameFor({body})}}catch{return{name:`case-${i}`,body,rejected:true}}}); -const path='backend/internal/server/testdata/token-names.json';const output=JSON.stringify(cases,null,2)+'\n'; -if(process.argv.includes('--check'))assert.equal(fs.readFileSync(path,'utf8'),output);else fs.writeFileSync(path,output); -console.log(`${cases.length} TypeScript token naming contracts verified`); diff --git a/backend/contracts/user-defaults.cjs b/backend/contracts/user-defaults.cjs deleted file mode 100644 index ba00a18..0000000 --- a/backend/contracts/user-defaults.cjs +++ /dev/null @@ -1,21 +0,0 @@ -const fs=require('node:fs');const assert=require('node:assert/strict'); -require('ts-node/register/transpile-only');const mongoose=require('mongoose'); -const Model=mongoose.model('user_defaults_contract',require('../../src/core/model/users/users.schema.ts').default); -const inputs=[{}, {terms:['Alice','']}, {terms:[1,true,false,null,-0,1e21]}, {terms:'Alice'}, {terms:null}, {terms:[{}]}, {terms:[]}, {options:{}}, {options:null}, {unknown:'discard',options:{unknown:true,expirationDate:'2030-01-01',pageSource:{branch:'main'}}}]; -for(const value of [true,false,null,0,1,'0','1','true','false','yes','no','',2,[],{}])inputs.push({options:Object.fromEntries(['update','image','pdf','notebook','link'].map(key=>[key,value]))}); -for(const value of [null,true,false,0,'docs',{},[]])inputs.push({options:{page:value,expirationMode:value}}); -for(const options of [false,true,0,1,"bad",[]])inputs.push({options}); -const cases=[]; -for(const [i,body]of inputs.entries()) { - let stored,expected,rejected=false; - try{ - const query=Model.updateOne({_id:'111111111111111111111111'},{$set:{default:body}}); - stored=query._castUpdate(query.getUpdate()).$set.default; - expected=Model.hydrate({_id:'111111111111111111111111',default:stored}).default; - }catch(error){assert.ok(error.name==='CastError',error);rejected=true;} - cases.push({name:`case-${i}`,body,rejected,stored,expected}); -} -const initial=[{}, {default:null}, {default:{}}, {default:{options:{}}}].map(user=>({user,expected:Model.hydrate({_id:'111111111111111111111111',...user}).default})); -const target='backend/internal/server/testdata/user-defaults.json';const output=JSON.stringify({cases,initial},null,2)+'\n'; -if(process.argv.includes('--check'))assert.equal(fs.readFileSync(target,'utf8'),output,'TypeScript user defaults changed');else fs.writeFileSync(target,output); -console.log(`${cases.length} TypeScript default-setting casts and ${initial.length} read contracts ${process.argv.includes('--check')?'verified':'generated'}`); diff --git a/backend/contracts/user-membership.cjs b/backend/contracts/user-membership.cjs deleted file mode 100644 index c939f4c..0000000 --- a/backend/contracts/user-membership.cjs +++ /dev/null @@ -1,12 +0,0 @@ -const fs=require('node:fs');const vm=require('node:vm');const assert=require('node:assert/strict');const ts=require('typescript'); -const path='src/core/User.ts';const tree=ts.createSourceFile(path,fs.readFileSync(path,'utf8'),ts.ScriptTarget.Latest,true); -const cls=tree.statements.find(s=>ts.isClassDeclaration(s)&&s.name?.text==='User');const method=cls.members.find(s=>ts.isMethodDeclaration(s)&&s.name.getText(tree)==='repositoryMembership');assert.ok(method); -const code=ts.transpileModule(`module.exports=function() ${method.body.getText(tree)}`,{compilerOptions:{target:ts.ScriptTarget.ES2022}}).outputText;const mod={exports:{}};vm.runInNewContext(code,{module:mod}); -const cases=[]; -for(const username of [undefined,'','alice'])for(const github of [undefined,null,'','12345']) { - const user={_id:'local-owner',username,externalIDs:{github}}; - cases.push({user,expected:mod.exports.call({id:user._id,username:user.username,model:user})}); -} -const output=JSON.stringify(cases,null,2)+'\n';const target='backend/internal/server/testdata/user-membership.json'; -if(process.argv.includes('--check'))assert.equal(fs.readFileSync(target,'utf8'),output,'TypeScript membership changed');else fs.writeFileSync(target,output); -console.log(`${cases.length} TypeScript membership contracts ${process.argv.includes('--check')?'verified':'generated'}`); diff --git a/backend/contracts/user-search.cjs b/backend/contracts/user-search.cjs deleted file mode 100644 index fa4bba5..0000000 --- a/backend/contracts/user-search.cjs +++ /dev/null @@ -1,20 +0,0 @@ -'use strict'; -const fs=require('node:fs'),ts=require('typescript'),assert=require('node:assert/strict'); -const source=ts.createSourceFile('user.ts',fs.readFileSync('src/server/routes/user.ts','utf8'),ts.ScriptTarget.Latest,true); -function find(n,p){if(p(n))return n;let result;ts.forEachChild(n,c=>{result ||=find(c,p)});return result} -const route=find(source,n=>ts.isCallExpression(n)&&n.arguments[0]?.text==='/search/github-users'); -const callback=ts.transpile('('+route.arguments[1].getText(source)+')',{target:ts.ScriptTarget.ES2022}); -const app=require('express')();app.set('query parser','extended');const parse=app.get('query parser fn'); -const {Octokit}=require('@octokit/rest');const oct=new Octokit(); -const queries=['','q=','q=a','q=ab','q=%F0%9F%98%80','q=%C3%A9','q=++','q=a%2Bb','q=a%26b','q[]=ab','q[]=a&q[]=b','q=ab&q=cd','q[1]=ab','q[0]=a&q[2]=b','q[x]=ab','q[length]=0','q[length]=1','q[length]=2','q[length]=abc','q[length][]=1','q[length][toString]=1','q[toString]=ab','q[21]=ab','q=ab&q[x]=cd']; -(async()=>{ - const cases=[]; - for(const query of queries){ - const row={query,tokenCalls:0}; - const handler=new Function('getUser','octokit','handleError','return '+callback)(async()=>({getAccessToken:async()=>{row.tokenCalls++;return 'fixture';}}),()=>({search:{users:async params=>{const endpoint=oct.search.users.endpoint(params);row.upstreamQuery=new URL(endpoint.url).searchParams.get('q');return {data:{items:[]}};}}}),()=>{row.error=true}); - await handler({query:parse(query)},{json:value=>{row.response=value}});cases.push(row); - } - const file='backend/internal/server/testdata/user-search.json',output=JSON.stringify(cases,null,2)+'\n'; - if(process.argv.includes('--check'))assert.equal(fs.readFileSync(file,'utf8'),output);else fs.writeFileSync(file,output); - console.log(cases.length+' actual TypeScript user-search/Octokit contracts verified'); -})().catch(e=>{console.error(e);process.exitCode=1}); diff --git a/backend/contracts/validation.cjs b/backend/contracts/validation.cjs deleted file mode 100644 index ee8e858..0000000 --- a/backend/contracts/validation.cjs +++ /dev/null @@ -1,27 +0,0 @@ -// Extract the actual TS validator declarations with its parser, not a copied oracle. -const fs=require('node:fs');const vm=require('node:vm');const assert=require('node:assert/strict');const ts=require('typescript'); -class AnonymousError extends Error{constructor(message,options){super(message);this.httpStatus=options?.httpStatus}} -const specifications=[['repo','repository','validateNewRepo','repoId'],['gist','gist','validateNewGist','gistId'],['pr','pullRequest','validateNewPullRequest','pullRequestId']]; -const cases=[]; -for(const [kind,file,name,id] of specifications){ - const path=`src/server/routes/${file}-private.ts`;const text=fs.readFileSync(path,'utf8');const tree=ts.createSourceFile(path,text,ts.ScriptTarget.Latest,true); - const declaration=tree.statements.find(s=>ts.isFunctionDeclaration(s)&&s.name?.text===name);assert.ok(declaration,name); - const code=ts.transpileModule(`${declaration.getText(tree)};module.exports=${name}`,{compilerOptions:{target:ts.ScriptTarget.ES2022,module:ts.ModuleKind.CommonJS}}).outputText; - const module={exports:{}};vm.runInNewContext(code,{module,AnonymousError});const validate=module.exports; - const base={[id]:'example',source:{branch:'main',commit:'abc123',gistId:'snippet',repositoryFullName:'owner/repo',pullRequestId:42},options:{},terms:[]}; - const add=(name,change)=>{const body=structuredClone(base);change(body);let expected=null;try{validate(body)}catch(e){assert.ok(e instanceof AnonymousError,`${kind}/${name}: unexpected TS runtime exception`);expected={code:e.message,status:e.httpStatus}}cases.push({name:`${kind}/${name}`,kind,body,expected})}; - add('valid',()=>{}); - for(const value of ['', 'ab','bad/name','a b','ééé','a'.repeat(180)])add(`id/${JSON.stringify(value)}`,b=>b[id]=value); - const fields=kind==='repo'?['branch','commit']:kind==='gist'?['gistId']:['repositoryFullName','pullRequestId']; - for(const field of fields)for(const value of [null,'',false,0])add(`source/${field}/${JSON.stringify(value)}`,b=>b.source[field]=value); - for(const value of [null,false,'',0])add(`options/${JSON.stringify(value)}`,b=>b.options=value); - for(const value of [null,'terms',{},42])add(`terms/${JSON.stringify(value)}`,b=>b.terms=value); - add('precedence/source-options-terms',b=>{b.source={};b.options=null;b.terms=null}); - add('precedence/options-terms',b=>{b.options=null;b.terms=null}); - if(kind==='repo'){add('missing-source',b=>delete b.source);for(const v of ['xyz','a-b','abc\n','123'])add(`commit/${JSON.stringify(v)}`,b=>b.source.commit=v);add('precedence/terms-commit',b=>{b.terms=null;b.source.commit='xyz'})} - if(kind==='gist')add('missing-source',b=>delete b.source); - if(kind==='pr')for(const v of [1.5,1e20,1e21,-1e21,'1.0','1e3',' 42 ','42abc','0x10',true,'0',-1])add(`number/${JSON.stringify(v)}`,b=>b.source.pullRequestId=v); -} -const target='backend/internal/server/testdata/validation.json';const output=JSON.stringify(cases,null,2)+'\n'; -if(process.argv.includes('--check'))assert.equal(fs.readFileSync(target,'utf8'),output,'TS validation contract changed');else fs.writeFileSync(target,output); -console.log(`${cases.length} TypeScript validation contracts ${process.argv.includes('--check')?'verified':'generated'}`); diff --git a/backend/contracts/webhook-http.cjs b/backend/contracts/webhook-http.cjs deleted file mode 100644 index f42213e..0000000 --- a/backend/contracts/webhook-http.cjs +++ /dev/null @@ -1,54 +0,0 @@ -const fs = require('node:fs'); -const assert = require('node:assert/strict'); -const crypto = require('node:crypto'); -const zlib = require('node:zlib'); -const express = require('express'); -const ts = require('typescript'); -const source = fs.readFileSync('src/server/routes/github-app.ts', 'utf8'); -const code = ts.transpileModule(source.slice(source.indexOf('export function validWebhookSignature')).replaceAll('export ', ''), {compilerOptions:{target:ts.ScriptTarget.ES2022,module:ts.ModuleKind.CommonJS}}).outputText; -const secret = 'synthetic-webhook-contract'; -const config = {GITHUB_APP_ENABLED:true,GITHUB_APP_WEBHOOK_SECRET:secret,GITHUB_APP_ID:'123'}; -const unavailable = () => {throw new Error('contract must not access database or upstream')}; -const router = new Function('express','config','createHmac','timingSafeEqual','UserModel','InstallationModel','reconcileAppGrant','reconcileInstallation','clearAppTokenCache','randomUUID',code+'\nreturn githubAppWebhook;')(express,config,crypto.createHmac,crypto.timingSafeEqual,{find:unavailable},{updateOne:unavailable},unavailable,unavailable,unavailable,crypto.randomUUID); -const cases = []; -for(const event of ['ping','installation','installation_repositories','github_app_authorization']) { - for(const body of ['{}','null','[]','true','42','"hello"','{','', '{"action":"revoked"}', '{"action":"revoked","sender":null}']) cases.push({name:`${event}-${cases.length}`,event,body,contentType:'application/json'}); -} -for(const contentType of ['', 'text/plain','application/vnd.github+json','application/json; charset=utf-8','Application/JSON']) cases.push({name:`content-type-${cases.length}`,event:'ping',body:'{}',contentType}); -cases.push({name:'invalid-signature',event:'ping',body:'{}',contentType:'application/json',tampered:true}); -cases.push({name:'disabled-app',event:'ping',body:'{}',contentType:'application/json',disabled:true}); -for(const size of [1024*1024+1,2*1024*1024,2*1024*1024+1]) cases.push({name:`body-size-${size}`,event:'ping',size,contentType:'application/json'}); -const compressors={gzip:zlib.gzipSync,deflate:zlib.deflateSync,br:zlib.brotliCompressSync,zstd:zlib.zstdCompressSync}; -for(const encoding of ['gzip','deflate','br','zstd']) { - for(const mode of ['valid','truncated','corrupt','wire-signature','boundary','oversized']) cases.push({name:`${encoding}-${mode}`,event:'ping',body:'{}',contentType:'application/json',encoding,mode,...(mode==='boundary'?{size:2*1024*1024}:mode==='oversized'?{size:2*1024*1024+1}:{})}); -} -for(const encoding of ['identity','GZIP','unknown','gzip, deflate']) cases.push({name:`encoding-${encoding}`,event:'ping',body:'{}',contentType:'application/json',encoding,mode:'valid'}); -const app = express(); app.use('/webhook',router); -// Record parser status without depending on Express's environment-specific HTML error page. -app.use((err,req,res,next)=>res.status(err.status||500).end()); -(async()=>{ - const server=app.listen(0,'127.0.0.1'); await new Promise(resolve=>server.once('listening',resolve)); - try { - for(const item of cases){ - config.GITHUB_APP_ENABLED=!item.disabled; - const body=item.size ? '{"padding":"'+'x'.repeat(item.size-14)+'"}' : item.body; - let wire=Buffer.from(body); - if(item.encoding && compressors[item.encoding.toLowerCase()])wire=compressors[item.encoding.toLowerCase()](wire); - if(item.mode==='truncated')wire=wire.subarray(0,wire.length-2); - if(item.mode==='corrupt')wire=Buffer.from('not a compressed stream'); - if(item.encoding)item.wire=wire.toString('base64'); - const signature='sha256='+crypto.createHmac('sha256',secret).update(item.mode==='wire-signature'?wire:body).digest('hex'); - const headers={'x-github-event':item.event,'x-hub-signature-256':item.tampered?'sha256='+'0'.repeat(64):signature}; - if(item.contentType)headers['content-type']=item.contentType; - if(item.encoding)headers['content-encoding']=item.encoding; - // A Buffer prevents fetch from adding a text/plain content type. - const res=await fetch(`http://127.0.0.1:${server.address().port}/webhook`,{method:'POST',headers,body:wire}); - item.status=res.status; - const text=await res.text(); - if(text && res.headers.get('content-type')?.includes('application/json')) item.error=JSON.parse(text).error; - } - } finally { server.closeAllConnections(); await new Promise(resolve=>server.close(resolve)); } - const path='backend/internal/server/testdata/webhook-http.json', output=JSON.stringify(cases,null,2)+'\n'; - if(process.argv.includes('--check'))assert.equal(fs.readFileSync(path,'utf8'),output);else fs.writeFileSync(path,output); - console.log(`${cases.length} TypeScript webhook HTTP contracts verified`); -})().catch(error=>{console.error(error);process.exitCode=1}); diff --git a/backend/contracts/worker-queues.cjs b/backend/contracts/worker-queues.cjs deleted file mode 100644 index a965989..0000000 --- a/backend/contracts/worker-queues.cjs +++ /dev/null @@ -1,27 +0,0 @@ -const fs = require('node:fs'); -const assert = require('node:assert/strict'); -const ts = require('typescript'); -const file = 'src/queue/index.ts'; -const tree = ts.createSourceFile(file, fs.readFileSync(file, 'utf8'), ts.ScriptTarget.Latest, true); -const queues = {downloadWorker: 'download', removeWorker: 'remove', cacheWorker: 'cache'}; -const cases = []; -function visit(node) { - if (ts.isVariableDeclaration(node) && queues[node.name.getText(tree)]) { - const call = node.initializer; - assert.ok(ts.isNewExpression(call) && call.expression.getText(tree) === 'Worker'); - const options = call.arguments[2]; - assert.ok(ts.isObjectLiteralExpression(options)); - const concurrency = options.properties.find(p => p.name?.getText(tree) === 'concurrency'); - assert.ok(concurrency && ts.isNumericLiteral(concurrency.initializer)); - cases.push({name: queues[node.name.getText(tree)], concurrency: Number(concurrency.initializer.text)}); - } - ts.forEachChild(node, visit); -} -visit(tree); -assert.equal(cases.length, 3); -cases.sort((a, b) => a.name.localeCompare(b.name)); -const output = JSON.stringify(cases, null, 2) + '\n'; -const target = 'backend/internal/server/testdata/worker-queues.json'; -if (process.argv.includes('--check')) assert.equal(fs.readFileSync(target, 'utf8'), output, 'TypeScript worker configuration changed'); -else fs.writeFileSync(target, output); -console.log('3 TypeScript worker queue capacities verified'); diff --git a/backend/go.mod b/backend/go.mod deleted file mode 100644 index f3a039b..0000000 --- a/backend/go.mod +++ /dev/null @@ -1,45 +0,0 @@ -module github.com/tdurieux/anonymous_github/backend - -go 1.27.3 - -require ( - github.com/andybalholm/brotli v1.2.7 - github.com/aws/aws-sdk-go-v2 v1.47.5 - github.com/aws/aws-sdk-go-v2/credentials v1.20.13 - github.com/aws/aws-sdk-go-v2/service/s3 v1.114.6 - github.com/dlclark/regexp2 v1.12.0 - github.com/google/uuid v1.6.0 - github.com/klauspost/compress v1.19.2 - github.com/redis/go-redis/v9 v9.23.0 - go.mongodb.org/mongo-driver/v2 v2.9.2 - golang.org/x/sync v0.24.0 - golang.org/x/text v0.43.0 - modernc.org/sqlite v1.61.1 -) - -require ( - github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.25 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.5.8 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.8.8 // indirect - github.com/aws/aws-sdk-go-v2/internal/v4a v1.5.8 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.23 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.11.9 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.14.8 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.20.8 // indirect - github.com/aws/smithy-go v1.28.7 // indirect - github.com/cespare/xxhash/v2 v2.3.0 // indirect - github.com/dustin/go-humanize v1.1.0 // indirect - github.com/mattn/go-isatty v0.0.24 // indirect - github.com/ncruces/go-strftime v1.1.0 // indirect - github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect - github.com/xdg-go/pbkdf2 v1.0.0 // indirect - github.com/xdg-go/scram v1.2.0 // indirect - github.com/xdg-go/stringprep v1.0.4 // indirect - github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78 // indirect - go.uber.org/atomic v1.12.0 // indirect - golang.org/x/crypto v0.53.0 // indirect - golang.org/x/sys v0.49.0 // indirect - modernc.org/libc v1.79.0 // indirect - modernc.org/mathutil v1.7.1 // indirect - modernc.org/memory v1.12.1 // indirect -) diff --git a/backend/go.sum b/backend/go.sum deleted file mode 100644 index 2e4d07d..0000000 --- a/backend/go.sum +++ /dev/null @@ -1,142 +0,0 @@ -github.com/andybalholm/brotli v1.2.7 h1:UgafRPGMam5ySHfRkhthMqOFA6IFoeF3D7mWIDLjG5A= -github.com/andybalholm/brotli v1.2.7/go.mod h1:rzTDkvFWvIrjDXZHkuS16NPggd91W3kUSvPlQ1pLaKY= -github.com/aws/aws-sdk-go-v2 v1.47.5 h1:5yA+A+BiXbDq1ZLbYwPViwhEGDMdR0MEhL8Jh2LnLS4= -github.com/aws/aws-sdk-go-v2 v1.47.5/go.mod h1:iNIkogrRvFwm+1OQIUOP2lPBtlXZboOIUWiCa+pHEMw= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.25 h1:MW0Iql1SOTgQPj8mCxrU/eH/K/AIDWi08ItOsXaWRLU= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.25/go.mod h1:+ucVYmHYB3JqVueY0E1RHahdXAnKQbIHqybSbvOUbOM= -github.com/aws/aws-sdk-go-v2/credentials v1.20.13 h1:j4z41OtspmQ3ftQycaDunJ26b69a9SHfaSVUPqgRv8k= -github.com/aws/aws-sdk-go-v2/credentials v1.20.13/go.mod h1:SgPA1oS3b+dlMxZb618jDmGNscpXSCaxz15igS52OlE= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.5.8 h1:gzIWc3DTPfPbWKrQnmL6BV6WD7NPD1htxzgdk/bQ/Z4= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.5.8/go.mod h1:vvUA5cDAZWGo4R14FZPZfXfJCmgsafOWEq78Kg0D+ug= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.8.8 h1:PWv+vG8aCLS8qd+HPdYhK7Vees90aKHWFFQ1AGYD/8E= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.8.8/go.mod h1:xxPZEpflYHJA12366ZGyq66z9dHPCoeCIu99Jck+MPw= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.5.8 h1:WOp5De9iWdEHDPh2Kb0tBP3vGBm/dVAuRGh4a4tqduo= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.5.8/go.mod h1:z8W8YgfhbWl62XqcTtK+CxPrE+iHGRVUOtrrbIOp7ZY= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.23 h1:MCIR6iZaCKO4UE0hUvoWWLI6JVjppopV64JfAJaMjng= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.23/go.mod h1:pphWFS+z0MmIPivj8c/6bATd1Z+Av7Ust75DPdEFsPA= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.11.9 h1:GACgECI422Xt5n4Pojr3O0aocPv8lfH4PJe2Aon5Wv8= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.11.9/go.mod h1:lPfnRkHpn1qWZJLbVEw10rIqSuCee1pNQTyGkUjAYh8= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.14.8 h1:+PMpWlJYOn2tm7sm6OZ/ZLd4jStl17T7wjNapd1Rczs= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.14.8/go.mod h1:cnG3xZLGQL4c/bt8pjdzlFtZsW7epBBuNS04a5xMjdo= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.20.8 h1:RS1Wt+K0r4X0ci9Vf4JYTUfHzsQihYA2LgGJeEneKpk= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.20.8/go.mod h1:adMnTy5kyoUW86jhXnGSVc/mvMQI4GZd1qYWMeaS8M8= -github.com/aws/aws-sdk-go-v2/service/s3 v1.114.6 h1:to7+Vr3rLkpYRwVKJ5QRriI0eE306vrVN/6TnVHgxvY= -github.com/aws/aws-sdk-go-v2/service/s3 v1.114.6/go.mod h1:Jc89ASa2k7HMAskj3bSnt8bf+k+p2IApzkoXnEjkgUw= -github.com/aws/smithy-go v1.28.7 h1:h/n1SHrwVtaDYLz8mR1/Kq4Xh4RaFbFW7bOYckg9mfE= -github.com/aws/smithy-go v1.28.7/go.mod h1:YE2RhdIuDbA5E5bTdciG9KrW3+TiEONeUWCqxX9i1Fc= -github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs= -github.com/bsm/ginkgo/v2 v2.12.0/go.mod h1:SwYbGRRDovPVboqFv0tPTcG1sN61LM1Z4ARdbAV9g4c= -github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA= -github.com/bsm/gomega v1.27.10/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0= -github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= -github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dlclark/regexp2 v1.12.0 h1:0j4c5qQmnC6XOWNjP3PIXURXN2gWx76rd3KvgdPkCz8= -github.com/dlclark/regexp2 v1.12.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= -github.com/dustin/go-humanize v1.1.0 h1:dbKTrvD0klcbBV/h4AWJdMuZogJACoMlvWIWZ5b2xWg= -github.com/dustin/go-humanize v1.1.0/go.mod h1:hc1CvRkJMsgxqjmjMQF3QNRAZBwY8AXBAzKYoSX9sFI= -github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= -github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= -github.com/google/pprof v0.0.0-20261016150608-1facf8f91b50 h1:PlNWJRxu5APSV0pWqfIsZ0qt9OOGHSWfZQ4zvx+WgWs= -github.com/google/pprof v0.0.0-20261016150608-1facf8f91b50/go.mod h1:yUo1AMMpsPIDFGuwDK8nLcf8+vvAd5l2O6JDZ6hpwrM= -github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= -github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= -github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= -github.com/klauspost/compress v1.19.2 h1:hMRETovs/pu/dVWN7zIT1PGG8t509MwT6bO7XSi26R8= -github.com/klauspost/compress v1.19.2/go.mod h1:cwPg85FWrGar70rWktvGQj8/hthj3wpl0PGDogxkrSQ= -github.com/klauspost/cpuid/v2 v2.4.0 h1:S6Hrbc7+ywsr0r+RLapfGBHfyefhCTwEh3A0tV913Dw= -github.com/klauspost/cpuid/v2 v2.4.0/go.mod h1:19jmZ9mjzoF//ddRSUsv0zfBTJWh3QJh9FNxZTMrGxU= -github.com/mattn/go-isatty v0.0.24 h1:tGZZoVgT/KiqK1c8ocVLeDS8BSWMRd47J3Lbz7vsReI= -github.com/mattn/go-isatty v0.0.24/go.mod h1:nMCL3Zebbrt45jsMDgnfIwz6ydEQApk5oEI3HqDio6A= -github.com/ncruces/go-strftime v1.1.0 h1:vtPmPWMkb539RGV9WpWT9EwJGvrOCKvMNI4obWL47Hk= -github.com/ncruces/go-strftime v1.1.0/go.mod h1:yVaq7iwCN09vHRrKBrrflXT0M9tTMG2KmZ9Fj7xeG/g= -github.com/redis/go-redis/v9 v9.23.0 h1:/TTVdJa8BRNsybwwGGnmiYktHNlUXtbOQxlWpHBPL3s= -github.com/redis/go-redis/v9 v9.23.0/go.mod h1:EWP2UUk+XDaI1s5nQB5mablZN6vccXlmBQTyfnF87D0= -github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE= -github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= -github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWDWE= -github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= -github.com/xdg-go/pbkdf2 v1.0.0 h1:Su7DPu48wXMwC3bs7MCNG+z4FhcyEuz5dlvchbq0B0c= -github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= -github.com/xdg-go/scram v1.2.0 h1:bYKF2AEwG5rqd1BumT4gAnvwU/M9nBp2pTSxeZw7Wvs= -github.com/xdg-go/scram v1.2.0/go.mod h1:3dlrS0iBaWKYVt2ZfA4cj48umJZ+cAEbR6/SjLA88I8= -github.com/xdg-go/stringprep v1.0.4 h1:XLI/Ng3O1Atzq0oBs3TWm+5ZVgkq2aqdlvP9JtoZ6c8= -github.com/xdg-go/stringprep v1.0.4/go.mod h1:mPGuuIYwz7CmR2bT9j4GbQqutWS1zV24gijq1dTyGkM= -github.com/xyproto/randomstring v1.0.5 h1:YtlWPoRdgMu3NZtP45drfy1GKoojuR7hmRcnhZqKjWU= -github.com/xyproto/randomstring v1.0.5/go.mod h1:rgmS5DeNXLivK7YprL0pY+lTuhNQW3iGxZ18UQApw/E= -github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78 h1:ilQV1hzziu+LLM3zUTJ0trRztfwgjqKnBWNtSRkbmwM= -github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78/go.mod h1:aL8wCCfTfSfmXjznFBSZNN13rSJjlIOI1fUNAtF7rmI= -github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -github.com/zeebo/xxh3 v1.1.0 h1:s7DLGDK45Dyfg7++yxI0khrfwq9661w9EN78eP/UZVs= -github.com/zeebo/xxh3 v1.1.0/go.mod h1:IisAie1LELR4xhVinxWS5+zf1lA4p0MW4T+w+W07F5s= -go.mongodb.org/mongo-driver/v2 v2.9.2 h1:OCAdjI37pC/SVxucz/9CM8zD4jCdegtsY5QcKzYFCgE= -go.mongodb.org/mongo-driver/v2 v2.9.2/go.mod h1:SHKN0IWkKmEVGHLjXnni6s4wPKX4v86FTgOeJJFuXcA= -go.uber.org/atomic v1.12.0 h1:BvcXdFKuviU4fTL/f+SxdQ5qJX/Jix8pAkgdUcb3XOE= -go.uber.org/atomic v1.12.0/go.mod h1:I6c4cg+6HCxRjfjSsYtApoFILnpc0CGUdGkXVqbYVNk= -go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= -go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.53.0 h1:QZ4Muo8THX6CizN2vPPd5fBGHyogrdK9fG4wLPFUsto= -golang.org/x/crypto v0.53.0/go.mod h1:DNLU434OwVakk9PzuwV8w62mAJpRJL3vsgcfp4Qnsio= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.42.0 h1:ICeL3t2L30ljSPHHxDnR4fqVcBt/zR2zJAb9juavmQg= -golang.org/x/mod v0.42.0/go.mod h1:u5fzIrRInkL8MaO1cbRkUHT64v303YIT5KEqpNr7jRs= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.24.0 h1:iqiDrGoDgyuvAKrhLQthUEzU/R378N78gXbBjxed7oA= -golang.org/x/sync v0.24.0/go.mod h1:sUUOizhqBxiL6pEWpqNLUiaJn1ShEbZ6BBqskPbjZm0= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.49.0 h1:XbzkgYJHdqh/8m2Uu0W/dQv8nktxx4BFHp1M0gROTXA= -golang.org/x/sys v0.49.0/go.mod h1:hNLxWAXmnKAxqDtdwIYC4bM9oQPEecfsnNMuSxOs3og= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= -golang.org/x/text v0.43.0 h1:1QivrlhwAsnMOcqgOdl9my7s9OyZl8O5/UGUTJVXoWc= -golang.org/x/text v0.43.0/go.mod h1:hbSIYA/amXcRXTFSZqh8tWHEoqRvvbKPJ2uz/KU+a+s= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.52.0 h1:ryxg4U63oaUYk7uOLTF37n43f4qgtGvqV4Ioit1BaEs= -golang.org/x/tools v0.52.0/go.mod h1:ItcP5UNaVGG+Yc4eIYmaFLNJ4soEopkx5Y2d4lcEurs= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -modernc.org/cc/v4 v4.30.3 h1:aDq8gIX1X7+VFgO/JYYji6pLWL2H4tv3g8WatT3KCys= -modernc.org/cc/v4 v4.30.3/go.mod h1:OnovgIhbbMXMu1aISnJ0wvVD1KnW+cAUJkIrAWh+kVI= -modernc.org/ccgo/v4 v4.37.0 h1:BAuJCUtIHIxFIYaFhqXIw5YaoMBlNCUlFovejHfMip4= -modernc.org/ccgo/v4 v4.37.0/go.mod h1:/8627VhwWtAbqUXmPORxFQU5SgLrAx2jl9seLw9GBhY= -modernc.org/fileutil v1.4.0 h1:j6ZzNTftVS054gi281TyLjHPp6CPHr2KCxEXjEbD6SM= -modernc.org/fileutil v1.4.0/go.mod h1:EqdKFDxiByqxLk8ozOxObDSfcVOv/54xDs/DUHdvCUU= -modernc.org/gc/v2 v2.6.5 h1:nyqdV8q46KvTpZlsw66kWqwXRHdjIlJOhG6kxiV/9xI= -modernc.org/gc/v2 v2.6.5/go.mod h1:YgIahr1ypgfe7chRuJi2gD7DBQiKSLMPgBQe9oIiito= -modernc.org/gc/v3 v3.2.0 h1:/Y3LGDMQaoYf55PebP1qsZ5FDGgAZyG1RYKEHeQzh1o= -modernc.org/gc/v3 v3.2.0/go.mod h1:HFK/6AGESC7Ex+EZJhJ2Gni6cTaYpSMmU/cT9RmlfYY= -modernc.org/goabi0 v0.2.0 h1:HvEowk7LxcPd0eq6mVOAEMai46V+i7Jrj13t4AzuNks= -modernc.org/goabi0 v0.2.0/go.mod h1:CEFRnnJhKvWT1c1JTI3Avm+tgOWbkOu5oPA8eH8LnMI= -modernc.org/libc v1.79.0 h1:9Dvvv++bAMSkSuBzuOFAatbTV5OIoq6Y6FohmD3e7q8= -modernc.org/libc v1.79.0/go.mod h1:uT3kR61NsbeKJSLqq83GJwSnZMVLlSjyAz4DfTaBy1M= -modernc.org/mathutil v1.7.1 h1:GCZVGXdaN8gTqB1Mf/usp1Y/hSqgI2vAGGP4jZMCxOU= -modernc.org/mathutil v1.7.1/go.mod h1:4p5IwJITfppl0G4sUEDtCr4DthTaT47/N3aT6MhfgJg= -modernc.org/memory v1.12.1 h1:nFMiWrpStgZczNl6XI9GnIk/rWhYIyHGUaR04pGbp9g= -modernc.org/memory v1.12.1/go.mod h1:/JP4VbVC+K5sU2wZi9bHoq2MAkCnrt2r98UGeSK7Mjw= -modernc.org/opt v0.2.0 h1:tGyef5ApycA7FSEOMraay9SaTk5zmbx7Tu+cJs4QKZg= -modernc.org/opt v0.2.0/go.mod h1:03fq9lsNfvkYSfxrfUhZCWPk1lm4cq4N+Bh//bEtgns= -modernc.org/sortutil v1.2.1 h1:+xyoGf15mM3NMlPDnFqrteY07klSFxLElE2PVuWIJ7w= -modernc.org/sortutil v1.2.1/go.mod h1:7ZI3a3REbai7gzCLcotuw9AC4VZVpYMjDzETGsSMqJE= -modernc.org/sqlite v1.61.1 h1:TBEE49wz7VlxS+qXRXMQiPUZYOXHJ4ku83daYv1fe04= -modernc.org/sqlite v1.61.1/go.mod h1:f4gr5tbpx2umklaT/QVtbi/50hNdM+4ng+2zMo8KXJ0= -modernc.org/strutil v1.2.1 h1:UneZBkQA+DX2Rp35KcM69cSsNES9ly8mQWD71HKlOA0= -modernc.org/strutil v1.2.1/go.mod h1:EHkiggD70koQxjVdSBM3JKM7k6L0FbGE5eymy9i3B9A= -modernc.org/token v1.1.0 h1:Xl7Ap9dKaEs5kLoOQeQmPWevfnk/DM5qcLcYlA8ys6Y= -modernc.org/token v1.1.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= diff --git a/backend/internal/anonymize/anonymize.go b/backend/internal/anonymize/anonymize.go deleted file mode 100644 index 25a4e39..0000000 --- a/backend/internal/anonymize/anonymize.go +++ /dev/null @@ -1,727 +0,0 @@ -// Package anonymize preserves the ordered transformation contract of the -// existing backend. Regular patterns use Go's linear-time engine; extensions -// use an explicitly time-bounded ECMAScript-compatible engine. -package anonymize - -import ( - "context" - "errors" - "fmt" - "regexp" - "strings" - "time" - "unicode" - "unicode/utf8" - - "github.com/dlclark/regexp2" - unicodeencoding "golang.org/x/text/encoding/unicode" - "golang.org/x/text/unicode/norm" -) - -const MaxInput = 100 * 1024 * 1024 -const MaxOutput = 4 * MaxInput - -type Options struct { - Terms []string `json:"terms" bson:"terms"` - Image *bool `json:"image,omitempty" bson:"image,omitempty"` - Link *bool `json:"link,omitempty" bson:"link,omitempty"` - RepoName string `json:"repoName,omitempty"` - BranchName string `json:"branchName,omitempty"` - RepoID string `json:"repoId,omitempty"` - SourceURLs []string `json:"sourceURLs"` -} -type Context struct { - Mask string `json:"mask"` - Hostname string `json:"hostname"` -} -type Result struct { - Content string `json:"content"` - Changed bool `json:"changed"` -} -type rule struct { - re *regexp.Regexp - js *regexp2.Regexp - before, after bool - mask string - fastPattern string - fastBefore, fastAfter bool - required string - requiredLetters uint32 -} -type Engine struct { - rules []rule - options Options - config Context - self []*regexp.Regexp -} - -var urlRE = regexp.MustCompile(`?`) -var anchoredURL = regexp.MustCompile("^" + urlRE.String()) -var imageRE = regexp2.MustCompile(`!\[[^\]]*\]\((?.*?)(?="|\))(?".*")?\)`, regexp2.ECMAScript) -var quantified = regexp.MustCompile(`\(([\s\S]*?)\)\s*(?:[*+]|\{\d+(?:,\d*)?\})`) -var innerQuant = regexp.MustCompile(`[*+]|\{\d+(?:,\d*)?\}`) -var escapeRE = regexp.MustCompile(`[-\[\]{}()*+?.,\\^$|#]`) -var sniffRE = regexp.MustCompile(`^\(\?[:=!]?|^\(|\)$`) -var classes = map[rune]string{ - 'a': "[aàáâãäåāăąǎ]", 'c': "[cçćĉċč]", 'd': "[dďđ]", 'e': "[eèéêëēĕėęěȩ]", 'g': "[gĝğġģǧ]", 'h': "[hĥħȟ]", 'i': "[iìíîïĩīĭįıǐ]", 'j': "[jĵǰ]", 'k': "[kķǩ]", 'l': "[lĺļľŀł]", 'n': "[nñńņňʼnŋ]", 'o': "[oòóôõöōŏőøǒ]", 'r': "[rŕŗř]", 's': "[sśŝşšș]", 't': "[tţťŧț]", 'u': "[uùúûüũūŭůűųǔ]", 'w': "[wŵẁẃẅ]", 'y': "[yýÿŷỳ]", 'z': "[zźżž]", -} - -func init() { imageRE.MatchTimeout = time.Second } -func StripDiacritics(s string) string { - return strings.Map(func(r rune) rune { - if unicode.Is(unicode.Diacritic, r) { - return -1 - } - return r - }, norm.NFD.String(s)) -} -func DiacriticInsensitive(s string) string { - var out strings.Builder - inClass := false - runes := []rune(s) - for i := 0; i < len(runes); i++ { - r := runes[i] - if r == '\\' && i+1 < len(runes) { - i++ - n := runes[i] - if strings.ContainsRune(`^$\.*+?()[]{}|/dDsSwWbBnrtvf0cxupP`, n) { - out.WriteRune('\\') - } - out.WriteRune(n) - continue - } - if r == '[' && !inClass { - inClass = true - out.WriteRune(r) - continue - } - if r == ']' && inClass { - inClass = false - out.WriteRune(r) - continue - } - if !inClass { - if c, ok := classes[unicode.ToLower(r)]; ok { - out.WriteString(c) - continue - } - } - out.WriteRune(r) - } - return out.String() -} -func ParseTerm(s string) (term, replacement string, custom bool) { - i := strings.Index(s, "=>") - if i < 0 { - return s, "", false - } - t := strings.TrimRightFunc(s[:i], unicode.IsSpace) - if t == "" { - return s, "", false - } - return t, strings.TrimLeftFunc(s[i+2:], unicode.IsSpace), true -} -func asciiWord(r rune) bool { - return r >= 'a' && r <= 'z' || r >= 'A' && r <= 'Z' || r >= '0' && r <= '9' || r == '_' -} -func unicodeWord(r rune) bool { return unicode.IsLetter(r) || unicode.IsNumber(r) || r == '_' } -func boundaries(pattern string) (bool, bool) { - s := []rune(sniffRE.ReplaceAllString(pattern, "")) - if len(s) == 0 { - return false, false - } - return asciiWord(s[0]), asciiWord(s[len(s)-1]) -} -func catastrophic(s string) bool { - for _, m := range quantified.FindAllStringSubmatch(s, -1) { - if innerQuant.MatchString(m[1]) || strings.Contains(m[1], "|") { - return true - } - } - return false -} - -func New(opt Options, c Context) (*Engine, error) { - if len(opt.Terms) > 1000 { - return nil, errors.New("too_many_anonymization_terms") - } - if c.Mask == "" { - c.Mask = "XXXX" - } - e := &Engine{options: opt, config: c} - for i, s := range opt.Terms { - if len(s) > 8192 { - return nil, errors.New("anonymization_term_too_large") - } - if strings.TrimSpace(s) == "" { - continue - } - term, mask, custom := ParseTerm(s) - if !custom { - mask = fmt.Sprintf("%s-%d", c.Mask, i+1) - } - if _, err := regexp2.Compile(term, regexp2.ECMAScript|regexp2.IgnoreCase); err != nil || catastrophic(term) { - term = escapeRE.ReplaceAllStringFunc(term, func(s string) string { return `\` + s }) - } - stripped := StripDiacritics(term) - for pass, variant := range []string{term, DiacriticInsensitive(stripped)} { - sniff := term - if pass == 1 { - sniff = stripped - } - before, after := boundaries(sniff) - source := variant - if pass == 0 { - if before { - source = `\b` + source - } - if after { - source += `\b` - } - } - r := rule{before: pass == 1 && before, after: pass == 1 && after, mask: mask} - if sniff != "" && isASCII(sniff) && !strings.ContainsAny(sniff, `\^$*+?()[]{}|`) { - r.fastPattern = strings.ToLower(sniff) - r.fastBefore = before - r.fastAfter = after - for _, piece := range strings.Split(r.fastPattern, ".") { - // Share absence checks for numbered names such as Researcher0 - // through Researcher40. A required prefix is only a rejection - // filter; the full pattern still decides every replacement. - prefix := strings.TrimRight(piece, "0123456789") - if len(prefix) >= 3 { - piece = prefix - } - if len(piece) > len(r.required) { - r.required = piece - } - } - _, r.requiredLetters = asciiLetters(r.required) - } - var err error - r.re, err = regexp.Compile("(?i)" + source) - // Go's FindAll omits an empty match adjacent to a nonempty match. - // ECMAScript global replacement retains it; use the compatible iterator. - if err == nil { - plain, pe := regexp.Compile("(?i)" + variant) - if pe == nil && plain.MatchString("") { - r.re = nil - err = errors.New("empty_match_requires_ecmascript_iterator") - } - } - if err != nil { - if pass == 1 { - if before { - source = `(? limit { - return "", errors.New("anonymized_output_too_large") - } - if !matched { - out.Grow(min(len(s), limit)) - } - out.WriteString(s[cursor:start]) - out.WriteString(value) - cursor = end - matched = true - } - search = end - if end == start { - if end == len(s) { - break - } - _, n := utf8.DecodeRuneInString(s[end:]) - search += n - } - } - if !matched { - return s, nil - } - if out.Len()+len(s)-cursor > limit { - return "", errors.New("anonymized_output_too_large") - } - out.WriteString(s[cursor:]) - return out.String(), nil -} -func findRE(re *regexp.Regexp, s string) func(int) (int, int, error) { - // Slicing before a \b or ^ changes its meaning. FindAll preserves the full - // context, but allocates per match; rule.replace below uses a rune iterator. - const matchLimit = 1_000_000 - matches := re.FindAllStringIndex(s, matchLimit+1) - i := 0 - return func(offset int) (int, int, error) { - if len(matches) > matchLimit { - return -1, -1, errors.New("anonymization_match_limit_exceeded") - } - for i < len(matches) && matches[i][0] < offset { - i++ - } - if i >= len(matches) { - return -1, -1, nil - } - m := matches[i] - i++ - return m[0], m[1], nil - } -} -func (r rule) replace(ctx context.Context, s string, limit int) (string, error) { - if r.fastPattern != "" && isASCII(s) { - return r.replaceASCII(ctx, s, limit) - } - if r.js != nil { - match, err := r.js.FindStringMatch(s) - if err != nil { - return "", errors.New("anonymization_regex_timeout") - } - if match == nil { - return s, nil - } - // regexp2 owns the rune input. Translate its monotonically increasing - // offsets incrementally instead of allocating another rune slice and - // an input-sized byte-offset table. - runeOffset, byteOffset := 0, 0 - advance := func(target int) int { - for runeOffset < target { - _, width := utf8.DecodeRuneInString(s[byteOffset:]) - byteOffset += width - runeOffset++ - } - return byteOffset - } - finder := func(_ int) (int, int, error) { - if err != nil { - return -1, -1, errors.New("anonymization_regex_timeout") - } - if match == nil { - return -1, -1, nil - } - start := advance(match.Index) - end := advance(match.Index + match.Length) - match, err = r.js.FindNextMatch(match) - return start, end, nil - } - return boundedReplace(ctx, s, finder, func(string) (string, error) { return r.mask, nil }, limit) - } - finder := findRE(r.re, s) - filtered := func(offset int) (int, int, error) { - for { - start, end, err := finder(offset) - if err != nil || start < 0 { - return start, end, err - } - if r.before && start > 0 { - v, _ := utf8.DecodeLastRuneInString(s[:start]) - if unicodeWord(v) { - continue - } - } - if r.after && end < len(s) { - v, _ := utf8.DecodeRuneInString(s[end:]) - if unicodeWord(v) { - continue - } - } - return start, end, nil - } - } - return boundedReplace(ctx, s, filtered, func(string) (string, error) { return r.mask, nil }, limit) -} -func (e *Engine) Transform(ctx context.Context, input string, limit int) (Result, error) { - return e.transform(ctx, input, limit, false) -} -func (e *Engine) Path(ctx context.Context, input string) (string, error) { - r, err := e.transform(ctx, input, MaxOutput, true) - return r.Content, err -} -func (e *Engine) transform(ctx context.Context, input string, limit int, pathOnly bool) (Result, error) { - if len(input) > MaxInput { - return Result{}, errors.New("anonymization_input_too_large") - } - if limit <= 0 || limit > MaxOutput { - limit = MaxOutput - } - content := input - changed := false - if !pathOnly { - if e.options.Image != nil && !*e.options.Image { - var err error - content, err = imageRE.ReplaceFunc(content, func(regexp2.Match) string { changed = true; return e.config.Mask }, -1, -1) - if err != nil { - return Result{}, errors.New("anonymization_regex_timeout") - } - if len(content) > limit { - return Result{}, errors.New("anonymized_output_too_large") - } - } - if e.options.Link != nil && !*e.options.Link { - var err error - content, err = boundedReplace(ctx, content, findURL(content), func(string) (string, error) { changed = true; return e.config.Mask, nil }, limit) - if err != nil { - return Result{}, err - } - } - for _, re := range e.self { - s := content - finder := findRE(re, s) - checked := func(offset int) (int, int, error) { - for { - a, b, err := finder(offset) - if a < 0 || err != nil { - return a, b, err - } - if b == len(s) || strings.ContainsRune("/?#", rune(s[b])) { - return a, b, nil - } - } - } - var err error - content, err = boundedReplace(ctx, s, checked, func(string) (string, error) { - changed = true - return "https://" + e.config.Hostname + "/r/" + e.options.RepoID, nil - }, limit) - if err != nil { - return Result{}, err - } - } - } - ascii, letters := asciiLetters(content) - presence := map[string]bool{} - for _, r := range e.rules { - if err := ctx.Err(); err != nil { - return Result{}, err - } - if ascii && r.required != "" { - if r.requiredLetters&^letters != 0 { - continue - } - present, ok := presence[r.required] - if !ok { - present = asciiFoldFinder(content, r.required)(0) >= 0 - presence[r.required] = present - } - if !present { - continue - } - } - previous := content - if !pathOnly && strings.Contains(content, "://") { - var err error - content, err = boundedReplace(ctx, content, findURL(content), func(url string) (string, error) { - v, err := r.replace(ctx, url, limit) - if err != nil { - return "", err - } - if v != url { - changed = true - return r.mask, nil - } - return url, nil - }, limit) - if err != nil { - return Result{}, err - } - } - if content != previous { - maskASCII, maskLetters := asciiLetters(r.mask) - ascii = ascii && maskASCII - letters |= maskLetters - } - var next string - var err error - if ascii && r.fastPattern != "" { - next, err = r.replaceASCII(ctx, content, limit) - } else { - next, err = r.replace(ctx, content, limit) - } - if err != nil { - return Result{}, err - } - if next != content { - changed = true - } - content = next - if content != previous { - // Replacements only introduce mask bytes. A conservative letter set - // avoids rescanning the entire ASCII output after every rule. Stale - // letters can cause extra searches, never suppress a valid match. - if ascii { - maskASCII, maskLetters := asciiLetters(r.mask) - ascii = maskASCII - letters |= maskLetters - } else { - ascii, letters = asciiLetters(content) - } - presence = map[string]bool{} - } - } - return Result{content, changed}, nil -} - -// A table avoids a variable shift and several branches for every input byte. -// The high bit records non-ASCII input; lower bits form a conservative filter. -var asciiLetterBits = func() [256]uint32 { - var table [256]uint32 - for i := 0; i < 256; i++ { - b := byte(i) | 32 - if i >= 128 { - table[i] = 1 << 31 - } else if b >= 'a' && b <= 'z' { - table[i] = 1 << (b - 'a') - } - } - return table -}() - -func asciiLetters(s string) (bool, uint32) { - var bits uint32 - i := 0 - for ; i+8 <= len(s); i += 8 { - bits |= asciiLetterBits[s[i]] | asciiLetterBits[s[i+1]] | asciiLetterBits[s[i+2]] | asciiLetterBits[s[i+3]] | - asciiLetterBits[s[i+4]] | asciiLetterBits[s[i+5]] | asciiLetterBits[s[i+6]] | asciiLetterBits[s[i+7]] - } - for ; i < len(s); i++ { - bits |= asciiLetterBits[s[i]] - } - return bits&(1<<31) == 0, bits & ((1 << 26) - 1) -} - -func isASCII(s string) bool { - for i := 0; i < len(s); i++ { - if s[i] >= 128 { - return false - } - } - return true -} - -// asciiFoldFinder searches monotonically without allocating a lowercase copy. -// Cache both anchor-byte candidates so an absent case is scanned only once, -// rather than scanning the remaining suffix again for every dense match. -func asciiFoldFinder(s, pattern string) func(int) int { - if pattern == "" { - return func(offset int) int { return offset } - } - anchor := len(pattern) - 1 - first := pattern[anchor] - upper := first - if first >= 'a' && first <= 'z' { - upper -= 'a' - 'A' - } - lowerAt, upperAt := -2, -2 - folded := "" - fallback := false - misses := 0 - locate := func(at *int, offset int, b byte) { - if *at == -2 || (*at >= 0 && *at < offset) { - *at = strings.IndexByte(s[offset:], b) - if *at >= 0 { - *at += offset - } - } - } - return func(offset int) int { - if fallback { - index := strings.Index(folded[offset:], pattern) - if index >= 0 { - index += offset - } - return index - } - for offset+len(pattern) <= len(s) { - locate(&lowerAt, offset+anchor, first) - candidate := lowerAt - if upper != first { - locate(&upperAt, offset+anchor, upper) - if candidate < 0 || upperAt >= 0 && upperAt < candidate { - candidate = upperAt - } - } - if candidate < 0 { - return -1 - } - candidate -= anchor - match := true - for i := 0; i < anchor; i++ { - if asciiLower(s[candidate+i]) != pattern[i] { - match = false - break - } - } - if match { - misses = 0 - return candidate - } - offset = candidate + 1 - misses++ - if misses == 128 { - // Dense false anchor-byte matches favor the standard substring - // search. Bound speculative scanning before paying for a copy. - folded, fallback = strings.ToLower(s), true - index := strings.Index(folded[offset:], pattern) - if index >= 0 { - index += offset - } - return index - } - } - return -1 - } -} -func asciiLower(b byte) byte { - if b >= 'A' && b <= 'Z' { - return b + ('a' - 'A') - } - return b -} - -func (r rule) replaceASCII(ctx context.Context, s string, limit int) (string, error) { - pattern := r.fastPattern - prefix := pattern - if i := strings.IndexByte(prefix, '.'); i >= 0 { - prefix = prefix[:i] - } - findPrefix := asciiFoldFinder(s, prefix) - finder := func(offset int) (int, int, error) { - for offset+len(pattern) <= len(s) { - if err := ctx.Err(); err != nil { - return -1, -1, err - } - start := offset - if prefix != "" { - index := findPrefix(offset) - if index < 0 { - return -1, -1, nil - } - start = index - } - end := start + len(pattern) - if end > len(s) { - return -1, -1, nil - } - valid := true - for i := len(prefix); i < len(pattern); i++ { - if pattern[i] == '.' { - if s[start+i] == '\n' { - valid = false - break - } - } else if pattern[i] != asciiLower(s[start+i]) { - valid = false - break - } - } - if valid && r.fastBefore && start > 0 && asciiWord(rune(s[start-1])) == asciiWord(rune(s[start])) { - valid = false - } - if valid && r.fastAfter && end < len(s) && asciiWord(rune(s[end-1])) == asciiWord(rune(s[end])) { - valid = false - } - if valid { - return start, end, nil - } - offset = start + 1 - } - return -1, -1, nil - } - return boundedReplace(ctx, s, finder, func(string) (string, error) { return r.mask, nil }, limit) -} -func findURL(s string) func(int) (int, int, error) { - return func(offset int) (int, int, error) { - for offset < len(s) { - i := strings.Index(s[offset:], "://") - if i < 0 { - return -1, -1, nil - } - colon := offset + i - offset = colon + 3 - for _, scheme := range []string{"https", "http", "ftp", "file"} { - start := colon - len(scheme) - if start < 0 || s[start:colon] != scheme { - continue - } - if start > 0 && asciiWord(rune(s[start-1])) { - continue - } - if start > 0 && s[start-1] == '<' { - start-- - } - m := anchoredURL.FindStringIndex(s[start:]) - if m != nil { - return start + m[0], start + m[1], nil - } - } - } - return -1, -1, nil - } -} - -// Bytes preserves the original byte sequence when the text is unchanged. -func (e *Engine) Bytes(ctx context.Context, input []byte, limit int) ([]byte, bool, error) { - decoded, decodeErr := unicodeencoding.UTF8.NewDecoder().Bytes(input) - if decodeErr != nil { - return nil, false, decodeErr - } - text := string(decoded) - result, err := e.Transform(ctx, text, limit) - if err != nil { - return nil, false, err - } - if result.Content == text { - if len(input) > limit { - return nil, false, errors.New("anonymized_output_too_large") - } - return input, result.Changed, nil - } - return []byte(result.Content), result.Changed, nil -} diff --git a/backend/internal/anonymize/anonymize_test.go b/backend/internal/anonymize/anonymize_test.go deleted file mode 100644 index c7a6276..0000000 --- a/backend/internal/anonymize/anonymize_test.go +++ /dev/null @@ -1,162 +0,0 @@ -package anonymize - -import ( - "bytes" - "context" - "strings" - "testing" - "time" -) - -func TestOutputAndLimits(t *testing.T) { - e, err := New(Options{Terms: []string{"Alice=>Bob", "Bob=>$&"}}, Context{Mask: "XXXX"}) - if err != nil { - t.Fatal(err) - } - r, err := e.Transform(context.Background(), "Alice and Bob", 1024) - if err != nil || r.Content != "$& and $&" { - t.Fatal(r, err) - } - if _, err = e.Transform(context.Background(), "Alice and Bob", 2); err == nil { - t.Fatal("output limit ignored") - } - ctx, cancel := context.WithCancel(context.Background()) - cancel() - if _, err = e.Transform(ctx, "Alice", 1024); err == nil { - t.Fatal("cancellation ignored") - } -} -func TestOriginalBytesPreserved(t *testing.T) { - e, _ := New(Options{Terms: []string{"Alice"}}, Context{}) - for _, raw := range [][]byte{{0xc3, 0x28, 0xff, 0xfe}, []byte("plain \r\nΔ café"), {0xff, 0xfe, 'a'}} { - out, _, err := e.Bytes(context.Background(), raw, 1024) - if err != nil || !bytes.Equal(out, raw) { - t.Fatalf("changed unmatched bytes: %x %v", out, err) - } - } -} -func TestRegexDeadline(t *testing.T) { - e, err := New(Options{Terms: []string{"a+a+a+a+a+a+b(?=x)"}}, Context{}) - if err != nil { - t.Fatal(err) - } - start := time.Now() - if _, err = e.Transform(context.Background(), strings.Repeat("a", 250), 1024); err == nil { - t.Fatal("expected regex timeout") - } - if time.Since(start) > 3*time.Second { - t.Fatal("regex timeout exceeded") - } -} -func FuzzOutputBound(f *testing.F) { - f.Add("Alice", "hello Alice") - f.Add("a*", "aaa") - f.Add("研究", "研究 foo") - f.Fuzz(func(t *testing.T, term, input string) { - if len(term) > 256 || len(input) > 4096 { - return - } - e, err := New(Options{Terms: []string{term}}, Context{}) - if err != nil { - return - } - ctx, cancel := context.WithTimeout(context.Background(), 20*time.Millisecond) - defer cancel() - r, err := e.Transform(ctx, input, 8192) - if err == nil && len(r.Content) > 8192 { - t.Fatal("output exceeded limit") - } - }) -} -func BenchmarkDenseReplacements(b *testing.B) { - input := strings.Repeat("Alice 123 first.last,45.678,-23.456\n", 600000) - e, _ := New(Options{Terms: []string{"Alice", "first.last"}}, Context{}) - b.SetBytes(int64(len(input))) - b.ReportAllocs() - b.ResetTimer() - for b.Loop() { - if _, err := e.Transform(context.Background(), input, MaxOutput); err != nil { - b.Fatal(err) - } - } -} - -func TestReplacementIntroducesSearchCharacters(t *testing.T) { - for _, tc := range []struct { - terms []string - input, want string - }{ - {[]string{"Alice=>Researcher0", "Researcher0=>done"}, "Alice", "done"}, - {[]string{"Alice=>é", "é=>done"}, "Alice", "done"}, - {[]string{"x.=>a", "ab=>done"}, "x-b", "done"}, - {[]string{"Alice=>ALICE"}, "Alice", "ALICE"}, - {[]string{"(?<=😀)Alice=>X"}, "😀Alice 😀Alice", "😀X 😀X"}, - {[]string{"(?=😀)=>X"}, "😀😀", "XX😀XX😀"}, - } { - e, err := New(Options{Terms: tc.terms}, Context{}) - if err != nil { - t.Fatal(err) - } - got, err := e.Transform(context.Background(), tc.input, 1024) - if err != nil || got.Content != tc.want { - t.Fatalf("%v %q: got %q want %q, %v", tc.terms, tc.input, got.Content, tc.want, err) - } - } -} - -func BenchmarkFallbackOffsets(b *testing.B) { benchmarkFallback(b, "Alice(?=!)") } -func BenchmarkFallbackLookaround(b *testing.B) { benchmarkFallback(b, "(?<=!)Alice(?=!)") } -func benchmarkFallback(b *testing.B, pattern string) { - input := strings.Repeat("😀 café not-a-name\n", 100000) + "!Alice!" - e, err := New(Options{Terms: []string{pattern}}, Context{}) - if err != nil { - b.Fatal(err) - } - b.SetBytes(int64(len(input))) - b.ReportAllocs() - b.ResetTimer() - for b.Loop() { - if _, err := e.Transform(context.Background(), input, MaxOutput); err != nil { - b.Fatal(err) - } - } -} - -func TestFallbackASCIIBoundaries(t *testing.T) { - for _, tc := range []struct{ pattern, input, want string }{ - {`(?<=😀)Alice=>X`, "😀Aliceé", "😀Xé"}, - {`\bAlice(?=!)=>X`, "éAlice!", "éX!"}, - {`\BAlice(?=!)=>X`, "éAlice!", "éAlice!"}, - {`\BAlice(?=!)=>X`, "xAlice!", "xX!"}, - } { - engine, e := New(Options{Terms: []string{tc.pattern}}, Context{}) - if e != nil { - t.Fatal(e) - } - got, e := engine.Transform(context.Background(), tc.input, 1024) - if e != nil || got.Content != tc.want { - t.Fatalf("%s: %q != %q: %v", tc.pattern, got.Content, tc.want, e) - } - } -} - -func TestASCIIFilters(t *testing.T) { - for i := 0; i < 256; i++ { - s := strings.Repeat(string([]byte{byte(i)}), 17) - ascii, letters := asciiLetters(s) - if ascii != (i < 128) { - t.Fatalf("ASCII classification for %d", i) - } - var expected uint32 - b := byte(i) | 32 - if i < 128 && b >= 'a' && b <= 'z' { - expected = 1 << (b - 'a') - } - if letters != expected { - t.Fatalf("letters for %d: %x != %x", i, letters, expected) - } - if ascii && string(asciiLower(byte(i))) != strings.ToLower(string(byte(i))) { - t.Fatalf("case folding for %d", i) - } - } -} diff --git a/backend/internal/anonymize/ascii_fold_test.go b/backend/internal/anonymize/ascii_fold_test.go deleted file mode 100644 index a5017ec..0000000 --- a/backend/internal/anonymize/ascii_fold_test.go +++ /dev/null @@ -1,83 +0,0 @@ -package anonymize - -import ( - "context" - "math/rand" - "strings" - "testing" -) - -func TestASCIIFoldFinder(t *testing.T) { - rng := rand.New(rand.NewSource(42)) - for trial := 0; trial < 500; trial++ { - var input strings.Builder - for i := 0; i < 120; i++ { - input.WriteByte("aAbBcC. _012"[rng.Intn(12)]) - } - s := input.String() - for _, pattern := range []string{"a", "ab", "abc", "c.c", "012", "_", ""} { - find := asciiFoldFinder(s, pattern) - lower := strings.ToLower(s) - for offset := 0; offset <= len(s); offset++ { - want := strings.Index(lower[offset:], pattern) - if want >= 0 { - want += offset - } - if got := find(offset); got != want { - t.Fatalf("%q %q offset %d: got %d want %d", s, pattern, offset, got, want) - } - } - } - } -} - -func TestASCIIFastPathMatchesRegex(t *testing.T) { - rng := rand.New(rand.NewSource(17)) - pieces := []string{"Alice", "ALICE", "alice", "malice", "first.last", "FIRST-LAST", "first\nlast", "lab.io", "LAB/IO", "_Alice", "Alice_", " ", "\n", "https://host/Alice"} - for _, terms := range [][]string{{"Alice", "first.last", "lab.io"}, {"Alice => FIRST-LAST", "first.last => lab.io", "lab.io => end"}} { - fast, err := New(Options{Terms: terms}, Context{Mask: "XXXX"}) - if err != nil { - t.Fatal(err) - } - reference, err := New(Options{Terms: terms}, Context{Mask: "XXXX"}) - if err != nil { - t.Fatal(err) - } - for i := range reference.rules { - reference.rules[i].fastPattern = "" - reference.rules[i].required = "" - } - for trial := 0; trial < 200; trial++ { - var s strings.Builder - for i := 0; i < 40; i++ { - s.WriteString(pieces[rng.Intn(len(pieces))]) - s.WriteByte(' ') - } - got, err := fast.Transform(context.Background(), s.String(), MaxOutput) - if err != nil { - t.Fatal(err) - } - want, err := reference.Transform(context.Background(), s.String(), MaxOutput) - if err != nil { - t.Fatal(err) - } - if got != want { - t.Fatalf("fast path differs for %q: got %#v want %#v", s.String(), got, want) - } - } - } -} - -func TestASCIIFoldFinderDenseFalsePrefixes(t *testing.T) { - s := strings.Repeat("cCbB ", 1000) + "ABC abc AbC" - find := asciiFoldFinder(s, "abc") - for offset := 0; offset <= len(s); offset++ { - want := strings.Index(strings.ToLower(s[offset:]), "abc") - if want >= 0 { - want += offset - } - if got := find(offset); got != want { - t.Fatalf("offset %d: got %d want %d", offset, got, want) - } - } -} diff --git a/backend/internal/anonymize/boundaries.go b/backend/internal/anonymize/boundaries.go deleted file mode 100644 index b1eeb62..0000000 --- a/backend/internal/anonymize/boundaries.go +++ /dev/null @@ -1,40 +0,0 @@ -package anonymize - -import "strings" - -// regexp2's ECMAScript boundary still uses Unicode categories. JavaScript's -// boundary uses ASCII word characters, plus Kelvin sign/long s under /iu. -// Explicit case-sensitive assertions preserve that contract in fallback rules. -func javascriptBoundaries(pattern string, unicodeMode bool) string { - word := `(?-i:[A-Za-z0-9_])` - if unicodeMode { - word = `(?-i:[A-Za-z0-9_Kſ])` - } - var out strings.Builder - inClass := false - for i := 0; i < len(pattern); i++ { - b := pattern[i] - if b == '\\' && i+1 < len(pattern) { - i++ - next := pattern[i] - if !inClass && (next == 'b' || next == 'B') { - if next == 'b' { - out.WriteString(`(?:(? 4 { - concurrency = 4 - } - mb, err := strconv.ParseInt(os.Getenv("ANONYMIZATION_MEMORY_MB"), 10, 64) - if err != nil || mb < 128 { - mb = 512 - } - mb = min(mb, 16384) - return &Pool{slots: make(chan struct{}, concurrency), binary: binary, memory: semaphore.NewWeighted(mb * 1024 * 1024), budget: mb * 1024 * 1024} -} -func (p *Pool) Stats() map[string]any { - return map[string]any{"running": len(p.slots), "waiting": p.waiting.Load(), "maxWorkers": cap(p.slots), "maxWaiting": 16, "workerStarts": p.starts.Load()} -} - -// Process confines each transform to a killable child with no inherited -// credentials. Only already-open input/output descriptors cross the boundary. -// GOMEMLIMIT is a GC target, not a hard limit; deploy workers within the -// documented container memory cap in addition to these admission limits. -func (p *Pool) Process(ctx context.Context, input io.Reader, request ProcessRequest) (resultFile *os.File, changed bool, resultCleanup func(), resultErr error) { - if err := ctx.Err(); err != nil { - return nil, false, nil, err - } - if p.waiting.Add(1) > 16 { - p.waiting.Add(-1) - return nil, false, nil, errors.New("anonymization_queue_full") - } - waitStarted := time.Now() - wait, cancel := context.WithTimeout(ctx, 30*time.Second) - select { - case p.slots <- struct{}{}: - p.waiting.Add(-1) - cancel() - request.observeStage("worker_wait", waitStarted, nil) - case <-wait.Done(): - p.waiting.Add(-1) - request.observeStage("worker_wait", waitStarted, wait.Err()) - cancel() - return nil, false, nil, errors.New("anonymization_cancelled") - } - var once sync.Once - var weight int64 - release := func() { - once.Do(func() { - if weight > 0 { - p.memory.Release(weight) - } - <-p.slots - }) - } - directory, err := os.MkdirTemp("", "anonymous-go-text-") - if err != nil { - release() - return nil, false, nil, err - } - cleanup := func() { os.RemoveAll(directory) } - in, err := os.OpenFile(directory+"/input", os.O_CREATE|os.O_EXCL|os.O_RDWR, 0600) - if err != nil { - cleanup() - release() - return nil, false, nil, err - } - defer in.Close() - digest := sha256.New() - count, err := io.Copy(io.MultiWriter(in, digest), contextReader{ctx, io.LimitReader(inputReader{input}, MaxInput+1)}) - if ctx.Err() != nil { - cleanup() - release() - return nil, false, nil, ctx.Err() - } - if err != nil { - cleanup() - release() - return nil, false, nil, err - } - if count > MaxInput { - cleanup() - release() - return nil, false, nil, errors.New("anonymization_input_too_large") - } - if err := ctx.Err(); err != nil { - cleanup() - release() - return nil, false, nil, err - } - cacheKey := "" - if request.CacheScope != "" { - settings, marshalErr := json.Marshal([]any{"go-matcher-result-v1", hex.EncodeToString(digest.Sum(nil)), request}) - if marshalErr != nil { - cleanup() - release() - return nil, false, nil, marshalErr - } - keyDigest := sha256.Sum256(settings) - cacheKey = hex.EncodeToString(keyDigest[:]) - if out, changed, hit := p.results.copy(ctx, cacheKey, directory+"/output"); hit { - if request.CacheEvent != nil { - request.CacheEvent(true) - } - release() - return out, changed, func() { out.Close(); cleanup() }, nil - } - if request.CacheEvent != nil { - request.CacheEvent(false) - } - done, waitErr := p.results.begin(ctx, cacheKey) - if waitErr != nil { - cleanup() - release() - return nil, false, nil, waitErr - } - defer done() - if out, changed, hit := p.results.copy(ctx, cacheKey, directory+"/output"); hit { - release() - return out, changed, func() { out.Close(); cleanup() }, nil - } - } - required := int64(64*1024*1024) + 4*count - if required > p.budget { - cleanup() - release() - return nil, false, nil, errors.New("anonymization_memory_budget_exceeded") - } - memoryStarted := time.Now() - memoryWait, memoryCancel := context.WithTimeout(ctx, 30*time.Second) - err = p.memory.Acquire(memoryWait, required) - request.observeStage("worker_wait", memoryStarted, err) - memoryCancel() - if err != nil { - cleanup() - release() - return nil, false, nil, errors.New("anonymization_cancelled") - } - weight = required - if _, err = in.Seek(0, io.SeekStart); err != nil { - cleanup() - release() - return nil, false, nil, err - } - out, err := os.OpenFile(directory+"/output", os.O_CREATE|os.O_EXCL|os.O_RDWR, 0600) - if err != nil { - cleanup() - release() - return nil, false, nil, err - } - work, stop := context.WithTimeout(ctx, 15*time.Second) - defer stop() - data, err := json.Marshal(request) - if err != nil { - out.Close() - cleanup() - release() - return nil, false, nil, err - } - cmd := exec.CommandContext(work, p.binary, "anonymization-worker") - cmd.Stdin = bytes.NewReader(data) - cmd.ExtraFiles = []*os.File{in, out} - cmd.Dir = directory - cmd.Env = []string{"GOMEMLIMIT=384MiB", "GOMAXPROCS=1"} - var response cappedBuffer - cmd.Stdout = &response - cmd.Stderr = io.Discard - p.starts.Add(1) - workStarted := time.Now() - err = cmd.Run() - workElapsed := time.Since(workStarted) - defer func() { - if request.StageEvent != nil { - request.StageEvent("anonymize", workElapsed, resultErr) - } - }() - if work.Err() != nil { - release() - out.Close() - cleanup() - return nil, false, nil, errors.New("anonymization_deadline_exceeded") - } - var result ProcessResult - if err != nil || json.Unmarshal(response.Bytes(), &result) != nil { - release() - out.Close() - cleanup() - return nil, false, nil, errors.New("anonymization_worker_failed") - } - if result.Error != "" { - release() - out.Close() - cleanup() - return nil, false, nil, errors.New(result.Error) - } - if _, err = out.Seek(0, io.SeekStart); err != nil { - release() - out.Close() - cleanup() - return nil, false, nil, err - } - if cacheKey != "" { - p.results.put(ctx, cacheKey, request.CacheOwner, out, result.Changed) - } - if err := ctx.Err(); err != nil { - out.Close() - cleanup() - release() - return nil, false, nil, err - } - // The worker has exited and its result is on disk. A slow output reader - // must not retain worker/memory admission and time out unrelated work. - release() - return out, result.Changed, func() { out.Close(); cleanup() }, nil -} - -type cappedBuffer struct{ bytes.Buffer } - -func (b *cappedBuffer) Write(p []byte) (int, error) { - if b.Len()+len(p) > 4096 { - return 0, errors.New("worker_response_too_large") - } - return b.Buffer.Write(p) -} - -func RunProcess() int { - debug.SetMemoryLimit(384 * 1024 * 1024) - var request ProcessRequest - if json.NewDecoder(io.LimitReader(os.Stdin, 1024*1024)).Decode(&request) != nil { - fmt.Println(`{"error":"invalid_worker_request"}`) - return 1 - } - in, out := os.NewFile(3, "input"), os.NewFile(4, "output") - if in == nil || out == nil { - return 1 - } - defer in.Close() - defer out.Close() - body, err := io.ReadAll(io.LimitReader(in, MaxInput+1)) - if err != nil || len(body) > MaxInput { - fmt.Println(`{"error":"anonymization_input_too_large"}`) - return 1 - } - engine, err := New(request.Options, request.Context) - if err != nil { - json.NewEncoder(os.Stdout).Encode(ProcessResult{Error: err.Error()}) - return 0 - } - ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) - defer cancel() - limit := request.MaxOutput - if limit <= 0 || limit > MaxOutput { - limit = MaxOutput - } - output, changed, err := engine.Bytes(ctx, body, limit) - if err != nil { - json.NewEncoder(os.Stdout).Encode(ProcessResult{Error: err.Error()}) - return 0 - } - if _, err = out.Write(output); err != nil { - fmt.Println(`{"error":"anonymization_output_failed"}`) - return 1 - } - json.NewEncoder(os.Stdout).Encode(ProcessResult{Changed: changed}) - return 0 -} - -func (r ProcessRequest) observeStage(name string, started time.Time, err error) { - if r.StageEvent != nil { - r.StageEvent(name, time.Since(started), err) - } -} diff --git a/backend/internal/anonymize/process_cache_test.go b/backend/internal/anonymize/process_cache_test.go deleted file mode 100644 index e85f2d6..0000000 --- a/backend/internal/anonymize/process_cache_test.go +++ /dev/null @@ -1,165 +0,0 @@ -package anonymize - -import ( - "context" - "errors" - "io" - "os" - "strings" - "testing" - "time" -) - -func TestProcessCacheWorker(t *testing.T) { - binary := os.Getenv("GO_TEST_SERVER_BINARY") - if binary == "" { - t.Skip("requires built worker binary") - } - pool := NewPool(binary, 2) - defer pool.Close() - request := ProcessRequest{Options: Options{Terms: []string{"Alice"}}, Context: Context{Mask: "XXXX"}, MaxOutput: MaxOutput, CacheScope: "revision-one", CacheOwner: "fixture"} - stages, failures := map[string]int{}, map[string]int{} - request.StageEvent = func(name string, elapsed time.Duration, err error) { - if elapsed < 0 { - t.Fatal("negative duration") - } - stages[name]++ - if err != nil { - failures[name]++ - } - } - call := func(req ProcessRequest) (string, error) { - f, _, cleanup, err := pool.Process(context.Background(), strings.NewReader("hello Alice"), req) - if err != nil { - return "", err - } - defer cleanup() - data, err := io.ReadAll(f) - return string(data), err - } - first, err := call(request) - if err != nil { - t.Fatal(err) - } - second, err := call(request) - if err != nil || second != first || pool.starts.Load() != 1 { - t.Fatal("warm output", second, err, pool.Stats()) - } - if stages["anonymize"] != 1 || stages["worker_wait"] < 2 { - t.Fatal("cache hit ran worker or missing wait metrics", stages) - } - limited := request - limited.MaxOutput = 2 - if _, err = call(limited); err == nil || err.Error() != "anonymized_output_too_large" { - t.Fatal("cached output bypassed smaller limit", err) - } - if _, err = call(limited); err == nil || pool.starts.Load() != 3 { - t.Fatal("failed output cached", err, pool.Stats()) - } - if failures["anonymize"] != 2 { - t.Fatal("worker errors missing", failures) - } - request.Context.Mask = "REDACTED" - changed, err := call(request) - if err != nil || changed == first || !strings.Contains(changed, "REDACTED") { - t.Fatal("context collision", changed, err) - } - ctx, cancel := context.WithCancel(context.Background()) - cancel() - _, _, _, err = pool.Process(ctx, strings.NewReader("hello Alice"), request) - if err == nil { - t.Fatal("canceled cache hit succeeded") - } - if pool.Stats()["running"] != 0 || pool.Stats()["waiting"] != int64(0) { - t.Fatal("admission leaked", pool.Stats()) - } -} - -type cancelingReader struct { - cancel context.CancelFunc - reads int -} - -func (r *cancelingReader) Read(p []byte) (int, error) { - r.reads++ - r.cancel() - copy(p, "bytes") - return 5, nil -} -func TestProcessSpoolingCancellation(t *testing.T) { - pool := NewPool("unused", 1) - defer pool.Close() - ctx, cancel := context.WithCancel(context.Background()) - defer cancel() - reader := &cancelingReader{cancel: cancel} - _, _, _, err := pool.Process(ctx, reader, ProcessRequest{}) - if !errors.Is(err, context.Canceled) || reader.reads != 1 || pool.starts.Load() != 0 || len(pool.slots) != 0 { - t.Fatal(err, reader.reads, pool.Stats()) - } -} -func TestCacheCopyAndPublicationCancellation(t *testing.T) { - c := &resultCache{} - defer c.close() - source, err := os.CreateTemp(t.TempDir(), "source") - if err != nil { - t.Fatal(err) - } - defer source.Close() - source.WriteString("output") - ctx, cancel := context.WithCancel(context.Background()) - cancel() - c.put(ctx, "canceled", "owner", source, true) - if len(c.entries) != 0 { - t.Fatal("canceled publication retained") - } - c.put(context.Background(), "valid", "owner", source, true) - destination := t.TempDir() + "/output" - if out, _, hit := c.copy(ctx, "valid", destination); hit { - out.Close() - t.Fatal("canceled copy succeeded") - } - if _, err = os.Stat(destination); !errors.Is(err, os.ErrNotExist) { - t.Fatal("partial output remains", err) - } - if _, err = c.begin(ctx, "unoccupied"); !errors.Is(err, context.Canceled) { - t.Fatal("canceled leader admitted", err) - } - if len(c.flights) != 0 { - t.Fatal("canceled flight leaked") - } -} - -func TestProcessOutputReadersDoNotHoldWorkerAdmission(t *testing.T) { - binary := os.Getenv("GO_TEST_SERVER_BINARY") - if binary == "" { - t.Skip("requires built worker binary") - } - pool := NewPool(binary, 1) - defer pool.Close() - request := ProcessRequest{Options: Options{Terms: []string{"Alice"}}, Context: Context{Mask: "XXXX"}, MaxOutput: MaxOutput, CacheScope: "slow-readers", CacheOwner: "fixture"} - // Keep every output open, as a slow client would. Cover a cold result, - // a cache hit and a different cold result with only one worker slot. - for _, text := range []string{"first Alice", "first Alice", "second Alice"} { - ctx, cancel := context.WithTimeout(t.Context(), 3*time.Second) - file, _, cleanup, err := pool.Process(ctx, strings.NewReader(text), request) - cancel() - if err != nil { - t.Fatal("open output blocked subsequent worker", err) - } - defer cleanup() - if len(pool.slots) != 0 { - t.Fatal("completed worker retained slot") - } - if !pool.memory.TryAcquire(pool.budget) { - t.Fatal("completed worker retained memory admission") - } - pool.memory.Release(pool.budget) - actual, err := io.ReadAll(file) - if err != nil || string(actual) != strings.ReplaceAll(text, "Alice", "XXXX-1") { - t.Fatal(string(actual), err) - } - } - if pool.starts.Load() != 2 { - t.Fatal("cache hit unexpectedly started worker", pool.starts.Load()) - } -} diff --git a/backend/internal/anonymize/result_cache.go b/backend/internal/anonymize/result_cache.go deleted file mode 100644 index d5be768..0000000 --- a/backend/internal/anonymize/result_cache.go +++ /dev/null @@ -1,204 +0,0 @@ -package anonymize - -import ( - "context" - "io" - "os" - "sort" - "sync" - "time" -) - -const resultCacheBudget int64 = 512 * 1024 * 1024 -const resultCacheObjectLimit int64 = resultCacheBudget / 4 -const resultCacheTTL = time.Hour - -type resultEntry struct { - path, owner string - size int64 - changed bool - created time.Time -} - -// Result caches are private to a process. The directory is created with mode -// 0700 and removed on shutdown; no credentials or source names enter filenames. -type resultCache struct { - mu sync.Mutex - directory string - entries map[string]resultEntry - flights map[string]chan struct{} - closed bool -} - -func (c *resultCache) prune(now time.Time) { - keys := make([]string, 0, len(c.entries)) - for key := range c.entries { - keys = append(keys, key) - } - sort.Slice(keys, func(i, j int) bool { return c.entries[keys[i]].created.After(c.entries[keys[j]].created) }) - var size int64 - for i, key := range keys { - e := c.entries[key] - size += e.size - if i >= 128 || size > resultCacheBudget || now.Sub(e.created) > resultCacheTTL { - os.Remove(e.path) - delete(c.entries, key) - } - } -} -func (c *resultCache) begin(ctx context.Context, key string) (func(), error) { - for { - if err := ctx.Err(); err != nil { - return nil, err - } - c.mu.Lock() - if err := ctx.Err(); err != nil { - c.mu.Unlock() - return nil, err - } - if c.flights == nil { - c.flights = map[string]chan struct{}{} - } - if ready, exists := c.flights[key]; exists { - c.mu.Unlock() - select { - case <-ready: - continue - case <-ctx.Done(): - return nil, ctx.Err() - } - } - ready := make(chan struct{}) - c.flights[key] = ready - c.mu.Unlock() - return func() { c.mu.Lock(); delete(c.flights, key); close(ready); c.mu.Unlock() }, nil - } -} -func (c *resultCache) copy(ctx context.Context, key, destination string) (*os.File, bool, bool) { - c.mu.Lock() - c.prune(time.Now()) - e, ok := c.entries[key] - if !ok || c.closed { - c.mu.Unlock() - return nil, false, false - } - in, err := os.Open(e.path) - c.mu.Unlock() - if err != nil { - c.discard(key, e.path) - return nil, false, false - } - defer in.Close() - info, err := in.Stat() - if err != nil || !info.Mode().IsRegular() || info.Size() != e.size { - c.discard(key, e.path) - return nil, false, false - } - out, err := os.OpenFile(destination, os.O_CREATE|os.O_EXCL|os.O_RDWR, 0600) - if err != nil { - return nil, false, false - } - n, err := io.Copy(out, contextReader{ctx, io.LimitReader(in, e.size+1)}) - if err == nil { - err = ctx.Err() - } - if err == nil && n == e.size { - _, err = out.Seek(0, io.SeekStart) - } else if err == nil { - err = io.ErrUnexpectedEOF - } - if err != nil { - out.Close() - os.Remove(destination) - return nil, false, false - } - return out, e.changed, true -} -func (c *resultCache) put(ctx context.Context, key, owner string, out *os.File, changed bool) { - info, err := out.Stat() - if err != nil || info.Size() > resultCacheObjectLimit { - return - } - c.mu.Lock() - defer c.mu.Unlock() - if c.closed || ctx.Err() != nil { - return - } - if c.directory == "" { - c.directory, err = os.MkdirTemp("", "anonymous-go-results-") - if err != nil { - return - } - c.entries = map[string]resultEntry{} - } - if _, ok := c.entries[key]; ok { - return - } - // Copy through a section reader: publishing must not advance the response. - file, err := os.CreateTemp(c.directory, "result-") - if err != nil { - return - } - n, err := io.Copy(file, contextReader{ctx, io.NewSectionReader(out, 0, info.Size())}) - closeErr := file.Close() - if err != nil || closeErr != nil || n != info.Size() || ctx.Err() != nil { - os.Remove(file.Name()) - return - } - c.entries[key] = resultEntry{path: file.Name(), owner: owner, size: n, changed: changed, created: time.Now()} - c.prune(time.Now()) -} -func (c *resultCache) removeOwner(owner string) { - c.mu.Lock() - defer c.mu.Unlock() - for key, e := range c.entries { - if e.owner == owner { - os.Remove(e.path) - delete(c.entries, key) - } - } -} -func (c *resultCache) close() { - c.mu.Lock() - defer c.mu.Unlock() - c.closed = true - if c.directory != "" { - os.RemoveAll(c.directory) - } - c.entries = nil -} -func (p *Pool) Close() { p.results.close() } -func (p *Pool) RemoveResults(owner string) { p.results.removeOwner(owner) } - -func (p *Pool) PruneResults() { - p.results.mu.Lock() - defer p.results.mu.Unlock() - p.results.prune(time.Now()) -} - -func (c *resultCache) discard(key, path string) { - c.mu.Lock() - defer c.mu.Unlock() - if e, ok := c.entries[key]; ok && e.path == path { - os.Remove(e.path) - delete(c.entries, key) - } -} - -// Check cancellation between reads without spawning a goroutine that could leak -// if an arbitrary Reader blocks. Network readers retain their own context. -type contextReader struct { - ctx context.Context - reader io.Reader -} - -func (r contextReader) Read(p []byte) (int, error) { - if err := r.ctx.Err(); err != nil { - return 0, err - } - n, err := r.reader.Read(p) - if canceled := r.ctx.Err(); canceled != nil { - return n, canceled - } - return n, err -} diff --git a/backend/internal/anonymize/result_cache_test.go b/backend/internal/anonymize/result_cache_test.go deleted file mode 100644 index 5ac1db9..0000000 --- a/backend/internal/anonymize/result_cache_test.go +++ /dev/null @@ -1,106 +0,0 @@ -package anonymize - -import ( - "context" - "io" - "os" - "path/filepath" - "testing" - "time" -) - -func TestResultCache(t *testing.T) { - c := &resultCache{} - defer c.close() - source, err := os.CreateTemp(t.TempDir(), "source") - if err != nil { - t.Fatal(err) - } - defer source.Close() - source.WriteString("masked content") - c.put(context.Background(), "key", "owner", source, true) - read := func(key string) bool { - f, changed, hit := c.copy(context.Background(), key, filepath.Join(t.TempDir(), "output")) - if !hit { - return false - } - defer f.Close() - raw, err := io.ReadAll(f) - if err != nil || string(raw) != "masked content" || !changed { - t.Fatal(string(raw), changed, err) - } - return true - } - if !read("key") { - t.Fatal("cache miss") - } - c.removeOwner("other") - if !read("key") { - t.Fatal("wrong owner invalidated") - } - c.removeOwner("owner") - if read("key") { - t.Fatal("removed cache reused") - } - c.put(context.Background(), "key", "owner", source, true) - entry := c.entries["key"] - entry.created = time.Now().Add(-2 * time.Hour) - c.entries["key"] = entry - if read("key") { - t.Fatal("expired cache reused") - } - c.put(context.Background(), "key", "owner", source, true) - if err := os.Truncate(c.entries["key"].path, 1); err != nil { - t.Fatal(err) - } - if read("key") { - t.Fatal("truncated cache reused") - } - c.put(context.Background(), "key", "owner", source, true) - if !read("key") { - t.Fatal("corrupted cache was not repaired") - } - c.close() - c.put(context.Background(), "after-close", "owner", source, true) - if len(c.entries) != 0 { - t.Fatal("published after shutdown") - } -} -func TestResultCacheCoordination(t *testing.T) { - c := &resultCache{} - defer c.close() - release, err := c.begin(context.Background(), "key") - if err != nil { - t.Fatal(err) - } - ctx, cancel := context.WithCancel(context.Background()) - cancel() - if _, err := c.begin(ctx, "key"); err == nil { - t.Fatal("canceled waiter admitted") - } - release() - next, err := c.begin(context.Background(), "key") - if err != nil { - t.Fatal(err) - } - next() - if len(c.flights) != 0 { - t.Fatal("leaked flight") - } -} -func TestResultCacheBudgets(t *testing.T) { - c := &resultCache{entries: map[string]resultEntry{}} - now := time.Now() - for i := 0; i < 129; i++ { - c.entries[string(rune(i))] = resultEntry{created: now.Add(time.Duration(i) * time.Second), size: 1} - } - c.prune(now) - if len(c.entries) != 128 { - t.Fatal("entry limit", len(c.entries)) - } - c.entries = map[string]resultEntry{"old": {created: now.Add(-time.Minute), size: resultCacheBudget}, "new": {created: now, size: 1}} - c.prune(now) - if len(c.entries) != 1 || c.entries["new"].size != 1 { - t.Fatal("byte limit", c.entries) - } -} diff --git a/backend/internal/anonymize/transform_bench_test.go b/backend/internal/anonymize/transform_bench_test.go deleted file mode 100644 index 693609c..0000000 --- a/backend/internal/anonymize/transform_bench_test.go +++ /dev/null @@ -1,37 +0,0 @@ -package anonymize - -import ( - "context" - "fmt" - "strings" - "testing" -) - -func BenchmarkReplacementPaths(b *testing.B) { - terms := []string{"first.last", "user@example.org", "dept.example.edu", "lab.io", "project.org", "Author X. Name"} - for i := 0; i < 41; i++ { - terms = append(terms, fmt.Sprintf("Researcher%d", i)) - } - for _, name := range []string{"sparse", "dense"} { - b.Run(name, func(b *testing.B) { - input := "first.last\n" + strings.Repeat("123,456,78.91234,-45.123456\n", 1800000) + "\nhttps://host/user@example.org" - rules := terms - if name == "dense" { - input = strings.Repeat("Alice 123 first.last,45.678,-23.456\n", 600000) - rules = append([]string{"Alice"}, terms...) - } - engine, err := New(Options{Terms: rules}, Context{Mask: "XXXX"}) - if err != nil { - b.Fatal(err) - } - b.SetBytes(int64(len(input))) - b.ReportAllocs() - b.ResetTimer() - for b.Loop() { - if _, err := engine.Transform(context.Background(), input, MaxOutput); err != nil { - b.Fatal(err) - } - } - }) - } -} diff --git a/backend/internal/blobcache/disk_linux.go b/backend/internal/blobcache/disk_linux.go deleted file mode 100644 index e835de2..0000000 --- a/backend/internal/blobcache/disk_linux.go +++ /dev/null @@ -1,42 +0,0 @@ -//go:build linux - -package blobcache - -import ( - "errors" - "math" - "os" - - "golang.org/x/sys/unix" -) - -func (c *Cache) diskSpace() (available uint64, unit int64, err error) { - file, err := c.root.Open(".") - if err != nil { - return 0, 0, err - } - defer file.Close() - var stat unix.Statfs_t - if err := unix.Fstatfs(int(file.Fd()), &stat); err != nil { - return 0, 0, err - } - unit = int64(stat.Bsize) - if unit <= 0 { - return 0, 0, errors.New("invalid_cache_filesystem") - } - if stat.Bavail > math.MaxUint64/uint64(unit) { - return math.MaxUint64, unit, nil - } - return stat.Bavail * uint64(unit), unit, nil -} - -func allocatedBytes(file *os.File) (int64, error) { - var stat unix.Stat_t - if err := unix.Fstat(int(file.Fd()), &stat); err != nil { - return 0, err - } - if stat.Blocks < 0 || stat.Blocks > math.MaxInt64/512 { - return 0, errors.New("invalid_cache_allocation") - } - return max(4096, stat.Blocks*512), nil -} diff --git a/backend/internal/blobcache/disk_other.go b/backend/internal/blobcache/disk_other.go deleted file mode 100644 index 96f7007..0000000 --- a/backend/internal/blobcache/disk_other.go +++ /dev/null @@ -1,14 +0,0 @@ -//go:build !linux - -package blobcache - -import "os" - -// The shipped runtime is Linux. Reads remain portable; admission must not -// pretend physical disk accounting is available on an unsupported platform. -func (c *Cache) diskSpace() (uint64, int64, error) { - return 0, 0, &AdmissionError{Code: "disk_accounting_not_supported"} -} -func allocatedBytes(*os.File) (int64, error) { - return 0, &AdmissionError{Code: "disk_accounting_not_supported"} -} diff --git a/backend/internal/blobcache/events.go b/backend/internal/blobcache/events.go deleted file mode 100644 index 0bd1048..0000000 --- a/backend/internal/blobcache/events.go +++ /dev/null @@ -1,72 +0,0 @@ -package blobcache - -import ( - "context" - "database/sql" - "errors" - "time" -) - -// Observe callbacks must be fast and must not call back into Cache. The server -// can buffer these events without making database writes in the callback. -type Event struct { - Context context.Context - Name string - Bytes int64 - Duration time.Duration -} - -func (c *Cache) emit(ctx context.Context, event string, bytes int64, duration time.Duration) { - if c.options.Observe != nil { - c.options.Observe(Event{Context: ctx, Name: c.options.Name + "_" + event, Bytes: bytes, Duration: duration}) - } -} -func (c *Cache) transformEvent(ctx context.Context, event string, bytes int64, duration time.Duration) { - if c.options.Observe != nil { - c.options.Observe(Event{Context: ctx, Name: event, Bytes: bytes, Duration: duration}) - } -} -func (c *Cache) accessed(ctx context.Context, key string, hit bool, bytes int64) error { - now := c.now().UnixMilli() - var seen int64 - var evicted bool - err := c.db.QueryRowContext(ctx, "SELECT seen,evicted FROM history WHERE key=? AND seen>=?", key, now-7*86400000).Scan(&seen, &evicted) - previous := err == nil - if err != nil && !errors.Is(err, sql.ErrNoRows) { - return err - } - if hit { - c.emit(ctx, "hit", bytes, 0) - } else { - c.emit(ctx, "miss", bytes, 0) - switch { - case previous && evicted: - c.emit(ctx, "refetch", 0, 0) - case previous: - c.emit(ctx, "known_miss", 0, 0) - default: - c.emit(ctx, "first_seen_miss", 0, 0) - } - } - if previous { - age := now - seen - for _, window := range []struct { - name string - limit int64 - }{{"1h", 3600000}, {"1d", 86400000}, {"7d", 604800000}} { - if age <= window.limit { - c.emit(ctx, "reuse_"+window.name, bytes, 0) - } - } - } - if previous && !evicted && now-seen < 30000 { - return nil - } - return c.transaction(ctx, false, func(tx *sql.Tx) error { - if _, err := tx.ExecContext(ctx, "INSERT INTO history VALUES(?,?,0) ON CONFLICT(key) DO UPDATE SET seen=excluded.seen,evicted=0", key, now); err != nil { - return err - } - _, err := tx.ExecContext(ctx, `DELETE FROM history WHERE rowid IN(SELECT rowid FROM history ORDER BY seen LIMIT MAX(0,(SELECT history FROM summary WHERE id=1)-100000))`) - return err - }) -} diff --git a/backend/internal/blobcache/fill.go b/backend/internal/blobcache/fill.go deleted file mode 100644 index b63e3f3..0000000 --- a/backend/internal/blobcache/fill.go +++ /dev/null @@ -1,523 +0,0 @@ -package blobcache - -import ( - "compress/gzip" - "context" - "crypto/sha1" - "crypto/sha256" - "database/sql" - "encoding/hex" - "errors" - "fmt" - "io" - "math" - "os" - "path" - "regexp" - "sync" - "time" -) - -var validKey = regexp.MustCompile(`^[a-z0-9-]{1,100}$`) -var ErrFillLeaseLost = errors.New("cache_fill_lease_lost") -var errFillTimeout = errors.New("cache_fill_timeout") - -type AdmissionError struct{ Code string } - -func (e *AdmissionError) Error() string { return e.Code } - -type Proof struct { - GitSHA, SHA256 string - Size int64 -} - -// Producers and verifiers must honor their context. Cancellation also closes -// a returned input stream to interrupt reads blocked on upstream I/O. -type Producer func(context.Context) (io.ReadCloser, error) -type Verifier func(context.Context, Proof) (string, error) -type fillOperation struct { - ctx context.Context - cancel context.CancelCauseFunc - done chan struct{} -} - -func (c *Cache) startFill(ctx context.Context) (*fillOperation, error) { - c.lifecycle.RLock() - defer c.lifecycle.RUnlock() - if c.closed { - return nil, os.ErrClosed - } - life, cancel := context.WithCancelCause(ctx) - op := &fillOperation{ctx: life, cancel: cancel, done: make(chan struct{})} - c.fillsMu.Lock() - c.fills[op] = struct{}{} - c.fillsMu.Unlock() - return op, nil -} -func (c *Cache) endFill(op *fillOperation) { - op.cancel(context.Canceled) - c.fillsMu.Lock() - delete(c.fills, op) - c.fillsMu.Unlock() - close(op.done) -} - -func (c *Cache) reservation(unit int64) (int64, error) { - unit = max(unit, 4096) - if unit > math.MaxInt64/3 { - return 0, errors.New("invalid_cache_filesystem") - } - blocks := c.options.MaxObject / unit - if c.options.MaxObject%unit != 0 { - blocks++ - } - if blocks > math.MaxInt64/(3*unit) { - return 0, &AdmissionError{Code: "cache_budget_busy"} - } - // Preserve the TS reservation, but cover allocation rounding for small files. - return max(c.options.MaxObject*3+1024, blocks*unit*3), nil -} - -func (c *Cache) claimFill(ctx context.Context, key, token string) (bool, error) { - available, unit, err := c.diskSpace() - if err != nil { - return false, err - } - reservation, err := c.reservation(unit) - if err != nil { - return false, err - } - if available < uint64(reservation)+uint64(c.options.FreeBytes) { - return false, &AdmissionError{Code: "disk_headroom"} - } - owned := false - err = c.transaction(ctx, true, func(tx *sql.Tx) error { - if err := c.expire(ctx, tx); err != nil { - return err - } - var exists bool - if err := tx.QueryRowContext(ctx, "SELECT EXISTS(SELECT 1 FROM fills WHERE key=?)", key).Scan(&exists); err != nil { - return err - } - if exists { - return nil - } - var used, reserved int64 - usage := func() error { - return tx.QueryRowContext(ctx, "SELECT allocatedBytes,reservedBytes FROM summary WHERE id=1").Scan(&used, &reserved) - } - if err := usage(); err != nil { - return err - } - fits := func() bool { - return used >= 0 && reserved >= 0 && reservation <= c.options.Budget && reserved <= c.options.Budget-reservation && used <= c.options.Budget-reservation-reserved - } - if !fits() { - low := 0.9 - if c.options.LowWater != nil { - low = *c.options.LowWater - } - target := int64(0) - if reservation <= c.options.Budget && reserved >= 0 && reserved <= c.options.Budget-reservation { - target = min(int64(float64(c.options.Budget)*low), c.options.Budget-reserved-reservation) - } - if err := c.evictTo(ctx, tx, max(0, target)); err != nil { - return err - } - if err := usage(); err != nil { - return err - } - } - if !fits() { - return &AdmissionError{Code: "cache_budget_busy"} - } - if _, err := tx.ExecContext(ctx, "INSERT INTO fills VALUES(?,?,?,?)", key, token, c.now().Add(readerLease).UnixMilli(), reservation); err != nil { - return err - } - owned = true - return nil - }) - return owned, err -} - -// GetOrFill returns a leased decoded reader for an alias or content digest. -// The caller must authorize access even on a hit and close the returned reader. -// A nil verifier uses the computed SHA-256 digest. A verifier may select the -// computed Git or SHA-256 digest after checking provider-owned metadata. -// AdmissionError allows callers to choose an independently bounded fallback. -func (c *Cache) GetOrFill(ctx context.Context, key string, produce Producer, verify Verifier, sizeHint *int64) (reader *Reader, err error) { - if !validKey.MatchString(key) { - return nil, errors.New("invalid_cache_key") - } - op, err := c.startFill(ctx) - if err != nil { - return nil, err - } - defer c.endFill(op) - hit, err := c.lookup(op.ctx, ctx, key) - if err != nil { - return nil, err - } - bytes := int64(0) - if sizeHint != nil { - bytes = *sizeHint - } - if hit != nil { - bytes = hit.record.Size - } - if err := c.accessed(op.ctx, key, hit != nil, bytes); err != nil { - if hit != nil { - hit.Close() - } - return nil, err - } - if hit != nil { - return hit, nil - } - if sizeHint != nil && *sizeHint > c.options.MaxObject { - c.emit(ctx, "bypass", *sizeHint, 0) - return nil, &AdmissionError{Code: "object_too_large"} - } - token, err := newToken() - if err != nil { - return nil, err - } - wait, cancelWait := context.WithTimeoutCause(op.ctx, c.fillWait, &AdmissionError{Code: "fill_timeout"}) - defer cancelWait() - for { - if wait.Err() != nil { - return nil, context.Cause(wait) - } - owned, err := c.claimFill(wait, key, token) - if err != nil { - if wait.Err() != nil { - return nil, context.Cause(wait) - } - return nil, err - } - if owned { - break - } - c.emit(ctx, "fill_wait", 0, 0) - select { - case <-wait.Done(): - return nil, context.Cause(wait) - case <-time.After(50 * time.Millisecond): - } - hit, err := c.lookup(wait, ctx, key) - if err != nil { - return nil, err - } - if hit != nil { - return hit, nil - } - } - cancelWait() - fillStarted := time.Now() - defer func() { - if c.options.Stage != nil { - c.options.Stage(ctx, "cache_fill", time.Since(fillStarted), err) - } - }() - var candidate *Record - defer func() { - if cleanupErr := c.cleanupFill(key, token, candidate); cleanupErr != nil { - if reader != nil { - reader.Close() - reader = nil - } - err = errors.Join(err, cleanupErr) - } - }() - work, cancelWork := context.WithTimeoutCause(op.ctx, c.fillTimeout, errFillTimeout) - defer cancelWork() - live, cancelLive := context.WithCancelCause(work) - defer cancelLive(context.Canceled) - heartbeatDone := make(chan struct{}) - go func() { - defer close(heartbeatDone) - ticker := time.NewTicker(c.fillHeartbeat) - defer ticker.Stop() - for { - select { - case <-live.Done(): - return - case <-ticker.C: - now := c.now().UnixMilli() - result, err := c.db.ExecContext(live, "UPDATE fills SET expires=? WHERE key=? AND token=? AND expires>=?", now+readerLease.Milliseconds(), key, token, now) - if err != nil { - cancelLive(ErrFillLeaseLost) - return - } - n, err := result.RowsAffected() - if err != nil || n != 1 { - cancelLive(ErrFillLeaseLost) - return - } - } - } - }() - defer func() { cancelLive(context.Canceled); <-heartbeatDone }() - defer func() { - if err != nil && live.Err() != nil { - err = context.Cause(live) - } - }() - if hit, err := c.lookup(live, ctx, key); err != nil || hit != nil { - return hit, err - } - if produce == nil { - return nil, errors.New("cache_producer_required") - } - input, err := produce(live) - if err != nil { - return nil, err - } - if input == nil { - return nil, errors.New("cache_input_required") - } - var closeInput sync.Once - closeStream := func() { closeInput.Do(func() { input.Close() }) } - stopClose := context.AfterFunc(live, closeStream) - defer func() { stopClose(); closeStream() }() - record, chosen, err := c.spool(live, token, input, verify) - if err != nil { - return nil, err - } - candidate = &record - if err := live.Err(); err != nil { - return nil, context.Cause(live) - } - pin, err := c.publish(live, key, token, record, chosen) - if err != nil { - return nil, err - } - defer c.releaseReader(pin) - reader, err = c.open(live, ctx, record.Digest, false) - if err == nil && reader == nil { - err = errors.New("published_blob_missing") - } - return reader, err -} - -type checkedReader struct { - ctx context.Context - input io.Reader -} - -func (r checkedReader) Read(p []byte) (int, error) { - if r.ctx.Err() != nil { - return 0, context.Cause(r.ctx) - } - n, err := r.input.Read(p) - if r.ctx.Err() != nil { - return n, context.Cause(r.ctx) - } - return n, err -} - -func (c *Cache) spool(ctx context.Context, token string, input io.Reader, verify Verifier) (record Record, chosen string, err error) { - raw := "tmp/" + token + ".raw" - file, err := c.root.OpenFile(raw, os.O_CREATE|os.O_EXCL|os.O_RDWR, 0600) - if err != nil { - return record, "", err - } - defer file.Close() - hash := sha256.New() - size, err := io.Copy(io.MultiWriter(file, hash), io.LimitReader(checkedReader{ctx, input}, c.options.MaxObject+1)) - if err != nil { - return record, "", err - } - if size > c.options.MaxObject { - return record, "", &AdmissionError{Code: "object_too_large"} - } - if _, err = file.Seek(0, 0); err != nil { - return record, "", err - } - git := sha1.New() - fmt.Fprintf(git, "blob %d\x00", size) - if _, err = io.Copy(git, checkedReader{ctx, file}); err != nil { - return record, "", err - } - proof := Proof{GitSHA: hex.EncodeToString(git.Sum(nil)), SHA256: hex.EncodeToString(hash.Sum(nil)), Size: size} - digest := "sha256-" + proof.SHA256 - if verify != nil { - digest, err = verify(ctx, proof) - if err != nil { - return record, "", err - } - } - if !validDigest.MatchString(digest) || (digest != "git-"+proof.GitSHA && digest != "sha256-"+proof.SHA256) { - return record, "", errors.New("invalid_verified_digest") - } - record = Record{Digest: digest, File: token + ".raw", Size: size, Stored: size, Encoding: "identity", Accessed: c.now().UnixMilli()} - chosen = raw - if c.options.Gzip && size >= 1024 { - if _, err = file.Seek(0, 0); err != nil { - return record, "", err - } - compressed, err := c.root.OpenFile("tmp/"+token+".gz", os.O_CREATE|os.O_EXCL|os.O_RDWR, 0600) - if err != nil { - return record, "", err - } - defer compressed.Close() - started := time.Now() - writer, err := gzip.NewWriterLevel(compressed, 6) - if err != nil { - return record, "", err - } - _, copyErr := io.Copy(writer, checkedReader{ctx, file}) - closeErr := writer.Close() - if copyErr != nil { - return record, "", copyErr - } - if closeErr != nil { - return record, "", closeErr - } - info, err := compressed.Stat() - if err != nil { - return record, "", err - } - c.transformEvent(ctx, "compress", size, time.Since(started)) - saving := 0.1 - if c.options.Saving != nil { - saving = *c.options.Saving - } - if float64(info.Size()) <= float64(size)*(1-saving) { - record.Encoding = "gzip" - record.File = token + ".gz" - record.Stored = info.Size() - chosen = "tmp/" + token + ".gz" - if err := compressed.Sync(); err != nil { - return record, "", err - } - } - } - if record.Encoding == "identity" { - if err := file.Sync(); err != nil { - return record, "", err - } - } - if ctx.Err() != nil { - return record, "", context.Cause(ctx) - } - return record, chosen, nil -} - -func (c *Cache) publish(ctx context.Context, key, token string, record Record, chosen string) (string, error) { - name, err := blobPath(record) - if err != nil { - return "", err - } - if err = c.root.MkdirAll(path.Dir(name), 0700); err != nil { - return "", err - } - checkLease := func(tx *sql.Tx) error { - var alive bool - if err := tx.QueryRowContext(ctx, "SELECT EXISTS(SELECT 1 FROM fills WHERE key=? AND token=? AND expires>?)", key, token, c.now().UnixMilli()).Scan(&alive); err != nil { - return err - } - if !alive { - return ErrFillLeaseLost - } - return nil - } - // Commit recovery metadata before rename. A killed publisher leaves this - // journal and its reservation available to either runtime's recovery code. - if err := c.transaction(ctx, true, func(tx *sql.Tx) error { - if err := checkLease(tx); err != nil { - return err - } - _, err := tx.ExecContext(ctx, "INSERT INTO publications VALUES(?,?,?)", token, record.Digest, record.File) - return err - }); err != nil { - return "", err - } - pin, err := newToken() - if err != nil { - return "", err - } - duplicate := false - err = c.transaction(ctx, true, func(tx *sql.Tx) error { - if err := checkLease(tx); err != nil { - return err - } - if err := tx.QueryRowContext(ctx, "SELECT EXISTS(SELECT 1 FROM blobs WHERE digest=?)", record.Digest).Scan(&duplicate); err != nil { - return err - } - if !duplicate { - // Keep recovery and lease renewal out of the rename/publication window. - if err := c.root.Rename(chosen, name); err != nil { - return err - } - file, err := c.root.Open(name) - if err != nil { - return err - } - allocated, err := allocatedBytes(file) - file.Close() - if err != nil { - return err - } - if _, err := tx.ExecContext(ctx, "INSERT INTO blobs VALUES(?,?,?,?,?,?,?)", record.Digest, record.File, record.Size, record.Stored, record.Encoding, c.now().UnixMilli(), allocated); err != nil { - return err - } - } - if _, err := tx.ExecContext(ctx, "INSERT INTO aliases VALUES(?,?) ON CONFLICT(key) DO UPDATE SET digest=excluded.digest", key, record.Digest); err != nil { - return err - } - if _, err := tx.ExecContext(ctx, `DELETE FROM aliases WHERE rowid IN(SELECT rowid FROM aliases ORDER BY rowid LIMIT MAX(0,(SELECT aliases FROM summary WHERE id=1)-200000))`); err != nil { - return err - } - // Pin before releasing the transaction. Maintenance must not evict the blob - // between publication and opening the caller's reader. - _, err := tx.ExecContext(ctx, "INSERT INTO readers VALUES(?,?,?)", pin, record.Digest, c.now().Add(readerLease).UnixMilli()) - return err - }) - if err != nil { - c.releaseReader(pin) - return "", err - } - if duplicate { - c.emit(ctx, "deduplicated", record.Stored, 0) - } - c.emit(ctx, "fill", record.Size, 0) - stored := record.Stored - if duplicate { - stored = 0 - } - c.emit(ctx, "stored", stored, 0) - return pin, nil -} - -func (c *Cache) cleanupFill(key, token string, candidate *Record) error { - ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second) - defer cancel() - return c.transaction(ctx, true, func(tx *sql.Tx) error { - if candidate != nil { - var indexed bool - if err := tx.QueryRowContext(ctx, "SELECT EXISTS(SELECT 1 FROM blobs WHERE file=?)", candidate.File).Scan(&indexed); err != nil { - return err - } - if !indexed { - name, err := blobPath(*candidate) - if err != nil { - return err - } - if err = c.removePayload(name); err != nil { - return err - } - } - } - for _, suffix := range []string{"raw", "gz"} { - if err := c.removePayload("tmp/" + token + "." + suffix); err != nil { - return err - } - } - if _, err := tx.ExecContext(ctx, "DELETE FROM publications WHERE token=?", token); err != nil { - return err - } - _, err := tx.ExecContext(ctx, "DELETE FROM fills WHERE key=? AND token=?", key, token) - return err - }) -} diff --git a/backend/internal/blobcache/fill_test.go b/backend/internal/blobcache/fill_test.go deleted file mode 100644 index aa82202..0000000 --- a/backend/internal/blobcache/fill_test.go +++ /dev/null @@ -1,376 +0,0 @@ -package blobcache - -import ( - "bufio" - "bytes" - "context" - "errors" - "fmt" - "io" - "math" - "os" - "os/exec" - "reflect" - "strings" - "sync" - "sync/atomic" - "testing" - "time" -) - -func producer(body string) Producer { - return func(context.Context) (io.ReadCloser, error) { return io.NopCloser(strings.NewReader(body)), nil } -} -func readFilled(t *testing.T, reader *Reader, err error) string { - t.Helper() - if err != nil || reader == nil { - t.Fatal(reader, err) - } - data, err := io.ReadAll(reader) - reader.Close() - if err != nil { - t.Fatal(err) - } - return string(data) -} -func assertFillClean(t *testing.T, c *Cache) { - t.Helper() - stats, err := c.Stats(t.Context()) - if err != nil || stats.ReservedBytes != 0 || stats.ActiveReaders != 0 || countRows(t, c, "fills") != 0 || countRows(t, c, "publications") != 0 { - t.Fatal("fill state leaked", stats, err) - } - file, err := c.root.Open("tmp") - if err != nil { - t.Fatal(err) - } - entries, err := file.ReadDir(-1) - file.Close() - if err != nil || len(entries) != 0 { - t.Fatal("spools leaked", entries, err) - } -} - -func TestFillPublicationAndDeduplication(t *testing.T) { - cache := openTestCache(t, t.TempDir()) - cache.options.Gzip = true - var eventsMu sync.Mutex - events := map[string]int{} - cache.options.Observe = func(event Event) { eventsMu.Lock(); events[event.Name]++; eventsMu.Unlock() } - body := strings.Repeat("go shared payload\n", 150) - verify := func(ctx context.Context, proof Proof) (string, error) { - if proof.Size != int64(len(body)) || len(proof.GitSHA) != 40 || len(proof.SHA256) != 64 { - t.Error(proof) - } - return "git-" + proof.GitSHA, nil - } - reader, err := cache.GetOrFill(t.Context(), "go-alias", producer(body), verify, nil) - if err != nil || reader == nil { - t.Fatal(reader, err) - } - record := reader.Record() - if record.Encoding != "gzip" || record.Stored >= record.Size { - t.Fatal(record) - } - if got := readFilled(t, reader, nil); got != body { - t.Fatal(got) - } - reader, err = cache.GetOrFill(t.Context(), "second-alias", producer(body), verify, nil) - if got := readFilled(t, reader, err); got != body { - t.Fatal(got) - } - stats, err := cache.Stats(t.Context()) - if err != nil || stats.Blobs != 1 || countRows(t, cache, "aliases") != 2 { - t.Fatal(stats, err) - } - // A hit must outlive the fill operation's internal cancellation and must not - // invoke a producer, even when its stale hint exceeds current admission limits. - hint := cache.options.MaxObject + 1 - reader, err = cache.GetOrFill(t.Context(), "go-alias", func(context.Context) (io.ReadCloser, error) { t.Error("producer called on hit"); return nil, nil }, nil, &hint) - if got := readFilled(t, reader, err); got != body { - t.Fatal(got) - } - assertFillClean(t, cache) - eventsMu.Lock() - defer eventsMu.Unlock() - for _, name := range []string{"source_fill", "source_deduplicated", "source_hit", "source_miss", "compress", "decompress", "source_reuse_1h"} { - if events[name] == 0 { - t.Error("missing metric", name, events) - } - } -} - -func TestFillFailuresAndAdmission(t *testing.T) { - for _, kind := range []string{"large-hint", "large-stream", "producer", "verify", "false-digest", "invalid-digest", "budget", "disk", "timeout", "wait-timeout", "lease-lost"} { - t.Run(kind, func(t *testing.T) { - cache := openTestCache(t, t.TempDir()) - produce := producer("data") - var verify Verifier - var hint *int64 - sentinel := errors.New("fixture_failure") - switch kind { - case "large-hint": - n := cache.options.MaxObject + 1 - hint = &n - produce = func(context.Context) (io.ReadCloser, error) { t.Error("oversized hint produced"); return nil, nil } - case "large-stream": - produce = producer(strings.Repeat("x", int(cache.options.MaxObject+1))) - case "producer": - produce = func(context.Context) (io.ReadCloser, error) { return nil, sentinel } - case "verify": - verify = func(context.Context, Proof) (string, error) { return "", sentinel } - case "false-digest": - verify = func(context.Context, Proof) (string, error) { return "sha256-" + strings.Repeat("0", 64), nil } - case "invalid-digest": - verify = func(context.Context, Proof) (string, error) { return "../outside", nil } - case "budget": - cache.options.Budget = 1 - case "disk": - cache.options.FreeBytes = math.MaxInt64 - case "timeout": - cache.fillTimeout = 30 * time.Millisecond - produce = func(ctx context.Context) (io.ReadCloser, error) { <-ctx.Done(); return nil, ctx.Err() } - case "wait-timeout": - cache.fillWait = 30 * time.Millisecond - if _, err := cache.db.Exec("INSERT INTO fills VALUES('key','foreign',?,1)", time.Now().Add(time.Hour).UnixMilli()); err != nil { - t.Fatal(err) - } - case "lease-lost": - verify = func(ctx context.Context, proof Proof) (string, error) { - _, err := cache.db.Exec("UPDATE fills SET expires=1 WHERE key='key'") - return "sha256-" + proof.SHA256, err - } - } - reader, err := cache.GetOrFill(t.Context(), "key", produce, verify, hint) - if err == nil || reader != nil { - t.Fatal("failure published", reader, err) - } - if kind == "timeout" && !errors.Is(err, errFillTimeout) { - t.Fatal(err) - } - if kind == "lease-lost" && !errors.Is(err, ErrFillLeaseLost) { - t.Fatal(err) - } - if kind == "producer" || kind == "verify" { - if !errors.Is(err, sentinel) { - t.Fatal(err) - } - } - if kind == "large-hint" || kind == "large-stream" || kind == "budget" || kind == "disk" || kind == "wait-timeout" { - var admission *AdmissionError - if !errors.As(err, &admission) { - t.Fatal("not an admission error", err) - } - } - if countRows(t, cache, "blobs") != 0 || countRows(t, cache, "aliases") != 0 { - t.Fatal("failed content indexed") - } - if kind == "wait-timeout" { - if countRows(t, cache, "fills") != 1 { - t.Fatal("foreign fill removed") - } - cache.db.Exec("DELETE FROM fills") - } - assertFillClean(t, cache) - }) - } -} - -func TestFillCoordinationAcrossConnections(t *testing.T) { - root := t.TempDir() - first := openTestCache(t, root) - second := openTestCache(t, root) - var calls atomic.Int64 - produce := func(ctx context.Context) (io.ReadCloser, error) { - calls.Add(1) - select { - case <-ctx.Done(): - return nil, ctx.Err() - case <-time.After(100 * time.Millisecond): - return io.NopCloser(strings.NewReader("one producer")), nil - } - } - start := make(chan struct{}) - var work sync.WaitGroup - for i := 0; i < 6; i++ { - cache := first - if i%2 != 0 { - cache = second - } - work.Go(func() { - <-start - reader, err := cache.GetOrFill(t.Context(), "shared-key", produce, nil, nil) - if err != nil || reader == nil { - t.Error(reader, err) - return - } - data, err := io.ReadAll(reader) - reader.Close() - if err != nil || string(data) != "one producer" { - t.Error(string(data), err) - } - }) - } - close(start) - work.Wait() - if calls.Load() != 1 { - t.Fatal("duplicate producers", calls.Load()) - } - assertFillClean(t, first) -} - -func TestCacheCloseCancelsFill(t *testing.T) { - for _, blocked := range []string{"producer", "stream", "verifier"} { - t.Run(blocked, func(t *testing.T) { - cache := openTestCache(t, t.TempDir()) - entered := make(chan struct{}) - done := make(chan error, 1) - produce := producer("data") - var verify Verifier - switch blocked { - case "producer": - produce = func(ctx context.Context) (io.ReadCloser, error) { close(entered); <-ctx.Done(); return nil, ctx.Err() } - case "stream": - input, output := io.Pipe() - defer output.Close() - produce = func(context.Context) (io.ReadCloser, error) { close(entered); return input, nil } - case "verifier": - verify = func(ctx context.Context, proof Proof) (string, error) { - close(entered) - <-ctx.Done() - return "", ctx.Err() - } - } - go func() { - reader, err := cache.GetOrFill(t.Context(), "key", produce, verify, nil) - if reader != nil { - reader.Close() - } - done <- err - }() - select { - case <-entered: - case <-time.After(3 * time.Second): - t.Fatal("fill did not enter") - } - closed := make(chan error, 1) - go func() { closed <- cache.Close() }() - select { - case err := <-closed: - if err != nil { - t.Fatal(err) - } - case <-time.After(3 * time.Second): - t.Fatal("cache close blocked") - } - if err := <-done; !errors.Is(err, os.ErrClosed) { - t.Fatal(err) - } - other := openTestCache(t, cache.options.Root) - assertFillClean(t, other) - }) - } -} - -func TestFillIdentityAndSizeBoundaries(t *testing.T) { - for _, size := range []int{0, 1023, 1024, 4096} { - t.Run(fmt.Sprint(size), func(t *testing.T) { - cache := openTestCache(t, t.TempDir()) - cache.options.Gzip = true - body := bytes.Repeat([]byte("x"), size) - reader, err := cache.GetOrFill(t.Context(), "key", producer(string(body)), nil, nil) - if err != nil || reader == nil { - t.Fatal(reader, err) - } - if size < 1024 && reader.Record().Encoding != "identity" { - t.Fatal(reader.Record()) - } - if got := readFilled(t, reader, nil); got != string(body) { - t.Fatal(len(got), size) - } - assertFillClean(t, cache) - }) - } -} - -func TestFillNodeReadsGoPublications(t *testing.T) { - root := t.TempDir() - cache := openTestCache(t, root) - cache.options.Gzip = true - for _, fixture := range []struct { - key, body string - git bool - }{ - {"go-identity", "identity from Go", true}, - {"go-gzip", strings.Repeat("Go gzip payload\n", 150), false}, - } { - var verify Verifier - if fixture.git { - verify = func(_ context.Context, proof Proof) (string, error) { return "git-" + proof.GitSHA, nil } - } - reader, err := cache.GetOrFill(t.Context(), fixture.key, producer(fixture.body), verify, nil) - if got := readFilled(t, reader, err); got != fixture.body { - t.Fatal(got) - } - } - assertFillClean(t, cache) - nodeStats, _ := nodeIndex(t, "read-go", root) - goStats, err := cache.Stats(t.Context()) - if err != nil || !reflect.DeepEqual(nodeStats, goStats) { - t.Fatal(nodeStats, goStats, err) - } - assertFillClean(t, cache) -} - -func TestFillNodeWaitsForGoProducer(t *testing.T) { - if _, err := exec.LookPath("node"); err != nil { - t.Skip("requires Node") - } - root := t.TempDir() - cache := openTestCache(t, root) - entered, release := make(chan struct{}), make(chan struct{}) - var releaseOnce sync.Once - unblock := func() { releaseOnce.Do(func() { close(release) }) } - defer unblock() - completed := make(chan error, 1) - go func() { - reader, err := cache.GetOrFill(t.Context(), "shared-process-key", func(ctx context.Context) (io.ReadCloser, error) { - close(entered) - select { - case <-ctx.Done(): - return nil, ctx.Err() - case <-release: - } - return io.NopCloser(strings.NewReader("one cross-process producer")), nil - }, nil, nil) - if err == nil { - _, err = io.Copy(io.Discard, reader) - reader.Close() - } - completed <- err - }() - <-entered - ctx, cancel := context.WithTimeout(t.Context(), 30*time.Second) - defer cancel() - command := exec.CommandContext(ctx, "node", "../../scripts/test-blob-index.cjs", "wait-go", root) - var stderr bytes.Buffer - command.Stderr = &stderr - stdout, err := command.StdoutPipe() - if err != nil { - t.Fatal(err) - } - if err := command.Start(); err != nil { - t.Fatal(err) - } - output := bufio.NewReader(stdout) - signal, err := output.ReadString('\n') - unblock() - remaining, readErr := io.ReadAll(output) - waitErr := command.Wait() - if err != nil || signal != "waiting\n" || readErr != nil || waitErr != nil { - t.Fatal(signal, string(remaining), err, readErr, waitErr, stderr.String()) - } - if err := <-completed; err != nil { - t.Fatal(err) - } - assertFillClean(t, cache) -} diff --git a/backend/internal/blobcache/index.go b/backend/internal/blobcache/index.go deleted file mode 100644 index a9e2ffb..0000000 --- a/backend/internal/blobcache/index.go +++ /dev/null @@ -1,324 +0,0 @@ -// Package blobcache implements the shared filesystem cache index used by the -// TypeScript backend. The schema includes content and lease metadata; the -// methods expose accounting, transformation decisions, leased readers, bounded -// fills and recovery. Callers must authorize access before using cached content. -package blobcache - -import ( - "context" - "database/sql" - _ "embed" - "errors" - "math" - "net/url" - "os" - "path/filepath" - "sync" - "time" - - "modernc.org/sqlite" -) - -//go:embed schema.sql -var schema string - -type Options struct { - Root string - Budget, MaxObject int64 - Gzip bool - Saving, LowWater *float64 - FreeBytes int64 - Name string - Observe func(Event) - Stage func(context.Context, string, time.Duration, error) -} - -type Cache struct { - db *sql.DB - options Options - now func() time.Time - root *os.Root - lifecycle sync.RWMutex - closed bool - readersMu sync.Mutex - readers map[*Reader]struct{} - closeOnce sync.Once - closeErr error - readerHeartbeat time.Duration - fillHeartbeat time.Duration - fillTimeout time.Duration - fillWait time.Duration - fillsMu sync.Mutex - fills map[*fillOperation]struct{} -} - -func New(ctx context.Context, options Options) (*Cache, error) { - if options.Budget <= 0 || options.MaxObject <= 0 || options.MaxObject > (math.MaxInt64-1024)/3 || options.FreeBytes < 0 { - return nil, errors.New("invalid_cache_budget") - } - for _, value := range []*float64{options.Saving, options.LowWater} { - if value != nil && (math.IsNaN(*value) || math.IsInf(*value, 0) || *value < 0 || *value > 1) { - return nil, errors.New("invalid_cache_options") - } - } - if options.Name == "" { - options.Name = "source" - } - root, err := filepath.Abs(options.Root) - if err != nil { - return nil, err - } - options.Root = root - if err := os.MkdirAll(filepath.Join(root, "tmp"), 0700); err != nil { - return nil, err - } - index := filepath.Join(root, "index.sqlite") - // Never open and close an existing index outside SQLite: POSIX file locks - // can be released by closing another descriptor for the same inode. - file, err := os.OpenFile(index, os.O_CREATE|os.O_EXCL|os.O_RDWR, 0600) - if err != nil && !errors.Is(err, os.ErrExist) { - return nil, err - } - if err == nil { - if err = file.Close(); err != nil { - return nil, err - } - } - // Apply connection-local settings to every connection, including replacements. - location := url.URL{Scheme: "file", Path: index} - params := url.Values{"_txlock": {"immediate"}, "_pragma": {"busy_timeout(50)", "foreign_keys(ON)", "recursive_triggers(ON)", "synchronous(NORMAL)"}} - location.RawQuery = params.Encode() - db, err := sql.Open("sqlite", location.String()) - if err != nil { - return nil, err - } - db.SetMaxOpenConns(1) - db.SetMaxIdleConns(1) - rootHandle, err := os.OpenRoot(root) - if err != nil { - db.Close() - return nil, err - } - cache := &Cache{db: db, options: options, now: time.Now, root: rootHandle, readers: map[*Reader]struct{}{}, readerHeartbeat: 30 * time.Second, fillHeartbeat: 30 * time.Second, fillTimeout: 120 * time.Second, fillWait: 120 * time.Second, fills: map[*fillOperation]struct{}{}} - if err := cache.initialize(ctx); err != nil { - rootHandle.Close() - db.Close() - return nil, err - } - return cache, nil -} - -// Connection pragmas and switching a new database to WAL may return BUSY -// before SQLite's busy handler can wait. Initialization only performs -// idempotent SQL and rolls back failed transactions, so retry the whole attempt. -func (c *Cache) initialize(ctx context.Context) error { - work, cancel := context.WithTimeout(ctx, 5*time.Second) - defer cancel() - for { - err := c.initializeAttempt(work) - if err == nil { - return nil - } - if work.Err() != nil { - return context.Cause(work) - } - var sqliteErr *sqlite.Error - if !errors.As(err, &sqliteErr) || sqliteErr.Code()&255 != 5 { - return err - } - select { - case <-work.Done(): - return context.Cause(work) - case <-time.After(10 * time.Millisecond): - } - } -} - -func (c *Cache) initializeAttempt(ctx context.Context) error { - conn, err := c.db.Conn(ctx) - if err != nil { - return err - } - defer conn.Close() - if _, err = conn.ExecContext(ctx, "PRAGMA busy_timeout=50; PRAGMA journal_mode=WAL;"); err != nil { - return err - } - // Contending processes may hold the writer lock longer than busy_timeout. - // Retry only BEGIN, never fn: callbacks can rename or remove payload files. - deadline := time.NewTimer(2 * time.Second) - defer deadline.Stop() - var tx *sql.Tx - for { - tx, err = conn.BeginTx(ctx, nil) - if err == nil { - break - } - var sqliteErr *sqlite.Error - if !errors.As(err, &sqliteErr) || sqliteErr.Code()&255 != 5 { - return err - } - select { - case <-ctx.Done(): - return context.Cause(ctx) - case <-deadline.C: - return err - case <-time.After(10 * time.Millisecond): - } - } - defer tx.Rollback() - if _, err = tx.ExecContext(ctx, schema); err != nil { - return err - } - // Backfill pre-summary TypeScript databases exactly once, under the same - // write lock as schema creation. Existing counters must not be reset. - if _, err = tx.ExecContext(ctx, `INSERT INTO totals SELECT 1,COALESCE(SUM(allocated),0) FROM blobs - HAVING NOT EXISTS(SELECT 1 FROM totals WHERE id=1); - INSERT INTO summary SELECT 1,COUNT(*),COALESCE(SUM(size),0),COALESCE(SUM(stored),0),COALESCE(SUM(allocated),0), - (SELECT COUNT(*) FROM readers),(SELECT COUNT(*) FROM decisions),(SELECT COUNT(*) FROM aliases),(SELECT COUNT(*) FROM history),(SELECT COALESCE(SUM(reserved),0) FROM fills) - FROM blobs HAVING NOT EXISTS(SELECT 1 FROM summary WHERE id=1);`); err != nil { - return err - } - if err = tx.Commit(); err != nil { - return err - } - _, err = conn.ExecContext(ctx, "PRAGMA busy_timeout=50;") - return err -} - -// transaction reserves one connection for the entire synchronous-mode change. -// SQLite cannot change synchronous inside a transaction. FULL is required by -// the fill/publication protocol before creating or renaming payload files. -func (c *Cache) transaction(ctx context.Context, durable bool, fn func(*sql.Tx) error) (err error) { - conn, err := c.db.Conn(ctx) - if err != nil { - return err - } - defer conn.Close() - if durable { - if _, err = conn.ExecContext(ctx, "PRAGMA synchronous=FULL"); err != nil { - return err - } - defer func() { - cleanup, cancel := context.WithTimeout(context.Background(), time.Second) - defer cancel() - _, resetErr := conn.ExecContext(cleanup, "PRAGMA synchronous=NORMAL") - if err == nil { - err = resetErr - } - }() - } - // Contending processes may hold the writer lock longer than busy_timeout. - // Retry only BEGIN, never fn: callbacks can rename or remove payload files. - deadline := time.NewTimer(2 * time.Second) - defer deadline.Stop() - var tx *sql.Tx - for { - tx, err = conn.BeginTx(ctx, nil) - if err == nil { - break - } - var sqliteErr *sqlite.Error - if !errors.As(err, &sqliteErr) || sqliteErr.Code()&255 != 5 { - return err - } - select { - case <-ctx.Done(): - return context.Cause(ctx) - case <-deadline.C: - return err - case <-time.After(10 * time.Millisecond): - } - } - defer tx.Rollback() - if err = fn(tx); err != nil { - return err - } - return tx.Commit() -} - -func (c *Cache) Close() error { - c.closeOnce.Do(func() { - c.lifecycle.Lock() - c.closed = true - c.fillsMu.Lock() - fills := make([]*fillOperation, 0, len(c.fills)) - for fill := range c.fills { - fills = append(fills, fill) - } - c.fillsMu.Unlock() - c.readersMu.Lock() - readers := make([]*Reader, 0, len(c.readers)) - for reader := range c.readers { - readers = append(readers, reader) - } - c.readersMu.Unlock() - c.lifecycle.Unlock() - for _, fill := range fills { - fill.cancel(os.ErrClosed) - } - for _, reader := range readers { - reader.Close() - } - for _, fill := range fills { - <-fill.done - } - c.closeErr = errors.Join(c.db.Close(), c.root.Close()) - }) - return c.closeErr -} - -type Stats struct { - Blobs int64 `json:"blobs"` - OriginalBytes int64 `json:"originalBytes"` - StoredBytes int64 `json:"storedBytes"` - AllocatedBytes int64 `json:"allocatedBytes"` - ActiveReaders int64 `json:"activeReaders"` - Decisions int64 `json:"decisions"` - ReservedBytes int64 `json:"reservedBytes"` - BudgetBytes int64 `json:"budgetBytes"` - MaxObjectBytes int64 `json:"maxObjectBytes"` - OldestAccess *int64 `json:"oldestAccess"` -} - -func (c *Cache) Stats(ctx context.Context) (Stats, error) { - result := Stats{BudgetBytes: c.options.Budget, MaxObjectBytes: c.options.MaxObject} - err := c.db.QueryRowContext(ctx, `SELECT blobs,originalBytes,storedBytes,allocatedBytes,activeReaders,decisions,reservedBytes, - (SELECT accessed FROM blobs ORDER BY accessed LIMIT 1) FROM summary WHERE id=1`).Scan(&result.Blobs, &result.OriginalBytes, &result.StoredBytes, &result.AllocatedBytes, &result.ActiveReaders, &result.Decisions, &result.ReservedBytes, &result.OldestAccess) - return result, err -} - -type Decision struct { - Digest string `json:"digest"` - Changed bool `json:"changed"` -} - -func (c *Cache) Decision(ctx context.Context, key string) (*Decision, error) { - now := c.now().UnixMilli() - var result Decision - var changed int64 - err := c.db.QueryRowContext(ctx, "SELECT digest,changed FROM decisions WHERE key=? AND expires>?", key, now).Scan(&result.Digest, &changed) - if errors.Is(err, sql.ErrNoRows) { - return nil, nil - } - if err != nil { - return nil, err - } - result.Changed = changed != 0 - _, err = c.db.ExecContext(ctx, "UPDATE decisions SET accessed=? WHERE key=? AND accessed time.Second { - t.Fatal("initialization ignored cancellation", err, time.Since(started)) - } - if err := holder.Rollback(); err != nil { - t.Fatal(err) - } - decision, err := first.Decision(t.Context(), "preserved") - if err != nil || decision == nil || decision.Digest != "source-digest" { - t.Fatal("failed initialization changed index", decision, err) - } -} diff --git a/backend/internal/blobcache/maintenance.go b/backend/internal/blobcache/maintenance.go deleted file mode 100644 index 9beb26b..0000000 --- a/backend/internal/blobcache/maintenance.go +++ /dev/null @@ -1,298 +0,0 @@ -package blobcache - -import ( - "context" - "database/sql" - "errors" - "io" - "os" - "path" - "regexp" - "time" -) - -var validFillToken = regexp.MustCompile(`^[a-zA-Z0-9-]{1,128}$`) -var errCachePayloadNotFile = errors.New("cache_payload_not_file") - -func (c *Cache) removePayload(name string) error { - info, err := c.root.Lstat(name) - if errors.Is(err, os.ErrNotExist) { - return nil - } - if err != nil { - return err - } - if info.IsDir() { - return errCachePayloadNotFile - } - err = c.root.Remove(name) - if errors.Is(err, os.ErrNotExist) { - return nil - } - return err -} - -// expire runs under the caller's write transaction. Unlinking files precedes -// releasing their reservation; a failed transaction can overcount disk usage, -// but it cannot forget a producer's remaining files. -func (c *Cache) expire(ctx context.Context, tx *sql.Tx) error { - now := c.now().UnixMilli() - for { - rows, err := tx.QueryContext(ctx, "SELECT key,token FROM fills WHERE expires now { - return nil - } - if _, err = tx.ExecContext(ctx, "INSERT OR REPLACE INTO maintenance VALUES(1,?)", claim); err != nil { - return err - } - scan = true - return nil - }); err != nil { - return err - } - if !scan { - return nil - } - if err := c.scanOrphans(ctx, "blobs", 0); err != nil { - // A partial scan must be retryable. A stale scanner cannot clear a newer - // process's claim after its own one-hour interval has elapsed. - cleanup, cancel := context.WithTimeout(context.Background(), time.Second) - defer cancel() - c.db.ExecContext(cleanup, "UPDATE maintenance SET nextScan=? WHERE id=1 AND nextScan=?", now, claim) - return err - } - return nil -} - -func (c *Cache) scanOrphans(ctx context.Context, directory string, depth int) error { - if err := ctx.Err(); err != nil { - return err - } - if depth > 64 { - return errors.New("cache_directory_depth_exceeded") - } - info, err := c.root.Lstat(directory) - if errors.Is(err, os.ErrNotExist) { - return nil - } - if err != nil { - return err - } - if !info.IsDir() { - return ErrInvalidRecord - } - dir, err := c.root.Open(directory) - if errors.Is(err, os.ErrNotExist) { - return nil - } - if err != nil { - return err - } - defer dir.Close() - for { - entries, readErr := dir.ReadDir(128) - for _, entry := range entries { - if err := ctx.Err(); err != nil { - return err - } - name := path.Join(directory, entry.Name()) - if entry.IsDir() { - if err := c.scanOrphans(ctx, name, depth+1); err != nil { - return err - } - continue - } - // Lstat inspects links themselves. Orphan cleanup never follows them. - info, err := c.root.Lstat(name) - if errors.Is(err, os.ErrNotExist) { - continue - } - if err != nil { - return err - } - now := c.now() - if now.Sub(info.ModTime()) < time.Hour { - continue - } - if err := c.transaction(ctx, false, func(tx *sql.Tx) error { - var protected bool - if err := tx.QueryRowContext(ctx, `SELECT EXISTS(SELECT 1 FROM blobs WHERE file=?) OR EXISTS( - SELECT 1 FROM publications p JOIN fills f ON p.token=f.token WHERE p.file=? AND f.expires>=?)`, entry.Name(), entry.Name(), now.UnixMilli()).Scan(&protected); err != nil { - return err - } - if protected { - return nil - } - return c.removePayload(name) - }); err != nil { - return err - } - } - if errors.Is(readErr, io.EOF) { - return nil - } - if readErr != nil { - return readErr - } - } -} diff --git a/backend/internal/blobcache/maintenance_test.go b/backend/internal/blobcache/maintenance_test.go deleted file mode 100644 index c56c30b..0000000 --- a/backend/internal/blobcache/maintenance_test.go +++ /dev/null @@ -1,427 +0,0 @@ -package blobcache - -import ( - "context" - "database/sql" - "fmt" - "io" - "os" - "path/filepath" - "reflect" - "strings" - "testing" - "time" -) - -func writeCacheFile(t *testing.T, c *Cache, name string, old bool) { - t.Helper() - if err := c.root.MkdirAll(filepath.Dir(name), 0700); err != nil { - t.Fatal(err) - } - file, err := c.root.OpenFile(name, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, 0600) - if err != nil { - t.Fatal(err) - } - if _, err := file.WriteString("payload"); err != nil { - t.Fatal(err) - } - file.Close() - if old { - stamp := c.now().Add(-2 * time.Hour) - if err := os.Chtimes(filepath.Join(c.options.Root, name), stamp, stamp); err != nil { - t.Fatal(err) - } - } -} - -func countRows(t *testing.T, c *Cache, table string) int { - t.Helper() - var count int - if err := c.db.QueryRow("SELECT COUNT(*) FROM " + table).Scan(&count); err != nil { - t.Fatal(err) - } - return count -} - -func TestNodeMaintenanceParity(t *testing.T) { - nodeRoot, goRoot := t.TempDir(), t.TempDir() - nodeIndex(t, "seed-maintenance", nodeRoot) - nodeIndex(t, "seed-maintenance", goRoot) - expected, _ := nodeIndex(t, "maintain", nodeRoot) - cache := openTestCache(t, goRoot) - cache.options.Budget = 4096 - if err := cache.Maintain(t.Context()); err != nil { - t.Fatal(err) - } - actual, err := cache.Stats(t.Context()) - if err != nil || !reflect.DeepEqual(actual, expected) { - t.Fatal(actual, expected, err) - } - for _, key := range []string{"node-alias", "node-identity", "node-third"} { - var evicted int - if err := cache.db.QueryRow("SELECT evicted FROM history WHERE key=?", key).Scan(&evicted); err != nil { - t.Fatal(err) - } - expected := 1 - if key == "node-third" { - expected = 0 - } - if evicted != expected { - t.Fatal(key, evicted, expected) - } - } - nodeIndex(t, "inspect", goRoot) -} - -func TestMaintenanceHonorsReadersAndReservations(t *testing.T) { - root := t.TempDir() - nodeIndex(t, "seed-maintenance", root) - cache := openTestCache(t, root) - reader, err := cache.Lookup(t.Context(), "node-alias") - if err != nil || reader == nil { - t.Fatal(reader, err) - } - defer reader.Close() - // The live reservation consumes the entire budget. Only the reader-pinned - // blob may remain; maintenance cannot reclaim that space yet. - if _, err := cache.db.Exec("INSERT INTO fills VALUES('live','live-token',?,65536)", time.Now().Add(time.Hour).UnixMilli()); err != nil { - t.Fatal(err) - } - if err := cache.Maintain(t.Context()); err != nil { - t.Fatal(err) - } - stats, err := cache.Stats(t.Context()) - if err != nil || stats.Blobs != 1 || stats.ActiveReaders != 1 || stats.ReservedBytes != 65536 { - t.Fatal(stats, err) - } - reader.Close() - if err := cache.Maintain(t.Context()); err != nil { - t.Fatal(err) - } - stats, err = cache.Stats(t.Context()) - if err != nil || stats.Blobs != 0 || stats.ReservedBytes != 65536 { - t.Fatal(stats, err) - } -} - -func TestExpiredFillRecovery(t *testing.T) { - for _, kind := range []string{"unindexed", "indexed", "blocked-spool", "blocked-publication", "unsafe-token", "unsafe-publication"} { - t.Run(kind, func(t *testing.T) { - cache := openTestCache(t, t.TempDir()) - record := seedBlob(t, cache, []byte("published"), false) - token := "dead-token" - file := "dead.raw" - digest := record.Digest - if kind == "indexed" { - file = record.File - } - if kind == "unsafe-token" { - token = "../../outside" - } - if kind == "unsafe-publication" { - file = "../../outside.raw" - } - name, _ := blobLocation(digest, "dead.raw") - if kind != "indexed" { - writeCacheFile(t, cache, name, false) - } - if kind == "blocked-publication" { - cache.root.Remove(name) - cache.root.MkdirAll(name, 0700) - } - if kind != "unsafe-token" { - writeCacheFile(t, cache, "tmp/"+token+".raw", false) - writeCacheFile(t, cache, "tmp/"+token+".gz", false) - } - if kind == "blocked-spool" { - cache.root.Remove("tmp/" + token + ".raw") - cache.root.MkdirAll("tmp/"+token+".raw", 0700) - } - if _, err := cache.db.Exec("INSERT INTO fills VALUES('dead',?,?,13312)", token, time.Now().Add(-time.Second).UnixMilli()); err != nil { - t.Fatal(err) - } - if _, err := cache.db.Exec("INSERT INTO publications VALUES(?,?,?)", token, digest, file); err != nil { - t.Fatal(err) - } - err := cache.Maintain(t.Context()) - failed := strings.HasPrefix(kind, "blocked") || strings.HasPrefix(kind, "unsafe") - if failed { - if err == nil { - t.Fatal("failed file deletion released reservation") - } - stats, statsErr := cache.Stats(t.Context()) - if statsErr != nil || stats.ReservedBytes != 13312 || countRows(t, cache, "publications") != 1 { - t.Fatal(stats, statsErr) - } - if strings.HasPrefix(kind, "unsafe") { - return - } - if kind == "blocked-spool" { - cache.root.Remove("tmp/" + token + ".raw") - } else { - cache.root.Remove(name) - } - err = cache.Maintain(t.Context()) - } - if err != nil { - t.Fatal(err) - } - stats, err := cache.Stats(t.Context()) - if err != nil || stats.ReservedBytes != 0 || countRows(t, cache, "publications") != 0 || stats.Blobs != 1 { - t.Fatal(stats, err) - } - for _, suffix := range []string{"raw", "gz"} { - if _, err := cache.root.Lstat("tmp/" + token + "." + suffix); !os.IsNotExist(err) { - t.Fatal("spool survived", suffix, err) - } - } - reader, err := cache.Open(t.Context(), record.Digest, false) - if err != nil || reader == nil { - t.Fatal("indexed publication removed", reader, err) - } - reader.Close() - }) - } -} - -func TestMaintenanceExpiryBoundariesAndBatches(t *testing.T) { - cache := openTestCache(t, t.TempDir()) - now := time.Now().Truncate(time.Millisecond) - cache.now = func() time.Time { return now } - err := cache.transaction(t.Context(), false, func(tx *sql.Tx) error { - for i := 0; i < 300; i++ { - if _, err := tx.Exec("INSERT INTO fills VALUES(?,?,?,1)", fmt.Sprint(i), fmt.Sprintf("token-%d", i), now.UnixMilli()-1); err != nil { - return err - } - if _, err := tx.Exec("INSERT INTO decisions VALUES(?,'digest',0,0,?)", fmt.Sprint(i), now.UnixMilli()-1); err != nil { - return err - } - if _, err := tx.Exec("INSERT INTO history VALUES(?,?,0)", fmt.Sprint(i), now.Add(-7*24*time.Hour).UnixMilli()-1); err != nil { - return err - } - } - for _, stamp := range []int64{now.UnixMilli() - 1, now.UnixMilli(), now.UnixMilli() + 1} { - if _, err := tx.Exec("INSERT INTO readers VALUES(?,'digest',?)", fmt.Sprint(stamp), stamp); err != nil { - return err - } - } - _, err := tx.Exec("INSERT INTO fills VALUES('boundary','boundary',?,1)", now.UnixMilli()) - return err - }) - if err != nil { - t.Fatal(err) - } - if err := cache.Maintain(t.Context()); err != nil { - t.Fatal(err) - } - if countRows(t, cache, "fills") != 1 || countRows(t, cache, "readers") != 2 || countRows(t, cache, "decisions") != 44 || countRows(t, cache, "history") != 44 { - t.Fatal("incorrect expiry boundary or batch") - } - if err := cache.Maintain(t.Context()); err != nil { - t.Fatal(err) - } - if countRows(t, cache, "decisions") != 0 || countRows(t, cache, "history") != 0 { - t.Fatal("second batch not reclaimed") - } -} - -func TestMaintenanceOrphanScan(t *testing.T) { - cache := openTestCache(t, t.TempDir()) - now := time.Now() - cache.now = func() time.Time { return now } - record := seedBlob(t, cache, []byte("indexed"), false) - indexed, _ := blobPath(record) - stamp := now.Add(-2 * time.Hour) - os.Chtimes(filepath.Join(cache.options.Root, indexed), stamp, stamp) - old, _ := blobLocation(record.Digest, "dead.raw") - fresh, _ := blobLocation(record.Digest, "beef.raw") - live, _ := blobLocation(record.Digest, "feed.raw") - writeCacheFile(t, cache, old, true) - writeCacheFile(t, cache, fresh, false) - writeCacheFile(t, cache, live, true) - if _, err := cache.db.Exec("INSERT INTO fills VALUES('live','live-token',?,1)", now.Add(3*time.Hour).UnixMilli()); err != nil { - t.Fatal(err) - } - if _, err := cache.db.Exec("INSERT INTO publications VALUES('live-token',?,?)", record.Digest, "feed.raw"); err != nil { - t.Fatal(err) - } - outside := t.TempDir() - if err := os.WriteFile(filepath.Join(outside, "private"), []byte("private"), 0600); err != nil { - t.Fatal(err) - } - if err := os.Symlink(outside, filepath.Join(cache.options.Root, "blobs", "outside")); err != nil { - t.Fatal(err) - } - if err := cache.Maintain(t.Context()); err != nil { - t.Fatal(err) - } - if _, err := cache.root.Lstat(old); !os.IsNotExist(err) { - t.Fatal("orphan retained", err) - } - for _, name := range []string{indexed, fresh, live} { - if _, err := cache.root.Lstat(name); err != nil { - t.Fatal("live file removed", name, err) - } - } - if data, err := os.ReadFile(filepath.Join(outside, "private")); err != nil || string(data) != "private" { - t.Fatal("followed directory symlink", err) - } - writeCacheFile(t, cache, old, true) - if err := cache.Maintain(t.Context()); err != nil { - t.Fatal(err) - } - if _, err := cache.root.Lstat(old); err != nil { - t.Fatal("hourly claim ignored", err) - } - now = now.Add(time.Hour) - if err := cache.Maintain(t.Context()); err != nil { - t.Fatal(err) - } - if _, err := cache.root.Lstat(old); !os.IsNotExist(err) { - t.Fatal("next scan skipped", err) - } - if _, err := cache.root.Lstat(live); err != nil { - t.Fatal("active publication deleted", err) - } -} - -func TestFailedOrphanScanCanRetry(t *testing.T) { - cache := openTestCache(t, t.TempDir()) - writeCacheFile(t, cache, "blobs", false) - if err := cache.Maintain(t.Context()); err == nil { - t.Fatal("non-directory scan accepted") - } - var next int64 - if err := cache.db.QueryRow("SELECT nextScan FROM maintenance WHERE id=1").Scan(&next); err != nil || next > time.Now().UnixMilli() { - t.Fatal("failed scan retained claim", next, err) - } - cache.root.Remove("blobs") - name := "blobs/orphan.raw" - writeCacheFile(t, cache, name, true) - if err := cache.Maintain(t.Context()); err != nil { - t.Fatal(err) - } - if _, err := cache.root.Lstat(name); !os.IsNotExist(err) { - t.Fatal("retry skipped orphan", err) - } - cancelled, cancel := context.WithCancel(t.Context()) - cancel() - if err := cache.Maintain(cancelled); err == nil { - t.Fatal("cancelled cleanup ran") - } -} - -func TestEvictionBatchLimitAndDeletionFailure(t *testing.T) { - t.Run("bounded batch", func(t *testing.T) { - cache := openTestCache(t, t.TempDir()) - cache.options.Budget = 1 - if err := cache.transaction(t.Context(), false, func(tx *sql.Tx) error { - for i := 1; i <= 513; i++ { - record := Record{Digest: fmt.Sprintf("sha256-%064x", i), File: fmt.Sprintf("%064x.raw", i), Size: 7, Stored: 7, Allocated: 4096, Encoding: "identity", Accessed: int64(i)} - name, err := blobPath(record) - if err != nil { - return err - } - writeCacheFile(t, cache, name, false) - if _, err := tx.Exec("INSERT INTO blobs VALUES(?,?,?,?,?,?,?)", record.Digest, record.File, record.Size, record.Stored, record.Encoding, record.Accessed, record.Allocated); err != nil { - return err - } - } - return nil - }); err != nil { - t.Fatal(err) - } - if err := cache.Maintain(t.Context()); err != nil { - t.Fatal(err) - } - stats, err := cache.Stats(t.Context()) - if err != nil || stats.Blobs != 1 || stats.AllocatedBytes != 4096 || stats.OldestAccess == nil || *stats.OldestAccess != 513 { - t.Fatal(stats, err) - } - if err := cache.Maintain(t.Context()); err != nil { - t.Fatal(err) - } - stats, err = cache.Stats(t.Context()) - if err != nil || stats.Blobs != 0 || stats.AllocatedBytes != 0 { - t.Fatal(stats, err) - } - }) - t.Run("failed deletion retains accounting and tries later candidates", func(t *testing.T) { - cache := openTestCache(t, t.TempDir()) - cache.options.Budget = 4096 - bad := seedBlob(t, cache, []byte("bad"), false) - if _, err := cache.db.Exec("UPDATE aliases SET key='bad'"); err != nil { - t.Fatal(err) - } - seedBlob(t, cache, []byte("good"), false) - name, _ := blobPath(bad) - cache.root.Remove(name) - cache.root.MkdirAll(name, 0700) - if err := cache.Maintain(t.Context()); err != nil { - t.Fatal(err) - } - stats, err := cache.Stats(t.Context()) - if err != nil || stats.Blobs != 1 || stats.AllocatedBytes != 4096 { - t.Fatal(stats, err) - } - var retained string - if err := cache.db.QueryRow("SELECT digest FROM blobs").Scan(&retained); err != nil || retained != bad.Digest { - t.Fatal(retained, err) - } - }) -} - -func TestOrphanScanRejectsSymlinkRoot(t *testing.T) { - cache := openTestCache(t, t.TempDir()) - // Even an in-root link must not redirect the blob scan into index or spool - // files. Nested links are unlinked as entries, never traversed. - if err := os.Symlink(".", filepath.Join(cache.options.Root, "blobs")); err != nil { - t.Fatal(err) - } - if err := cache.Maintain(t.Context()); err == nil { - t.Fatal("followed symlink scan root") - } - if _, err := cache.Stats(t.Context()); err != nil { - t.Fatal("index damaged", err) - } -} - -func TestRecoverKilledNodePublisher(t *testing.T) { - root := t.TempDir() - before, _ := nodeIndex(t, "crash-publisher", root) - if before.ReservedBytes == 0 || before.Blobs != 0 { - t.Fatal("publisher did not stop before indexing", before) - } - cache := openTestCache(t, root) - var digest, file string - if err := cache.db.QueryRow("SELECT digest,file FROM publications").Scan(&digest, &file); err != nil { - t.Fatal(err) - } - name, err := blobLocation(digest, file) - if err != nil { - t.Fatal(err) - } - if info, err := cache.root.Stat(name); err != nil || info.Size() == 0 { - t.Fatal("renamed payload missing", err) - } - if err := cache.Maintain(t.Context()); err != nil { - t.Fatal(err) - } - if _, err := cache.root.Stat(name); !os.IsNotExist(err) { - t.Fatal("crashed publication retained", err) - } - after, err := cache.Stats(t.Context()) - if err != nil || after.ReservedBytes != 0 || after.Blobs != 0 || countRows(t, cache, "publications") != 0 { - t.Fatal(after, err) - } - nodeIndex(t, "refill", root) - reader, err := cache.Lookup(t.Context(), "multiprocess") - if err != nil || reader == nil { - t.Fatal(reader, err) - } - data, err := io.ReadAll(reader) - reader.Close() - if err != nil || string(data) != "recovered" { - t.Fatal(string(data), err) - } -} diff --git a/backend/internal/blobcache/reader.go b/backend/internal/blobcache/reader.go deleted file mode 100644 index ca4452a..0000000 --- a/backend/internal/blobcache/reader.go +++ /dev/null @@ -1,334 +0,0 @@ -package blobcache - -import ( - "compress/flate" - "compress/gzip" - "context" - "crypto/rand" - "database/sql" - "encoding/hex" - "errors" - "io" - "math" - "os" - "path" - "regexp" - "strings" - "sync" - "time" -) - -var validDigest = regexp.MustCompile(`^(git-[a-f0-9]{40}|sha256-[a-f0-9]{64})$`) -var validBlobFile = regexp.MustCompile(`^[a-f0-9-]+\.(gz|raw)$`) -var ErrInvalidRecord = errors.New("invalid_blob_record") -var ErrReaderLeaseLost = errors.New("cache_reader_lease_lost") -var errBlobSize = errors.New("corrupt_blob_size") - -const readerLease = 120 * time.Second - -type Record struct { - Digest string `json:"digest"` - File string `json:"file"` - Size int64 `json:"size"` - Stored int64 `json:"stored"` - Allocated int64 `json:"allocated"` - Encoding string `json:"encoding"` - Accessed int64 `json:"accessed"` -} - -func blobLocation(digest, file string) (string, error) { - if !validDigest.MatchString(digest) || len(file) > 128 || !validBlobFile.MatchString(file) { - return "", ErrInvalidRecord - } - hex := strings.SplitN(digest, "-", 2)[1] - return path.Join("blobs", hex[:2], digest, file), nil -} - -func blobPath(record Record) (string, error) { - if record.Size < 0 || record.Size == math.MaxInt64 || record.Stored < 0 || record.Stored == math.MaxInt64 || record.Allocated < 0 || - (record.Encoding != "identity" && record.Encoding != "gzip") { - return "", ErrInvalidRecord - } - return blobLocation(record.Digest, record.File) -} - -func newToken() (string, error) { - var token [32]byte - if _, err := rand.Read(token[:]); err != nil { - return "", err - } - return hex.EncodeToString(token[:]), nil -} - -// Open pins the exact published record before opening its file. A nil reader -// means a miss. encoded returns stored gzip bytes without decompressing them. -// Authorization belongs to the caller and must precede even a cache hit. -func (c *Cache) Open(ctx context.Context, digest string, encoded bool) (*Reader, error) { - return c.open(ctx, ctx, digest, encoded) -} -func (c *Cache) open(ctx, readerContext context.Context, digest string, encoded bool) (*Reader, error) { - c.lifecycle.RLock() - defer c.lifecycle.RUnlock() - if c.closed { - return nil, os.ErrClosed - } - if !validDigest.MatchString(digest) { - return nil, nil - } - token, err := newToken() - if err != nil { - return nil, err - } - var record Record - var name string - now := c.now().UnixMilli() - err = c.transaction(ctx, false, func(tx *sql.Tx) error { - err := tx.QueryRowContext(ctx, "SELECT digest,file,size,stored,allocated,encoding,accessed FROM blobs WHERE digest=?", digest).Scan(&record.Digest, &record.File, &record.Size, &record.Stored, &record.Allocated, &record.Encoding, &record.Accessed) - if err != nil { - return err - } - name, err = blobPath(record) - if err != nil { - return err - } - if _, err = tx.ExecContext(ctx, "INSERT INTO readers VALUES(?,?,?)", token, digest, now+readerLease.Milliseconds()); err != nil { - return err - } - if now-record.Accessed > 30000 { - _, err = tx.ExecContext(ctx, "UPDATE blobs SET accessed=? WHERE digest=?", now, digest) - } - return err - }) - if errors.Is(err, sql.ErrNoRows) { - return nil, nil - } - if err != nil { - return nil, err - } - // Check the type before opening to avoid blocking on a corrupt FIFO entry. - info, err := c.root.Lstat(name) - var file *os.File - if err == nil && !info.Mode().IsRegular() { - err = ErrInvalidRecord - } - if err == nil { - file, err = c.root.Open(name) - } - if err == nil { - info, err = file.Stat() - } - if err == nil && (!info.Mode().IsRegular() || info.Size() != record.Stored) { - err = errBlobSize - } - if err != nil || ctx.Err() != nil { - if file != nil { - file.Close() - } - c.releaseReader(token) - if ctx.Err() != nil { - return nil, ctx.Err() - } - if err = c.discardRecord(ctx, record); err != nil { - return nil, err - } - c.emit(ctx, "corrupt", 0, 0) - return nil, nil - } - life, cancel := context.WithCancelCause(readerContext) - remaining := record.Stored - if record.Encoding == "gzip" && !encoded { - remaining = record.Size - } - reader := &Reader{cache: c, record: record, token: token, file: file, ctx: life, cancel: cancel, done: make(chan struct{}), decode: record.Encoding == "gzip" && !encoded, remaining: remaining} - c.readersMu.Lock() - c.readers[reader] = struct{}{} - c.readersMu.Unlock() - go reader.heartbeat() - return reader, nil -} - -func (c *Cache) Lookup(ctx context.Context, key string) (*Reader, error) { - return c.lookup(ctx, ctx, key) -} -func (c *Cache) lookup(ctx, readerContext context.Context, key string) (result *Reader, resultErr error) { - started := time.Now() - defer func() { - if c.options.Stage != nil { - c.options.Stage(readerContext, "cache_lookup", time.Since(started), resultErr) - } - }() - c.lifecycle.RLock() - if c.closed { - c.lifecycle.RUnlock() - return nil, os.ErrClosed - } - var digest string - err := c.db.QueryRowContext(ctx, "SELECT digest FROM aliases WHERE key=?", key).Scan(&digest) - c.lifecycle.RUnlock() - if err != nil && !errors.Is(err, sql.ErrNoRows) { - return nil, err - } - if digest == "" { - digest = key - } - return c.open(ctx, readerContext, digest, false) -} - -func (c *Cache) releaseReader(token string) { - ctx, cancel := context.WithTimeout(context.Background(), time.Second) - defer cancel() - // Failed release is recoverable through the two-minute lease expiry. - _ = c.transaction(ctx, false, func(tx *sql.Tx) error { - _, err := tx.ExecContext(ctx, "DELETE FROM readers WHERE token=?", token) - return err - }) -} - -func (c *Cache) discardRecord(ctx context.Context, record Record) error { - name, err := blobPath(record) - if err != nil { - return err - } - // Publication names are unique. Never delete a newer record for this digest. - c.root.Remove(name) - return c.transaction(ctx, false, func(tx *sql.Tx) error { - _, err := tx.ExecContext(ctx, "DELETE FROM blobs WHERE digest=? AND file=?", record.Digest, record.File) - return err - }) -} - -// Reader releases its lease on EOF, read failure, context cancellation or Close. -// Gzip decoding starts on the first Read, allowing unused streams to be closed. -type Reader struct { - cache *Cache - record Record - token string - file *os.File - ctx context.Context - cancel context.CancelCauseFunc - done chan struct{} - once sync.Once - readMu sync.Mutex - gzip *gzip.Reader - decode bool - remaining int64 - started time.Time -} - -func (r *Reader) Record() Record { return r.record } - -func (r *Reader) Read(p []byte) (int, error) { - if len(p) == 0 { - return 0, nil - } - r.readMu.Lock() - n, err := r.read(p) - r.readMu.Unlock() - if r.ctx.Err() != nil { - err = context.Cause(r.ctx) - } - if err != nil { - r.finish(err) - <-r.done - } - return n, err -} - -func (r *Reader) read(p []byte) (int, error) { - if r.ctx.Err() != nil { - return 0, context.Cause(r.ctx) - } - var input io.Reader = r.file - if r.decode { - if r.gzip == nil { - r.started = time.Now() - decoder, err := gzip.NewReader(r.file) - if err != nil { - return 0, err - } - r.gzip = decoder - } - input = r.gzip - } - if int64(len(p)) > r.remaining+1 { - p = p[:r.remaining+1] - } - n, err := input.Read(p) - if int64(n) > r.remaining { - n = int(r.remaining) - r.remaining = 0 - return n, errBlobSize - } - r.remaining -= int64(n) - if errors.Is(err, io.EOF) && r.remaining != 0 { - err = io.ErrUnexpectedEOF - } - return n, err -} - -func (r *Reader) renew() error { - now := r.cache.now().UnixMilli() - result, err := r.cache.db.ExecContext(r.ctx, "UPDATE readers SET expires=? WHERE token=? AND expires>=?", now+readerLease.Milliseconds(), r.token, now) - if err != nil { - return ErrReaderLeaseLost - } - n, err := result.RowsAffected() - if err != nil || n != 1 { - return ErrReaderLeaseLost - } - return nil -} - -func (r *Reader) heartbeat() { - defer close(r.done) - ticker := time.NewTicker(r.cache.readerHeartbeat) - defer ticker.Stop() - for { - select { - case <-r.ctx.Done(): - r.finish(context.Cause(r.ctx)) - return - case <-ticker.C: - if err := r.renew(); err != nil { - if r.ctx.Err() != nil { - err = context.Cause(r.ctx) - } - r.finish(err) - return - } - } - } -} - -func (r *Reader) finish(cause error) { - r.once.Do(func() { - r.cancel(cause) - r.file.Close() - r.readMu.Lock() - if r.gzip != nil { - r.gzip.Close() - } - if cause == io.EOF && r.decode && !r.started.IsZero() { - r.cache.transformEvent(r.ctx, "decompress", r.record.Size, time.Since(r.started)) - } - r.readMu.Unlock() - r.cache.releaseReader(r.token) - var corrupt flate.CorruptInputError - if errors.Is(cause, errBlobSize) || errors.Is(cause, io.ErrUnexpectedEOF) || errors.Is(cause, gzip.ErrHeader) || errors.Is(cause, gzip.ErrChecksum) || errors.As(cause, &corrupt) { - ctx, cancel := context.WithTimeout(context.Background(), time.Second) - r.cache.discardRecord(ctx, r.record) - cancel() - } - r.cache.readersMu.Lock() - delete(r.cache.readers, r) - r.cache.readersMu.Unlock() - }) -} - -func (r *Reader) Close() error { r.finish(os.ErrClosed); <-r.done; return nil } - -// Reopen acquires another reader lease for this content. Keeping the current -// reader pinned prevents eviction while HTTP selects the stored representation. -func (r *Reader) Reopen(ctx context.Context, encoded bool) (*Reader, error) { - return r.cache.Open(ctx, r.record.Digest, encoded) -} diff --git a/backend/internal/blobcache/reader_test.go b/backend/internal/blobcache/reader_test.go deleted file mode 100644 index fbb66d6..0000000 --- a/backend/internal/blobcache/reader_test.go +++ /dev/null @@ -1,397 +0,0 @@ -package blobcache - -import ( - "bytes" - "compress/gzip" - "context" - "crypto/sha256" - "encoding/hex" - "errors" - "io" - "os" - "path/filepath" - "strings" - "sync" - "testing" - "time" -) - -func TestNodeBlobReaders(t *testing.T) { - root := t.TempDir() - nodeIndex(t, "seed-readers", root) - cache := openTestCache(t, root) - for _, fixture := range []struct{ key, body, encoding string }{{"node-alias", strings.Repeat("shared payload\n", 150), "gzip"}, {"node-identity", "identity payload", "identity"}} { - t.Run(fixture.encoding, func(t *testing.T) { - reader, err := cache.Lookup(t.Context(), fixture.key) - if err != nil || reader == nil { - t.Fatal(reader, err) - } - record := reader.Record() - if record.Encoding != fixture.encoding { - t.Fatal(record) - } - stats, err := cache.Stats(t.Context()) - if err != nil || stats.ActiveReaders != 1 { - t.Fatal(stats, err) - } - if reader.gzip != nil { - t.Fatal("decoder initialized before reading") - } - data, err := io.ReadAll(reader) - if err != nil || string(data) != fixture.body { - t.Fatal(string(data), err) - } - if err := reader.Close(); err != nil { - t.Fatal(err) - } - stats, err = cache.Stats(t.Context()) - if err != nil || stats.ActiveReaders != 0 { - t.Fatal("EOF leaked lease", stats, err) - } - raw, err := cache.Open(t.Context(), record.Digest, true) - if err != nil || raw == nil { - t.Fatal(raw, err) - } - encoded, err := io.ReadAll(raw) - if err != nil { - t.Fatal(err) - } - if int64(len(encoded)) != record.Stored { - t.Fatal(len(encoded), record.Stored) - } - if fixture.encoding == "gzip" { - decoder, err := gzip.NewReader(bytes.NewReader(encoded)) - if err != nil { - t.Fatal(err) - } - decoded, err := io.ReadAll(decoder) - decoder.Close() - if err != nil || string(decoded) != fixture.body { - t.Fatal(string(decoded), err) - } - } else if string(encoded) != fixture.body { - t.Fatal(string(encoded)) - } - }) - } - pinned, err := cache.Lookup(t.Context(), "node-alias") - if err != nil || pinned == nil { - t.Fatal(pinned, err) - } - stats, _ := nodeIndex(t, "evict", root) - if stats.Blobs != 1 || stats.ActiveReaders != 1 { - t.Fatal("Node ignored Go reader pin", stats) - } - data, err := io.ReadAll(pinned) - if err != nil || string(data) != strings.Repeat("shared payload\n", 150) { - t.Fatal(len(data), err) - } - stats, _ = nodeIndex(t, "evict", root) - if stats.Blobs != 0 || stats.ActiveReaders != 0 { - t.Fatal("released pin prevented eviction", stats) - } - if miss, err := cache.Lookup(t.Context(), "node-alias"); err != nil || miss != nil { - t.Fatal(miss, err) - } -} - -func seedBlob(t *testing.T, c *Cache, body []byte, compressed bool) Record { - t.Helper() - sum := sha256.Sum256(body) - record := Record{Digest: "sha256-" + hex.EncodeToString(sum[:]), File: "aaaaaaaa.raw", Size: int64(len(body)), Encoding: "identity", Allocated: 4096, Accessed: time.Now().Add(-time.Minute).UnixMilli()} - stored := body - if compressed { - var out bytes.Buffer - writer := gzip.NewWriter(&out) - writer.Write(body) - writer.Close() - stored = out.Bytes() - record.Encoding = "gzip" - record.File = "aaaaaaaa.gz" - } - record.Stored = int64(len(stored)) - name, err := blobPath(record) - if err != nil { - t.Fatal(err) - } - if err := c.root.MkdirAll(filepath.Dir(name), 0700); err != nil { - t.Fatal(err) - } - file, err := c.root.OpenFile(name, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, 0600) - if err != nil { - t.Fatal(err) - } - if _, err := file.Write(stored); err != nil { - t.Fatal(err) - } - file.Close() - if _, err := c.db.Exec("INSERT INTO blobs VALUES(?,?,?,?,?,?,?)", record.Digest, record.File, record.Size, record.Stored, record.Encoding, record.Accessed, record.Allocated); err != nil { - t.Fatal(err) - } - if _, err := c.db.Exec("INSERT INTO aliases VALUES(?,?)", "alias", record.Digest); err != nil { - t.Fatal(err) - } - return record -} - -func TestReaderLeaseLifecycle(t *testing.T) { - for _, action := range []string{"close", "cancel", "lease-lost", "lease-expired", "cache-close"} { - t.Run(action, func(t *testing.T) { - cache := openTestCache(t, t.TempDir()) - cache.readerHeartbeat = 10 * time.Millisecond - record := seedBlob(t, cache, []byte("payload"), false) - ctx, cancel := context.WithCancel(t.Context()) - defer cancel() - reader, err := cache.Open(ctx, record.Digest, false) - if err != nil || reader == nil { - t.Fatal(reader, err) - } - var before int64 - if err := cache.db.QueryRow("SELECT expires FROM readers WHERE token=?", reader.token).Scan(&before); err != nil { - t.Fatal(err) - } - deadline := time.After(2 * time.Second) - for { - var renewed int64 - if err := cache.db.QueryRow("SELECT expires FROM readers WHERE token=?", reader.token).Scan(&renewed); err != nil { - t.Fatal(err) - } - if renewed > before { - break - } - select { - case <-deadline: - t.Fatal("reader lease did not renew") - case <-time.After(time.Millisecond): - } - } - expected := error(os.ErrClosed) - switch action { - case "close": - reader.Close() - case "cancel": - cancel() - expected = context.Canceled - case "lease-lost": - if _, err := cache.db.Exec("DELETE FROM readers WHERE token=?", reader.token); err != nil { - t.Fatal(err) - } - expected = ErrReaderLeaseLost - case "lease-expired": - if _, err := cache.db.Exec("UPDATE readers SET expires=0 WHERE token=?", reader.token); err != nil { - t.Fatal(err) - } - expected = ErrReaderLeaseLost - case "cache-close": - if err := cache.Close(); err != nil { - t.Fatal(err) - } - } - select { - case <-reader.done: - case <-time.After(2 * time.Second): - t.Fatal("reader did not stop") - } - if _, err := reader.Read(make([]byte, 3)); !errors.Is(err, expected) { - t.Fatal(err, expected) - } - reader.Close() - if action == "cache-close" { - other := openTestCache(t, cache.options.Root) - stats, err := other.Stats(t.Context()) - if err != nil || stats.ActiveReaders != 0 { - t.Fatal(stats, err) - } - if r, err := cache.Open(t.Context(), record.Digest, false); !errors.Is(err, os.ErrClosed) || r != nil { - t.Fatal(r, err) - } - } else { - stats, err := cache.Stats(t.Context()) - if err != nil || stats.ActiveReaders != 0 { - t.Fatal(stats, err) - } - } - }) - } -} - -func TestReaderCorruptionAndConfinement(t *testing.T) { - for _, kind := range []string{"missing", "short", "directory", "symlink", "gzip-header", "gzip-checksum", "expanded-size", "decoded-short", "unsafe-name"} { - t.Run(kind, func(t *testing.T) { - cache := openTestCache(t, t.TempDir()) - record := seedBlob(t, cache, bytes.Repeat([]byte("content"), 200), strings.HasPrefix(kind, "gzip") || kind == "expanded-size" || kind == "decoded-short") - name, _ := blobPath(record) - var outside string - switch kind { - case "missing": - cache.root.Remove(name) - case "short": - if err := os.Truncate(filepath.Join(cache.options.Root, name), 1); err != nil { - t.Fatal(err) - } - case "directory": - cache.root.Remove(name) - cache.root.MkdirAll(name, 0700) - case "symlink": - outside = filepath.Join(t.TempDir(), "private") - if err := os.WriteFile(outside, []byte("secret"), 0600); err != nil { - t.Fatal(err) - } - cache.root.Remove(name) - if err := os.Symlink(outside, filepath.Join(cache.options.Root, name)); err != nil { - t.Fatal(err) - } - case "gzip-header", "gzip-checksum": - data, err := os.ReadFile(filepath.Join(cache.options.Root, name)) - if err != nil { - t.Fatal(err) - } - offset := 0 - if kind == "gzip-checksum" { - offset = len(data) - 8 - } - data[offset] ^= 0xff - if err := os.WriteFile(filepath.Join(cache.options.Root, name), data, 0600); err != nil { - t.Fatal(err) - } - case "expanded-size": - if _, err := cache.db.Exec("UPDATE blobs SET size=1"); err != nil { - t.Fatal(err) - } - case "decoded-short": - if _, err := cache.db.Exec("UPDATE blobs SET size=size+1"); err != nil { - t.Fatal(err) - } - case "unsafe-name": - if _, err := cache.db.Exec("UPDATE blobs SET file='../escape.raw'"); err != nil { - t.Fatal(err) - } - } - reader, err := cache.Open(t.Context(), record.Digest, false) - if kind == "unsafe-name" { - if !errors.Is(err, ErrInvalidRecord) || reader != nil { - t.Fatal(reader, err) - } - } else { - if err != nil { - t.Fatal(err) - } - if reader != nil { - data, err := io.ReadAll(reader) - reader.Close() - if err == nil { - t.Fatal("corrupt body accepted", len(data)) - } - if kind == "expanded-size" && len(data) > 1 { - t.Fatal("decompression exceeded declared size", len(data)) - } - } - stats, err := cache.Stats(t.Context()) - if err != nil || stats.Blobs != 0 || stats.ActiveReaders != 0 { - t.Fatal("corruption retained", stats, err) - } - if reader, err := cache.Lookup(t.Context(), "alias"); err != nil || reader != nil { - t.Fatal(reader, err) - } - } - if outside != "" { - data, err := os.ReadFile(outside) - if err != nil || string(data) != "secret" { - t.Fatal("escaped cache root", string(data), err) - } - } - }) - } -} - -func TestReaderConcurrentCloseAndRead(t *testing.T) { - cache := openTestCache(t, t.TempDir()) - record := seedBlob(t, cache, bytes.Repeat([]byte("read"), 10000), true) - for i := 0; i < 20; i++ { - reader, err := cache.Open(t.Context(), record.Digest, false) - if err != nil || reader == nil { - t.Fatal(reader, err) - } - var work sync.WaitGroup - work.Go(func() { io.Copy(io.Discard, reader) }) - work.Go(func() { reader.Close() }) - work.Go(func() { reader.Close() }) - work.Wait() - } - stats, err := cache.Stats(t.Context()) - if err != nil || stats.ActiveReaders != 0 { - t.Fatal(stats, err) - } -} - -func TestDiscardOldRepresentationPreservesReplacement(t *testing.T) { - cache := openTestCache(t, t.TempDir()) - old := seedBlob(t, cache, []byte("replacement-safe"), false) - replacement := old - replacement.File = "bbbbbbbb.raw" - name, err := blobPath(replacement) - if err != nil { - t.Fatal(err) - } - if err := os.WriteFile(filepath.Join(cache.options.Root, name), []byte("replacement-safe"), 0600); err != nil { - t.Fatal(err) - } - if _, err := cache.db.Exec("UPDATE blobs SET file=? WHERE digest=?", replacement.File, old.Digest); err != nil { - t.Fatal(err) - } - if err := cache.discardRecord(t.Context(), old); err != nil { - t.Fatal(err) - } - reader, err := cache.Lookup(t.Context(), "alias") - if err != nil || reader == nil { - t.Fatal("replacement removed", reader, err) - } - data, err := io.ReadAll(reader) - reader.Close() - if err != nil || string(data) != "replacement-safe" { - t.Fatal(string(data), err) - } -} - -func TestCacheCloseDuringOpens(t *testing.T) { - cache := openTestCache(t, t.TempDir()) - record := seedBlob(t, cache, bytes.Repeat([]byte("data"), 1000), true) - pinned, err := cache.Open(t.Context(), record.Digest, false) - if err != nil || pinned == nil { - t.Fatal(pinned, err) - } - start := make(chan struct{}) - var work sync.WaitGroup - for i := 0; i < 20; i++ { - work.Go(func() { - <-start - reader, err := cache.Open(t.Context(), record.Digest, false) - if errors.Is(err, os.ErrClosed) { - return - } - if err != nil || reader == nil { - t.Error(reader, err) - return - } - _, err = io.Copy(io.Discard, reader) - if err != nil && !errors.Is(err, os.ErrClosed) { - t.Error(err) - } - reader.Close() - }) - } - work.Go(func() { - <-start - if err := cache.Close(); err != nil { - t.Error(err) - } - }) - close(start) - work.Wait() - pinned.Close() - other := openTestCache(t, cache.options.Root) - stats, err := other.Stats(t.Context()) - if err != nil || stats.ActiveReaders != 0 || stats.Blobs != 1 { - t.Fatal(stats, err) - } -} diff --git a/backend/internal/blobcache/schema.sql b/backend/internal/blobcache/schema.sql deleted file mode 100644 index d846fe4..0000000 --- a/backend/internal/blobcache/schema.sql +++ /dev/null @@ -1,37 +0,0 @@ --- Generated from src/core/blob-cache.ts by backend/contracts/blob-index.cjs. -CREATE TABLE IF NOT EXISTS aliases(key TEXT PRIMARY KEY,digest TEXT REFERENCES blobs(digest) ON DELETE CASCADE); -CREATE TABLE IF NOT EXISTS blobs(digest TEXT PRIMARY KEY,file TEXT,size INTEGER,stored INTEGER,encoding TEXT,accessed INTEGER,allocated INTEGER); -CREATE TABLE IF NOT EXISTS decisions(key TEXT PRIMARY KEY,digest TEXT,changed INTEGER,accessed INTEGER,expires INTEGER); -CREATE TABLE IF NOT EXISTS fills(key TEXT PRIMARY KEY,token TEXT,expires INTEGER,reserved INTEGER); -CREATE TABLE IF NOT EXISTS history(key TEXT PRIMARY KEY,seen INTEGER,evicted INTEGER); -CREATE TABLE IF NOT EXISTS maintenance(id INTEGER PRIMARY KEY,nextScan INTEGER); -CREATE TABLE IF NOT EXISTS publications(token TEXT PRIMARY KEY,digest TEXT,file TEXT); -CREATE TABLE IF NOT EXISTS readers(token TEXT PRIMARY KEY,digest TEXT,expires INTEGER); -CREATE TABLE IF NOT EXISTS summary(id INTEGER PRIMARY KEY,blobs INTEGER,originalBytes INTEGER,storedBytes INTEGER,allocatedBytes INTEGER,activeReaders INTEGER,decisions INTEGER,aliases INTEGER,history INTEGER,reservedBytes INTEGER); -CREATE TABLE IF NOT EXISTS totals(id INTEGER PRIMARY KEY, bytes INTEGER); -CREATE INDEX IF NOT EXISTS aliases_digest ON aliases(digest); -CREATE INDEX IF NOT EXISTS blobs_file ON blobs(file); -CREATE INDEX IF NOT EXISTS blobs_lru ON blobs(accessed); -CREATE INDEX IF NOT EXISTS decisions_age ON decisions(accessed); -CREATE INDEX IF NOT EXISTS decisions_expiry ON decisions(expires); -CREATE INDEX IF NOT EXISTS history_seen ON history(seen); -CREATE INDEX IF NOT EXISTS readers_digest ON readers(digest); -CREATE INDEX IF NOT EXISTS readers_expiry ON readers(expires); -CREATE TRIGGER IF NOT EXISTS blob_added AFTER INSERT ON blobs BEGIN UPDATE totals SET bytes=bytes+NEW.allocated WHERE id=1; END; -CREATE TRIGGER IF NOT EXISTS blob_removed AFTER DELETE ON blobs BEGIN UPDATE totals SET bytes=bytes-OLD.allocated WHERE id=1; END; -CREATE TRIGGER IF NOT EXISTS summary_aliases_delete AFTER DELETE ON aliases BEGIN UPDATE summary SET aliases=aliases-1 WHERE id=1; END; -CREATE TRIGGER IF NOT EXISTS summary_aliases_insert AFTER INSERT ON aliases BEGIN UPDATE summary SET aliases=aliases+1 WHERE id=1; END; -CREATE TRIGGER IF NOT EXISTS summary_blobs_delete AFTER DELETE ON blobs BEGIN UPDATE summary SET blobs=blobs-1,originalBytes=originalBytes-OLD.size,storedBytes=storedBytes-OLD.stored,allocatedBytes=allocatedBytes-OLD.allocated WHERE id=1; END; -CREATE TRIGGER IF NOT EXISTS summary_blobs_insert AFTER INSERT ON blobs BEGIN UPDATE summary SET blobs=blobs+1,originalBytes=originalBytes+NEW.size,storedBytes=storedBytes+NEW.stored,allocatedBytes=allocatedBytes+NEW.allocated WHERE id=1; END; -CREATE TRIGGER IF NOT EXISTS summary_blobs_update AFTER UPDATE OF size,stored,allocated ON blobs - BEGIN UPDATE summary SET originalBytes=originalBytes-OLD.size+NEW.size,storedBytes=storedBytes-OLD.stored+NEW.stored,allocatedBytes=allocatedBytes-OLD.allocated+NEW.allocated WHERE id=1; END; -CREATE TRIGGER IF NOT EXISTS summary_decisions_delete AFTER DELETE ON decisions BEGIN UPDATE summary SET decisions=decisions-1 WHERE id=1; END; -CREATE TRIGGER IF NOT EXISTS summary_decisions_insert AFTER INSERT ON decisions BEGIN UPDATE summary SET decisions=decisions+1 WHERE id=1; END; -CREATE TRIGGER IF NOT EXISTS summary_fills_delete AFTER DELETE ON fills BEGIN UPDATE summary SET reservedBytes=reservedBytes-OLD.reserved WHERE id=1; END; -CREATE TRIGGER IF NOT EXISTS summary_fills_insert AFTER INSERT ON fills BEGIN UPDATE summary SET reservedBytes=reservedBytes+NEW.reserved WHERE id=1; END; -CREATE TRIGGER IF NOT EXISTS summary_fills_update AFTER UPDATE OF reserved ON fills - BEGIN UPDATE summary SET reservedBytes=reservedBytes-OLD.reserved+NEW.reserved WHERE id=1; END; -CREATE TRIGGER IF NOT EXISTS summary_history_delete AFTER DELETE ON history BEGIN UPDATE summary SET history=history-1 WHERE id=1; END; -CREATE TRIGGER IF NOT EXISTS summary_history_insert AFTER INSERT ON history BEGIN UPDATE summary SET history=history+1 WHERE id=1; END; -CREATE TRIGGER IF NOT EXISTS summary_readers_delete AFTER DELETE ON readers BEGIN UPDATE summary SET activeReaders=activeReaders-1 WHERE id=1; END; -CREATE TRIGGER IF NOT EXISTS summary_readers_insert AFTER INSERT ON readers BEGIN UPDATE summary SET activeReaders=activeReaders+1 WHERE id=1; END; diff --git a/backend/internal/blobcache/stage_test.go b/backend/internal/blobcache/stage_test.go deleted file mode 100644 index db7c012..0000000 --- a/backend/internal/blobcache/stage_test.go +++ /dev/null @@ -1,46 +0,0 @@ -package blobcache - -import ( - "context" - "io" - "strings" - "testing" - "time" -) - -func TestStageTimingsDistinguishFillAndHit(t *testing.T) { - counts := map[string]int{} - cache, err := New(t.Context(), Options{Root: t.TempDir(), Budget: 65536, MaxObject: 4096, Stage: func(_ context.Context, name string, elapsed time.Duration, err error) { - if err != nil || elapsed < 0 { - t.Errorf("stage %s: %v %v", name, elapsed, err) - } - counts[name]++ - }}) - if err != nil { - t.Fatal(err) - } - defer cache.Close() - calls := 0 - produce := func(context.Context) (io.ReadCloser, error) { - calls++ - return io.NopCloser(strings.NewReader("fixture body")), nil - } - coldLookups := 0 - for i := 0; i < 2; i++ { - body, err := cache.GetOrFill(t.Context(), "stage-fixture", produce, nil, nil) - if err != nil { - t.Fatal(err) - } - if i == 0 { - coldLookups = counts["cache_lookup"] - } - data, err := io.ReadAll(body) - body.Close() - if err != nil || string(data) != "fixture body" { - t.Fatal(string(data), err) - } - } - if calls != 1 || counts["cache_fill"] != 1 || coldLookups < 1 || counts["cache_lookup"] != coldLookups+1 { - t.Fatal(calls, counts) - } -} diff --git a/backend/internal/filetype/LICENSE.compressible b/backend/internal/filetype/LICENSE.compressible deleted file mode 100644 index ce00b3f..0000000 --- a/backend/internal/filetype/LICENSE.compressible +++ /dev/null @@ -1,24 +0,0 @@ -(The MIT License) - -Copyright (c) 2013 Jonathan Ong -Copyright (c) 2014 Jeremiah Senkpiel -Copyright (c) 2015 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/backend/internal/filetype/LICENSE.isbinaryfile b/backend/internal/filetype/LICENSE.isbinaryfile deleted file mode 100644 index e5bf8e8..0000000 --- a/backend/internal/filetype/LICENSE.isbinaryfile +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2019 Garen J. Torikian - -MIT License - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/backend/internal/filetype/LICENSE.mime-db b/backend/internal/filetype/LICENSE.mime-db deleted file mode 100644 index 0751cb1..0000000 --- a/backend/internal/filetype/LICENSE.mime-db +++ /dev/null @@ -1,23 +0,0 @@ -(The MIT License) - -Copyright (c) 2014 Jonathan Ong -Copyright (c) 2015-2022 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/backend/internal/filetype/compressible.go b/backend/internal/filetype/compressible.go deleted file mode 100644 index bd75de5..0000000 --- a/backend/internal/filetype/compressible.go +++ /dev/null @@ -1,29 +0,0 @@ -package filetype - -import ( - _ "embed" - "encoding/json" - "strings" -) - -//go:embed compressible.json -var compressibleJSON []byte -var compressibleTypes = func() map[string]bool { - var v map[string]bool - if err := json.Unmarshal(compressibleJSON, &v); err != nil { - panic(err) - } - return v -}() - -func Compressible(contentType string) bool { - value := strings.TrimSpace(contentType) - if i := strings.IndexAny(value, "; \t\r\n"); i >= 0 { - value = value[:i] - } - value = strings.ToLower(value) - if v, ok := compressibleTypes[value]; ok { - return v - } - return strings.HasPrefix(value, "text/") || strings.HasSuffix(value, "+json") || strings.HasSuffix(value, "+text") || strings.HasSuffix(value, "+xml") -} diff --git a/backend/internal/filetype/compressible.json b/backend/internal/filetype/compressible.json deleted file mode 100644 index d36b04d..0000000 --- a/backend/internal/filetype/compressible.json +++ /dev/null @@ -1,824 +0,0 @@ -{ - "application/3gpdash-qoe-report+xml": true, - "application/3gpp-ims+xml": true, - "application/3gpphal+json": true, - "application/3gpphalforms+json": true, - "application/ace+json": true, - "application/activity+json": true, - "application/aif+json": true, - "application/alto-cdni+json": true, - "application/alto-cdnifilter+json": true, - "application/alto-costmap+json": true, - "application/alto-costmapfilter+json": true, - "application/alto-directory+json": true, - "application/alto-endpointcost+json": true, - "application/alto-endpointcostparams+json": true, - "application/alto-endpointprop+json": true, - "application/alto-endpointpropparams+json": true, - "application/alto-error+json": true, - "application/alto-networkmap+json": true, - "application/alto-networkmapfilter+json": true, - "application/alto-propmap+json": true, - "application/alto-propmapparams+json": true, - "application/alto-tips+json": true, - "application/alto-tipsparams+json": true, - "application/alto-updatestreamcontrol+json": true, - "application/alto-updatestreamparams+json": true, - "application/appinstaller": false, - "application/appx": false, - "application/appxbundle": false, - "application/atom+xml": true, - "application/atomcat+xml": true, - "application/atomdeleted+xml": true, - "application/atomsvc+xml": true, - "application/atsc-dwd+xml": true, - "application/atsc-held+xml": true, - "application/atsc-rdt+json": true, - "application/atsc-rsat+xml": true, - "application/auth-policy+xml": true, - "application/automationml-aml+xml": true, - "application/automationml-amlx+zip": false, - "application/bacnet-xdd+zip": false, - "application/bdoc": false, - "application/beep+xml": true, - "application/calendar+json": true, - "application/calendar+xml": true, - "application/captive+json": true, - "application/ccmp+xml": true, - "application/ccxml+xml": true, - "application/cda+xml": true, - "application/cdfx+xml": true, - "application/cea-2018+xml": true, - "application/cellml+xml": true, - "application/city+json": true, - "application/clue+xml": true, - "application/clue_info+xml": true, - "application/cnrp+xml": true, - "application/coap-group+json": true, - "application/conference-info+xml": true, - "application/cpl+xml": true, - "application/csta+xml": true, - "application/cstadata+xml": true, - "application/csvm+json": true, - "application/cwl+json": true, - "application/dart": true, - "application/dash+xml": true, - "application/dash-patch+xml": true, - "application/davmount+xml": true, - "application/dialog-info+xml": true, - "application/dicom+json": true, - "application/dicom+xml": true, - "application/dns+json": true, - "application/docbook+xml": true, - "application/dskpp+xml": true, - "application/dssc+xml": true, - "application/eat-bun+json": true, - "application/eat-ucs+json": true, - "application/ecmascript": true, - "application/edi-x12": false, - "application/edifact": false, - "application/elm+json": true, - "application/elm+xml": true, - "application/emergencycalldata.cap+xml": true, - "application/emergencycalldata.comment+xml": true, - "application/emergencycalldata.control+xml": true, - "application/emergencycalldata.deviceinfo+xml": true, - "application/emergencycalldata.legacyesn+json": true, - "application/emergencycalldata.providerinfo+xml": true, - "application/emergencycalldata.serviceinfo+xml": true, - "application/emergencycalldata.subscriberinfo+xml": true, - "application/emergencycalldata.veds+xml": true, - "application/emma+xml": true, - "application/emotionml+xml": true, - "application/epp+xml": true, - "application/epub+zip": false, - "application/expect-ct-report+json": true, - "application/fdt+xml": true, - "application/fhir+json": true, - "application/fhir+xml": true, - "application/fido.trusted-apps+json": true, - "application/font-woff": false, - "application/framework-attributes+xml": true, - "application/geo+json": true, - "application/geopose+json": true, - "application/geoxacml+json": true, - "application/geoxacml+xml": true, - "application/gml+xml": true, - "application/gpx+xml": true, - "application/gzip": false, - "application/held+xml": true, - "application/hl7v2+xml": true, - "application/ibe-key-request+xml": true, - "application/ibe-pkg-reply+xml": true, - "application/im-iscomposing+xml": true, - "application/inkml+xml": true, - "application/its+xml": true, - "application/java-archive": false, - "application/java-serialized-object": false, - "application/java-vm": false, - "application/javascript": true, - "application/jf2feed+json": true, - "application/jose+json": true, - "application/jrd+json": true, - "application/jscalendar+json": true, - "application/jscontact+json": true, - "application/json": true, - "application/json-patch+json": true, - "application/jsonml+json": true, - "application/jwk+json": true, - "application/jwk-set+json": true, - "application/kpml-request+xml": true, - "application/kpml-response+xml": true, - "application/ld+json": true, - "application/lgr+xml": true, - "application/linkset+json": true, - "application/load-control+xml": true, - "application/lost+xml": true, - "application/lostsync+xml": true, - "application/lpf+zip": false, - "application/mads+xml": true, - "application/manifest+json": true, - "application/marcxml+xml": true, - "application/mathml+xml": true, - "application/mathml-content+xml": true, - "application/mathml-presentation+xml": true, - "application/mbms-associated-procedure-description+xml": true, - "application/mbms-deregister+xml": true, - "application/mbms-envelope+xml": true, - "application/mbms-msk+xml": true, - "application/mbms-msk-response+xml": true, - "application/mbms-protection-description+xml": true, - "application/mbms-reception-report+xml": true, - "application/mbms-register+xml": true, - "application/mbms-register-response+xml": true, - "application/mbms-schedule+xml": true, - "application/mbms-user-service-description+xml": true, - "application/media-policy-dataset+xml": true, - "application/media_control+xml": true, - "application/mediaservercontrol+xml": true, - "application/merge-patch+json": true, - "application/metalink+xml": true, - "application/metalink4+xml": true, - "application/mets+xml": true, - "application/mmt-aei+xml": true, - "application/mmt-usd+xml": true, - "application/mods+xml": true, - "application/mrb-consumer+xml": true, - "application/mrb-publish+xml": true, - "application/msc-ivr+xml": true, - "application/msc-mixer+xml": true, - "application/msix": false, - "application/msixbundle": false, - "application/msword": false, - "application/mud+json": true, - "application/nlsml+xml": true, - "application/octet-stream": true, - "application/odm+xml": true, - "application/oebps-package+xml": true, - "application/ogg": false, - "application/omdoc+xml": true, - "application/opc-nodeset+xml": true, - "application/p21+zip": false, - "application/p2p-overlay+xml": true, - "application/patch-ops-error+xml": true, - "application/pdf": false, - "application/pgp-encrypted": false, - "application/pidf+xml": true, - "application/pidf-diff+xml": true, - "application/pls+xml": true, - "application/poc-settings+xml": true, - "application/postscript": true, - "application/ppsp-tracker+json": true, - "application/problem+json": true, - "application/problem+xml": true, - "application/provenance+xml": true, - "application/prs.hpub+zip": false, - "application/prs.implied-document+xml": true, - "application/prs.implied-object+json": true, - "application/prs.xsf+xml": true, - "application/pskc+xml": true, - "application/pvd+json": true, - "application/raml+yaml": true, - "application/rdap+json": true, - "application/rdf+xml": true, - "application/reginfo+xml": true, - "application/reputon+json": true, - "application/resource-lists+xml": true, - "application/resource-lists-diff+xml": true, - "application/rfc+xml": true, - "application/rlmi+xml": true, - "application/rls-services+xml": true, - "application/route-apd+xml": true, - "application/route-s-tsid+xml": true, - "application/route-usd+xml": true, - "application/rsd+xml": true, - "application/rss+xml": true, - "application/rtf": true, - "application/samlassertion+xml": true, - "application/samlmetadata+xml": true, - "application/sarif+json": true, - "application/sarif-external-properties+json": true, - "application/sbml+xml": true, - "application/scaip+xml": true, - "application/scim+json": true, - "application/senml+json": true, - "application/senml+xml": true, - "application/senml-etch+json": true, - "application/sensml+json": true, - "application/sensml+xml": true, - "application/sep+xml": true, - "application/shf+xml": true, - "application/simple-filter+xml": true, - "application/smil+xml": true, - "application/soap+xml": true, - "application/sparql-results+xml": true, - "application/spdx+json": true, - "application/spirits-event+xml": true, - "application/srgs+xml": true, - "application/sru+xml": true, - "application/ssdl+xml": true, - "application/ssml+xml": true, - "application/stix+json": true, - "application/swid+xml": true, - "application/tar": true, - "application/taxii+json": true, - "application/td+json": true, - "application/tei+xml": true, - "application/thraud+xml": true, - "application/tlsrpt+json": true, - "application/tm+json": true, - "application/toml": true, - "application/trust-chain+json": true, - "application/ttml+xml": true, - "application/ubjson": false, - "application/ujcs+json": true, - "application/urc-grpsheet+xml": true, - "application/urc-ressheet+xml": true, - "application/urc-targetdesc+xml": true, - "application/urc-uisocketdesc+xml": true, - "application/vcard+json": true, - "application/vcard+xml": true, - "application/vnd.1000minds.decision-model+xml": true, - "application/vnd.3gpp-prose+xml": true, - "application/vnd.3gpp-prose-pc3a+xml": true, - "application/vnd.3gpp-prose-pc3ach+xml": true, - "application/vnd.3gpp-prose-pc3ch+xml": true, - "application/vnd.3gpp-prose-pc8+xml": true, - "application/vnd.3gpp.access-transfer-events+xml": true, - "application/vnd.3gpp.bsf+xml": true, - "application/vnd.3gpp.crs+xml": true, - "application/vnd.3gpp.current-location-discovery+xml": true, - "application/vnd.3gpp.gmop+xml": true, - "application/vnd.3gpp.mcdata-affiliation-command+xml": true, - "application/vnd.3gpp.mcdata-info+xml": true, - "application/vnd.3gpp.mcdata-msgstore-ctrl-request+xml": true, - "application/vnd.3gpp.mcdata-regroup+xml": true, - "application/vnd.3gpp.mcdata-service-config+xml": true, - "application/vnd.3gpp.mcdata-ue-config+xml": true, - "application/vnd.3gpp.mcdata-user-profile+xml": true, - "application/vnd.3gpp.mcptt-affiliation-command+xml": true, - "application/vnd.3gpp.mcptt-floor-request+xml": true, - "application/vnd.3gpp.mcptt-info+xml": true, - "application/vnd.3gpp.mcptt-location-info+xml": true, - "application/vnd.3gpp.mcptt-mbms-usage-info+xml": true, - "application/vnd.3gpp.mcptt-regroup+xml": true, - "application/vnd.3gpp.mcptt-service-config+xml": true, - "application/vnd.3gpp.mcptt-signed+xml": true, - "application/vnd.3gpp.mcptt-ue-config+xml": true, - "application/vnd.3gpp.mcptt-ue-init-config+xml": true, - "application/vnd.3gpp.mcptt-user-profile+xml": true, - "application/vnd.3gpp.mcvideo-affiliation-command+xml": true, - "application/vnd.3gpp.mcvideo-info+xml": true, - "application/vnd.3gpp.mcvideo-location-info+xml": true, - "application/vnd.3gpp.mcvideo-mbms-usage-info+xml": true, - "application/vnd.3gpp.mcvideo-regroup+xml": true, - "application/vnd.3gpp.mcvideo-service-config+xml": true, - "application/vnd.3gpp.mcvideo-transmission-request+xml": true, - "application/vnd.3gpp.mcvideo-ue-config+xml": true, - "application/vnd.3gpp.mcvideo-user-profile+xml": true, - "application/vnd.3gpp.mid-call+xml": true, - "application/vnd.3gpp.pinapp-info+xml": true, - "application/vnd.3gpp.seal-group-doc+xml": true, - "application/vnd.3gpp.seal-info+xml": true, - "application/vnd.3gpp.seal-location-info+xml": true, - "application/vnd.3gpp.seal-mbms-usage-info+xml": true, - "application/vnd.3gpp.seal-network-qos-management-info+xml": true, - "application/vnd.3gpp.seal-ue-config-info+xml": true, - "application/vnd.3gpp.seal-unicast-info+xml": true, - "application/vnd.3gpp.seal-user-profile-info+xml": true, - "application/vnd.3gpp.sms+xml": true, - "application/vnd.3gpp.srvcc-ext+xml": true, - "application/vnd.3gpp.srvcc-info+xml": true, - "application/vnd.3gpp.state-and-event-info+xml": true, - "application/vnd.3gpp.ussd+xml": true, - "application/vnd.3gpp.vae-info+xml": true, - "application/vnd.3gpp2.bcmcsinfo+xml": true, - "application/vnd.acm.addressxfer+json": true, - "application/vnd.acm.chatbot+json": true, - "application/vnd.adobe.air-application-installer-package+zip": false, - "application/vnd.adobe.xdp+xml": true, - "application/vnd.amadeus+json": true, - "application/vnd.amundsen.maze+xml": true, - "application/vnd.android.package-archive": false, - "application/vnd.api+json": true, - "application/vnd.aplextor.warrp+json": true, - "application/vnd.apothekende.reservation+json": true, - "application/vnd.apple.installer+xml": true, - "application/vnd.apple.pkpass": false, - "application/vnd.artisan+json": true, - "application/vnd.avalon+json": true, - "application/vnd.avistar+xml": true, - "application/vnd.balsamiq.bmml+xml": true, - "application/vnd.bbf.usp.msg+json": true, - "application/vnd.bekitzur-stech+json": true, - "application/vnd.belightsoft.lhzd+zip": false, - "application/vnd.belightsoft.lhzl+zip": false, - "application/vnd.biopax.rdf+xml": true, - "application/vnd.byu.uapi+json": true, - "application/vnd.c3voc.schedule+xml": true, - "application/vnd.capasystems-pg+json": true, - "application/vnd.chemdraw+xml": true, - "application/vnd.citationstyles.style+xml": true, - "application/vnd.cncf.helm.config.v1+json": true, - "application/vnd.collection+json": true, - "application/vnd.collection.doc+json": true, - "application/vnd.collection.next+json": true, - "application/vnd.comicbook+zip": false, - "application/vnd.coreos.ignition+json": true, - "application/vnd.criticaltools.wbs+xml": true, - "application/vnd.cryptii.pipe+json": true, - "application/vnd.ctct.ws+xml": true, - "application/vnd.cyan.dean.root+xml": true, - "application/vnd.cyclonedx+json": true, - "application/vnd.cyclonedx+xml": true, - "application/vnd.d2l.coursepackage1p0+zip": false, - "application/vnd.dart": true, - "application/vnd.datapackage+json": true, - "application/vnd.dataresource+json": true, - "application/vnd.dcmp+xml": true, - "application/vnd.dece.ttml+xml": true, - "application/vnd.dm.delegation+xml": true, - "application/vnd.document+json": true, - "application/vnd.drive+json": true, - "application/vnd.dvb.dvbisl+xml": true, - "application/vnd.dvb.notif-aggregate-root+xml": true, - "application/vnd.dvb.notif-container+xml": true, - "application/vnd.dvb.notif-generic+xml": true, - "application/vnd.dvb.notif-ia-msglist+xml": true, - "application/vnd.dvb.notif-ia-registration-request+xml": true, - "application/vnd.dvb.notif-ia-registration-response+xml": true, - "application/vnd.dvb.notif-init+xml": true, - "application/vnd.eclipse.ditto+json": true, - "application/vnd.eln+zip": false, - "application/vnd.emclient.accessrequest+xml": true, - "application/vnd.eprints.data+xml": true, - "application/vnd.espass-espass+zip": false, - "application/vnd.eszigno3+xml": true, - "application/vnd.etsi.aoc+xml": true, - "application/vnd.etsi.asic-e+zip": false, - "application/vnd.etsi.asic-s+zip": false, - "application/vnd.etsi.cug+xml": true, - "application/vnd.etsi.iptvcommand+xml": true, - "application/vnd.etsi.iptvdiscovery+xml": true, - "application/vnd.etsi.iptvprofile+xml": true, - "application/vnd.etsi.iptvsad-bc+xml": true, - "application/vnd.etsi.iptvsad-cod+xml": true, - "application/vnd.etsi.iptvsad-npvr+xml": true, - "application/vnd.etsi.iptvservice+xml": true, - "application/vnd.etsi.iptvsync+xml": true, - "application/vnd.etsi.iptvueprofile+xml": true, - "application/vnd.etsi.mcid+xml": true, - "application/vnd.etsi.overload-control-policy-dataset+xml": true, - "application/vnd.etsi.pstn+xml": true, - "application/vnd.etsi.sci+xml": true, - "application/vnd.etsi.simservs+xml": true, - "application/vnd.etsi.tsl+xml": true, - "application/vnd.eu.kasparian.car+json": true, - "application/vnd.exstream-empower+zip": false, - "application/vnd.familysearch.gedcom+zip": false, - "application/vnd.fdsn.stationxml+xml": true, - "application/vnd.ficlab.flb+zip": false, - "application/vnd.fujifilm.fb.jfi+xml": true, - "application/vnd.futoin+json": true, - "application/vnd.gentics.grd+json": true, - "application/vnd.gentoo.catmetadata+xml": true, - "application/vnd.gentoo.pkgmetadata+xml": true, - "application/vnd.geo+json": true, - "application/vnd.geocube+xml": true, - "application/vnd.gnu.taler.exchange+json": true, - "application/vnd.gnu.taler.merchant+json": true, - "application/vnd.google-apps.document": false, - "application/vnd.google-apps.drawing": false, - "application/vnd.google-apps.drive-sdk": false, - "application/vnd.google-apps.folder": false, - "application/vnd.google-apps.form": false, - "application/vnd.google-apps.jam": false, - "application/vnd.google-apps.map": false, - "application/vnd.google-apps.presentation": false, - "application/vnd.google-apps.script": false, - "application/vnd.google-apps.site": false, - "application/vnd.google-apps.spreadsheet": false, - "application/vnd.google-earth.kml+xml": true, - "application/vnd.google-earth.kmz": false, - "application/vnd.gov.sk.e-form+xml": true, - "application/vnd.gov.sk.e-form+zip": false, - "application/vnd.gov.sk.xmldatacontainer+xml": true, - "application/vnd.gpxsee.map+xml": true, - "application/vnd.hal+json": true, - "application/vnd.hal+xml": true, - "application/vnd.handheld-entertainment+xml": true, - "application/vnd.hc+json": true, - "application/vnd.heroku+json": true, - "application/vnd.hyper+json": true, - "application/vnd.hyper-item+json": true, - "application/vnd.hyperdrive+json": true, - "application/vnd.imagemeter.folder+zip": false, - "application/vnd.imagemeter.image+zip": false, - "application/vnd.ims.lis.v2.result+json": true, - "application/vnd.ims.lti.v2.toolconsumerprofile+json": true, - "application/vnd.ims.lti.v2.toolproxy+json": true, - "application/vnd.ims.lti.v2.toolproxy.id+json": true, - "application/vnd.ims.lti.v2.toolsettings+json": true, - "application/vnd.ims.lti.v2.toolsettings.simple+json": true, - "application/vnd.informedcontrol.rms+xml": true, - "application/vnd.infotech.project+xml": true, - "application/vnd.iptc.g2.catalogitem+xml": true, - "application/vnd.iptc.g2.conceptitem+xml": true, - "application/vnd.iptc.g2.knowledgeitem+xml": true, - "application/vnd.iptc.g2.newsitem+xml": true, - "application/vnd.iptc.g2.newsmessage+xml": true, - "application/vnd.iptc.g2.packageitem+xml": true, - "application/vnd.iptc.g2.planningitem+xml": true, - "application/vnd.irepository.package+xml": true, - "application/vnd.iso11783-10+zip": false, - "application/vnd.keyman.kmp+zip": false, - "application/vnd.las.las+json": true, - "application/vnd.las.las+xml": true, - "application/vnd.leap+json": true, - "application/vnd.liberty-request+xml": true, - "application/vnd.llamagraphics.life-balance.exchange+xml": true, - "application/vnd.logipipe.circuit+zip": false, - "application/vnd.marlin.drm.actiontoken+xml": true, - "application/vnd.marlin.drm.conftoken+xml": true, - "application/vnd.marlin.drm.license+xml": true, - "application/vnd.mason+json": true, - "application/vnd.maxar.archive.3tz+zip": false, - "application/vnd.micro+json": true, - "application/vnd.miele+json": true, - "application/vnd.mozilla.xul+xml": true, - "application/vnd.ms-excel": false, - "application/vnd.ms-fontobject": true, - "application/vnd.ms-office.activex+xml": true, - "application/vnd.ms-opentype": true, - "application/vnd.ms-outlook": false, - "application/vnd.ms-playready.initiator+xml": true, - "application/vnd.ms-powerpoint": false, - "application/vnd.ms-printdevicecapabilities+xml": true, - "application/vnd.ms-printing.printticket+xml": true, - "application/vnd.ms-printschematicket+xml": true, - "application/vnd.ms-xpsdocument": false, - "application/vnd.nacamar.ybrid+json": true, - "application/vnd.nato.bindingdataobject+json": true, - "application/vnd.nato.bindingdataobject+xml": true, - "application/vnd.nato.openxmlformats-package.iepd+zip": false, - "application/vnd.nearst.inv+json": true, - "application/vnd.nokia.conml+xml": true, - "application/vnd.nokia.iptv.config+xml": true, - "application/vnd.nokia.landmark+xml": true, - "application/vnd.nokia.landmarkcollection+xml": true, - "application/vnd.nokia.n-gage.ac+xml": true, - "application/vnd.nokia.pcd+xml": true, - "application/vnd.oai.workflows+json": true, - "application/vnd.oasis.opendocument.graphics": false, - "application/vnd.oasis.opendocument.presentation": false, - "application/vnd.oasis.opendocument.spreadsheet": false, - "application/vnd.oasis.opendocument.text": false, - "application/vnd.oci.image.manifest.v1+json": true, - "application/vnd.oftn.l10n+json": true, - "application/vnd.oipf.contentaccessdownload+xml": true, - "application/vnd.oipf.contentaccessstreaming+xml": true, - "application/vnd.oipf.dae.svg+xml": true, - "application/vnd.oipf.dae.xhtml+xml": true, - "application/vnd.oipf.mippvcontrolmessage+xml": true, - "application/vnd.oipf.spdiscovery+xml": true, - "application/vnd.oipf.spdlist+xml": true, - "application/vnd.oipf.ueprofile+xml": true, - "application/vnd.oipf.userprofile+xml": true, - "application/vnd.oma.bcast.associated-procedure-parameter+xml": true, - "application/vnd.oma.bcast.drm-trigger+xml": true, - "application/vnd.oma.bcast.imd+xml": true, - "application/vnd.oma.bcast.notification+xml": true, - "application/vnd.oma.bcast.sgdd+xml": true, - "application/vnd.oma.bcast.smartcard-trigger+xml": true, - "application/vnd.oma.bcast.sprov+xml": true, - "application/vnd.oma.cab-address-book+xml": true, - "application/vnd.oma.cab-feature-handler+xml": true, - "application/vnd.oma.cab-pcc+xml": true, - "application/vnd.oma.cab-subs-invite+xml": true, - "application/vnd.oma.cab-user-prefs+xml": true, - "application/vnd.oma.dd2+xml": true, - "application/vnd.oma.drm.risd+xml": true, - "application/vnd.oma.group-usage-list+xml": true, - "application/vnd.oma.lwm2m+json": true, - "application/vnd.oma.pal+xml": true, - "application/vnd.oma.poc.detailed-progress-report+xml": true, - "application/vnd.oma.poc.final-report+xml": true, - "application/vnd.oma.poc.groups+xml": true, - "application/vnd.oma.poc.invocation-descriptor+xml": true, - "application/vnd.oma.poc.optimized-progress-report+xml": true, - "application/vnd.oma.scidm.messages+xml": true, - "application/vnd.oma.xcap-directory+xml": true, - "application/vnd.omads-email+xml": true, - "application/vnd.omads-file+xml": true, - "application/vnd.omads-folder+xml": true, - "application/vnd.openblox.game+xml": true, - "application/vnd.openstreetmap.data+xml": true, - "application/vnd.openvpi.dspx+json": true, - "application/vnd.openxmlformats-officedocument.custom-properties+xml": true, - "application/vnd.openxmlformats-officedocument.customxmlproperties+xml": true, - "application/vnd.openxmlformats-officedocument.drawing+xml": true, - "application/vnd.openxmlformats-officedocument.drawingml.chart+xml": true, - "application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml": true, - "application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml": true, - "application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml": true, - "application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml": true, - "application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml": true, - "application/vnd.openxmlformats-officedocument.extended-properties+xml": true, - "application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml": true, - "application/vnd.openxmlformats-officedocument.presentationml.comments+xml": true, - "application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml": true, - "application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml": true, - "application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml": true, - "application/vnd.openxmlformats-officedocument.presentationml.presentation": false, - "application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml": true, - "application/vnd.openxmlformats-officedocument.presentationml.presprops+xml": true, - "application/vnd.openxmlformats-officedocument.presentationml.slide+xml": true, - "application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml": true, - "application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml": true, - "application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml": true, - "application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml": true, - "application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml": true, - "application/vnd.openxmlformats-officedocument.presentationml.tags+xml": true, - "application/vnd.openxmlformats-officedocument.presentationml.template.main+xml": true, - "application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml": true, - "application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml": true, - "application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml": true, - "application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml": true, - "application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml": true, - "application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml": true, - "application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml": true, - "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml": true, - "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml": true, - "application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml": true, - "application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml": true, - "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml": true, - "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml": true, - "application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml": true, - "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": false, - "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml": true, - "application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml": true, - "application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml": true, - "application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml": true, - "application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml": true, - "application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml": true, - "application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml": true, - "application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml": true, - "application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml": true, - "application/vnd.openxmlformats-officedocument.theme+xml": true, - "application/vnd.openxmlformats-officedocument.themeoverride+xml": true, - "application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml": true, - "application/vnd.openxmlformats-officedocument.wordprocessingml.document": false, - "application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml": true, - "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml": true, - "application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml": true, - "application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml": true, - "application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml": true, - "application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml": true, - "application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml": true, - "application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml": true, - "application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml": true, - "application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml": true, - "application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml": true, - "application/vnd.openxmlformats-package.core-properties+xml": true, - "application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml": true, - "application/vnd.openxmlformats-package.relationships+xml": true, - "application/vnd.oracle.resource+json": true, - "application/vnd.otps.ct-kip+xml": true, - "application/vnd.pagerduty+json": true, - "application/vnd.poc.group-advertisement+xml": true, - "application/vnd.pwg-xhtml-print+xml": true, - "application/vnd.radisys.moml+xml": true, - "application/vnd.radisys.msml+xml": true, - "application/vnd.radisys.msml-audit+xml": true, - "application/vnd.radisys.msml-audit-conf+xml": true, - "application/vnd.radisys.msml-audit-conn+xml": true, - "application/vnd.radisys.msml-audit-dialog+xml": true, - "application/vnd.radisys.msml-audit-stream+xml": true, - "application/vnd.radisys.msml-conf+xml": true, - "application/vnd.radisys.msml-dialog+xml": true, - "application/vnd.radisys.msml-dialog-base+xml": true, - "application/vnd.radisys.msml-dialog-fax-detect+xml": true, - "application/vnd.radisys.msml-dialog-fax-sendrecv+xml": true, - "application/vnd.radisys.msml-dialog-group+xml": true, - "application/vnd.radisys.msml-dialog-speech+xml": true, - "application/vnd.radisys.msml-dialog-transform+xml": true, - "application/vnd.recordare.musicxml+xml": true, - "application/vnd.restful+json": true, - "application/vnd.route66.link66+xml": true, - "application/vnd.seis+json": true, - "application/vnd.shootproof+json": true, - "application/vnd.shopkick+json": true, - "application/vnd.siren+json": true, - "application/vnd.software602.filler.form+xml": true, - "application/vnd.solent.sdkm+xml": true, - "application/vnd.sun.wadl+xml": true, - "application/vnd.sycle+xml": true, - "application/vnd.syft+json": true, - "application/vnd.syncml+xml": true, - "application/vnd.syncml.dm+xml": true, - "application/vnd.syncml.dmddf+xml": true, - "application/vnd.syncml.dmtnds+xml": true, - "application/vnd.tableschema+json": true, - "application/vnd.think-cell.ppttc+json": true, - "application/vnd.tmd.mediaflex.api+xml": true, - "application/vnd.uic.osdm+json": true, - "application/vnd.uoml+xml": true, - "application/vnd.vel+json": true, - "application/vnd.veraison.tsm-report+json": true, - "application/vnd.veritone.aion+json": true, - "application/vnd.wv.csp+xml": true, - "application/vnd.wv.ssp+xml": true, - "application/vnd.xacml+json": true, - "application/vnd.xmi+xml": true, - "application/vnd.yamaha.openscoreformat.osfpvg+xml": true, - "application/vnd.zzazz.deck+xml": true, - "application/voicexml+xml": true, - "application/voucher-cms+json": true, - "application/voucher-jws+json": true, - "application/wasm": true, - "application/watcherinfo+xml": true, - "application/webpush-options+json": true, - "application/wsdl+xml": true, - "application/wspolicy+xml": true, - "application/x-7z-compressed": false, - "application/x-arj": false, - "application/x-bdoc": false, - "application/x-bzip": false, - "application/x-bzip2": false, - "application/x-deb": false, - "application/x-dtbncx+xml": true, - "application/x-dtbook+xml": true, - "application/x-dtbresource+xml": true, - "application/x-dvi": false, - "application/x-httpd-php": true, - "application/x-ipynb+json": true, - "application/x-java-jnlp-file": false, - "application/x-javascript": true, - "application/x-latex": false, - "application/x-mpegurl": false, - "application/x-ns-proxy-autoconfig": true, - "application/x-pkcs12": false, - "application/x-rar-compressed": false, - "application/x-sh": true, - "application/x-shockwave-flash": false, - "application/x-stuffit": false, - "application/x-tar": true, - "application/x-virtualbox-hdd": true, - "application/x-virtualbox-ova": true, - "application/x-virtualbox-ovf": true, - "application/x-virtualbox-vbox": true, - "application/x-virtualbox-vbox-extpack": false, - "application/x-virtualbox-vdi": true, - "application/x-virtualbox-vhd": true, - "application/x-virtualbox-vmdk": true, - "application/x-web-app-manifest+json": true, - "application/x-www-form-urlencoded": true, - "application/x-xliff+xml": true, - "application/x-xpinstall": false, - "application/xacml+xml": true, - "application/xaml+xml": true, - "application/xcap-att+xml": true, - "application/xcap-caps+xml": true, - "application/xcap-diff+xml": true, - "application/xcap-el+xml": true, - "application/xcap-error+xml": true, - "application/xcap-ns+xml": true, - "application/xcon-conference-info+xml": true, - "application/xcon-conference-info-diff+xml": true, - "application/xenc+xml": true, - "application/xhtml+xml": true, - "application/xhtml-voice+xml": true, - "application/xliff+xml": true, - "application/xml": true, - "application/xml-dtd": true, - "application/xml-patch+xml": true, - "application/xmpp+xml": true, - "application/xop+xml": true, - "application/xproc+xml": true, - "application/xslt+xml": true, - "application/xspf+xml": true, - "application/xv+xml": true, - "application/yang-data+json": true, - "application/yang-data+xml": true, - "application/yang-patch+json": true, - "application/yang-patch+xml": true, - "application/yang-sid+json": true, - "application/yin+xml": true, - "application/zip": false, - "audio/3gpp": false, - "audio/basic": false, - "audio/l24": false, - "audio/mp3": false, - "audio/mp4": false, - "audio/mpeg": false, - "audio/ogg": false, - "audio/vnd.rn-realaudio": false, - "audio/vnd.wave": false, - "audio/vorbis": false, - "audio/wav": false, - "audio/wave": false, - "audio/webm": false, - "audio/x-aac": false, - "audio/x-caf": false, - "font/otf": true, - "font/ttf": true, - "image/apng": false, - "image/avif": false, - "image/bmp": true, - "image/gif": false, - "image/jp2": false, - "image/jpeg": false, - "image/jpm": false, - "image/jpx": false, - "image/pjpeg": false, - "image/png": false, - "image/svg+xml": true, - "image/tiff": false, - "image/vnd.adobe.photoshop": true, - "image/vnd.microsoft.icon": true, - "image/vnd.ms-dds": true, - "image/x-icon": true, - "image/x-ms-bmp": true, - "image/x-xcf": false, - "message/http": false, - "message/imdn+xml": true, - "message/partial": false, - "message/rfc822": true, - "model/gltf+json": true, - "model/gltf-binary": true, - "model/iges": false, - "model/mesh": false, - "model/step+xml": true, - "model/step+zip": false, - "model/step-xml+zip": false, - "model/vnd.collada+xml": true, - "model/vnd.moml+xml": true, - "model/vnd.usdz+zip": false, - "model/vrml": false, - "model/x3d+binary": false, - "model/x3d+vrml": false, - "model/x3d+xml": true, - "multipart/alternative": false, - "multipart/encrypted": false, - "multipart/form-data": false, - "multipart/related": false, - "multipart/signed": false, - "text/cache-manifest": true, - "text/calender": true, - "text/cmd": true, - "text/css": true, - "text/csv": true, - "text/html": true, - "text/javascript": true, - "text/jsx": true, - "text/less": true, - "text/markdown": true, - "text/mdx": true, - "text/n3": true, - "text/plain": true, - "text/richtext": true, - "text/rtf": true, - "text/tab-separated-values": true, - "text/uri-list": true, - "text/vcard": true, - "text/vtt": true, - "text/x-gwt-rpc": true, - "text/x-jquery-tmpl": true, - "text/x-markdown": true, - "text/x-org": true, - "text/x-processing": true, - "text/x-suse-ymp": true, - "text/xml": true, - "text/yaml": true, - "video/lottie+json": true, - "video/mp4": false, - "video/mpeg": false, - "video/ogg": false, - "video/quicktime": false, - "video/webm": false, - "video/x-flv": false, - "video/x-matroska": false, - "video/x-ms-wmv": false, - "x-shader/x-fragment": true, - "x-shader/x-vertex": true -} diff --git a/backend/internal/filetype/filetype.go b/backend/internal/filetype/filetype.go deleted file mode 100644 index bf834bb..0000000 --- a/backend/internal/filetype/filetype.go +++ /dev/null @@ -1,152 +0,0 @@ -// Package filetype preserves the Node backend's MIME and binary-sniffing rules. -// MIME data is generated from mime-types; see LICENSE.mime-db. The bounded -// binary heuristic follows isbinaryfile; see LICENSE.isbinaryfile. -package filetype - -import ( - "bytes" - _ "embed" - "encoding/json" - "path" - "strings" -) - -//go:embed mime.json -var mimeData []byte -var types map[string]string - -func init() { - if e := json.Unmarshal(mimeData, &types); e != nil { - panic(e) - } -} -func MIME(ext string) string { return types[strings.ToLower(strings.TrimPrefix(ext, "."))] } - -var names = map[string]bool{"license": true, "licence": true, "copying": true, "copyright": true, "authors": true, "contributors": true, "readme": true, "changelog": true, "changes": true, "notice": true, "install": true, "todo": true, "version": true, "manifest": true} -var additional = map[string]bool{"license": true, "dockerfile": true, "sbt": true, "ipynb": true, "gp": true, "out": true, "sol": true, "in": true, "jsonl": true, "ndjson": true, "bat": true, "cmd": true, "ts": true} -var textual = map[string]bool{"application/json": true, "application/ld+json": true, "application/xml": true, "application/javascript": true, "application/ecmascript": true, "application/typescript": true, "application/toml": true, "application/sql": true, "application/x-sql": true, "application/x-sh": true, "application/x-csh": true, "application/x-yaml": true, "application/yaml": true, "application/x-httpd-php": true, "application/graphql": true, "application/x-tex": true, "application/x-latex": true, "application/x-perl": true, "application/x-ruby": true, "application/x-python": true} - -func Text(name string, data []byte) bool { - base := strings.ToLower(path.Base(name)) - parts := strings.Split(base, ".") - ext := parts[len(parts)-1] - if names[base] || additional[ext] { - return true - } - mime := strings.Split(MIME(path.Ext(base)), ";")[0] - if mime != "" { - return strings.HasPrefix(mime, "text/") || textual[mime] || strings.HasSuffix(mime, "+json") || strings.HasSuffix(mime, "+xml") || strings.HasSuffix(mime, "+yaml") - } - return len(data) > 0 && !binary(data) -} -func binary(data []byte) bool { - if len(data) == 0 { - return false - } - for _, bom := range [][]byte{{0xef, 0xbb, 0xbf}, {0, 0, 0xfe, 0xff}, {0xff, 0xfe, 0, 0}, {0x84, 0x31, 0x95, 0x33}, {0xfe, 0xff}, {0xff, 0xfe}} { - if bytes.HasPrefix(data, bom) { - return false - } - } - if bytes.HasPrefix(data, []byte("%PDF-")) { - return true - } - total := min(len(data), 515) - scan := min(total, 512) - suspicious := 0 - continuation := func(b byte) bool { return b >= 0x80 && b <= 0xbf } - for i := 0; i < scan; i++ { - b := data[i] - if b == 0 { - return true - } - if (b < 7 || b > 14) && (b < 32 || b > 127) { - if b >= 0xc0 && b <= 0xdf && i+1 < total { - i++ - if continuation(data[i]) { - continue - } - } else if b >= 0xe0 && b <= 0xef && i+2 < total { - i++ - if continuation(data[i]) && continuation(data[i+1]) { - i++ - continue - } - } else if b >= 0xf0 && b <= 0xf7 && i+3 < total { - i++ - if continuation(data[i]) && continuation(data[i+1]) && continuation(data[i+2]) { - i += 2 - continue - } - } - suspicious++ - if i >= 32 && suspicious*100 > scan*10 { - return true - } - } - } - if suspicious*100 > scan*10 { - return true - } - return suspicious > 1 && protobuf(data[:scan]) -} -func protobuf(data []byte) bool { - offset := 0 - broken := false - count := 0 - next := func() byte { - if offset >= len(data) || broken { - broken = true - return 0xff - } - b := data[offset] - offset++ - return b - } - variable := func() int32 { - var value int32 - for i := 0; !broken; i++ { - b := next() - value |= int32(b&0x7f) << ((7 * i) % 32) - if b&0x80 == 0 { - break - } - if i >= 10 { - broken = true - break - } - } - return value - } - for !broken { - tag := variable() - length := int32(0) - valid := true - switch tag & 7 { - case 0: - variable() - case 1: - length = 8 - case 2: - length = variable() - case 5: - length = 4 - default: - valid = false - } - if !valid && !broken { - return false - } - if length > 0 { - if int64(offset)+int64(length) > int64(len(data)) { - broken = true - } else { - offset += int(length) - } - } - if !broken { - count++ - } - } - return count > 0 -} diff --git a/backend/internal/filetype/mime.json b/backend/internal/filetype/mime.json deleted file mode 100644 index 3b7d285..0000000 --- a/backend/internal/filetype/mime.json +++ /dev/null @@ -1 +0,0 @@ -{"123":"application/vnd.lotus-1-2-3","210":"model/step","1km":"application/vnd.1000minds.decision-model+xml","3dml":"text/vnd.in3d.3dml; charset=utf-8","3ds":"image/x-3ds","3g2":"video/3gpp2","3gp":"video/3gpp","3gpp":"video/3gpp","3mf":"model/3mf","7z":"application/x-7z-compressed","aab":"application/x-authorware-bin","aac":"audio/aac","aam":"application/x-authorware-map","aas":"application/x-authorware-seg","abw":"application/x-abiword","ac":"application/pkix-attr-cert","acc":"application/vnd.americandynamics.acc","ace":"application/x-ace-compressed","acu":"application/vnd.acucobol","acutc":"application/vnd.acucorp","adp":"audio/adpcm","adts":"audio/aac","aep":"application/vnd.audiograph","afm":"application/x-font-type1","afp":"application/vnd.ibm.modcap","age":"application/vnd.age","ahead":"application/vnd.ahead.space","ai":"application/postscript","aif":"audio/x-aiff","aifc":"audio/x-aiff","aiff":"audio/x-aiff","air":"application/vnd.adobe.air-application-installer-package+zip","ait":"application/vnd.dvb.ait","ami":"application/vnd.amiga.ami","aml":"application/automationml-aml+xml","amlx":"application/automationml-amlx+zip","amr":"audio/amr","apk":"application/vnd.android.package-archive","apng":"image/apng","appcache":"text/cache-manifest; charset=utf-8","appinstaller":"application/appinstaller","application":"application/x-ms-application","appx":"application/appx","appxbundle":"application/appxbundle","apr":"application/vnd.lotus-approach","arc":"application/x-freearc","arj":"application/x-arj","asc":"application/pgp-keys","asf":"video/x-ms-asf","asm":"text/x-asm; charset=utf-8","aso":"application/vnd.accpac.simply.aso","asx":"video/x-ms-asf","atc":"application/vnd.acucorp","atom":"application/atom+xml","atomcat":"application/atomcat+xml","atomdeleted":"application/atomdeleted+xml","atomsvc":"application/atomsvc+xml","atx":"application/vnd.antix.game-component","au":"audio/basic","avci":"image/avci","avcs":"image/avcs","avi":"video/x-msvideo","avif":"image/avif","aw":"application/applixware","azf":"application/vnd.airzip.filesecure.azf","azs":"application/vnd.airzip.filesecure.azs","azv":"image/vnd.airzip.accelerator.azv","azw":"application/vnd.amazon.ebook","b16":"image/vnd.pco.b16","bary":"model/vnd.bary","bat":"application/x-msdownload","bcpio":"application/x-bcpio","bdf":"application/x-font-bdf","bdm":"application/vnd.syncml.dm+wbxml; charset=utf-8","bdo":"application/vnd.nato.bindingdataobject+xml","bdoc":"application/bdoc","bed":"application/vnd.realvnc.bed","bh2":"application/vnd.fujitsu.oasysprs","bin":"application/octet-stream","blb":"application/x-blorb","blend":"application/x-blender","blorb":"application/x-blorb","bmi":"application/vnd.bmi","bmml":"application/vnd.balsamiq.bmml+xml","bmp":"image/bmp","book":"application/vnd.framemaker","box":"application/vnd.previewsystems.box","boz":"application/x-bzip2","bpk":"application/octet-stream","brush":"application/vnd.procreate.brush","brushset":"application/vnd.procrate.brushset","bsp":"model/vnd.valve.source.compiled-map","btf":"image/prs.btif","btif":"image/prs.btif","buffer":"application/octet-stream","bz":"application/x-bzip","bz2":"application/x-bzip2","c":"text/x-c; charset=utf-8","c11amc":"application/vnd.cluetrust.cartomobile-config","c11amz":"application/vnd.cluetrust.cartomobile-config-pkg","c4d":"application/vnd.clonk.c4group","c4f":"application/vnd.clonk.c4group","c4g":"application/vnd.clonk.c4group","c4p":"application/vnd.clonk.c4group","c4u":"application/vnd.clonk.c4group","cab":"application/vnd.ms-cab-compressed","caf":"audio/x-caf","cap":"application/vnd.tcpdump.pcap","car":"application/vnd.curl.car","cat":"application/vnd.ms-pki.seccat","cb7":"application/x-cbr","cba":"application/x-cbr","cbr":"application/x-cbr","cbt":"application/x-cbr","cbz":"application/x-cbr","cc":"text/x-c; charset=utf-8","cco":"application/x-cocoa","cct":"application/x-director","ccxml":"application/ccxml+xml","cdbcmsg":"application/vnd.contact.cmsg","cdf":"application/x-netcdf","cdfx":"application/cdfx+xml","cdkey":"application/vnd.mediastation.cdkey","cdmia":"application/cdmi-capability","cdmic":"application/cdmi-container","cdmid":"application/cdmi-domain","cdmio":"application/cdmi-object","cdmiq":"application/cdmi-queue","cdx":"chemical/x-cdx","cdxml":"application/vnd.chemdraw+xml","cdy":"application/vnd.cinderella","cer":"application/pkix-cert","cfs":"application/x-cfs-compressed","cgm":"image/cgm","chat":"application/x-chat","chm":"application/vnd.ms-htmlhelp","chrt":"application/vnd.kde.kchart","cif":"chemical/x-cif","cii":"application/vnd.anser-web-certificate-issue-initiation","cil":"application/vnd.ms-artgalry","cjs":"application/node","cla":"application/vnd.claymore","class":"application/java-vm","cld":"model/vnd.cld","clkk":"application/vnd.crick.clicker.keyboard","clkp":"application/vnd.crick.clicker.palette","clkt":"application/vnd.crick.clicker.template","clkw":"application/vnd.crick.clicker.wordbank","clkx":"application/vnd.crick.clicker","clp":"application/x-msclip","cmc":"application/vnd.cosmocaller","cmdf":"chemical/x-cmdf","cml":"chemical/x-cml","cmp":"application/vnd.yellowriver-custom-menu","cmx":"image/x-cmx","cod":"application/vnd.rim.cod","coffee":"text/coffeescript; charset=utf-8","com":"application/x-msdownload","conf":"text/plain; charset=utf-8","cpio":"application/x-cpio","cpl":"application/cpl+xml","cpp":"text/x-c; charset=utf-8","cpt":"application/mac-compactpro","crd":"application/x-mscardfile","crl":"application/pkix-crl","crt":"application/x-x509-ca-cert","crx":"application/x-chrome-extension","cryptonote":"application/vnd.rig.cryptonote","csh":"application/x-csh","csl":"application/vnd.citationstyles.style+xml","csml":"chemical/x-csml","csp":"application/vnd.commonspace","css":"text/css; charset=utf-8","cst":"application/x-director","csv":"text/csv; charset=utf-8","cu":"application/cu-seeme","curl":"text/vnd.curl; charset=utf-8","cwl":"application/cwl","cww":"application/prs.cww","cxt":"application/x-director","cxx":"text/x-c; charset=utf-8","dae":"model/vnd.collada+xml","daf":"application/vnd.mobius.daf","dart":"application/vnd.dart","dataless":"application/vnd.fdsn.seed","davmount":"application/davmount+xml","dbf":"application/vnd.dbf","dbk":"application/docbook+xml","dcm":"application/dicom","dcmp":"application/vnd.dcmp+xml","dcr":"application/x-director","dcurl":"text/vnd.curl.dcurl; charset=utf-8","dd2":"application/vnd.oma.dd2+xml","ddd":"application/vnd.fujixerox.ddd","ddf":"application/vnd.syncml.dmddf+xml; charset=utf-8","dds":"image/vnd.ms-dds","deb":"application/x-debian-package","def":"text/plain; charset=utf-8","deploy":"application/octet-stream","der":"application/x-x509-ca-cert","dfac":"application/vnd.dreamfactory","dgc":"application/x-dgc-compressed","dib":"image/bmp","dic":"text/x-c; charset=utf-8","dir":"application/x-director","dis":"application/vnd.mobius.dis","disposition-notification":"message/disposition-notification","dist":"application/octet-stream","distz":"application/octet-stream","djv":"image/vnd.djvu","djvu":"image/vnd.djvu","dll":"application/x-msdownload","dmg":"application/x-apple-diskimage","dmp":"application/vnd.tcpdump.pcap","dms":"application/octet-stream","dna":"application/vnd.dna","dng":"image/x-adobe-dng","doc":"application/msword","docm":"application/vnd.ms-word.document.macroenabled.12","docx":"application/vnd.openxmlformats-officedocument.wordprocessingml.document","dot":"application/msword","dotm":"application/vnd.ms-word.template.macroenabled.12","dotx":"application/vnd.openxmlformats-officedocument.wordprocessingml.template","dp":"application/vnd.osgi.dp","dpg":"application/vnd.dpgraph","dpx":"image/dpx","dra":"audio/vnd.dra","drle":"image/dicom-rle","drm":"application/vnd.procreate.dream","dsc":"text/prs.lines.tag; charset=utf-8","dssc":"application/dssc+der","dtb":"application/x-dtbook+xml","dtd":"application/xml-dtd","dts":"audio/vnd.dts","dtshd":"audio/vnd.dts.hd","dump":"application/octet-stream","dvb":"video/vnd.dvb.file","dvi":"application/x-dvi","dwd":"application/atsc-dwd+xml","dwf":"model/vnd.dwf","dwg":"image/vnd.dwg","dxf":"image/vnd.dxf","dxp":"application/vnd.spotfire.dxp","dxr":"application/x-director","ear":"application/java-archive","ecelp4800":"audio/vnd.nuera.ecelp4800","ecelp7470":"audio/vnd.nuera.ecelp7470","ecelp9600":"audio/vnd.nuera.ecelp9600","ecma":"application/ecmascript","edm":"application/vnd.novadigm.edm","edx":"application/vnd.novadigm.edx","efif":"application/vnd.picsel","ei6":"application/vnd.pg.osasli","elc":"application/octet-stream","emf":"image/emf","eml":"message/rfc822","emma":"application/emma+xml","emotionml":"application/emotionml+xml","emz":"application/x-msmetafile","eol":"audio/vnd.digital-winds","eot":"application/vnd.ms-fontobject","eps":"application/postscript","epub":"application/epub+zip","es3":"application/vnd.eszigno3+xml","esa":"application/vnd.osgi.subsystem","esf":"application/vnd.epson.esf","et3":"application/vnd.eszigno3+xml","etx":"text/x-setext; charset=utf-8","eva":"application/x-eva","evy":"application/x-envoy","exe":"application/x-msdos-program","exi":"application/exi","exp":"application/express","exr":"image/aces","ext":"application/vnd.novadigm.ext","ez":"application/andrew-inset","ez2":"application/vnd.ezpix-album","ez3":"application/vnd.ezpix-package","f":"text/x-fortran; charset=utf-8","f4v":"video/x-f4v","f77":"text/x-fortran; charset=utf-8","f90":"text/x-fortran; charset=utf-8","fbs":"image/vnd.fastbidsheet","fbx":"application/vnd.autodesk.fbx","fcdt":"application/vnd.adobe.formscentral.fcdt","fcs":"application/vnd.isac.fcs","fdf":"application/fdf","fdt":"application/fdt+xml","fe_launch":"application/vnd.denovo.fcselayout-link","fg5":"application/vnd.fujitsu.oasysgp","fgd":"application/x-director","fh":"image/x-freehand","fh4":"image/x-freehand","fh5":"image/x-freehand","fh7":"image/x-freehand","fhc":"image/x-freehand","fig":"application/x-xfig","fits":"image/fits","flac":"audio/x-flac","fli":"video/x-fli","flo":"application/vnd.micrografx.flo","flv":"video/x-flv","flw":"application/vnd.kde.kivio","flx":"text/vnd.fmi.flexstor; charset=utf-8","fly":"text/vnd.fly; charset=utf-8","fm":"application/vnd.framemaker","fnc":"application/vnd.frogans.fnc","fo":"application/vnd.software602.filler.form+xml","for":"text/x-fortran; charset=utf-8","fpx":"image/vnd.fpx","frame":"application/vnd.framemaker","fsc":"application/vnd.fsc.weblaunch","fst":"image/vnd.fst","ftc":"application/vnd.fluxtime.clip","fti":"application/vnd.anser-web-funds-transfer-initiation","fvt":"video/vnd.fvt","fxp":"application/vnd.adobe.fxp","fxpl":"application/vnd.adobe.fxp","fzs":"application/vnd.fuzzysheet","g2w":"application/vnd.geoplan","g3":"image/g3fax","g3w":"application/vnd.geospace","gac":"application/vnd.groove-account","gam":"application/x-tads","gbr":"application/rpki-ghostbusters","gca":"application/x-gca-compressed","gdl":"model/vnd.gdl","gdoc":"application/vnd.google-apps.document","gdraw":"application/vnd.google-apps.drawing","ged":"text/vnd.familysearch.gedcom; charset=utf-8","geo":"application/vnd.dynageo","geojson":"application/geo+json","gex":"application/vnd.geometry-explorer","gform":"application/vnd.google-apps.form","ggb":"application/vnd.geogebra.file","ggs":"application/vnd.geogebra.slides","ggt":"application/vnd.geogebra.tool","ghf":"application/vnd.groove-help","gif":"image/gif","gim":"application/vnd.groove-identity-message","gjam":"application/vnd.google-apps.jam","glb":"model/gltf-binary","gltf":"model/gltf+json","gmap":"application/vnd.google-apps.map","gml":"application/gml+xml","gmx":"application/vnd.gmx","gnumeric":"application/x-gnumeric","gph":"application/vnd.flographit","gpx":"application/gpx+xml","gqf":"application/vnd.grafeq","gqs":"application/vnd.grafeq","gram":"application/srgs","gramps":"application/x-gramps-xml","gre":"application/vnd.geometry-explorer","grv":"application/vnd.groove-injector","grxml":"application/srgs+xml","gscript":"application/vnd.google-apps.script","gsf":"application/x-font-ghostscript","gsheet":"application/vnd.google-apps.spreadsheet","gsite":"application/vnd.google-apps.site","gslides":"application/vnd.google-apps.presentation","gtar":"application/x-gtar","gtm":"application/vnd.groove-tool-message","gtw":"model/vnd.gtw","gv":"text/vnd.graphviz; charset=utf-8","gxf":"application/gxf","gxt":"application/vnd.geonext","gz":"application/gzip","h":"text/x-c; charset=utf-8","h261":"video/h261","h263":"video/h263","h264":"video/h264","hal":"application/vnd.hal+xml","hbci":"application/vnd.hbci","hbs":"text/x-handlebars-template; charset=utf-8","hdd":"application/x-virtualbox-hdd","hdf":"application/x-hdf","heic":"image/heic","heics":"image/heic-sequence","heif":"image/heif","heifs":"image/heif-sequence","hej2":"image/hej2k","held":"application/atsc-held+xml","hh":"text/x-c; charset=utf-8","hjson":"application/hjson","hlp":"application/winhlp","hpgl":"application/vnd.hp-hpgl","hpid":"application/vnd.hp-hpid","hps":"application/vnd.hp-hps","hqx":"application/mac-binhex40","htc":"text/x-component; charset=utf-8","htke":"application/vnd.kenameaapp","htm":"text/html; charset=utf-8","html":"text/html; charset=utf-8","hvd":"application/vnd.yamaha.hv-dic","hvp":"application/vnd.yamaha.hv-voice","hvs":"application/vnd.yamaha.hv-script","i2g":"application/vnd.intergeo","icc":"application/vnd.iccprofile","ice":"x-conference/x-cooltalk","icm":"application/vnd.iccprofile","ico":"image/vnd.microsoft.icon","ics":"text/calendar; charset=utf-8","ief":"image/ief","ifb":"text/calendar; charset=utf-8","ifm":"application/vnd.shana.informed.formdata","iges":"model/iges","igl":"application/vnd.igloader","igm":"application/vnd.insors.igm","igs":"model/iges","igx":"application/vnd.micrografx.igx","iif":"application/vnd.shana.informed.interchange","img":"application/octet-stream","imp":"application/vnd.accpac.simply.imp","ims":"application/vnd.ms-ims","in":"text/plain; charset=utf-8","ini":"text/plain; charset=utf-8","ink":"application/inkml+xml","inkml":"application/inkml+xml","install":"application/x-install-instructions","iota":"application/vnd.astraea-software.iota","ipfix":"application/ipfix","ipk":"application/vnd.shana.informed.package","ipynb":"application/x-ipynb+json","irm":"application/vnd.ibm.rights-management","irp":"application/vnd.irepository.package+xml","iso":"application/x-iso9660-image","itp":"application/vnd.shana.informed.formtemplate","its":"application/its+xml","ivp":"application/vnd.immervision-ivp","ivu":"application/vnd.immervision-ivu","jad":"text/vnd.sun.j2me.app-descriptor; charset=utf-8","jade":"text/jade; charset=utf-8","jaii":"image/jaii","jais":"image/jais","jam":"application/vnd.jam","jar":"application/java-archive","jardiff":"application/x-java-archive-diff","java":"text/x-java-source; charset=utf-8","jfif":"image/pjpeg","jhc":"image/jphc","jisp":"application/vnd.jisp","jls":"image/jls","jlt":"application/vnd.hp-jlyt","jng":"image/x-jng","jnlp":"application/x-java-jnlp-file","joda":"application/vnd.joost.joda-archive","jp2":"image/jp2","jpe":"image/jpeg","jpeg":"image/jpeg","jpf":"image/jpx","jpg":"image/jpeg","jpg2":"image/jp2","jpgm":"image/jpm","jpgv":"video/jpeg","jph":"image/jph","jpm":"image/jpm","jpx":"image/jpx","js":"text/javascript; charset=utf-8","json":"application/json; charset=utf-8","json5":"application/json5","jsonld":"application/ld+json","jsonml":"application/jsonml+json","jsx":"text/jsx; charset=utf-8","jt":"model/jt","jxl":"image/jxl","jxr":"image/jxr","jxra":"image/jxra","jxrs":"image/jxrs","jxs":"image/jxs","jxsc":"image/jxsc","jxsi":"image/jxsi","jxss":"image/jxss","kar":"audio/midi","karbon":"application/vnd.kde.karbon","kdbx":"application/x-keepass2","key":"application/vnd.apple.keynote","kfo":"application/vnd.kde.kformula","kia":"application/vnd.kidspiration","kml":"application/vnd.google-earth.kml+xml","kmz":"application/vnd.google-earth.kmz","kne":"application/vnd.kinar","knp":"application/vnd.kinar","kon":"application/vnd.kde.kontour","kpr":"application/vnd.kde.kpresenter","kpt":"application/vnd.kde.kpresenter","kpxx":"application/vnd.ds-keypoint","ksp":"application/vnd.kde.kspread","ktr":"application/vnd.kahootz","ktx":"image/ktx","ktx2":"image/ktx2","ktz":"application/vnd.kahootz","kwd":"application/vnd.kde.kword","kwt":"application/vnd.kde.kword","lasxml":"application/vnd.las.las+xml","latex":"application/x-latex","lbd":"application/vnd.llamagraphics.life-balance.desktop","lbe":"application/vnd.llamagraphics.life-balance.exchange+xml","les":"application/vnd.hhe.lesson-player","less":"text/less; charset=utf-8","lgr":"application/lgr+xml","lha":"application/x-lzh-compressed","link66":"application/vnd.route66.link66+xml","list":"text/plain; charset=utf-8","list3820":"application/vnd.ibm.modcap","listafp":"application/vnd.ibm.modcap","litcoffee":"text/coffeescript; charset=utf-8","lnk":"application/x-ms-shortcut","log":"text/plain; charset=utf-8","lostxml":"application/lost+xml","lottie":"application/zip+dotlottie","lrf":"application/octet-stream","lrm":"application/vnd.ms-lrm","ltf":"application/vnd.frogans.ltf","lua":"text/x-lua; charset=utf-8","luac":"application/x-lua-bytecode","lvp":"audio/vnd.lucent.voice","lwp":"application/vnd.lotus-wordpro","lzh":"application/x-lzh-compressed","m13":"application/x-msmediaview","m14":"application/x-msmediaview","m1v":"video/mpeg","m21":"application/mp21","m2a":"audio/mpeg","m2t":"video/mp2t","m2ts":"video/mp2t","m2v":"video/mpeg","m3a":"audio/mpeg","m3u":"audio/x-mpegurl","m3u8":"application/vnd.apple.mpegurl","m4a":"audio/mp4","m4b":"audio/mp4","m4p":"application/mp4","m4s":"video/iso.segment","m4u":"video/vnd.mpegurl","m4v":"video/x-m4v","ma":"application/mathematica","mads":"application/mads+xml","maei":"application/mmt-aei+xml","mag":"application/vnd.ecowin.chart","maker":"application/vnd.framemaker","man":"text/troff; charset=utf-8","manifest":"text/cache-manifest; charset=utf-8","map":"application/json; charset=utf-8","mar":"application/octet-stream","markdown":"text/markdown; charset=utf-8","mathml":"application/mathml+xml","mb":"application/mathematica","mbk":"application/vnd.mobius.mbk","mbox":"application/mbox","mc1":"application/vnd.medcalcdata","mcd":"application/vnd.mcd","mcurl":"text/vnd.curl.mcurl; charset=utf-8","md":"text/markdown; charset=utf-8","mdb":"application/x-msaccess","mdi":"image/vnd.ms-modi","mdx":"text/mdx; charset=utf-8","me":"text/troff; charset=utf-8","mesh":"model/mesh","meta4":"application/metalink4+xml","metalink":"application/metalink+xml","mets":"application/mets+xml","mfm":"application/vnd.mfmp","mft":"application/rpki-manifest","mgp":"application/vnd.osgeo.mapguide.package","mgz":"application/vnd.proteus.magazine","mht":"message/rfc822","mhtml":"message/rfc822","mid":"audio/midi","midi":"audio/midi","mie":"application/x-mie","mif":"application/vnd.mif","mime":"message/rfc822","mj2":"video/mj2","mjp2":"video/mj2","mjs":"text/javascript; charset=utf-8","mk3d":"video/x-matroska","mka":"audio/x-matroska","mkd":"text/x-markdown; charset=utf-8","mks":"video/x-matroska","mkv":"video/x-matroska","mlp":"application/vnd.dolby.mlp","mmd":"application/vnd.chipnuts.karaoke-mmd","mmf":"application/vnd.smaf","mml":"text/mathml; charset=utf-8","mmr":"image/vnd.fujixerox.edmics-mmr","mng":"video/x-mng","mny":"application/x-msmoney","mobi":"application/x-mobipocket-ebook","mods":"application/mods+xml","mov":"video/quicktime","movie":"video/x-sgi-movie","mp2":"audio/mpeg","mp21":"application/mp21","mp2a":"audio/mpeg","mp3":"audio/mpeg","mp4":"video/mp4","mp4a":"audio/mp4","mp4s":"application/mp4","mp4v":"video/mp4","mpc":"application/vnd.mophun.certificate","mpd":"application/dash+xml","mpe":"video/mpeg","mpeg":"video/mpeg","mpf":"application/media-policy-dataset+xml","mpg":"video/mpeg","mpg4":"video/mp4","mpga":"audio/mpeg","mpkg":"application/vnd.apple.installer+xml","mpm":"application/vnd.blueice.multipass","mpn":"application/vnd.mophun.application","mpp":"application/dash-patch+xml","mpt":"application/vnd.ms-project","mpy":"application/vnd.ibm.minipay","mqy":"application/vnd.mobius.mqy","mrc":"application/marc","mrcx":"application/marcxml+xml","ms":"text/troff; charset=utf-8","mscml":"application/mediaservercontrol+xml","mseed":"application/vnd.fdsn.mseed","mseq":"application/vnd.mseq","msf":"application/vnd.epson.msf","msg":"application/vnd.ms-outlook","msh":"model/mesh","msi":"application/x-msdownload","msix":"application/msix","msixbundle":"application/msixbundle","msl":"application/vnd.mobius.msl","msm":"application/octet-stream","msp":"application/octet-stream","msty":"application/vnd.muvee.style","mtl":"model/mtl","mts":"video/mp2t","mus":"application/vnd.musician","musd":"application/mmt-usd+xml","musicxml":"application/vnd.recordare.musicxml+xml","mvb":"application/x-msmediaview","mvt":"application/vnd.mapbox-vector-tile","mwf":"application/vnd.mfer","mxf":"application/mxf","mxl":"application/vnd.recordare.musicxml","mxmf":"audio/mobile-xmf","mxml":"application/xv+xml","mxs":"application/vnd.triscape.mxs","mxu":"video/vnd.mpegurl","n-gage":"application/vnd.nokia.n-gage.symbian.install","n3":"text/n3; charset=utf-8","nb":"application/mathematica","nbp":"application/vnd.wolfram.player","nc":"application/x-netcdf","ncx":"application/x-dtbncx+xml","nfo":"text/x-nfo; charset=utf-8","ngdat":"application/vnd.nokia.n-gage.data","nitf":"application/vnd.nitf","nlu":"application/vnd.neurolanguage.nlu","nml":"application/vnd.enliven","nnd":"application/vnd.noblenet-directory","nns":"application/vnd.noblenet-sealer","nnw":"application/vnd.noblenet-web","npx":"image/vnd.net-fpx","nq":"application/n-quads","nsc":"application/x-conference","nsf":"application/vnd.lotus-notes","nt":"application/n-triples","ntf":"application/vnd.nitf","numbers":"application/vnd.apple.numbers","nzb":"application/x-nzb","oa2":"application/vnd.fujitsu.oasys2","oa3":"application/vnd.fujitsu.oasys3","oas":"application/vnd.fujitsu.oasys","obd":"application/x-msbinder","obgx":"application/vnd.openblox.game+xml","obj":"model/obj","oda":"application/oda","odb":"application/vnd.oasis.opendocument.database","odc":"application/vnd.oasis.opendocument.chart","odf":"application/vnd.oasis.opendocument.formula","odft":"application/vnd.oasis.opendocument.formula-template","odg":"application/vnd.oasis.opendocument.graphics","odi":"application/vnd.oasis.opendocument.image","odm":"application/vnd.oasis.opendocument.text-master","odp":"application/vnd.oasis.opendocument.presentation","ods":"application/vnd.oasis.opendocument.spreadsheet","odt":"application/vnd.oasis.opendocument.text","oga":"audio/ogg","ogex":"model/vnd.opengex","ogg":"audio/ogg","ogv":"video/ogg","ogx":"application/ogg","omdoc":"application/omdoc+xml","one":"application/onenote","onea":"application/onenote","onepkg":"application/onenote","onetmp":"application/onenote","onetoc":"application/onenote","onetoc2":"application/onenote","opf":"application/oebps-package+xml","opml":"text/x-opml; charset=utf-8","oprc":"application/vnd.palm","opus":"audio/ogg","org":"application/vnd.lotus-organizer","osf":"application/vnd.yamaha.openscoreformat","osfpvg":"application/vnd.yamaha.openscoreformat.osfpvg+xml","osm":"application/vnd.openstreetmap.data+xml","otc":"application/vnd.oasis.opendocument.chart-template","otf":"font/otf","otg":"application/vnd.oasis.opendocument.graphics-template","oth":"application/vnd.oasis.opendocument.text-web","oti":"application/vnd.oasis.opendocument.image-template","otp":"application/vnd.oasis.opendocument.presentation-template","ots":"application/vnd.oasis.opendocument.spreadsheet-template","ott":"application/vnd.oasis.opendocument.text-template","ova":"application/x-virtualbox-ova","ovf":"application/x-virtualbox-ovf","owl":"application/rdf+xml","oxps":"application/oxps","oxt":"application/vnd.openofficeorg.extension","p":"text/x-pascal; charset=utf-8","p10":"application/pkcs10","p12":"application/x-pkcs12","p21":"model/step","p7b":"application/x-pkcs7-certificates","p7c":"application/pkcs7-mime","p7m":"application/pkcs7-mime","p7r":"application/x-pkcs7-certreqresp","p7s":"application/pkcs7-signature","p8":"application/pkcs8","pac":"application/x-ns-proxy-autoconfig","pages":"application/vnd.apple.pages","pas":"text/x-pascal; charset=utf-8","paw":"application/vnd.pawaafile","pbd":"application/vnd.powerbuilder6","pbm":"image/x-portable-bitmap","pcap":"application/vnd.tcpdump.pcap","pcf":"application/x-font-pcf","pcl":"application/vnd.hp-pcl","pclxl":"application/vnd.hp-pclxl","pct":"image/x-pict","pcurl":"application/vnd.curl.pcurl","pcx":"image/vnd.zbrush.pcx","pdb":"application/vnd.palm","pde":"text/x-processing; charset=utf-8","pdf":"application/pdf","pem":"application/x-x509-ca-cert","pfa":"application/x-font-type1","pfb":"application/x-font-type1","pfm":"application/x-font-type1","pfr":"application/font-tdpfr","pfx":"application/x-pkcs12","pgm":"image/x-portable-graymap","pgn":"application/x-chess-pgn","pgp":"application/pgp-encrypted","php":"application/x-httpd-php","pic":"image/x-pict","pkg":"application/octet-stream","pki":"application/pkixcmp","pkipath":"application/pkix-pkipath","pkpass":"application/vnd.apple.pkpass","pl":"application/x-perl","plb":"application/vnd.3gpp.pic-bw-large","plc":"application/vnd.mobius.plc","plf":"application/vnd.pocketlearn","pls":"application/pls+xml","pm":"application/x-perl","pml":"application/vnd.ctc-posml","png":"image/png","pnm":"image/x-portable-anymap","portpkg":"application/vnd.macports.portpkg","pot":"application/vnd.ms-powerpoint","potm":"application/vnd.ms-powerpoint.template.macroenabled.12","potx":"application/vnd.openxmlformats-officedocument.presentationml.template","ppam":"application/vnd.ms-powerpoint.addin.macroenabled.12","ppd":"application/vnd.cups-ppd","ppm":"image/x-portable-pixmap","pps":"application/vnd.ms-powerpoint","ppsm":"application/vnd.ms-powerpoint.slideshow.macroenabled.12","ppsx":"application/vnd.openxmlformats-officedocument.presentationml.slideshow","ppt":"application/vnd.ms-powerpoint","pptm":"application/vnd.ms-powerpoint.presentation.macroenabled.12","pptx":"application/vnd.openxmlformats-officedocument.presentationml.presentation","pqa":"application/vnd.palm","prc":"model/prc","pre":"application/vnd.lotus-freelance","prf":"application/pics-rules","provx":"application/provenance+xml","ps":"application/postscript","psb":"application/vnd.3gpp.pic-bw-small","psd":"image/vnd.adobe.photoshop","psf":"application/x-font-linux-psf","pskcxml":"application/pskc+xml","pti":"image/prs.pti","ptid":"application/vnd.pvi.ptid1","pub":"application/x-mspublisher","pvb":"application/vnd.3gpp.pic-bw-var","pwn":"application/vnd.3m.post-it-notes","pya":"audio/vnd.ms-playready.media.pya","pyo":"model/vnd.pytha.pyox","pyox":"model/vnd.pytha.pyox","pyv":"video/vnd.ms-playready.media.pyv","qam":"application/vnd.epson.quickanime","qbo":"application/vnd.intu.qbo","qfx":"application/vnd.intu.qfx","qps":"application/vnd.publishare-delta-tree","qt":"video/quicktime","qwd":"application/vnd.quark.quarkxpress","qwt":"application/vnd.quark.quarkxpress","qxb":"application/vnd.quark.quarkxpress","qxd":"application/vnd.quark.quarkxpress","qxl":"application/vnd.quark.quarkxpress","qxt":"application/vnd.quark.quarkxpress","ra":"audio/x-pn-realaudio","ram":"audio/x-pn-realaudio","raml":"application/raml+yaml","rapd":"application/route-apd+xml","rar":"application/vnd.rar","ras":"image/x-cmu-raster","rcprofile":"application/vnd.ipunplugged.rcprofile","rdf":"application/rdf+xml","rdz":"application/vnd.data-vision.rdz","relo":"application/p2p-overlay+xml","rep":"application/vnd.businessobjects","res":"application/x-dtbresource+xml","rgb":"image/x-rgb","rif":"application/reginfo+xml","rip":"audio/vnd.rip","ris":"application/x-research-info-systems","rl":"application/resource-lists+xml","rlc":"image/vnd.fujixerox.edmics-rlc","rld":"application/resource-lists-diff+xml","rm":"application/vnd.rn-realmedia","rmi":"audio/midi","rmp":"audio/x-pn-realaudio-plugin","rms":"application/vnd.jcp.javame.midlet-rms","rmvb":"application/vnd.rn-realmedia-vbr","rnc":"application/relax-ng-compact-syntax","rng":"application/xml","roa":"application/rpki-roa","roff":"text/troff; charset=utf-8","rp9":"application/vnd.cloanto.rp9","rpm":"application/x-redhat-package-manager","rpss":"application/vnd.nokia.radio-presets","rpst":"application/vnd.nokia.radio-preset","rq":"application/sparql-query","rs":"application/rls-services+xml","rsat":"application/atsc-rsat+xml","rsd":"application/rsd+xml","rsheet":"application/urc-ressheet+xml","rss":"application/rss+xml","rtf":"application/rtf","rtx":"text/richtext; charset=utf-8","run":"application/x-makeself","rusd":"application/route-usd+xml","s":"text/x-asm; charset=utf-8","s3m":"audio/s3m","saf":"application/vnd.yamaha.smaf-audio","sass":"text/x-sass; charset=utf-8","sbml":"application/sbml+xml","sc":"application/vnd.ibm.secure-container","scd":"application/x-msschedule","scm":"application/vnd.lotus-screencam","scq":"application/scvp-cv-request","scs":"application/scvp-cv-response","scss":"text/x-scss; charset=utf-8","scurl":"text/vnd.curl.scurl; charset=utf-8","sda":"application/vnd.stardivision.draw","sdc":"application/vnd.stardivision.calc","sdd":"application/vnd.stardivision.impress","sdkd":"application/vnd.solent.sdkm+xml","sdkm":"application/vnd.solent.sdkm+xml","sdp":"application/sdp","sdw":"application/vnd.stardivision.writer","sea":"application/x-sea","see":"application/vnd.seemail","seed":"application/vnd.fdsn.seed","sema":"application/vnd.sema","semd":"application/vnd.semd","semf":"application/vnd.semf","senmlx":"application/senml+xml","sensmlx":"application/sensml+xml","ser":"application/java-serialized-object","setpay":"application/set-payment-initiation","setreg":"application/set-registration-initiation","sfd-hdstx":"application/vnd.hydrostatix.sof-data","sfs":"application/vnd.spotfire.sfs","sfv":"text/x-sfv; charset=utf-8","sgi":"image/sgi","sgl":"application/vnd.stardivision.writer-global","sgm":"text/sgml; charset=utf-8","sgml":"text/sgml; charset=utf-8","sh":"application/x-sh","shar":"application/x-shar","shex":"text/shex; charset=utf-8","shf":"application/shf+xml","shtml":"text/html; charset=utf-8","sid":"image/x-mrsid-image","sieve":"application/sieve","sig":"application/pgp-signature","sil":"audio/silk","silo":"model/mesh","sis":"application/vnd.symbian.install","sisx":"application/vnd.symbian.install","sit":"application/x-stuffit","sitx":"application/x-stuffitx","siv":"application/sieve","skd":"application/vnd.koan","skm":"application/vnd.koan","skp":"application/vnd.koan","skt":"application/vnd.koan","sldm":"application/vnd.ms-powerpoint.slide.macroenabled.12","sldx":"application/vnd.openxmlformats-officedocument.presentationml.slide","slim":"text/slim; charset=utf-8","slm":"text/slim; charset=utf-8","sls":"application/route-s-tsid+xml","slt":"application/vnd.epson.salt","sm":"application/vnd.stepmania.stepchart","smf":"application/vnd.stardivision.math","smi":"application/smil+xml","smil":"application/smil+xml","smv":"video/x-smv","smzip":"application/vnd.stepmania.package","snd":"audio/basic","snf":"application/x-font-snf","so":"application/octet-stream","spc":"application/x-pkcs7-certificates","spdx":"text/spdx; charset=utf-8","spf":"application/vnd.yamaha.smaf-phrase","spl":"application/x-futuresplash","spot":"text/vnd.in3d.spot; charset=utf-8","spp":"application/scvp-vp-response","spq":"application/scvp-vp-request","spx":"audio/ogg","sql":"application/sql","src":"application/x-wais-source","srt":"application/x-subrip","sru":"application/sru+xml","srx":"application/sparql-results+xml","ssdl":"application/ssdl+xml","sse":"application/vnd.kodak-descriptor","ssf":"application/vnd.epson.ssf","ssml":"application/ssml+xml","st":"application/vnd.sailingtracker.track","stc":"application/vnd.sun.xml.calc.template","std":"application/vnd.sun.xml.draw.template","step":"model/step","stf":"application/vnd.wt.stf","sti":"application/vnd.sun.xml.impress.template","stk":"application/hyperstudio","stl":"model/stl","stp":"model/step","stpnc":"model/step","stpx":"model/step+xml","stpxz":"model/step-xml+zip","stpz":"model/step+zip","str":"application/vnd.pg.format","stw":"application/vnd.sun.xml.writer.template","styl":"text/stylus; charset=utf-8","stylus":"text/stylus; charset=utf-8","sub":"text/vnd.dvb.subtitle; charset=utf-8","sus":"application/vnd.sus-calendar","susp":"application/vnd.sus-calendar","sv4cpio":"application/x-sv4cpio","sv4crc":"application/x-sv4crc","svc":"application/vnd.dvb.service","svd":"application/vnd.svd","svg":"image/svg+xml","svgz":"image/svg+xml","swa":"application/x-director","swf":"application/x-shockwave-flash","swi":"application/vnd.aristanetworks.swi","swidtag":"application/swid+xml","sxc":"application/vnd.sun.xml.calc","sxd":"application/vnd.sun.xml.draw","sxg":"application/vnd.sun.xml.writer.global","sxi":"application/vnd.sun.xml.impress","sxm":"application/vnd.sun.xml.math","sxw":"application/vnd.sun.xml.writer","t":"text/troff; charset=utf-8","t3":"application/x-t3vm-image","t38":"image/t38","taglet":"application/vnd.mynfc","tao":"application/vnd.tao.intent-module-archive","tap":"image/vnd.tencent.tap","tar":"application/x-tar","tcap":"application/vnd.3gpp2.tcap","tcl":"application/x-tcl","td":"application/urc-targetdesc+xml","teacher":"application/vnd.smart.teacher","tei":"application/tei+xml","teicorpus":"application/tei+xml","tex":"application/x-tex","texi":"application/x-texinfo","texinfo":"application/x-texinfo","text":"text/plain; charset=utf-8","tfi":"application/thraud+xml","tfm":"application/x-tex-tfm","tfx":"image/tiff-fx","tga":"image/x-tga","thmx":"application/vnd.ms-officetheme","tif":"image/tiff","tiff":"image/tiff","tk":"application/x-tcl","tmo":"application/vnd.tmobile-livetv","toml":"application/toml","torrent":"application/x-bittorrent","tpl":"application/vnd.groove-tool-template","tpt":"application/vnd.trid.tpt","tr":"text/troff; charset=utf-8","tra":"application/vnd.trueapp","trig":"application/trig","trm":"application/x-msterminal","ts":"video/mp2t","tsd":"application/timestamped-data","tsv":"text/tab-separated-values; charset=utf-8","ttc":"font/collection","ttf":"font/ttf","ttl":"text/turtle; charset=utf-8","ttml":"application/ttml+xml","twd":"application/vnd.simtech-mindmapper","twds":"application/vnd.simtech-mindmapper","txd":"application/vnd.genomatix.tuxedo","txf":"application/vnd.mobius.txf","txt":"text/plain; charset=utf-8","u32":"application/x-authorware-bin","u3d":"model/u3d","u8dsn":"message/global-delivery-status","u8hdr":"message/global-headers","u8mdn":"message/global-disposition-notification","u8msg":"message/global","ubj":"application/ubjson","udeb":"application/x-debian-package","ufd":"application/vnd.ufdl","ufdl":"application/vnd.ufdl","ulx":"application/x-glulx","umj":"application/vnd.umajin","unityweb":"application/vnd.unity","uo":"application/vnd.uoml+xml","uoml":"application/vnd.uoml+xml","uri":"text/uri-list; charset=utf-8","uris":"text/uri-list; charset=utf-8","urls":"text/uri-list; charset=utf-8","usda":"model/vnd.usda","usdz":"model/vnd.usdz+zip","ustar":"application/x-ustar","utz":"application/vnd.uiq.theme","uu":"text/x-uuencode; charset=utf-8","uva":"audio/vnd.dece.audio","uvd":"application/vnd.dece.data","uvf":"application/vnd.dece.data","uvg":"image/vnd.dece.graphic","uvh":"video/vnd.dece.hd","uvi":"image/vnd.dece.graphic","uvm":"video/vnd.dece.mobile","uvp":"video/vnd.dece.pd","uvs":"video/vnd.dece.sd","uvt":"application/vnd.dece.ttml+xml","uvu":"video/vnd.uvvu.mp4","uvv":"video/vnd.dece.video","uvva":"audio/vnd.dece.audio","uvvd":"application/vnd.dece.data","uvvf":"application/vnd.dece.data","uvvg":"image/vnd.dece.graphic","uvvh":"video/vnd.dece.hd","uvvi":"image/vnd.dece.graphic","uvvm":"video/vnd.dece.mobile","uvvp":"video/vnd.dece.pd","uvvs":"video/vnd.dece.sd","uvvt":"application/vnd.dece.ttml+xml","uvvu":"video/vnd.uvvu.mp4","uvvv":"video/vnd.dece.video","uvvx":"application/vnd.dece.unspecified","uvvz":"application/vnd.dece.zip","uvx":"application/vnd.dece.unspecified","uvz":"application/vnd.dece.zip","vbox":"application/x-virtualbox-vbox","vbox-extpack":"application/x-virtualbox-vbox-extpack","vcard":"text/vcard; charset=utf-8","vcd":"application/x-cdlink","vcf":"text/x-vcard; charset=utf-8","vcg":"application/vnd.groove-vcard","vcs":"text/x-vcalendar; charset=utf-8","vcx":"application/vnd.vcx","vdi":"application/x-virtualbox-vdi","vds":"model/vnd.sap.vds","vdx":"application/vnd.ms-visio.viewer","vhd":"application/x-virtualbox-vhd","vis":"application/vnd.visionary","viv":"video/vnd.vivo","vmdk":"application/x-virtualbox-vmdk","vob":"video/x-ms-vob","vor":"application/vnd.stardivision.writer","vox":"application/x-authorware-bin","vrml":"model/vrml","vsd":"application/vnd.visio","vsdx":"application/vnd.visio","vsf":"application/vnd.vsf","vss":"application/vnd.visio","vst":"application/vnd.visio","vsw":"application/vnd.visio","vtf":"image/vnd.valve.source.texture","vtt":"text/vtt; charset=utf-8","vtu":"model/vnd.vtu","vtx":"application/vnd.visio","vxml":"application/voicexml+xml","w3d":"application/x-director","wad":"application/x-doom","wadl":"application/vnd.sun.wadl+xml","war":"application/java-archive","wasm":"application/wasm","wav":"audio/wav","wax":"audio/x-ms-wax","wbmp":"image/vnd.wap.wbmp","wbs":"application/vnd.criticaltools.wbs+xml","wbxml":"application/vnd.wap.wbxml; charset=utf-8","wcm":"application/vnd.ms-works","wdb":"application/vnd.ms-works","wdp":"image/vnd.ms-photo","weba":"audio/webm","webapp":"application/x-web-app-manifest+json","webm":"video/webm","webmanifest":"application/manifest+json; charset=utf-8","webp":"image/webp","wg":"application/vnd.pmi.widget","wgsl":"text/wgsl; charset=utf-8","wgt":"application/widget","wif":"application/watcherinfo+xml","wks":"application/vnd.ms-works","wm":"video/x-ms-wm","wma":"audio/x-ms-wma","wmd":"application/x-ms-wmd","wmf":"image/wmf","wml":"text/vnd.wap.wml; charset=utf-8","wmlc":"application/vnd.wap.wmlc","wmls":"text/vnd.wap.wmlscript; charset=utf-8","wmlsc":"application/vnd.wap.wmlscriptc","wmv":"video/x-ms-wmv","wmx":"video/x-ms-wmx","wmz":"application/x-ms-wmz","woff":"font/woff","woff2":"font/woff2","wpd":"application/vnd.wordperfect","wpl":"application/vnd.ms-wpl","wps":"application/vnd.ms-works","wqd":"application/vnd.wqd","wri":"application/x-mswrite","wrl":"model/vrml","wsc":"message/vnd.wfa.wsc","wsdl":"application/wsdl+xml","wspolicy":"application/wspolicy+xml","wtb":"application/vnd.webturbo","wvx":"video/x-ms-wvx","x32":"application/x-authorware-bin","x3d":"model/x3d+xml","x3db":"model/x3d+fastinfoset","x3dbz":"model/x3d+binary","x3dv":"model/x3d-vrml","x3dvz":"model/x3d+vrml","x3dz":"model/x3d+xml","x_b":"model/vnd.parasolid.transmit.binary","x_t":"model/vnd.parasolid.transmit.text","xaml":"application/xaml+xml","xap":"application/x-silverlight-app","xar":"application/vnd.xara","xav":"application/xcap-att+xml","xbap":"application/x-ms-xbap","xbd":"application/vnd.fujixerox.docuworks.binder","xbm":"image/x-xbitmap","xca":"application/xcap-caps+xml","xcs":"application/calendar+xml","xdcf":"application/vnd.gov.sk.xmldatacontainer+xml","xdf":"application/xcap-diff+xml","xdm":"application/vnd.syncml.dm+xml; charset=utf-8","xdp":"application/vnd.adobe.xdp+xml","xdssc":"application/dssc+xml","xdw":"application/vnd.fujixerox.docuworks","xel":"application/xcap-el+xml","xenc":"application/xenc+xml","xer":"application/patch-ops-error+xml","xfdf":"application/xfdf","xfdl":"application/vnd.xfdl","xht":"application/xhtml+xml","xhtm":"application/vnd.pwg-xhtml-print+xml","xhtml":"application/xhtml+xml","xhvml":"application/xv+xml","xif":"image/vnd.xiff","xla":"application/vnd.ms-excel","xlam":"application/vnd.ms-excel.addin.macroenabled.12","xlc":"application/vnd.ms-excel","xlf":"application/xliff+xml","xlm":"application/vnd.ms-excel","xls":"application/vnd.ms-excel","xlsb":"application/vnd.ms-excel.sheet.binary.macroenabled.12","xlsm":"application/vnd.ms-excel.sheet.macroenabled.12","xlsx":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","xlt":"application/vnd.ms-excel","xltm":"application/vnd.ms-excel.template.macroenabled.12","xltx":"application/vnd.openxmlformats-officedocument.spreadsheetml.template","xlw":"application/vnd.ms-excel","xm":"audio/xm","xml":"application/xml","xns":"application/xcap-ns+xml","xo":"application/vnd.olpc-sugar","xop":"application/xop+xml","xpi":"application/x-xpinstall","xpl":"application/xproc+xml","xpm":"image/x-xpixmap","xpr":"application/vnd.is-xpr","xps":"application/vnd.ms-xpsdocument","xpw":"application/vnd.intercon.formnet","xpx":"application/vnd.intercon.formnet","xsd":"application/xml","xsf":"application/prs.xsf+xml","xsl":"application/xml","xslt":"application/xslt+xml","xsm":"application/vnd.syncml+xml; charset=utf-8","xspf":"application/xspf+xml","xul":"application/vnd.mozilla.xul+xml","xvm":"application/xv+xml","xvml":"application/xv+xml","xwd":"image/x-xwindowdump","xyz":"chemical/x-xyz","xz":"application/x-xz","yaml":"text/yaml; charset=utf-8","yang":"application/yang","yin":"application/yin+xml","yml":"text/yaml; charset=utf-8","ymp":"text/x-suse-ymp; charset=utf-8","z1":"application/x-zmachine","z2":"application/x-zmachine","z3":"application/x-zmachine","z4":"application/x-zmachine","z5":"application/x-zmachine","z6":"application/x-zmachine","z7":"application/x-zmachine","z8":"application/x-zmachine","zaz":"application/vnd.zzazz.deck+xml","zip":"application/zip","zir":"application/vnd.zul","zirz":"application/vnd.zul","zmm":"application/vnd.handheld-entertainment+xml"} \ No newline at end of file diff --git a/backend/internal/provider/archive.go b/backend/internal/provider/archive.go deleted file mode 100644 index 233fabf..0000000 --- a/backend/internal/provider/archive.go +++ /dev/null @@ -1,30 +0,0 @@ -package provider - -import ( - "context" - "errors" - "io" -) - -// Archives optionally supplies a sequential, immutable repository snapshot. -// Entries contain repository-relative paths, with no archive root prefix. -// Bodies are valid until Next is called; callers must consume them first. -// Implementations must honor cancellation, validate archive structure and -// checksums, and never follow filesystem links. Close releases the upstream. -type Archives interface { - OpenArchive(context.Context, Access) (Archive, error) -} - -type Archive interface { - Next() (Entry, io.Reader, error) - Close() error -} - -// ArchiveContentVerifier can request the normal file path when an archive -// representation differs from a blob (for example export-subst or LFS). -// Returning ErrArchiveEntryFallback never permits unverified bytes through. -type ArchiveContentVerifier interface { - VerifyArchiveContent(context.Context, Access, Entry, ContentProof, []byte) error -} - -var ErrArchiveEntryFallback = errors.New("archive_entry_requires_file_download") diff --git a/backend/internal/provider/content.go b/backend/internal/provider/content.go deleted file mode 100644 index 7110c25..0000000 --- a/backend/internal/provider/content.go +++ /dev/null @@ -1,27 +0,0 @@ -package provider - -import "context" - -// ContentProof describes bytes hashed by the cache, not metadata supplied by a -// client or upstream service. GitSHA includes the Git blob header. -type ContentProof struct { - GitSHA, SHA256 string - Size int64 -} - -// ContentVerifier optionally binds downloaded bytes to a provider's immutable -// entry revision. Return "git-" plus proof.GitSHA or "sha256-" plus proof.SHA256. -// Providers without this capability use a computed SHA-256 content identity. -// This capability does not authorize access; callers must authorize before -// both cache lookups and downloads. Implementations must honor cancellation. -type ContentVerifier interface { - VerifyContent(context.Context, Access, Entry, ContentProof) (string, error) -} - -// ContentIdentity optionally supplies a globally reusable cache key. Implement -// only alongside ContentVerifier when the revision proves content identity. -// Empty means use the server's provider/repository/path/revision namespace. -type ContentIdentity interface { - ContentVerifier - ContentCacheKey(Access, Entry) string -} diff --git a/backend/internal/provider/errors.go b/backend/internal/provider/errors.go deleted file mode 100644 index 1b4f836..0000000 --- a/backend/internal/provider/errors.go +++ /dev/null @@ -1,22 +0,0 @@ -package provider - -import ( - "errors" - "time" -) - -// Adapters can wrap these errors with internal context. The server publishes -// only the stable category, never a remote response body or wrapper message. -var ( - ErrNotFound = errors.New("resource_not_found") - ErrAccessDenied = errors.New("not_authorized") - ErrRateLimited = errors.New("rate_limited") - ErrUpstream = errors.New("upstream_error") -) - -// RateLimitError carries an optional reset instant without depending on HTTP -// handlers, MongoDB, or a particular provider's rate-limit headers. -type RateLimitError struct{ ResetAt time.Time } - -func (e *RateLimitError) Error() string { return ErrRateLimited.Error() } -func (e *RateLimitError) Unwrap() error { return ErrRateLimited } diff --git a/backend/internal/provider/provider.go b/backend/internal/provider/provider.go deleted file mode 100644 index bd3eb42..0000000 --- a/backend/internal/provider/provider.go +++ /dev/null @@ -1,214 +0,0 @@ -// Package provider defines source-control operations independently of HTTP -// routes, MongoDB, anonymization, queues, and any particular hosting service. -package provider - -import ( - "context" - "errors" - "io" - "reflect" - "regexp" - "sort" - "time" -) - -type Ref struct { - Provider, ID, Name, Branch, Commit, AnonymousID string -} - -// Access contains server-owned state, never an access token or client-supplied -// endpoint. Data is opaque to the lifecycle and interpreted only by its adapter. -type Access struct { - Ref Ref - OwnerID string - Binding map[string]any -} -type ConnectRequest struct { - OwnerID, Name, Connection string - // RepositoryID is an optional identity from server-owned metadata. Resolve - // and authorize that identity even when Name is stale after a rename. - RepositoryID string -} -type Connection struct { - Ref Ref - Binding map[string]any -} -type Repository struct { - ID, Name, URL, DefaultBranch string - Size int64 - HasPage bool - PageBranch, PagePath string -} -type Commit struct { - ID string - Date time.Time -} -type Branch struct { - Name, Commit string - Readme *string -} -type Entry struct { - Path, Revision string - Size int64 - Directory bool -} - -type Provider interface{ ID() string } -type Repositories interface { - Provider - Connect(context.Context, ConnectRequest) (Connection, error) - Authorize(context.Context, Access) error - Repository(context.Context, Access) (Repository, error) - Commit(context.Context, Access, string) (Commit, error) - // Branch resolves a branch only, never a tag or arbitrary revision. - Branch(context.Context, Access, string) (Commit, error) - Tree(context.Context, Access) ([]Entry, error) - Open(context.Context, Access, Entry) (io.ReadCloser, error) - PublicURL(Ref) string - // SelfLinks returns provider URLs whose repository-relative suffixes can be - // retained when rewriting to the anonymous repository URL. Most specific first. - SelfLinks(Ref) []string -} - -// PartialTrees optionally reports incomplete directories in a tree snapshot. -// Empty string denotes the root. Adapters without this capability return -// complete trees through Repositories.Tree. -type PartialTrees interface { - TreeWithTruncation(context.Context, Access) ([]Entry, []string, error) -} - -// FileMetadata optionally recovers metadata omitted from a truncated tree. -// A nil entry means absent or not a regular file. The adapter must use the -// immutable commit in Access and must not return content or credentials. -type FileMetadata interface { - FileMetadata(context.Context, Access, string) (*Entry, error) -} - -// RepositoryPreviews optionally supports provider-specific metadata caching. -// A cache hit must still authorize access and verify the upstream identity. -// A nil cached value requires fresh metadata. Otherwise return the supplied -// snapshot after verifying access and identity; the server will not rewrite it. -type RepositoryPreviews interface { - PreviewRepository(context.Context, Access, *Repository) (Repository, error) -} - -// ListRequest keeps refresh policy independent of any hosting service. -type ListRequest struct { - OwnerID string - Force bool -} - -// Discovery is optional; an archive provider need not have remote search. -type Discovery interface { - Provider - List(context.Context, ListRequest) ([]Repository, error) - Branches(context.Context, Access) ([]Branch, error) - Readme(context.Context, Access, string) (string, error) -} - -// DiscoveryPreviews optionally adds cache/refresh behavior after the shared -// route has authorized access and verified repository metadata. -type DiscoveryPreviews interface { - PreviewBranches(context.Context, Access, bool) ([]Branch, error) - PreviewReadme(context.Context, Access, string, bool) (string, error) -} - -// BranchMatch is evaluated against discovered branch names. The transport -// owns name coercion; adapters own discovery and content caching. -type BranchMatch func(string) (bool, error) - -// SelectedReadmePreviews optionally defers branch selection until discovery -// succeeds. Existing DiscoveryPreviews implementations remain supported. -type SelectedReadmePreviews interface { - PreviewSelectedReadme(context.Context, Access, BranchMatch, bool) (string, error) -} - -// Documents is optional. PRs and snippets use the same lifecycle/public-output -// rules, while adapters normalize their native response into the saved schema. -type DocumentRequest struct { - Access Access - Kind, ID string - Number int64 -} -type Documents interface { - Provider - ConnectDocument(context.Context, DocumentRequest, string) (Access, error) - Document(context.Context, DocumentRequest) (map[string]any, error) - DocumentURL(DocumentRequest) string -} - -var ErrBranchNotFound = errors.New("branch_not_found") - -var ErrUnknown = errors.New("provider_not_supported") -var ErrCapability = errors.New("provider_capability_not_supported") -var validID = regexp.MustCompile(`^[a-z][a-z0-9-]{0,63}$`) - -type Registry struct{ entries map[string]Provider } - -// New constructs an immutable registry. Duplicate IDs are rejected so an -// extension cannot silently replace GitHub's authentication or authorization. -func New(entries ...Provider) (*Registry, error) { - r := &Registry{entries: map[string]Provider{}} - for _, p := range entries { - if nilProvider(p) { - return nil, errors.New("invalid_provider_id") - } - id := p.ID() - if !validID.MatchString(id) { - return nil, errors.New("invalid_provider_id") - } - if _, ok := r.entries[id]; ok { - return nil, errors.New("duplicate_provider_id") - } - r.entries[id] = p - } - return r, nil -} - -func nilProvider(p Provider) bool { - if p == nil { - return true - } - value := reflect.ValueOf(p) - switch value.Kind() { - case reflect.Chan, reflect.Func, reflect.Interface, reflect.Map, reflect.Pointer, reflect.Slice: - return value.IsNil() - } - return false -} -func (r *Registry) Get(id string) (Provider, error) { - p, ok := r.entries[id] - if !ok { - return nil, ErrUnknown - } - return p, nil -} -func (r *Registry) Repositories(id string) (Repositories, error) { - p, e := r.Get(id) - if e != nil { - return nil, e - } - v, ok := p.(Repositories) - if !ok { - return nil, ErrCapability - } - return v, nil -} -func (r *Registry) All() []Provider { - out := make([]Provider, 0, len(r.entries)) - for _, id := range r.IDs() { - out = append(out, r.entries[id]) - } - return out -} - -// IDs returns a sorted copy of the registered names. Adapter methods cannot -// rename registry entries or change capability routing after registration. -func (r *Registry) IDs() []string { - ids := make([]string, 0, len(r.entries)) - for id := range r.entries { - ids = append(ids, id) - } - sort.Strings(ids) - return ids -} diff --git a/backend/internal/provider/provider_test.go b/backend/internal/provider/provider_test.go deleted file mode 100644 index 3b9710b..0000000 --- a/backend/internal/provider/provider_test.go +++ /dev/null @@ -1,91 +0,0 @@ -package provider - -import ( - "errors" - "testing" -) - -type named string - -func (n named) ID() string { return string(n) } -func TestRegistry(t *testing.T) { - for _, entries := range [][]Provider{{nil}, {named("GitHub")}, {named("../host")}, {named("github"), named("github")}} { - if _, e := New(entries...); e == nil { - t.Fatalf("accepted %#v", entries) - } - } - r, e := New(named("fixture")) - if e != nil { - t.Fatal(e) - } - if _, e = r.Get("github"); !errors.Is(e, ErrUnknown) { - t.Fatal(e) - } - if _, e = r.Repositories("fixture"); !errors.Is(e, ErrCapability) { - t.Fatal(e) - } - if p, e := r.Get("fixture"); e != nil || p.ID() != "fixture" { - t.Fatal(p, e) - } -} - -type changingProvider struct { - calls int - first, later string -} - -func (p *changingProvider) ID() string { - p.calls++ - if p.calls == 1 { - return p.first - } - return p.later -} - -type mapProvider map[string]string - -func (p mapProvider) ID() string { return "map-provider" } - -func TestRegistryCapturesIdentityOnce(t *testing.T) { - p := &changingProvider{first: "fixture", later: "github"} - builtin := named("github") - r, err := New(builtin, p) - if err != nil { - t.Fatal(err) - } - if p.calls != 1 { - t.Fatal("provider identity read more than once", p.calls) - } - if actual, err := r.Get("github"); err != nil || actual != builtin { - t.Fatal("extension replaced built-in provider", actual, err) - } - if actual, err := r.Get("fixture"); err != nil || actual != p { - t.Fatal("registered identity was not retained", actual, err) - } - ids := r.IDs() - if len(ids) != 2 || ids[0] != "fixture" || ids[1] != "github" { - t.Fatal("unstable registry ordering", ids) - } - ids[0] = "changed" - all := r.All() - if len(all) != 2 || all[0] != p || all[1] != builtin || r.IDs()[0] != "fixture" || p.calls != 1 { - t.Fatal("listing re-read mutable identities or exposed registry storage") - } - duplicate := &changingProvider{first: "github", later: "fixture"} - if _, err := New(builtin, duplicate); err == nil || err.Error() != "duplicate_provider_id" { - t.Fatal("duplicate identity accepted", err) - } -} - -func TestRegistryRejectsTypedNil(t *testing.T) { - var pointer *changingProvider - var mapping mapProvider - for _, p := range []Provider{pointer, mapping} { - if _, err := New(p); err == nil || err.Error() != "invalid_provider_id" { - t.Fatal("typed-nil adapter accepted", err) - } - } - if _, err := New(mapProvider{}); err != nil { - t.Fatal("non-nil adapter rejected", err) - } -} diff --git a/backend/internal/quotagate/gate.go b/backend/internal/quotagate/gate.go deleted file mode 100644 index 3ede933..0000000 --- a/backend/internal/quotagate/gate.go +++ /dev/null @@ -1,120 +0,0 @@ -// Package quotagate coordinates provider quotas across processes. Scope names -// belong to adapters: use a stable installation/account identifier where token -// renewal shares a quota, or the token itself for an independent credential. -package quotagate - -import ( - "context" - "crypto/sha256" - "encoding/hex" - "encoding/json" - "sync" - "time" - - "github.com/redis/go-redis/v9" -) - -const maxLocal = 2048 - -type Gate struct { - client redis.UniversalClient - mu sync.Mutex - local map[string]int64 -} - -func New(client redis.UniversalClient) *Gate { - return &Gate{client: client, local: make(map[string]int64)} -} - -func key(provider, scope string) string { - input, _ := json.Marshal([]string{provider, scope}) - digest := sha256.Sum256(input) - return "go:provider-quota:" + hex.EncodeToString(digest[:]) -} - -func (g *Gate) remember(key string, reset, now int64) int64 { - g.mu.Lock() - defer g.mu.Unlock() - if reset > 253402300799000 { - reset = 0 - } - if previous := g.local[key]; previous > reset { - reset = previous - } - if reset <= now { - delete(g.local, key) - return 0 - } - if _, exists := g.local[key]; !exists && len(g.local) >= maxLocal { - for k, v := range g.local { - if v <= now { - delete(g.local, k) - } - } - if len(g.local) >= maxLocal { - for k := range g.local { - delete(g.local, k) - break - } - } - } - g.local[key] = reset - return reset -} - -// Current returns zero when unrestricted. Redis outages fail open for unknown -// scopes, while already observed limits remain in the bounded local fallback. -// Cancellation is returned to the caller rather than permitting upstream work. -func (g *Gate) Current(ctx context.Context, provider, scope string) (time.Time, error) { - if err := ctx.Err(); err != nil { - return time.Time{}, err - } - k := key(provider, scope) - var reset int64 - if g.client != nil { - reset, _ = g.client.Get(ctx, k).Int64() - } - if err := ctx.Err(); err != nil { - return time.Time{}, err - } - reset = g.remember(k, reset, time.Now().UnixMilli()) - if reset == 0 { - return time.Time{}, nil - } - return time.UnixMilli(reset), nil -} - -// Updating a gate must never shorten a concurrently reported quota delay. -var extend = redis.NewScript(` -local previous = tonumber(redis.call('GET', KEYS[1])) or 0 -if previous > 253402300799000 then previous = 0 end -local requested = tonumber(ARGV[1]) -if requested > previous then - redis.call('SET', KEYS[1], ARGV[1], 'PXAT', ARGV[2]) - return requested -end -return previous -`) - -// Extend records the limit locally before attempting Redis. A Redis failure is -// nonfatal, matching the TypeScript quota gate. Only valid future instants are -// retained; timestamps are bounded to avoid overflow in Redis TTL arithmetic. -func (g *Gate) Extend(ctx context.Context, provider, scope string, reset time.Time) error { - if err := ctx.Err(); err != nil { - return err - } - now := time.Now().UnixMilli() - millis := reset.UnixMilli() - if millis <= now || millis > 253402300799000 { - return nil - } - k := key(provider, scope) - millis = g.remember(k, millis, now) - if g.client != nil { - shared, err := extend.Run(ctx, g.client, []string{k}, millis, millis+10000).Int64() - if err == nil { - g.remember(k, shared, time.Now().UnixMilli()) - } - } - return ctx.Err() -} diff --git a/backend/internal/quotagate/gate_test.go b/backend/internal/quotagate/gate_test.go deleted file mode 100644 index 2ae8c34..0000000 --- a/backend/internal/quotagate/gate_test.go +++ /dev/null @@ -1,144 +0,0 @@ -package quotagate - -import ( - "context" - "fmt" - "os" - "strings" - "sync" - "testing" - "time" - - "github.com/redis/go-redis/v9" -) - -func TestLocalGateBoundsAndCancellation(t *testing.T) { - ctx := context.Background() - g := New(nil) - reset := time.Now().Add(time.Hour).Truncate(time.Millisecond) - for i := 0; i < maxLocal+100; i++ { - if err := g.Extend(ctx, "forge", fmt.Sprint(i), reset); err != nil { - t.Fatal(err) - } - } - if len(g.local) > maxLocal { - t.Fatal("unbounded local cache") - } - if err := g.Extend(ctx, "forge", "secret", reset); err != nil { - t.Fatal(err) - } - if err := g.Extend(ctx, "forge", "secret", reset.Add(-time.Minute)); err != nil { - t.Fatal(err) - } - got, err := g.Current(ctx, "forge", "secret") - if err != nil || !got.Equal(reset) { - t.Fatal(got, err) - } - if got, _ := g.Current(ctx, "other-forge", "secret"); !got.IsZero() { - t.Fatal("provider scopes mixed") - } - for k := range g.local { - if strings.Contains(k, "secret") || strings.Contains(k, "forge") { - t.Fatal("scope exposed in key") - } - } - canceled, cancel := context.WithCancel(ctx) - cancel() - if _, err := g.Current(canceled, "forge", "secret"); err != context.Canceled { - t.Fatal(err) - } - if err := g.Extend(canceled, "forge", "secret", reset.Add(time.Hour)); err != context.Canceled { - t.Fatal(err) - } - got, _ = g.Current(ctx, "forge", "secret") - if !got.Equal(reset) { - t.Fatal("canceled extension changed gate") - } -} - -func TestSharedGateIntegration(t *testing.T) { - address := os.Getenv("GO_TEST_REDIS_ADDR") - if address == "" { - t.Skip("requires disposable Redis") - } - if !strings.HasPrefix(address, "127.0.0.1:") { - t.Fatal("requires local disposable Redis") - } - ctx := context.Background() - client := redis.NewClient(&redis.Options{Addr: address, MaxRetries: -1}) - defer client.Close() - scope := fmt.Sprintf("synthetic-secret-%d", time.Now().UnixNano()) - providers := []string{"forge-one", "forge-two"} - defer func() { - for _, p := range providers { - client.Del(ctx, key(p, scope)) - } - }() - a, b := New(client), New(client) - now := time.Now().Truncate(time.Millisecond) - var wg sync.WaitGroup - for i := 1; i <= 40; i++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - g := a - if i%2 == 0 { - g = b - } - if err := g.Extend(ctx, providers[0], scope, now.Add(time.Duration(i)*time.Minute)); err != nil { - t.Error(err) - } - }(i) - } - wg.Wait() - want := now.Add(40 * time.Minute) - fresh := New(client) - got, err := fresh.Current(ctx, providers[0], scope) - if err != nil || !got.Equal(want) { - t.Fatal(got, err) - } - if got, _ := b.Current(ctx, providers[1], scope); !got.IsZero() { - t.Fatal("providers share gate") - } - if got, _ := b.Current(ctx, providers[0], scope+"other"); !got.IsZero() { - t.Fatal("credentials share gate") - } - ttl, err := client.PTTL(ctx, key(providers[0], scope)).Result() - if err != nil || ttl <= 0 || ttl > 40*time.Minute+10*time.Second { - t.Fatal(ttl, err) - } - // A fresh scope expires in both the shared and local cache. - if err := b.Extend(ctx, providers[1], scope, time.Now().Add(30*time.Millisecond)); err != nil { - t.Fatal(err) - } - time.Sleep(50 * time.Millisecond) - if got, err := b.Current(ctx, providers[1], scope); err != nil || !got.IsZero() { - t.Fatal(got, err) - } - // Corrupt shared values neither create a permanent gate nor prevent repair. - if err := client.Set(ctx, key(providers[1], scope), "9223372036854775807", time.Minute).Err(); err != nil { - t.Fatal(err) - } - if got, _ := b.Current(ctx, providers[1], scope); !got.IsZero() { - t.Fatal("invalid timestamp accepted") - } - if err := b.Extend(ctx, providers[1], scope, want); err != nil { - t.Fatal(err) - } - if got, _ := New(client).Current(ctx, providers[1], scope); !got.Equal(want) { - t.Fatal("corrupt gate not repaired", got) - } - // A local observation survives an unavailable Redis connection. - dead := redis.NewClient(&redis.Options{Addr: address, MaxRetries: -1}) - fallback := New(dead) - if got, _ := fallback.Current(ctx, providers[0], scope); !got.Equal(want) { - t.Fatal(got) - } - dead.Close() - if got, err := fallback.Current(ctx, providers[0], scope); err != nil || !got.Equal(want) { - t.Fatal("lost fallback", got, err) - } - if got, err := fallback.Current(ctx, providers[0], scope+"unknown"); err != nil || !got.IsZero() { - t.Fatal("outage did not fail open", got, err) - } -} diff --git a/backend/internal/security/access.go b/backend/internal/security/access.go deleted file mode 100644 index 167492a..0000000 --- a/backend/internal/security/access.go +++ /dev/null @@ -1,69 +0,0 @@ -package security - -import ( - "errors" - "net/url" - "path" - "regexp" - "strings" -) - -type Identity struct { - ID, Username, GitHubID, Status string - Admin bool -} -type Coauthor struct { - Username string `json:"username" bson:"username"` - GitHubID string `json:"githubId" bson:"githubId"` -} - -func (u Identity) Active() bool { return u.ID != "" && u.Status != "banned" && u.Status != "removed" } -func (u Identity) CanEdit(owner string, coauthors []Coauthor) bool { - if !u.Active() { - return false - } - if u.Admin || u.ID == owner { - return true - } - for _, c := range coauthors { - if c.GitHubID != "" { - if u.GitHubID != "" && u.GitHubID == c.GitHubID { - return true - } - } else if u.Username != "" && u.Username == c.Username { - return true - } - } - return false -} -func (u Identity) Owns(owner string) bool { return u.Active() && (u.Admin || u.ID == owner) } - -var safeReturn = regexp.MustCompile(`^/(?:(?:anonymize|pull-request-anonymize|gist-anonymize)(?:/[\w-]+)?|connections|dashboard)(?:\?[^\\\r\n]*)?$`) - -func ReturnTo(value, fallback string) string { - if safeReturn.MatchString(value) { - return value - } - return fallback -} - -// RelativePath rejects ambiguous separators before cleaning. Callers must use -// os.Root for disk access as well, to prevent symlink traversal and TOCTOU races. -func RelativePath(value string) (string, error) { - if value == "" || strings.HasPrefix(value, "/") || strings.ContainsAny(value, "\\\x00") { - return "", errors.New("invalid_file_path") - } - for _, s := range strings.Split(value, "/") { - if s == "" || s == "." || s == ".." { - return "", errors.New("invalid_file_path") - } - } - return path.Clean(value), nil -} -func DecodePath(value string) (string, error) { - s, e := url.PathUnescape(value) - if e != nil { - return "", errors.New("invalid_file_path") - } - return RelativePath(s) -} diff --git a/backend/internal/security/credentials.go b/backend/internal/security/credentials.go deleted file mode 100644 index ae7f853..0000000 --- a/backend/internal/security/credentials.go +++ /dev/null @@ -1,173 +0,0 @@ -// Package security implements the persisted security contracts shared with the -// TypeScript backend. Errors deliberately exclude key and credential material. -package security - -import ( - "bytes" - "crypto/aes" - "crypto/cipher" - "crypto/hmac" - "crypto/rand" - "crypto/sha256" - "encoding/base64" - "encoding/hex" - "encoding/json" - "errors" - "strings" -) - -type Envelope struct { - Version int `json:"version" bson:"version"` - KeyID string `json:"keyId" bson:"keyId"` - Nonce string `json:"nonce" bson:"nonce"` - Ciphertext string `json:"ciphertext" bson:"ciphertext"` - Tag string `json:"tag" bson:"tag"` -} - -type Cipher struct { - keys map[string][]byte - active string -} - -func NewCipher(raw, active string) (*Cipher, error) { - var values map[string]string - if json.Unmarshal([]byte(raw), &values) != nil || len(values) == 0 { - return nil, errors.New("invalid_credential_keyring") - } - keys := make(map[string][]byte, len(values)) - for id, value := range values { - decoded, err := decode64(value) - if err != nil || id == "" || len(decoded) != 32 { - return nil, errors.New("invalid_credential_keyring") - } - keys[id] = decoded - } - if _, ok := keys[active]; !ok { - return nil, errors.New("missing_active_credential_key") - } - return &Cipher{keys, active}, nil -} - -func decode64(s string) ([]byte, error) { - b, err := base64.StdEncoding.Strict().DecodeString(s) - if err != nil || s == "" || base64.StdEncoding.EncodeToString(b) != s { - return nil, errors.New("invalid_base64") - } - return b, nil -} - -// JSJSON uses JSON.stringify's non-HTML-escaped string encoding. AAD must be -// identical across languages; Go's default JSON HTML escaping changes it. -func JSJSON(v any) ([]byte, error) { - var b bytes.Buffer - e := json.NewEncoder(&b) - e.SetEscapeHTML(false) - if err := e.Encode(v); err != nil { - return nil, err - } - out := bytes.TrimSuffix(b.Bytes(), []byte{'\n'}) - out = bytes.ReplaceAll(out, []byte(`\u2028`), []byte("\u2028")) - out = bytes.ReplaceAll(out, []byte(`\u2029`), []byte("\u2029")) - return out, nil -} - -func aad(owner, provider, purpose string) []byte { - b, _ := JSJSON([]any{"credentials", owner, provider, purpose, 1}) - return b -} -func gcm(key []byte) (cipher.AEAD, error) { - b, e := aes.NewCipher(key) - if e != nil { - return nil, e - } - return cipher.NewGCM(b) -} - -func (c *Cipher) Encrypt(token, owner, provider, purpose string) (Envelope, error) { - if token == "" { - return Envelope{}, errors.New("empty_credential") - } - if purpose == "" { - purpose = "encryptedToken" - } - a, err := gcm(c.keys[c.active]) - if err != nil { - return Envelope{}, errors.New("credential_encryption_failed") - } - nonce := make([]byte, 12) - if _, err = rand.Read(nonce); err != nil { - return Envelope{}, errors.New("credential_encryption_failed") - } - sealed := a.Seal(nil, nonce, []byte(token), aad(owner, provider, purpose)) - enc := base64.StdEncoding.EncodeToString - return Envelope{1, c.active, enc(nonce), enc(sealed[:len(sealed)-16]), enc(sealed[len(sealed)-16:])}, nil -} - -func (c *Cipher) Decrypt(e Envelope, owner, provider, purpose string) (string, error) { - fail := errors.New("Credential decryption failed") - if purpose == "" { - purpose = "encryptedToken" - } - key, ok := c.keys[e.KeyID] - if !ok || e.Version != 1 { - return "", fail - } - nonce, nerr := decode64(e.Nonce) - tag, terr := decode64(e.Tag) - data, derr := decode64(e.Ciphertext) - if nerr != nil || terr != nil || derr != nil || len(nonce) != 12 || len(tag) != 16 { - return "", fail - } - a, err := gcm(key) - if err != nil { - return "", fail - } - plain, err := a.Open(nil, nonce, append(data, tag...), aad(owner, provider, purpose)) - if err != nil { - return "", fail - } - return string(plain), nil -} - -func HashToken(token string) string { - sum := sha256.Sum256([]byte(token)) - return hex.EncodeToString(sum[:]) -} -func RandomToken() (string, error) { - b := make([]byte, 32) - _, err := rand.Read(b) - return hex.EncodeToString(b), err -} - -// SignSession is compatible with express-session/cookie-signature. -func SignSession(id, secret string) string { - h := hmac.New(sha256.New, []byte(secret)) - h.Write([]byte(id)) - return "s:" + id + "." + base64.RawStdEncoding.EncodeToString(h.Sum(nil)) -} -func VerifySession(value, secret string) (string, bool) { - if !strings.HasPrefix(value, "s:") { - return "", false - } - i := strings.LastIndexByte(value, '.') - if i < 3 || i > 258 { - return "", false - } - id := value[2:i] - if !hmac.Equal([]byte(value), []byte(SignSession(id, secret))) { - return "", false - } - return id, true -} -func VerifyWebhook(body []byte, signature, secret string) bool { - if secret == "" || !strings.HasPrefix(signature, "sha256=") { - return false - } - provided, err := hex.DecodeString(strings.TrimPrefix(signature, "sha256=")) - if err != nil { - return false - } - h := hmac.New(sha256.New, []byte(secret)) - h.Write(body) - return hmac.Equal(provided, h.Sum(nil)) -} diff --git a/backend/internal/security/security_test.go b/backend/internal/security/security_test.go deleted file mode 100644 index aaadadb..0000000 --- a/backend/internal/security/security_test.go +++ /dev/null @@ -1,81 +0,0 @@ -package security - -import ( - "encoding/base64" - "encoding/json" - "strings" - "testing" -) - -func testCipher(t *testing.T) *Cipher { - t.Helper() - raw, _ := json.Marshal(map[string]string{"v1": base64.StdEncoding.EncodeToString(make([]byte, 32))}) - c, e := NewCipher(string(raw), "v1") - if e != nil { - t.Fatal(e) - } - return c -} -func TestCredentialBinding(t *testing.T) { - c := testCipher(t) - e, err := c.Encrypt("secret-token", "owner", "github", "") - if err != nil { - t.Fatal(err) - } - value, err := c.Decrypt(e, "owner", "github", "") - if err != nil || value != "secret-token" { - t.Fatal(value, err) - } - for _, args := range [][3]string{{"other", "github", ""}, {"owner", "github-app-user", ""}, {"owner", "github", "encryptedRefreshToken"}} { - if _, err := c.Decrypt(e, args[0], args[1], args[2]); err == nil { - t.Fatal("accepted wrong AAD", args) - } - } - for _, mutate := range []func(*Envelope){func(e *Envelope) { e.Version = 2 }, func(e *Envelope) { e.KeyID = "missing" }, func(e *Envelope) { e.Tag = base64.StdEncoding.EncodeToString(make([]byte, 16)) }, func(e *Envelope) { e.Nonce += "\n" }, func(e *Envelope) { e.Ciphertext = "" }} { - copy := e - mutate(©) - if _, err := c.Decrypt(copy, "owner", "github", ""); err == nil { - t.Fatal("accepted corrupted envelope") - } - } - other, _ := c.Encrypt("secret-token", "owner", "github", "") - if other.Nonce == e.Nonce { - t.Fatal("nonce reused") - } -} -func TestSessionsAndAuthorization(t *testing.T) { - signed := SignSession("id", "secret") - if id, ok := VerifySession(signed, "secret"); !ok || id != "id" { - t.Fatal("round trip") - } - if _, ok := VerifySession(signed, "other"); ok { - t.Fatal("wrong key accepted") - } - if _, ok := VerifySession(strings.Replace(signed, "id", "other", 1), "secret"); ok { - t.Fatal("forged session") - } - u := Identity{ID: "1", Username: "renamed", GitHubID: "10", Status: "active"} - if !u.CanEdit("2", []Coauthor{{Username: "old-name", GitHubID: "10"}}) { - t.Fatal("stable identity lost") - } - if u.CanEdit("2", []Coauthor{{Username: "renamed", GitHubID: "20"}}) { - t.Fatal("username bypassed GitHub identity") - } - u.Admin = true - u.Status = "banned" - if u.CanEdit("1", nil) { - t.Fatal("disabled admin authorized") - } -} -func TestPathAndRedirectValidation(t *testing.T) { - for _, s := range []string{"../secret", "a/../secret", "/etc/passwd", "a\\b", "a//b", "a/./b", "a\x00b"} { - if _, err := RelativePath(s); err == nil { - t.Errorf("accepted %q", s) - } - } - for _, s := range []string{"//evil.test", "/dashboard\\evil", "/dashboard?x=\r\nLocation:evil", "https://evil.test"} { - if ReturnTo(s, "/dashboard") != "/dashboard" { - t.Errorf("accepted redirect %q", s) - } - } -} diff --git a/backend/internal/server/LICENSE.compression b/backend/internal/server/LICENSE.compression deleted file mode 100644 index 386b7b6..0000000 --- a/backend/internal/server/LICENSE.compression +++ /dev/null @@ -1,23 +0,0 @@ -(The MIT License) - -Copyright (c) 2014 Jonathan Ong -Copyright (c) 2014-2015 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/backend/internal/server/LICENSE.content-disposition b/backend/internal/server/LICENSE.content-disposition deleted file mode 100644 index 84441fb..0000000 --- a/backend/internal/server/LICENSE.content-disposition +++ /dev/null @@ -1,22 +0,0 @@ -(The MIT License) - -Copyright (c) 2014-2017 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/backend/internal/server/LICENSE.content-type b/backend/internal/server/LICENSE.content-type deleted file mode 100644 index 34b1a2d..0000000 --- a/backend/internal/server/LICENSE.content-type +++ /dev/null @@ -1,22 +0,0 @@ -(The MIT License) - -Copyright (c) 2015 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/backend/internal/server/LICENSE.etag b/backend/internal/server/LICENSE.etag deleted file mode 100644 index cab251c..0000000 --- a/backend/internal/server/LICENSE.etag +++ /dev/null @@ -1,22 +0,0 @@ -(The MIT License) - -Copyright (c) 2014-2016 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/backend/internal/server/LICENSE.fresh b/backend/internal/server/LICENSE.fresh deleted file mode 100644 index 1434ade..0000000 --- a/backend/internal/server/LICENSE.fresh +++ /dev/null @@ -1,23 +0,0 @@ -(The MIT License) - -Copyright (c) 2012 TJ Holowaychuk -Copyright (c) 2016-2017 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/backend/internal/server/LICENSE.negotiator b/backend/internal/server/LICENSE.negotiator deleted file mode 100644 index 355cd8a..0000000 --- a/backend/internal/server/LICENSE.negotiator +++ /dev/null @@ -1,25 +0,0 @@ -(The MIT License) - -Copyright (c) 2012-2014 Federico Romero -Copyright (c) 2012-2014 Isaac Z. Schlueter -Copyright (c) 2014-2015 Douglas Christopher Wilson -Copyright (c) 2026 Blake Embrey - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/backend/internal/server/access_pagination_integration_test.go b/backend/internal/server/access_pagination_integration_test.go deleted file mode 100644 index eed74e3..0000000 --- a/backend/internal/server/access_pagination_integration_test.go +++ /dev/null @@ -1,90 +0,0 @@ -package server - -import ( - "context" - "encoding/json" - "io" - "net/http" - "net/http/httptest" - "strconv" - "strings" - "testing" - - "go.mongodb.org/mongo-driver/v2/bson" -) - -func runAccessPaginationIntegration(t *testing.T, base *Server) { - t.Run("App selection reaches installation repositories beyond page 1000", func(t *testing.T) { - ctx := context.Background() - owner := bson.NewObjectID() - db := base.Store.DB.Client().Database("access_pagination_" + owner.Hex()) - defer db.Drop(ctx) - s := &Server{Config: base.Config, Store: &Store{DB: db, Redis: base.Store.Redis}} - s.Config.AppEnabled = true - if _, err := db.Collection("users").InsertOne(ctx, M{"_id": owner, "username": owner.Hex(), "status": "active"}); err != nil { - t.Fatal(err) - } - q := &request{Server: s, R: httptest.NewRequest("GET", "/", nil)} - if err := s.saveGrant(q, owner, "github-app-user", M{"access_token": "synthetic-app", "refresh_token": "synthetic-refresh", "expires_in": float64(3600), "refresh_token_expires_in": float64(7200)}); err != nil { - t.Fatal(err) - } - if _, err := db.Collection("githubinstallations").InsertOne(ctx, M{"appId": s.Config.AppID, "installationId": int64(9), "blocked": true}); err != nil { - t.Fatal(err) - } - lateFailure := false - pages, identityChecks, fallbackCalls := 0, 0, 0 - s.HTTP = &http.Client{Transport: roundTrip(func(r *http.Request) (*http.Response, error) { - status := 200 - var data any - switch r.URL.Path { - case "/user/installations": - data = M{"installations": []M{{"id": 9, "app_id": s.Config.AppID}}} - case "/user/installations/9/repositories": - pages++ - page, _ := strconv.Atoi(r.URL.Query().Get("page")) - if page != pages { - t.Fatal("wrong page sequence", page, pages) - } - rows := []M{} - for i := 0; i < 100; i++ { - rows = append(rows, M{"id": 1, "full_name": "other/project"}) - } - if page == 1001 { - rows = []M{{"id": 42, "full_name": "renamed/project"}} - if lateFailure { - status = 503 - } - } - data = M{"repositories": rows} - case "/repositories/42": - identityChecks++ - data = M{"id": 42} - default: - fallbackCalls++ - data = M{"id": 42, "full_name": "renamed/project", "private": false, "visibility": "public"} - } - b, err := json.Marshal(data) - if err != nil { - t.Fatal(err) - } - return &http.Response{StatusCode: status, Header: http.Header{}, Body: io.NopCloser(strings.NewReader(string(b)))}, nil - })} - for _, id := range []string{"", "42"} { - pages, identityChecks, fallbackCalls = 0, 0, 0 - name := "renamed/project" - if id != "" { - name = "original/project" - } - _, binding, resolved, err := s.selectAccessIdentity(ctx, owner, name, "github-app", id) - if err == nil || err.Error() != "github_app_access_required" || pages != 1001 || identityChecks != 0 || fallbackCalls != 0 || number(binding["installationId"]) != 9 || resolved != "renamed/project" { - t.Fatal("late installed identity lost or blocked installation bypassed", pages, identityChecks, fallbackCalls, binding, resolved, err) - } - } - lateFailure = true - pages, identityChecks, fallbackCalls = 0, 0, 0 - _, binding, _, err := s.selectAccessIdentity(ctx, owner, "renamed/project", "github-app", "") - if err == nil || err.Error() != "github_unavailable" || binding != nil || pages != 1001 || identityChecks != 0 || fallbackCalls != 0 { - t.Fatal("late failure fell through to public access", pages, identityChecks, fallbackCalls, binding, err) - } - }) -} diff --git a/backend/internal/server/access_selection_integration_test.go b/backend/internal/server/access_selection_integration_test.go deleted file mode 100644 index 138f15d..0000000 --- a/backend/internal/server/access_selection_integration_test.go +++ /dev/null @@ -1,103 +0,0 @@ -package server - -import ( - "context" - "encoding/json" - "io" - "net/http" - "net/http/httptest" - "strings" - "testing" - - "go.mongodb.org/mongo-driver/v2/bson" -) - -func runAccessSelectionIntegration(t *testing.T, base *Server) { - t.Run("access selection uses typed upstream identities", func(t *testing.T) { - ctx := context.Background() - owner := bson.NewObjectID() - db := base.Store.DB.Client().Database("access_selection_" + owner.Hex()) - defer db.Drop(ctx) - s := &Server{Config: base.Config, Store: &Store{DB: db, Redis: base.Store.Redis}} - s.Config.AppEnabled = true - if _, err := db.Collection("users").InsertOne(ctx, M{"_id": owner, "username": owner.Hex(), "status": "active"}); err != nil { - t.Fatal(err) - } - for _, choice := range []string{"", "oauth"} { - if _, _, err := s.selectAccess(ctx, owner, "team/project", choice); err == nil || err.Error() != "github_oauth_required" { - t.Fatal("wrong missing OAuth result", err) - } - } - q := &request{Server: s, R: httptest.NewRequest("GET", "/", nil)} - if err := s.saveGrant(q, owner, "github", M{"access_token": "synthetic-oauth"}); err != nil { - t.Fatal(err) - } - if _, err := s.Store.update(ctx, "credentials", M{"ownerId": owner, "provider": "github"}, M{"$set": M{"revoked": true}}); err != nil { - t.Fatal(err) - } - if token, binding, err := s.selectAccess(ctx, owner, "team/project", "oauth"); err != nil || token != "synthetic-oauth" || binding["kind"] != "oauth" { - t.Fatal("stored OAuth selection differs", err) - } - if _, err := s.Store.update(ctx, "credentials", M{"ownerId": owner, "provider": "github"}, M{"$set": M{"encryptedToken": "corrupt"}}); err != nil { - t.Fatal(err) - } - if _, _, err := s.selectAccess(ctx, owner, "team/project", "oauth"); err == nil || err.Error() != "credential_decryption_failed" { - t.Fatal("corrupt OAuth grant accepted", err) - } - if err := s.saveGrant(q, owner, "github-app-user", M{"access_token": "synthetic-app", "refresh_token": "synthetic-refresh", "expires_in": float64(3600), "refresh_token_expires_in": float64(7200)}); err != nil { - t.Fatal(err) - } - var upstreamID any - repoCalls := 0 - s.HTTP = &http.Client{Transport: roundTrip(func(r *http.Request) (*http.Response, error) { - var response M - switch r.URL.Path { - case "/user/installations": - response = M{"installations": []any{}} - case "/repos/team/project": - repoCalls++ - response = M{"id": upstreamID, "full_name": "team/project", "private": false, "visibility": "public"} - default: - t.Fatal("invalid binding reached an unexpected upstream endpoint", r.URL) - } - body, err := json.Marshal(response) - if err != nil { - t.Fatal(err) - } - return &http.Response{StatusCode: 200, Header: http.Header{}, Body: io.NopCloser(strings.NewReader(string(body)))}, nil - })} - for _, id := range []any{nil, "42", true, 42.5, 9007199254740992.0, []any{42}, M{"id": 42}, float64(0), float64(-1), float64(42), float64(9007199254740991)} { - upstreamID = id - repoCalls = 0 - _, binding, err := s.selectAccess(ctx, owner, "team/project", "github-app") - valid := jsonSafeInteger(id) - if valid { - if err != nil || !boolean(binding["publicRead"]) || str(binding["repositoryId"]) != str(id) || repoCalls != 2 { - t.Fatal("valid public repository rejected", id, err, repoCalls) - } - } else if err == nil || err.Error() != "github_app_access_required" || repoCalls != 1 { - t.Fatal("invalid upstream ID bound", id, err, repoCalls) - } - } - for _, id := range []any{"42", 42.5, 9007199254740992.0, nil} { - upstreamID = float64(42) - repoCalls = 0 - _, err := s.boundToken(ctx, owner, M{"kind": "github-app", "publicRead": true, "repositoryId": id}, "team/project") - if err == nil || repoCalls != 0 { - t.Fatal("malformed stored identity reached upstream", id, err) - } - } - for _, installation := range []any{nil, float64(42), "42"} { - repoCalls = 0 - if _, err := s.boundToken(ctx, owner, M{"kind": "github-app", "publicRead": true, "repositoryId": int64(42), "installationId": installation}, "team/project"); err == nil || repoCalls != 0 { - t.Fatal("public binding accepted installation field", installation, err) - } - } - for _, id := range []any{"42", 42.5, float64(43)} { - upstreamID = id - if _, err := s.boundToken(ctx, owner, M{"kind": "github-app", "publicRead": true, "repositoryId": int64(42)}, "team/project"); err == nil { - t.Fatal("public reauthorization accepted changed/coerced identity", id) - } - } - }) -} diff --git a/backend/internal/server/account_removal.go b/backend/internal/server/account_removal.go deleted file mode 100644 index 144f4d7..0000000 --- a/backend/internal/server/account_removal.go +++ /dev/null @@ -1,45 +0,0 @@ -package server - -import "time" - -// Account deletion waits for each owned resource, in TypeScript's repo/PR/gist -// order. A failed cleanup leaves the account usable for a retry; completed -// tombstones stay reserved and are skipped on subsequent requests. -func (s *Server) removeAccountResources(q *request) error { - for _, kind := range []string{"repo", "pr", "gist"} { - rows, err := s.Store.list(q.ctx(), collection(kind), membership(q, kind), 0, nil) - if err != nil { - return err - } - rows, err = s.markListExpired(q.ctx(), kind, rows) - if err != nil { - return err - } - for _, row := range rows { - if str(row["owner"]) != str(q.User["_id"]) || str(row["status"]) == "removed" { - continue - } - if kind == "repo" && str(row["status"]) == "archived" { - return fail("repository_archived", 410) - } - claimed, err := s.Store.update(q.ctx(), collection(kind), revisionFilter(row), M{"$set": M{"status": "removing", "statusDate": time.Now()}}) - if err != nil { - return err - } - if !claimed { - return fail("repository_changed", 409) - } - if err := s.runJob(q.ctx(), M{"kind": kind, "resourceId": row[idKey(kind)], "action": "remove"}); err != nil { - return err - } - current, err := s.Store.one(q.ctx(), collection(kind), M{"_id": row["_id"]}) - if err != nil { - return err - } - if current == nil || str(current["status"]) != "removed" { - return fail("repository_changed", 409) - } - } - } - return nil -} diff --git a/backend/internal/server/account_removal_integration_test.go b/backend/internal/server/account_removal_integration_test.go deleted file mode 100644 index 37bad8a..0000000 --- a/backend/internal/server/account_removal_integration_test.go +++ /dev/null @@ -1,138 +0,0 @@ -package server - -import ( - "context" - "io" - "net/http" - "net/http/httptest" - "strings" - "testing" - "time" - - "go.mongodb.org/mongo-driver/v2/bson" -) - -func runAccountRemovalIntegration(t *testing.T, base *Server) { - t.Run("account removal scrubs tombstones despite upstream failure", func(t *testing.T) { - ctx := context.Background() - owner, other := bson.NewObjectID(), bson.NewObjectID() - // Isolate maintenance side effects from other lifecycle fixtures. - db := base.Store.DB.Client().Database("account_removal_" + owner.Hex()) - defer db.Drop(context.Background()) - s := &Server{Config: base.Config, Store: &Store{DB: db, Redis: base.Store.Redis}, content: base.content, providers: base.providers} - s.Config.AppEnabled = true - s.Config.ClientID = "fixture-oauth-client" - s.Config.AppClientID = "fixture-app-client" - user := M{"_id": owner, "username": "account-removal-fixture", "status": "active", "emails": []M{{"email": "fixture@example.test"}}, "apiTokens": []M{{"tokenHash": "synthetic"}}, "repositories": []any{bson.NewObjectID()}, "externalIDs": M{"github": "account-removal-fixture"}, "accessTokens": M{"github": "synthetic-legacy"}, "accessTokenDates": M{"github": time.Now()}, "photo": "fixture-avatar", "default": M{"terms": []string{"private"}}, "projectNames": M{"private": "name"}} - if _, err := db.Collection("users").InsertOne(ctx, user); err != nil { - t.Fatal(err) - } - q := &request{Server: s, User: user, Identity: identity(user), SessionID: "account-removal-" + owner.Hex(), R: httptest.NewRequest("DELETE", "/api/user", nil), W: httptest.NewRecorder()} - for _, provider := range []string{"github", "github-app-user"} { - tokens := M{"access_token": "synthetic-delete-" + provider} - if provider == "github-app-user" { - tokens["refresh_token"] = "synthetic-refresh" - tokens["expires_in"] = float64(3600) - tokens["refresh_token_expires_in"] = float64(7200) - } - if err := s.saveGrant(q, owner, provider, tokens); err != nil { - t.Fatal(err) - } - } - if _, err := db.Collection("credentials").InsertOne(ctx, M{"ownerId": owner, "provider": "other-forge", "encryptedToken": "synthetic-provider-credential"}); err != nil { - t.Fatal(err) - } - if _, err := db.Collection("credentials").InsertOne(ctx, M{"ownerId": other, "provider": "github", "encryptedToken": "another-user-credential"}); err != nil { - t.Fatal(err) - } - at := time.Date(2026, 1, 1, 0, 0, 0, 0, time.UTC) - for _, kind := range []string{"repo", "pr", "gist"} { - for _, id := range []bson.ObjectID{owner, other} { - if _, err := db.Collection(collection(kind)).InsertOne(ctx, M{"_id": bson.NewObjectID(), idKey(kind): "account-removal-" + id.Hex(), "owner": id, "status": "removed", "statusDate": at, "accessToken": "synthetic-top-secret", "source": M{"provider": "fixture", "accessToken": "synthetic-source-secret", "repositoryName": "private/project"}}); err != nil { - t.Fatal(err) - } - } - } - if _, err := db.Collection("dashboardnames").InsertMany(ctx, []any{M{"owner": owner, "name": "private-name"}, M{"owner": other, "name": "other-name"}}); err != nil { - t.Fatal(err) - } - installation := M{"appId": s.Config.AppID, "installationId": int64(912345), "accountLogin": "shared-organization", "blocked": false} - if _, err := db.Collection("githubinstallations").InsertOne(ctx, installation); err != nil { - t.Fatal(err) - } - key := "anoGH_session:" + q.SessionID - if err := s.Store.Redis.Set(ctx, key, "synthetic-session", time.Minute).Err(); err != nil { - t.Fatal(err) - } - defer s.Store.Redis.Del(context.Background(), key) - calls := map[string]int{} - s.HTTP = &http.Client{Transport: roundTrip(func(req *http.Request) (*http.Response, error) { - if req.Method != "DELETE" || !strings.HasSuffix(req.URL.Path, "/grant") || strings.Contains(req.URL.Path, "installations") { - t.Fatal("unexpected revocation target", req.URL) - } - calls[req.URL.Path]++ - return &http.Response{StatusCode: 503, Header: http.Header{}, Body: io.NopCloser(strings.NewReader("upstream unavailable"))}, nil - })} - result, err := s.deleteAccount(q) - if err != nil || obj(result)["status"] != "ok" { - t.Fatal("local removal failed", result, err) - } - if len(calls) != 2 { - t.Fatal("both grants were not attempted", calls) - } - saved, err := s.Store.one(ctx, "users", M{"_id": owner}) - if err != nil { - t.Fatal(err) - } - if saved["status"] != "removed" || saved["username"] != "deleted-"+owner.Hex() { - t.Fatal("identity not tombstoned") - } - for _, field := range []string{"accessTokens", "accessTokenDates", "externalIDs", "photo", "default", "projectNames"} { - if _, exists := saved[field]; exists { - t.Fatal("personal field retained", field) - } - } - for _, field := range []string{"emails", "apiTokens", "repositories"} { - if len(arr(saved[field])) != 0 { - t.Fatal("personal array retained", field) - } - } - for _, kind := range []string{"repo", "pr", "gist"} { - row, err := s.Store.one(ctx, collection(kind), M{"owner": owner}) - if err != nil { - t.Fatal(err) - } - if row["accessToken"] != nil || obj(row["source"])["accessToken"] != nil { - t.Fatal("tombstone retained a credential", kind) - } - if row["status"] != "removed" || !date(row["statusDate"]).Equal(at) { - t.Fatal("tombstone lifecycle rewritten", kind) - } - otherRow, err := s.Store.one(ctx, collection(kind), M{"owner": other}) - if err != nil || otherRow["accessToken"] == nil || obj(otherRow["source"])["accessToken"] == nil { - t.Fatal("another owner's source changed", kind, err) - } - } - for _, collection := range []string{"credentials", "dashboardnames"} { - field := "owner" - if collection == "credentials" { - field = "ownerId" - } - count, err := db.Collection(collection).CountDocuments(ctx, M{field: owner}) - if err != nil || count != 0 { - t.Fatal("private records retained", collection, count, err) - } - count, err = db.Collection(collection).CountDocuments(ctx, M{field: other}) - if err != nil || count != 1 { - t.Fatal("other owner changed", collection, count, err) - } - } - shared, err := s.Store.one(ctx, "githubinstallations", M{"installationId": int64(912345)}) - if err != nil || shared["accountLogin"] != "shared-organization" || boolean(shared["blocked"]) { - t.Fatal("shared installation changed", err) - } - if count, err := s.Store.Redis.Exists(ctx, key).Result(); err != nil || count != 0 { - t.Fatal("session retained", err) - } - }) -} diff --git a/backend/internal/server/account_removal_lifecycle_integration_test.go b/backend/internal/server/account_removal_lifecycle_integration_test.go deleted file mode 100644 index 2795a82..0000000 --- a/backend/internal/server/account_removal_lifecycle_integration_test.go +++ /dev/null @@ -1,160 +0,0 @@ -package server - -import ( - "context" - "errors" - "io" - "io/fs" - "net/http" - "net/http/httptest" - "strings" - "testing" - "time" - - "github.com/tdurieux/anonymous_github/backend/internal/storage" - "go.mongodb.org/mongo-driver/v2/bson" -) - -func runAccountRemovalLifecycleIntegration(t *testing.T, base *Server) { - t.Run("account removal waits for cleanup and remains retryable", func(t *testing.T) { - ctx := context.Background() - owner, other := bson.NewObjectID(), bson.NewObjectID() - prefix := "account-lifecycle-" + owner.Hex() - db := base.Store.DB.Client().Database("account_lifecycle_" + owner.Hex()) - defer db.Drop(context.Background()) - root := t.TempDir() - content, err := storage.New(storage.Config{Root: root}) - if err != nil { - t.Fatal(err) - } - s := &Server{Config: base.Config, Store: &Store{DB: db, Redis: base.Store.Redis}, content: content} - s.Config.AppEnabled = false - defer func() { s.content.Close() }() - user := M{"_id": owner, "username": prefix, "status": "active", "externalIDs": M{"github": prefix}, "apiTokens": []M{{"tokenHash": "synthetic-account-token"}}} - if _, err := db.Collection("users").InsertOne(ctx, user); err != nil { - t.Fatal(err) - } - q := &request{Server: s, User: user, Identity: identity(user), SessionID: prefix, R: httptest.NewRequest("DELETE", "/api/user", nil), W: httptest.NewRecorder()} - if err := s.saveGrant(q, owner, "github", M{"access_token": "synthetic-account-lifecycle-grant"}); err != nil { - t.Fatal(err) - } - sessionKey := "anoGH_session:" + q.SessionID - if err := s.Store.Redis.Set(ctx, sessionKey, "fixture-session", time.Minute).Err(); err != nil { - t.Fatal(err) - } - defer s.Store.Redis.Del(context.Background(), sessionKey) - for _, state := range []string{"archived", "ready", "foreign"} { - id := prefix + "-" + state - row := M{"_id": bson.NewObjectID(), "repoId": id, "owner": owner, "status": state, "source": M{"provider": "fixture"}} - if state == "foreign" { - row["owner"] = other - row["status"] = "ready" - row["coauthors"] = []M{{"username": "renamed", "githubId": prefix}} - } - if _, err := db.Collection(collection("repo")).InsertOne(ctx, row); err != nil { - t.Fatal(err) - } - if err := content.Put(ctx, id, "file", strings.NewReader("private"), 7, 7); err != nil { - t.Fatal(err) - } - for _, coll := range []string{"files", "anonymizedpaths"} { - if _, err := db.Collection(coll).InsertOne(ctx, M{"repoId": id, "path": "file"}); err != nil { - t.Fatal(err) - } - } - } - for _, kind := range []string{"pr", "gist"} { - row := M{"_id": bson.NewObjectID(), idKey(kind): prefix + "-" + kind, "owner": owner, "status": "ready", "source": M{"provider": "fixture"}} - if kind == "pr" { - row["pullRequest"] = M{"body": "private body", "title": "private title", "diff": "private diff"} - } else { - row["gist"] = M{"description": "private description", "ownerLogin": "private owner", "files": []M{{"content": "private"}}} - } - if _, err := db.Collection(collection(kind)).InsertOne(ctx, row); err != nil { - t.Fatal(err) - } - } - revocations := 0 - s.HTTP = &http.Client{Transport: roundTrip(func(req *http.Request) (*http.Response, error) { - revocations++ - for _, kind := range []string{"repo", "pr", "gist"} { - count, err := db.Collection(collection(kind)).CountDocuments(ctx, M{"owner": owner, "status": M{"$ne": "removed"}}) - if err != nil || count != 0 { - t.Error("revoked grant before content cleanup", kind, count, err) - } - } - return &http.Response{StatusCode: 204, Header: http.Header{}, Body: io.NopCloser(strings.NewReader(""))}, nil - })} - assertRetryable := func() { - t.Helper() - saved, err := s.Store.one(ctx, "users", M{"_id": owner}) - if err != nil || saved["status"] != "active" || saved["username"] != prefix { - t.Fatal("failed deletion disabled account", err) - } - count, err := db.Collection("credentials").CountDocuments(ctx, M{"ownerId": owner}) - if err != nil || count != 1 || revocations != 0 { - t.Fatal("failed deletion revoked credentials", count, err) - } - if count, err := s.Store.Redis.Exists(ctx, sessionKey).Result(); err != nil || count != 1 { - t.Fatal("failed deletion cleared session", err) - } - } - if result, err := s.deleteAccount(q); err == nil || err.Error() != "repository_archived" || result != nil { - t.Fatal("archived repository not protected", result, err) - } - assertRetryable() - if _, err := s.Store.update(ctx, collection("repo"), M{"repoId": prefix + "-archived"}, M{"$set": M{"status": "ready"}}); err != nil { - t.Fatal(err) - } - content.Close() - if result, err := s.deleteAccount(q); err == nil || result != nil { - t.Fatal("storage failure reported success") - } - assertRetryable() - if count, err := db.Collection(collection("repo")).CountDocuments(ctx, M{"owner": owner, "status": "removing"}); err != nil || count == 0 { - t.Fatal("failed cleanup lost durable removing state", err) - } - s.content, err = storage.New(storage.Config{Root: root}) - if err != nil { - t.Fatal(err) - } - if result, err := s.deleteAccount(q); err != nil || obj(result)["status"] != "ok" { - t.Fatal("cleanup retry failed", err) - } - if revocations != 1 { - t.Fatal("unexpected revocations", revocations) - } - for _, state := range []string{"archived", "ready"} { - id := prefix + "-" + state - for _, coll := range []string{"files", "anonymizedpaths"} { - count, err := db.Collection(coll).CountDocuments(ctx, M{"repoId": id}) - if err != nil || count != 0 { - t.Fatal("index cleanup incomplete", coll, count, err) - } - } - entries, err := s.content.List(ctx, id) - if err != nil && !errors.Is(err, fs.ErrNotExist) || len(entries) != 0 { - t.Fatal("content cleanup incomplete", err) - } - } - foreign, err := s.Store.one(ctx, collection("repo"), M{"repoId": prefix + "-foreign"}) - if err != nil || foreign["status"] != "ready" { - t.Fatal("coauthor-only resource removed", err) - } - if entries, err := s.content.List(ctx, prefix+"-foreign"); err != nil || len(entries) != 1 { - t.Fatal("coauthor-only storage changed", err) - } - pr, err := s.Store.one(ctx, collection("pr"), M{"owner": owner}) - if err != nil || str(obj(pr["pullRequest"])["body"]) != "" || str(obj(pr["pullRequest"])["diff"]) != "" { - t.Fatal("PR payload retained", err) - } - gist, err := s.Store.one(ctx, collection("gist"), M{"owner": owner}) - if err != nil || len(arr(obj(gist["gist"])["files"])) != 0 || str(obj(gist["gist"])["description"]) != "" { - t.Fatal("gist payload retained", err) - } - saved, err := s.Store.one(ctx, "users", M{"_id": owner}) - if err != nil || saved["status"] != "removed" { - t.Fatal("account not removed after cleanup", err) - } - }) -} diff --git a/backend/internal/server/admin.go b/backend/internal/server/admin.go deleted file mode 100644 index 515db78..0000000 --- a/backend/internal/server/admin.go +++ /dev/null @@ -1,522 +0,0 @@ -package server - -import ( - "encoding/json" - "go.mongodb.org/mongo-driver/v2/bson" - "runtime" - "strconv" - "strings" - "time" -) - -func pageInt(v string, fallback, upper int64) int64 { - n, e := strconv.ParseInt(v, 10, 64) - if e != nil || n < 1 { - return fallback - } - return min(n, upper) -} -func (s *Server) aggregate(q *request, coll string, pipeline []M) ([]M, error) { - cur, e := s.Store.DB.Collection(coll).Aggregate(q.ctx(), pipeline) - if e != nil { - return nil, e - } - defer cur.Close(q.ctx()) - out := []M{} - e = cur.All(q.ctx(), &out) - return out, e -} -func (s *Server) adminList(kind string) handler { - return func(q *request) (any, error) { - coll := collection("repo") - if kind == "users" { - coll = "users" - } - if kind == "conferences" { - coll = "conferences" - } - page, limit, sort, csv, err := adminListPage(q.R.URL.RawQuery) - if err != nil { - return nil, err - } - v, err := adminFilterQuery(kind, q.R.URL.RawQuery) - if err != nil { - return nil, err - } - query := parseExtendedQuery(q.R.URL.RawQuery).object - fields := M{} - for _, key := range []string{"owner", "conference", "status"} { - if query[key].truthy() { - fields[key] = query[key].nativeValue() - } - } - var owner M - if kind == "repos" && query["owner"].truthy() { - predicate, _, err := adminCastPredicate(query["owner"]) - if err != nil { - return nil, err - } - owner, err = s.Store.one(q.ctx(), "users", M{"username": predicate}) - if err != nil { - return nil, err - } - } - filter, missingOwner, err := adminFilter(kind, v, owner, adminFilterOptions{fields, q.R.URL.RawQuery}) - if err != nil { - return nil, err - } - if missingOwner { - return M{"query": filter, "page": page, "total": 0, "sort": sort, "results": []M{}, "statusCounts": []M{}, "totalSize": 0}, nil - } - aggregateFilter := filter - castFields := M{} - for key, value := range fields { - castFields[key] = value - } - castKey := "" - if kind == "repos" { - castKey = "conference" - } else if kind == "users" { - castKey = "status" - } - if castKey != "" && query[castKey].truthy() { - cast, raw, err := adminCastPredicate(query[castKey]) - if err != nil { - return nil, err - } - fields[castKey] = raw - castFields[castKey] = cast - filter, _, err = adminFilter(kind, v, owner, adminFilterOptions{fields, q.R.URL.RawQuery}) - if err != nil { - return nil, err - } - } - castFilter, _, err := adminFilter(kind, v, owner, adminFilterOptions{castFields, q.R.URL.RawQuery}) - if err != nil { - return nil, err - } - if csv { - return s.adminCSV(q, kind, coll, castFilter, sort) - } - projection := M{"accessTokens": 0, "accessTokenDates": 0, "apiTokens": 0, "source.accessToken": 0, "accessToken": 0, "refreshToken": 0, "cleanupToken": 0} - pipeline := []M{{"$match": aggregateFilter}, {"$sort": sort}, {"$skip": (page - 1) * limit}, {"$limit": limit}, {"$project": projection}} - if kind == "users" { - pipeline = append(pipeline, M{"$addFields": M{"repoCount": M{"$size": M{"$ifNull": []any{"$repositories", []any{}}}}}}) - } - var results []M - var e error - if kind == "users" { - results, e = s.aggregate(q, coll, pipeline) - } else { - results, e = s.adminFindPage(q, coll, castFilter, sort, projection, page, limit) - } - if e != nil { - return nil, e - } - total, e := s.Store.DB.Collection(coll).CountDocuments(q.ctx(), castFilter) - if e != nil { - return nil, e - } - group := M{"_id": "$status", "count": M{"$sum": 1}} - if kind == "repos" { - group["storage"] = M{"$sum": "$size.storage"} - } - counts, e := s.aggregate(q, coll, []M{{"$match": aggregateFilter}, {"$group": group}}) - if e != nil { - return nil, e - } - out := M{"query": filter, "page": page, "total": total, "sort": sort, "results": results, "statusCounts": counts} - if kind == "repos" { - var size int64 - for _, row := range counts { - size += number(row["storage"]) - } - out["totalSize"] = size - } - return out, nil - } -} -func (s *Server) adminUser(action string) handler { - return func(q *request) (any, error) { - u, e := s.Store.one(q.ctx(), "users", M{"username": q.Params["username"]}) - if e != nil { - return nil, e - } - if u == nil { - return nil, fail("user_not_found", 404) - } - if action == "get" { - return s.adminUserDetail(q.ctx(), u) - } - if action == "repos" { - rows, e := s.Store.list(q.ctx(), collection("repo"), repositoryMembership(u), 0, nil) - if e != nil { - return nil, e - } - rows, e = s.markListExpired(q.ctx(), "repo", rows) - if e != nil { - return nil, e - } - out := []M{} - for _, r := range rows { - out = append(out, resourceJSON("repo", r)) - } - return out, nil - } - set := M{} - switch action { - case "ban": - set["status"] = "banned" - case "activate": - set["status"] = "active" - case "promote": - set["isAdmin"] = true - case "demote": - set["isAdmin"] = false - default: - return nil, fail("invalid_action", 400) - } - matched, e := s.Store.update(q.ctx(), "users", M{"_id": u["_id"]}, M{"$set": set}) - if e != nil { - return nil, e - } - if !matched { - return nil, fail("user_not_found", 404) - } - out := M{"ok": true} - if action == "ban" { - rows, e := s.Store.list(q.ctx(), collection("repo"), M{"owner": u["_id"], "status": M{"$nin": []string{"removed", "removing"}}}, 0, nil) - if e != nil { - return nil, e - } - queued := 0 - for _, r := range rows { - ok, e := s.Store.update(q.ctx(), collection("repo"), revisionFilter(r), M{"$set": M{"status": "removing", "statusDate": time.Now()}}) - if e != nil || !ok { - continue - } - // Match the TypeScript best-effort loop. A failed enqueue keeps - // the removing state durable for the maintenance retry. - if e := s.enqueue(q.ctx(), "repo", str(r["repoId"]), "remove"); e != nil { - continue - } - queued++ - } - out["reposQueued"] = queued - } - return out, nil - } -} -func (s *Server) adminStats(q *request) (any, error) { - counts, e := s.aggregate(q, collection("repo"), []M{{"$group": M{"_id": "$status", "count": M{"$sum": 1}, "storage": M{"$sum": "$size.storage"}}}}) - if e != nil { - return nil, e - } - var size int64 - for _, r := range counts { - size += number(r["storage"]) - } - users, e := s.Store.DB.Collection("users").CountDocuments(q.ctx(), M{}) - if e != nil { - return nil, e - } - conferences, e := s.Store.DB.Collection("conferences").CountDocuments(q.ctx(), M{}) - if e != nil { - return nil, e - } - recent, e := s.Store.DB.Collection(collection("repo")).CountDocuments(q.ctx(), M{"status": "error", "statusDate": M{"$gte": time.Now().Add(-24 * time.Hour)}}) - return M{"statusBreakdown": counts, "totalStorage": size, "recentErrors24h": recent, "totalUsers": users, "totalConferences": conferences}, e -} -func (s *Server) adminPerformance(q *request) (any, error) { - report, err := s.requestPerformance(q) - if err != nil { - return nil, err - } - out := obj(report) - var m runtime.MemStats - runtime.ReadMemStats(&m) - out["runtime"], out["requests"], out["failures"], out["uptime"] = runtime.Version(), s.requests.Load(), s.failures.Load(), time.Since(s.started).Seconds() - out["heapBytes"], out["goroutines"] = m.HeapAlloc, runtime.NumGoroutine() - if s.pool != nil { - out["workers"] = s.pool.Stats() - } - return out, nil -} -func (s *Server) adminErrors(q *request) (any, error) { - const key = "admin:errors" - if s.Store == nil || s.Store.Redis == nil { - if q.R.Method == "DELETE" { - return M{"ok": true, "cleared": 0}, nil - } - return M{"available": false, "entries": []any{}, "total": 0, "offset": 0, "limit": 0, "max": errorLogMax}, nil - } - if err := s.flushErrorLog(q.ctx()); err != nil { - return nil, err - } - if q.R.Method == "DELETE" { - n, err := s.Store.Redis.LLen(q.ctx(), key).Result() - if err != nil { - return nil, err - } - keys := []string{} - var cursor uint64 - for { - batch, next, err := s.Store.Redis.Scan(q.ctx(), cursor, "admin:errors:hourly:*", 100).Result() - if err != nil { - return nil, err - } - keys = append(keys, batch...) - if len(keys) > 10000 { - return nil, fail("error_history_too_large", 503) - } - cursor = next - if cursor == 0 { - break - } - } - pipe := s.Store.Redis.TxPipeline() - pipe.Del(q.ctx(), key, "admin:errors:dropped") - if len(keys) > 0 { - pipe.Del(q.ctx(), keys...) - } - if _, err = pipe.Exec(q.ctx()); err != nil { - return nil, err - } - return M{"ok": true, "cleared": n, "hourlyCleared": len(keys)}, nil - } - offset, limit, err := errorQueryPage(q.R.URL.RawQuery) - if err != nil { - return nil, err - } - raw, err := s.Store.Redis.LRange(q.ctx(), key, offset, offset+limit-1).Result() - if err != nil { - return nil, err - } - entries := []any{} - for _, v := range raw { - var value any - if json.Unmarshal([]byte(v), &value) != nil { - value = M{"ts": nil, "module": nil, "message": v, "raw": []any{}} - } - entries = append(entries, value) - } - n, err := s.Store.Redis.LLen(q.ctx(), key).Result() - return M{"available": true, "entries": entries, "total": n, "offset": offset, "limit": limit, "max": errorLogMax}, err -} -func queueAction(name string) string { - switch name { - case "download": - return "prepare" - case "remove": - return "remove" - case "cache": - return "cache" - } - return "" -} - -// queueActions is shared by workers and administration so every runnable job -// is visible to the controls for its queue. -func queueActions(name string) []string { - if name == "remove" { - return []string{"remove", "expire"} - } - if action := queueAction(name); action != "" { - return []string{action} - } - return nil -} -func (s *Server) adminQueues(q *request) (any, error) { - name := q.Params["name"] - search := "" - if q.R.Method == "GET" { - query := parseExtendedQuery(q.R.URL.RawQuery).object - var err error - search, err = query["search"].stringDefault("") - if err != nil { - return nil, err - } - search = strings.ToLower(search) - if name == "" { - name, err = query["queue"].stringDefault("") - if err != nil { - return nil, err - } - } - } - if name == "" { - name = "download" - } - actions := queueActions(name) - if len(actions) == 0 && q.R.Method == "GET" { - name, actions = "download", queueActions("download") - } - if len(actions) == 0 { - return nil, fail("queue_not_found", 404) - } - if q.R.Method == "GET" { - _ = s.flushRequestMetrics(q.ctx()) - instances, _ := s.readProcessInstances(q.ctx(), time.Now()) - stats := []M{} - for _, n := range []string{"download", "remove", "cache"} { - counts, e := s.aggregate(q, "gojobs", []M{{"$match": M{"action": M{"$in": queueActions(n)}}}, {"$group": M{"_id": "$state", "count": M{"$sum": 1}}}}) - if e != nil { - return nil, e - } - c := M{"waiting": 0, "active": 0, "completed": 0, "failed": 0, "delayed": 0} - for _, r := range counts { - c[str(r["_id"])] = r["count"] - } - paused, e := s.Store.Redis.Exists(q.ctx(), "go:pause:"+n).Result() - if e != nil { - return nil, e - } - label := map[string]string{"download": "Download", "remove": "Remove", "cache": "Cache cleanup"}[n] - var completed, failed int64 - for _, point := range s.queueMetricPoints(q.ctx(), n, 1440, time.Now()) { - completed += point.Completed - failed += point.Failed - } - workers := 0 - var concurrency any - for _, instance := range instances { - if instance["runtime"] != "go" || instance["service"] != "api" { - continue - } - count := number(obj(instance["queueWorkers"])[n]) - if count > 0 { - workers++ - if concurrency == nil { - concurrency = count - } - } - } - stats = append(stats, M{"key": n, "label": label, "counts": c, "paused": paused > 0, "workers": workers, "concurrency": concurrency, "completed24h": completed, "failed24h": failed}) - } - rows := []M{} - for _, state := range []string{"active", "waiting", "delayed", "failed", "completed"} { - selected, e := s.Store.list(q.ctx(), "gojobs", M{"action": M{"$in": actions}, "state": state}, 200, bson.D{{Key: "createdAt", Value: -1}}) - if e != nil { - return nil, e - } - rows = append(rows, selected...) - } - jobs := []M{} - for _, r := range rows { - if search != "" && !strings.Contains(strings.ToLower(str(r["resourceId"])), search) && !strings.Contains(strings.ToLower(str(r["_id"])), search) { - continue - } - job := M{"id": r["_id"], "name": r["resourceId"], "_state": r["state"], "timestamp": date(r["createdAt"]).UnixMilli(), "attemptsMade": r["attempts"], "failedReason": r["error"], "data": M{"repoId": r["resourceId"]}} - if d, valid := storedDate(r["availableAt"]); r["state"] == "delayed" && valid { - job["delayUntil"] = d.UnixMilli() - } - if d, valid := storedDate(r["startedAt"]); valid { - job["processedOn"] = d.UnixMilli() - } - if d, valid := storedDate(r["finishedAt"]); valid { - job["finishedOn"] = d.UnixMilli() - } - jobs = append(jobs, job) - } - return M{"queues": stats, "selectedQueue": name, "jobs": jobs}, nil - } - operation := q.Params["operation"] - if q.R.Method == "DELETE" { - return s.adminJob(q, operation, actions) - } - switch operation { - case "pause", "resume": - if operation == "pause" { - if e := s.Store.Redis.Set(q.ctx(), "go:pause:"+name, "1", 0).Err(); e != nil { - return nil, e - } - } else { - if e := s.Store.Redis.Del(q.ctx(), "go:pause:"+name).Err(); e != nil { - return nil, e - } - } - case "retry-failed": - return s.retryFailedJobs(q.ctx(), actions...) - case "drain", "empty": - filter := M{"action": M{"$in": actions}} - if operation == "drain" { - filter["state"] = M{"$in": []string{"waiting", "delayed"}} - } - if _, e := s.Store.DB.Collection("gojobs").DeleteMany(q.ctx(), filter); e != nil { - return nil, e - } - default: - id := q.Params["id"] - if id == "" { - id = operation - } - if id == "" { - return nil, fail("invalid_job", 400) - } - return s.adminJob(q, id, actions) - } - return M{"ok": true}, nil -} -func (s *Server) registerAdmin() { - s.add("GET", "/api/admin/errors/stats", "admin", s.errorStats) - s.add("GET", "/api/admin/overview", "admin", s.overview) - s.add("GET", "/api/admin/queues/metrics", "admin", s.queueMetrics) - s.add("GET", "/api/admin/repos/:id/github", "admin", s.adminGitHub) - for _, kind := range []string{"users", "repos", "conferences"} { - s.add("GET", "/api/admin/"+kind, "admin", s.adminList(kind)) - } - s.add("GET", "/api/admin/users/:username", "admin", s.adminUser("get")) - s.add("GET", "/api/admin/users/:username/repos", "admin", s.adminUser("repos")) - for _, action := range []string{"ban", "activate", "promote", "demote"} { - s.add("POST", "/api/admin/users/:username/"+action, "admin", s.adminUser(action)) - } - s.add("GET", "/api/admin/stats", "admin", s.adminStats) - s.add("GET", "/api/admin/performance", "admin", s.adminPerformance) - s.add("GET", "/api/admin/cache", "admin", s.adminCache) - for _, method := range []string{"GET", "DELETE"} { - s.add(method, "/api/admin/errors", "admin", s.adminErrors) - } - s.add("GET", "/api/admin/queues", "admin", s.adminQueues) - for _, operation := range []string{"retry-failed", "drain", "pause", "resume", "empty"} { - s.add("POST", "/api/admin/queue/:name/"+operation, "admin", func(q *request) (any, error) { - q.Params["operation"] = operation - return s.adminQueues(q) - }) - } - for _, method := range []string{"POST", "DELETE"} { - s.add(method, "/api/admin/queue/:name/:operation", "admin", s.adminQueues) - } - s.add("POST", "/api/admin/queues/pause-all", "admin", func(q *request) (any, error) { - for _, n := range []string{"download", "remove", "cache"} { - if e := s.Store.Redis.Set(q.ctx(), "go:pause:"+n, "1", 0).Err(); e != nil { - return nil, e - } - } - return M{"ok": true}, nil - }) - s.add("DELETE", "/api/admin/repos/:id", "admin", func(q *request) (any, error) { - r, e := q.resource("repo", false) - if e != nil { - return nil, e - } - if e = s.resetContentCache(q.ctx(), r); e != nil { - return nil, e - } - return M{"status": r["status"]}, nil - }) -} - -func errorQueryPage(raw string) (offset, limit int64, err error) { - query := parseExtendedQuery(raw).object - value, err := query["offset"].stringDefault("0") - if err != nil { - return 0, 0, err - } - offset = max(0, errorPageInt(value, 0)) - value, err = query["limit"].stringDefault("250") - if err != nil { - return 0, 0, err - } - limit = min(int64(errorLogMax), max(int64(1), errorPageInt(value, 250))) - return -} diff --git a/backend/internal/server/admin_casting.go b/backend/internal/server/admin_casting.go deleted file mode 100644 index 5c0e249..0000000 --- a/backend/internal/server/admin_casting.go +++ /dev/null @@ -1,120 +0,0 @@ -package server - -import ( - "errors" - "strings" -) - -func adminCastString(v *queryValue) (any, error) { - if value, ok := v.scalarValue(); ok { - return value, nil - } - if v != nil && v.kind == 'o' { - if id, ok := v.object["_id"].scalarValue(); ok && id != "" { - return id, nil - } - } - return nil, errors.New("invalid_admin_filter") -} -func adminCastStrings(v *queryValue, allowEmpty bool) (any, error) { - values := []*queryValue{v} - if v != nil && v.kind == 'a' { - values = v.array - } - out := []any{} - for _, value := range values { - if value == nil { - continue - } - if allowEmpty && value.kind == 'a' && len(value.array) == 0 { - out = append(out, []any{}) - continue - } - cast, err := adminCastString(value) - if err != nil { - return nil, err - } - out = append(out, cast) - } - return out, nil -} -func adminCastOperators(v *queryValue, allowNot bool) (M, error) { - out := M{} - for _, key := range v.keys { - value := v.object[key] - var cast any - var err error - switch key { - case "$eq", "$ne", "$gt", "$gte", "$lt", "$lte", "$regex", "$options": - cast, err = adminCastString(value) - case "$in", "$nin", "$all": - cast, err = adminCastStrings(value, key != "$all") - case "$exists": - scalar, ok := value.scalarValue() - if !ok { - return nil, errors.New("invalid_admin_filter") - } - switch scalar { - case "true", "1", "yes": - cast = true - case "false", "0", "no": - cast = false - default: - return nil, errors.New("invalid_admin_filter") - } - case "$type": - if value.kind == 's' { - cast = value.scalar - } else if value.kind == 'a' { - list := []any{} - for _, item := range value.array { - if item == nil { - continue - } - if item.kind != 's' { - return nil, errors.New("invalid_admin_filter") - } - list = append(list, item.scalar) - } - cast = list - } else { - return nil, errors.New("invalid_admin_filter") - } - case "$not": - if allowNot && value.kind == 'o' && len(value.keys) > 0 && strings.HasPrefix(value.keys[0], "$") { - cast, err = adminCastOperators(value, false) - } else { - cast, err = adminCastString(value) - } - default: - return nil, errors.New("invalid_admin_filter") - } - if err != nil { - return nil, err - } - out[key] = cast - } - return out, nil -} - -// Mongoose rewrites scalar-field arrays to $in in the find/count filter, but -// leaves the original array used by aggregation unchanged. Operator objects -// receive cast values in the echoed filter; aggregation already captured the -// original values before those mutations. -func adminCastPredicate(v *queryValue) (cast, raw any, err error) { - raw = v.nativeValue() - if v != nil && v.kind == 'a' { - values, e := adminCastStrings(v, false) - return M{"$in": values}, raw, e - } - if v != nil && v.kind == 'o' { - for key := range v.object { - if strings.HasPrefix(key, "$") { - operators, e := adminCastOperators(v, true) - return operators, operators, e - } - } - } - cast, err = adminCastString(v) - return cast, raw, err -} diff --git a/backend/internal/server/admin_casting_integration_test.go b/backend/internal/server/admin_casting_integration_test.go deleted file mode 100644 index 6ce1278..0000000 --- a/backend/internal/server/admin_casting_integration_test.go +++ /dev/null @@ -1,86 +0,0 @@ -package server - -import ( - "context" - "encoding/json" - "net/http/httptest" - "os" - "os/exec" - "reflect" - "sort" - "testing" - "time" - - "go.mongodb.org/mongo-driver/v2/bson" -) - -func runAdminCastingIntegration(t *testing.T, base *Server) { - t.Run("admin Mongoose casting database differential", func(t *testing.T) { - name := "admin_cast_" + bson.NewObjectID().Hex() - db := base.Store.DB.Client().Database(name) - defer db.Drop(context.Background()) - ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second) - defer cancel() - command := exec.CommandContext(ctx, "node", "backend/contracts/admin-casting-database.cjs") - command.Dir = "../../.." - command.Env = append(os.Environ(), "ADMIN_CAST_DATABASE="+name, "TZ=UTC") - raw, err := command.Output() - if err != nil { - if e, ok := err.(*exec.ExitError); ok { - t.Fatalf("TypeScript database oracle: %s", e.Stderr) - } - t.Fatal(err) - } - var cases []struct { - Kind, Query string - Output any - CSV *string - Error bool - } - if err = json.Unmarshal(raw, &cases); err != nil { - t.Fatal(err, string(raw)) - } - if len(cases) != 44 { - t.Fatal("unexpected case count", len(cases)) - } - s := &Server{Config: base.Config, Store: &Store{DB: db, Redis: base.Store.Redis}} - for _, row := range cases { - w := httptest.NewRecorder() - q := &request{Server: s, W: w, R: httptest.NewRequest("GET", "/?"+row.Query, nil)} - value, err := s.adminList(row.Kind)(q) - if (err != nil) != row.Error { - t.Fatal(row.Kind, row.Query, err, row.Error) - } - if err != nil { - continue - } - if row.CSV != nil { - if w.Body.String() != *row.CSV { - t.Fatal(row.Kind, row.Query, "CSV", w.Body.String(), *row.CSV) - } - continue - } - out := obj(value) - ids := []any{} - for _, item := range arr(out["results"]) { - ids = append(ids, obj(item)["_id"]) - } - out["results"] = ids - counts := arr(out["statusCounts"]) - sort.Slice(counts, func(i, j int) bool { return str(obj(counts[i])["_id"]) < str(obj(counts[j])["_id"]) }) - out["statusCounts"] = counts - data, err := json.Marshal(responseJSON(out)) - if err != nil { - t.Fatal(err) - } - var normalized any - if err = json.Unmarshal(data, &normalized); err != nil { - t.Fatal(err) - } - if !reflect.DeepEqual(normalized, row.Output) { - expected, _ := json.Marshal(row.Output) - t.Fatalf("%s %s\ngot %s\nwant %s", row.Kind, row.Query, data, expected) - } - } - }) -} diff --git a/backend/internal/server/admin_casting_test.go b/backend/internal/server/admin_casting_test.go deleted file mode 100644 index eeec3df..0000000 --- a/backend/internal/server/admin_casting_test.go +++ /dev/null @@ -1,55 +0,0 @@ -package server - -import ( - "encoding/json" - "os" - "reflect" - "testing" -) - -func TestAdminMongooseCasting(t *testing.T) { - data, err := os.ReadFile("testdata/admin-casting.json") - if err != nil { - t.Fatal(err) - } - var cases []struct { - Field, Query string - Present, Error bool - Casted, RawAfter M - } - if err = json.Unmarshal(data, &cases); err != nil { - t.Fatal(err) - } - for _, row := range cases { - t.Run(row.Field+"/"+row.Query, func(t *testing.T) { - value := parseExtendedQuery(row.Query).object[row.Field] - if value.truthy() != row.Present { - t.Fatal(row) - } - if !row.Present { - return - } - cast, raw, err := adminCastPredicate(value) - if (err != nil) != row.Error { - t.Fatal(row, err) - } - if err != nil { - return - } - normalize := func(value any) any { - data, err := json.Marshal(value) - if err != nil { - t.Fatal(err) - } - var out any - if err = json.Unmarshal(data, &out); err != nil { - t.Fatal(err) - } - return out - } - if !reflect.DeepEqual(normalize(M{row.Field: cast}), normalize(row.Casted)) || !reflect.DeepEqual(normalize(M{row.Field: raw}), normalize(row.RawAfter)) { - t.Fatal(row, cast, raw) - } - }) - } -} diff --git a/backend/internal/server/admin_csv.go b/backend/internal/server/admin_csv.go deleted file mode 100644 index 71fd2c8..0000000 --- a/backend/internal/server/admin_csv.go +++ /dev/null @@ -1,92 +0,0 @@ -package server - -import ( - "io" - "strconv" - "strings" - "time" -) - -func csvDate(v any) string { - if !inputTruthy(v) { - return "" - } - d := date(v) - if value, ok := v.(string); ok && d.IsZero() { - var err error - d, err = time.Parse(time.RFC3339Nano, value) - if err != nil { - d, err = time.Parse("2006-01-02", value) - } - if err != nil { - return "" - } - } - return str(responseDate(d)) -} -func csvField(value any) string { - text := str(value) - if strings.ContainsAny(text, ",\"\n\r") { - return "\"" + strings.ReplaceAll(text, "\"", "\"\"") + "\"" - } - return text -} -func csvNumber(value any) any { - if !inputTruthy(value) { - return 0 - } - return value -} -func (s *Server) adminCSV(q *request, kind, coll string, filter, sort M) (any, error) { - rows, e := s.aggregate(q, coll, []M{{"$match": filter}, {"$sort": sort}, {"$limit": 50000}, {"$project": M{"accessTokens": 0, "apiTokens": 0, "accessToken": 0, "refreshToken": 0, "source.accessToken": 0}}}) - if e != nil { - return nil, e - } - filename := "repositories" - if kind == "users" || kind == "conferences" { - filename = kind - } - q.W.Header().Set("Content-Type", "text/csv; charset=utf-8") - q.W.Header().Set("Content-Disposition", `attachment; filename="`+filename+"-"+time.Now().UTC().Format("2006-01-02")+`.csv"`) - if err := writeAdminCSV(q.W, kind, rows); err != nil { - return nil, err - } - return written{}, nil -} -func writeAdminCSV(writer io.Writer, kind string, rows []M) error { - columns := []string{"repoId", "status", "statusMessage", "anonymizeDate", "lastView", "pageView", "sourceRepository", "sourceBranch", "sourceCommit", "conference", "storage", "terms"} - if kind == "users" { - columns = []string{"username", "email", "status", "isAdmin", "repoCount", "dateOfEntry"} - } - if kind == "conferences" { - columns = []string{"conferenceID", "name", "status", "price", "repoCount", "startDate", "endDate"} - } - if kind == "repos" && len(rows) == 0 { - columns = []string{"repoId"} - } - if _, err := io.WriteString(writer, strings.Join(columns, ",")); err != nil { - return err - } - for _, r := range rows { - source := obj(r["source"]) - values := M{"repoId": r["repoId"], "status": r["status"], "statusMessage": r["statusMessage"], "anonymizeDate": csvDate(r["anonymizeDate"]), "lastView": csvDate(r["lastView"]), "pageView": csvNumber(r["pageView"]), "sourceRepository": source["repositoryName"], "sourceBranch": source["branch"], "sourceCommit": source["commit"], "conference": r["conference"], "storage": csvNumber(obj(r["size"])["storage"]), "terms": len(arr(obj(r["options"])["terms"]))} - if kind == "users" { - email := "" - if emails := arr(r["emails"]); len(emails) > 0 { - email = str(obj(emails[0])["email"]) - } - values = M{"username": r["username"], "email": email, "status": r["status"], "isAdmin": strconv.FormatBool(boolean(r["isAdmin"])), "repoCount": len(arr(r["repositories"])), "dateOfEntry": csvDate(r["dateOfEntry"])} - } - if kind == "conferences" { - values = M{"conferenceID": r["conferenceID"], "name": r["name"], "status": r["status"], "price": csvNumber(r["price"]), "repoCount": len(arr(r["repositories"])), "startDate": csvDate(r["startDate"]), "endDate": csvDate(r["endDate"])} - } - row := make([]string, len(columns)) - for i, key := range columns { - row[i] = csvField(values[key]) - } - if _, err := io.WriteString(writer, "\n"+strings.Join(row, ",")); err != nil { - return err - } - } - return nil -} diff --git a/backend/internal/server/admin_csv_test.go b/backend/internal/server/admin_csv_test.go deleted file mode 100644 index 37bbdcc..0000000 --- a/backend/internal/server/admin_csv_test.go +++ /dev/null @@ -1,43 +0,0 @@ -package server - -import ( - "bytes" - "encoding/json" - "errors" - "os" - "testing" -) - -func TestTypeScriptAdminCSV(t *testing.T) { - raw, err := os.ReadFile("testdata/admin-csv.json") - if err != nil { - t.Fatal(err) - } - var cases []struct { - Name, Kind, Expected string - Rows []M - } - if err := json.Unmarshal(raw, &cases); err != nil { - t.Fatal(err) - } - for _, c := range cases { - t.Run(c.Name, func(t *testing.T) { - var output bytes.Buffer - if err := writeAdminCSV(&output, c.Kind, c.Rows); err != nil { - t.Fatal(err) - } - if output.String() != c.Expected { - t.Fatalf("got %q; expected %q", output.String(), c.Expected) - } - }) - } -} - -type rejectedCSVWriter struct{} - -func (rejectedCSVWriter) Write([]byte) (int, error) { return 0, errors.New("synthetic_write_failure") } -func TestAdminCSVWriteError(t *testing.T) { - if err := writeAdminCSV(rejectedCSVWriter{}, "repos", nil); err == nil { - t.Fatal("write error ignored") - } -} diff --git a/backend/internal/server/admin_dates.go b/backend/internal/server/admin_dates.go deleted file mode 100644 index 2b7ebfa..0000000 --- a/backend/internal/server/admin_dates.go +++ /dev/null @@ -1,21 +0,0 @@ -package server - -func adminDateRange(raw string) (M, error) { - query := parseExtendedQuery(raw).object - dates := M{} - for _, entry := range []struct{ Query, Operator string }{{"dateFrom", "$gte"}, {"dateTo", "$lte"}} { - value := query[entry.Query] - if !value.truthy() { - continue - } - text, err := value.stringValue() - if err != nil { - return nil, err - } - parsed, ok := javascriptDateString(text) - if ok { - dates[entry.Operator] = parsed - } - } - return dates, nil -} diff --git a/backend/internal/server/admin_dates_test.go b/backend/internal/server/admin_dates_test.go deleted file mode 100644 index 7731764..0000000 --- a/backend/internal/server/admin_dates_test.go +++ /dev/null @@ -1,49 +0,0 @@ -package server - -import ( - "encoding/json" - "os" - "reflect" - "testing" -) - -func TestAdminDateRangeContracts(t *testing.T) { - raw, err := os.ReadFile("testdata/admin-dates.json") - if err != nil { - t.Fatal(err) - } - var cases []struct { - Query string - Expected any - Error bool - } - if err = json.Unmarshal(raw, &cases); err != nil { - t.Fatal(err) - } - for _, row := range cases { - t.Run(row.Query, func(t *testing.T) { - dates, err := adminDateRange(row.Query) - if (err != nil) != row.Error { - t.Fatal(row, err) - } - if err != nil { - return - } - var value any - if len(dates) > 0 { - value = M{"date": dates} - } - data, err := json.Marshal(responseJSON(value)) - if err != nil { - t.Fatal(err) - } - var actual any - if err = json.Unmarshal(data, &actual); err != nil { - t.Fatal(err) - } - if !reflect.DeepEqual(actual, row.Expected) { - t.Fatal(row.Query, string(data), row.Expected) - } - }) - } -} diff --git a/backend/internal/server/admin_filter_query.go b/backend/internal/server/admin_filter_query.go deleted file mode 100644 index 35ee4da..0000000 --- a/backend/internal/server/admin_filter_query.go +++ /dev/null @@ -1,39 +0,0 @@ -package server - -import ( - "errors" - "net/url" -) - -// Status flags use loose string equality; search requires a string because -// TypeScript calls replace on it. Role selection uses strict scalar equality. -// Field predicate casting is handled separately for find/count and aggregation. -func adminFilterQuery(kind, raw string) (url.Values, error) { - values, _ := url.ParseQuery(raw) - query := parseExtendedQuery(raw).object - if kind != "users" { - for _, flag := range []string{"ready", "error", "preparing", "removed", "expired"} { - match, err := query[flag].looseStringEqual("true") - if err != nil { - return nil, err - } - values.Del(flag) - if match { - values.Set(flag, "true") - } - } - } - values.Del("search") - if query["search"].truthy() { - search, scalar := query["search"].scalarValue() - if !scalar { - return nil, errors.New("invalid_query_value") - } - values.Set("search", search) - } - values.Del("role") - if role, scalar := query["role"].scalarValue(); scalar && role == "admin" { - values.Set("role", role) - } - return values, nil -} diff --git a/backend/internal/server/admin_filters.go b/backend/internal/server/admin_filters.go deleted file mode 100644 index c69f152..0000000 --- a/backend/internal/server/admin_filters.go +++ /dev/null @@ -1,131 +0,0 @@ -package server - -import ( - "net/url" - "strings" - "unicode" -) - -func adminSearchPattern(value string) string { - var out strings.Builder - for _, r := range value { - if strings.ContainsRune(`-[]{}()*+?.,\^$|#`, r) || (unicode.IsSpace(r) && r != '\u0085') || r == '\ufeff' { - out.WriteByte('\\') - } - out.WriteRune(r) - } - return out.String() -} - -// owner is resolved only for repository queries. A missing owner returns the -// same empty response as TypeScript, rather than matching ownerless records. -type adminFilterOptions struct { - Fields M - RawQuery string -} - -func adminFilter(kind string, v url.Values, owner M, overrides ...adminFilterOptions) (M, bool, error) { - rawQuery := v.Encode() - fields := M{} - for _, key := range []string{"owner", "conference", "status"} { - if value := v.Get(key); value != "" { - fields[key] = value - } - } - if len(overrides) > 0 { - fields = overrides[0].Fields - rawQuery = overrides[0].RawQuery - } - filter := M{} - clauses := []M{} - add := func(value M) { - if kind == "users" { - for k, v := range value { - filter[k] = v - } - } else { - clauses = append(clauses, value) - } - } - if search := v.Get("search"); search != "" { - re := M{"$regex": adminSearchPattern(search), "$options": "i"} - fields := []string{"repoId", "source.repositoryName", "statusMessage", "conference"} - if kind == "users" { - fields = []string{"username", "emails.email"} - } - if kind == "conferences" { - fields = []string{"name", "conferenceID"} - } - or := []M{} - for _, field := range fields { - or = append(or, M{field: re}) - } - add(M{"$or": or}) - } - if kind == "repos" { - if _, present := fields["owner"]; present { - if owner == nil { - return M{"$and": clauses}, true, nil - } - add(M{"owner": owner["_id"]}) - } - if conference, present := fields["conference"]; present { - add(M{"conference": conference}) - } - } - if kind == "users" { - if status, present := fields["status"]; present { - add(M{"status": status}) - } - if v.Get("role") == "admin" { - add(M{"isAdmin": true}) - } - } - dateField := "anonymizeDate" - if kind == "users" { - dateField = "dateOfEntry" - } - if kind == "conferences" { - dateField = "startDate" - } - dates, err := adminDateRange(rawQuery) - if err != nil { - return nil, false, err - } - if len(dates) > 0 { - add(M{dateField: dates}) - } - if kind != "users" { - statuses := []M{} - order := []string{"ready", "error", "expired", "removed", "preparing"} - if kind == "conferences" { - order = []string{"ready", "error", "preparing", "expired", "removed"} - } - for _, flag := range order { - if v.Get(flag) != "true" { - continue - } - states := []string{flag} - if kind == "repos" { - switch flag { - case "expired": - states = []string{"expiring", "expired"} - case "removed": - states = []string{"removing", "removed"} - case "preparing": - states = []string{"preparing", "download"} - } - } - for _, state := range states { - statuses = append(statuses, M{"status": state}) - } - } - if len(statuses) > 0 { - add(M{"$or": statuses}) - } - if len(clauses) > 0 { - filter["$and"] = clauses - } - } - return filter, false, nil -} diff --git a/backend/internal/server/admin_filters_integration_test.go b/backend/internal/server/admin_filters_integration_test.go deleted file mode 100644 index ad7f850..0000000 --- a/backend/internal/server/admin_filters_integration_test.go +++ /dev/null @@ -1,216 +0,0 @@ -package server - -import ( - "context" - "encoding/json" - "net/http/httptest" - "net/url" - "reflect" - "sort" - "strings" - "testing" - - "github.com/tdurieux/anonymous_github/backend/internal/security" - "go.mongodb.org/mongo-driver/v2/bson" -) - -func runAdminFiltersIntegration(t *testing.T, s *Server, nonAdminToken string) { - t.Run("admin status filters and missing owners", func(t *testing.T) { - ctx := context.Background() - token := "synthetic-admin-filters" - owner := bson.NewObjectID() - if _, err := s.Store.DB.Collection("users").InsertOne(ctx, M{"_id": owner, "username": "admin-filter-owner", "status": "active", "isAdmin": true, "apiTokens": []M{{"tokenHash": security.HashToken(token)}}}); err != nil { - t.Fatal(err) - } - prefix := "admin-filter-fixture-" - for _, status := range []string{"ready", "error", "preparing", "queue", "download", "expired", "expiring", "removed", "removing", "archived"} { - if _, err := s.Store.DB.Collection(collection("repo")).InsertOne(ctx, M{"_id": bson.NewObjectID(), "repoId": prefix + status, "status": status, "size": M{"storage": 7}, "source": M{"provider": "fixture"}}); err != nil { - t.Fatal(err) - } - if _, err := s.Store.DB.Collection("conferences").InsertOne(ctx, M{"_id": bson.NewObjectID(), "conferenceID": prefix + status, "name": prefix + status, "status": status}); err != nil { - t.Fatal(err) - } - } - call := func(kind, auth string, values url.Values) *httptest.ResponseRecorder { - req := httptest.NewRequest("GET", "/api/admin/"+kind+"?"+values.Encode(), nil) - req.RemoteAddr = "198.51.100.16:1234" - req.Header.Set("Authorization", "Bearer "+auth) - w := httptest.NewRecorder() - s.ServeHTTP(w, req) - return w - } - if w := call("repos", nonAdminToken, url.Values{}); w.Code != 401 { - t.Fatal("non-admin allowed", w.Code, w.Body) - } - for _, kind := range []string{"repos", "conferences"} { - for _, flag := range []string{"ready", "error", "preparing", "expired", "removed"} { - values := url.Values{"search": {prefix}, flag: {"true"}} - w := call(kind, token, values) - var out M - if err := json.Unmarshal(w.Body.Bytes(), &out); err != nil { - t.Fatal(err) - } - if w.Code != 200 { - t.Fatal(kind, flag, w.Code, w.Body) - } - want := []string{flag} - if kind == "repos" { - switch flag { - case "preparing": - want = []string{"download", "preparing"} - case "expired": - want = []string{"expired", "expiring"} - case "removed": - want = []string{"removed", "removing"} - } - } - got := []string{} - for _, value := range arr(out["results"]) { - got = append(got, str(obj(value)["status"])) - } - sort.Strings(got) - sort.Strings(want) - if !reflect.DeepEqual(got, want) || number(out["total"]) != int64(len(want)) { - t.Fatal(kind, flag, got, want, out["total"]) - } - _, sizePresent := out["totalSize"] - if sizePresent != (kind == "repos") { - t.Fatal("wrong totalSize shape", kind) - } - for _, row := range arr(out["statusCounts"]) { - _, storagePresent := obj(row)["storage"] - if storagePresent != (kind == "repos") { - t.Fatal("wrong status count shape", kind) - } - } - } - } - for _, kind := range []string{"repos", "conferences"} { - field := "repoId" - if kind == "conferences" { - field = "conferenceID" - } - w := call(kind, token, url.Values{"search": {prefix}, "page": {"2.9"}, "limit": {"2rows"}, "sort": {field}, "direction": {"asc"}}) - var output M - if err := json.Unmarshal(w.Body.Bytes(), &output); err != nil { - t.Fatal(err) - } - rows := arr(output["results"]) - if w.Code != 200 || number(output["page"]) != 2 || len(rows) != 2 || str(obj(rows[0])[field]) != prefix+"error" || str(obj(rows[1])[field]) != prefix+"expired" { - t.Fatal(kind, "pagination", w.Code, w.Body) - } - w = call(kind, token, url.Values{"search": {prefix}, "sort": {"$where"}}) - output = M{} - if err := json.Unmarshal(w.Body.Bytes(), &output); err != nil { - t.Fatal(err) - } - if w.Code != 200 || number(obj(output["sort"])["_id"]) != -1 { - t.Fatal(kind, "unsafe sort", w.Code, w.Body) - } - } - for _, kind := range []string{"repos", "users", "conferences"} { - for _, values := range []url.Values{ - {"page[]": {"2"}, "limit[]": {"2"}, "sort[]": {"status"}, "direction[]": {"asc"}, "format[]": {"csv"}}, - {"page": {"1000001"}, "limit": {"1"}}, - } { - w := call(kind, token, values) - var out M - if err := json.Unmarshal(w.Body.Bytes(), &out); err != nil || w.Code != 200 { - t.Fatal(kind, values, w.Code, w.Body) - } - wantPage := int64(2) - if values.Get("page") != "" { - wantPage = 1000001 - } - if number(out["page"]) != wantPage || number(obj(out["sort"])["_id"]) != -1 { - t.Fatal(kind, values, out) - } - } - for _, values := range []url.Values{ - {"page": {"-1"}}, {"page": {"999999999999999999999999999999"}}, - {"page[toString]": {"x"}}, {"limit[toString]": {"x"}}, - } { - w := call(kind, token, values) - if w.Code != 500 || !strings.Contains(w.Body.String(), "internal_error") { - t.Fatal(kind, values, w.Code, w.Body) - } - } - negative := call(kind, token, url.Values{"limit": {"-1"}}) - if kind == "users" { - if negative.Code != 500 { - t.Fatal("negative aggregate limit", negative.Code, negative.Body) - } - } else { - var out M - if err := json.Unmarshal(negative.Body.Bytes(), &out); err != nil || negative.Code != 200 || len(arr(out["results"])) != 1 { - t.Fatal("negative find limit", kind, negative.Code, negative.Body) - } - } - // CSV does not execute pagination, even when its numeric values - // would produce invalid MongoDB skip/limit stages. - w := call(kind, token, url.Values{"page": {"-1"}, "limit": {"-1"}, "format": {"csv"}, "search": {"no-matching-export-fixture"}}) - if w.Code != 200 || !strings.HasPrefix(w.Header().Get("Content-Type"), "text/csv") { - t.Fatal(kind, "CSV pagination", w.Code, w.Body) - } - } - for _, kind := range []string{"repos", "users", "conferences"} { - w := call(kind, token, url.Values{"format": {"csv"}, "search": {"no-matching-export-fixture"}}) - var expected strings.Builder - if err := writeAdminCSV(&expected, kind, nil); err != nil { - t.Fatal(err) - } - if w.Code != 200 || w.Body.String() != expected.String() || w.Header().Get("Content-Type") != "text/csv; charset=utf-8" { - t.Fatal(kind, "empty CSV", w.Code, w.Header(), w.Body) - } - disposition := w.Header().Get("Content-Disposition") - if !strings.HasPrefix(disposition, `attachment; filename="`) || !strings.HasSuffix(disposition, `.csv"`) { - t.Fatal("CSV disposition", disposition) - } - } - for _, kind := range []string{"repos", "users", "conferences"} { - for _, values := range []url.Values{{"search[]": {"fixture"}}, {"search": {"fixture", "other"}}} { - w := call(kind, token, values) - if w.Code != 500 { - t.Fatal("search shape", kind, w.Code, w.Body) - } - } - if kind != "users" { - w := call(kind, token, url.Values{"search": {"admin-filter-fixture-"}, "ready[]": {"true"}}) - var out M - if err := json.Unmarshal(w.Body.Bytes(), &out); err != nil || w.Code != 200 || len(arr(out["results"])) != 1 || str(obj(arr(out["results"])[0])["status"]) != "ready" { - t.Fatal("array flag", kind, w.Code, w.Body) - } - } - } - csv := call("users", token, url.Values{"format": {"csv"}, "search": {"admin-filter-owner"}}) - if csv.Code != 200 || !strings.Contains(csv.Body.String(), "admin-filter-owner") || strings.Contains(csv.Body.String(), security.HashToken(token)) || strings.Contains(csv.Body.String(), token) { - t.Fatal("user CSV", csv.Code, csv.Body) - } - w := call("repos", token, url.Values{"owner": {"does-not-exist"}, "search": {prefix}}) - var out M - if err := json.Unmarshal(w.Body.Bytes(), &out); err != nil { - t.Fatal(err) - } - if w.Code != 200 || number(out["total"]) != 0 || len(arr(out["results"])) != 0 { - t.Fatal("unknown owner matched ownerless fixtures", w.Code, w.Body) - } - w = call("users", token, url.Values{"search": {"admin-filter-owner"}}) - // Decode into a fresh map because absent response fields must stay absent. - out = M{} - if err := json.Unmarshal(w.Body.Bytes(), &out); err != nil { - t.Fatal(err) - } - if w.Code != 200 || number(out["total"]) != 1 { - t.Fatal(w.Code, w.Body) - } - if _, ok := out["totalSize"]; ok { - t.Fatal("users include repository storage total") - } - for _, value := range arr(out["results"]) { - row := obj(value) - if row["apiTokens"] != nil || row["accessTokens"] != nil { - t.Fatal("admin list exposed credentials") - } - } - }) -} diff --git a/backend/internal/server/admin_filters_test.go b/backend/internal/server/admin_filters_test.go deleted file mode 100644 index 24f1f71..0000000 --- a/backend/internal/server/admin_filters_test.go +++ /dev/null @@ -1,68 +0,0 @@ -package server - -import ( - "encoding/json" - "net/url" - "os" - "reflect" - "testing" -) - -func TestTypeScriptAdminFilters(t *testing.T) { - raw, err := os.ReadFile("testdata/admin-filters.json") - if err != nil { - t.Fatal(err) - } - var cases []struct { - Kind string - Query M - RawQuery string - Error bool - Expected M - MissingOwner bool - } - if err := json.Unmarshal(raw, &cases); err != nil { - t.Fatal(err) - } - for _, c := range cases { - values := url.Values{} - for k, v := range c.Query { - values.Set(k, str(v)) - } - rawQuery := values.Encode() - if c.RawQuery != "" { - rawQuery = c.RawQuery - } - t.Run(c.Kind+"/"+rawQuery, func(t *testing.T) { - values, err := adminFilterQuery(c.Kind, rawQuery) - if c.Error { - if err == nil { - t.Fatal("expected invalid query") - } - return - } - if err != nil { - t.Fatal(err) - } - var owner M - if values.Get("owner") == "exists" { - owner = M{"_id": "owner-id"} - } - filter, missing, err := adminFilter(c.Kind, values, owner) - if err != nil { - t.Fatal(err) - } - raw, err := json.Marshal(responseJSON(filter)) - if err != nil { - t.Fatal(err) - } - var actual M - if err := json.Unmarshal(raw, &actual); err != nil { - t.Fatal(err) - } - if !reflect.DeepEqual(actual, c.Expected) || missing != c.MissingOwner { - t.Fatalf("got %s missing=%v; expected %#v missing=%v", raw, missing, c.Expected, c.MissingOwner) - } - }) - } -} diff --git a/backend/internal/server/admin_find.go b/backend/internal/server/admin_find.go deleted file mode 100644 index 304bbfe..0000000 --- a/backend/internal/server/admin_find.go +++ /dev/null @@ -1,25 +0,0 @@ -package server - -import ( - "errors" - "math" - - "go.mongodb.org/mongo-driver/v2/mongo/options" -) - -// Repository and conference lists use find, whose negative limit means a -// single batch. User lists use aggregation, where negative limits are invalid. -func (s *Server) adminFindPage(q *request, coll string, filter, sort, projection M, page, limit float64) ([]M, error) { - skip := (page - 1) * limit - if math.IsNaN(skip) || math.IsInf(skip, 0) || skip < 0 || skip >= math.Exp2(63) || limit <= -math.Exp2(63) || limit >= math.Exp2(63) { - return nil, errors.New("invalid_pagination") - } - cursor, err := s.Store.DB.Collection(coll).Find(q.ctx(), filter, options.Find().SetSort(sort).SetProjection(projection).SetSkip(int64(skip)).SetLimit(int64(limit))) - if err != nil { - return nil, err - } - defer cursor.Close(q.ctx()) - rows := []M{} - err = cursor.All(q.ctx(), &rows) - return rows, err -} diff --git a/backend/internal/server/admin_job.go b/backend/internal/server/admin_job.go deleted file mode 100644 index bd092ae..0000000 --- a/backend/internal/server/admin_job.go +++ /dev/null @@ -1,62 +0,0 @@ -package server - -import "time" - -// Job IDs are opaque to callers. Preserve the stored resource kind and action, -// including document preparation and expiry jobs in the remove queue. -func (s *Server) adminJob(q *request, id string, actions []string) (any, error) { - filter := M{"_id": id, "action": M{"$in": actions}} - if q.R.Method == "DELETE" { - result, err := s.Store.DB.Collection("gojobs").DeleteOne(q.ctx(), filter) - if err != nil { - return nil, err - } - if result.DeletedCount == 0 { - return nil, fail("job_not_found", 404) - } - // As with BullMQ removal, this removes the queue record, not work already - // running. The old worker's lease cannot update a replacement record. - return M{"ok": true}, nil - } - job, err := s.Store.one(q.ctx(), "gojobs", filter) - if err != nil { - return nil, err - } - if job == nil { - return nil, fail("job_not_found", 404) - } - if job["state"] == "active" { - return nil, fail("job_is_active", 409) - } - if job["action"] == "prepare" { - kind := str(job["kind"]) - if collection(kind) == "" { - return nil, fail("invalid_job", 400) - } - resource := resourceFilter(kind, str(job["resourceId"])) - resource["status"] = "error" - if _, err := s.Store.update(q.ctx(), collection(kind), resource, M{"$set": M{"status": "preparing", "statusDate": time.Now()}}); err != nil { - return nil, err - } - } - filter["state"] = M{"$ne": "active"} - changed, err := s.Store.update(q.ctx(), "gojobs", filter, M{ - "$set": M{"state": "waiting", "attempts": 0, "availableAt": time.Now()}, - "$unset": M{"lease": "", "leaseUntil": "", "finishedAt": "", "error": ""}, - }) - if err != nil { - return nil, err - } - if !changed { - delete(filter, "state") - current, err := s.Store.one(q.ctx(), "gojobs", filter) - if err != nil { - return nil, err - } - if current == nil { - return nil, fail("job_not_found", 404) - } - return nil, fail("job_is_active", 409) - } - return M{"ok": true}, nil -} diff --git a/backend/internal/server/admin_mutations_integration_test.go b/backend/internal/server/admin_mutations_integration_test.go deleted file mode 100644 index ad8a94e..0000000 --- a/backend/internal/server/admin_mutations_integration_test.go +++ /dev/null @@ -1,160 +0,0 @@ -package server - -import ( - "context" - "encoding/json" - "net/http/httptest" - "reflect" - "testing" - "time" - - "github.com/tdurieux/anonymous_github/backend/internal/security" - "go.mongodb.org/mongo-driver/v2/bson" -) - -func runAdminMutationsIntegration(t *testing.T, s *Server) { - t.Run("admin mutations persist and ban continues after enqueue failure", func(t *testing.T) { - ctx := context.Background() - adminToken, targetToken := "synthetic-mutation-admin", "synthetic-mutation-target" - admin, target := bson.NewObjectID(), bson.NewObjectID() - for _, u := range []M{{"_id": admin, "username": "mutation-admin", "status": "active", "isAdmin": true, "apiTokens": []M{{"tokenHash": security.HashToken(adminToken)}}}, {"_id": target, "username": "mutation-target", "status": "active", "apiTokens": []M{{"tokenHash": security.HashToken(targetToken)}}}} { - if _, err := s.Store.DB.Collection("users").InsertOne(ctx, u); err != nil { - t.Fatal(err) - } - } - call := func(method, path, token string) *httptest.ResponseRecorder { - req := httptest.NewRequest(method, path, nil) - req.RemoteAddr = "198.51.100.18:1234" - req.Header.Set("Authorization", "Bearer "+token) - w := httptest.NewRecorder() - s.ServeHTTP(w, req) - return w - } - mutate := func(username, action, token string) *httptest.ResponseRecorder { - return call("POST", "/api/admin/users/"+username+"/"+action, token) - } - for _, action := range []string{"ban", "activate", "promote", "demote"} { - if w := mutate("mutation-target", action, targetToken); w.Code != 401 { - t.Fatal("non-admin mutation", action, w.Code, w.Body) - } - if w := mutate("mutation-missing", action, adminToken); w.Code != 404 { - t.Fatal("missing user", action, w.Code, w.Body) - } - } - for _, action := range []string{"promote", "demote"} { - w := mutate("mutation-target", action, adminToken) - var out M - if err := json.Unmarshal(w.Body.Bytes(), &out); err != nil { - t.Fatal(err) - } - if w.Code != 200 || !reflect.DeepEqual(out, M{"ok": true}) { - t.Fatal(action, w.Code, w.Body) - } - stored, err := s.Store.one(ctx, "users", M{"_id": target}) - if err != nil { - t.Fatal(err) - } - if boolean(stored["isAdmin"]) != (action == "promote") { - t.Fatal("role not saved", stored) - } - wanted := 200 - if action == "demote" { - wanted = 401 - } - if w := call("GET", "/api/admin/users?search=mutation-target", targetToken); w.Code != wanted { - t.Fatal("role not effective", action, w.Code, w.Body) - } - } - before := time.Now().Add(-time.Hour).Truncate(time.Millisecond) - for _, state := range []string{"ready", "queue-failure", "archived", "error", "removed", "removing"} { - status := state - if state == "queue-failure" { - status = "ready" - } - if _, err := s.Store.DB.Collection(collection("repo")).InsertOne(ctx, M{"_id": bson.NewObjectID(), "repoId": "ban-mutation-" + state, "owner": target, "status": status, "statusDate": before}); err != nil { - t.Fatal(err) - } - } - if _, err := s.Store.DB.Collection(collection("repo")).InsertOne(ctx, M{"_id": bson.NewObjectID(), "repoId": "ban-mutation-coauthor-only", "owner": admin, "coauthors": []M{{"username": "mutation-target"}}, "status": "ready", "statusDate": before}); err != nil { - t.Fatal(err) - } - validator := func(value M) error { - return s.Store.DB.RunCommand(ctx, bson.D{{Key: "collMod", Value: "gojobs"}, {Key: "validator", Value: value}, {Key: "validationLevel", Value: "strict"}, {Key: "validationAction", Value: "error"}}).Err() - } - if err := validator(M{"resourceId": M{"$ne": "ban-mutation-queue-failure"}}); err != nil { - t.Fatal(err) - } - defer func() { - if err := validator(M{}); err != nil { - t.Error(err) - } - }() - w := mutate("mutation-target", "ban", adminToken) - var out M - if err := json.Unmarshal(w.Body.Bytes(), &out); err != nil { - t.Fatal(err) - } - if w.Code != 200 || out["ok"] != true || number(out["reposQueued"]) != 3 { - t.Fatal("ban stopped at failed enqueue", w.Code, w.Body) - } - user, err := s.Store.one(ctx, "users", M{"_id": target}) - if err != nil || user["status"] != "banned" { - t.Fatal(user, err) - } - if w := call("GET", "/api/user", targetToken); w.Code != 401 { - t.Fatal("banned credential accepted", w.Code, w.Body) - } - for _, state := range []string{"ready", "queue-failure", "archived", "error", "removed", "removing", "coauthor-only"} { - id := "ban-mutation-" + state - row, err := s.Store.one(ctx, collection("repo"), M{"repoId": id}) - if err != nil { - t.Fatal(err) - } - want := "removing" - if state == "removed" { - want = "removed" - } - if state == "coauthor-only" { - want = "ready" - } - if row["status"] != want { - t.Fatal(id, row["status"], want) - } - if state == "removed" || state == "removing" || state == "coauthor-only" { - if !date(row["statusDate"]).Equal(before) { - t.Fatal("excluded repository changed", id) - } - } - } - if err := validator(M{}); err != nil { - t.Fatal(err) - } - if err := s.enqueue(ctx, "repo", "ban-mutation-queue-failure", "remove"); err != nil { - t.Fatal(err) - } - if err := s.runJob(ctx, M{"kind": "repo", "resourceId": "ban-mutation-queue-failure", "action": "remove"}); err != nil { - t.Fatal(err) - } - if w := mutate("mutation-target", "activate", adminToken); w.Code != 200 { - t.Fatal(w.Code, w.Body) - } - if w := call("GET", "/api/user", targetToken); w.Code != 200 { - t.Fatal("activation not effective", w.Code, w.Body) - } - // Admin activation changes status only; anonymized account data stays erased. - deleted := M{"_id": bson.NewObjectID(), "username": "deleted-mutation-fixture", "status": "removed", "apiTokens": []any{}, "emails": []any{}} - if _, err := s.Store.DB.Collection("users").InsertOne(ctx, deleted); err != nil { - t.Fatal(err) - } - if w := mutate(str(deleted["username"]), "activate", adminToken); w.Code != 200 { - t.Fatal("removed activation", w.Code, w.Body) - } - restored, err := s.Store.one(ctx, "users", M{"_id": deleted["_id"]}) - if err != nil { - t.Fatal(err) - } - if restored["status"] != "active" || restored["externalIDs"] != nil || len(arr(restored["apiTokens"])) != 0 || len(arr(restored["emails"])) != 0 { - t.Fatal("activation recreated erased identity", restored) - } - }) -} diff --git a/backend/internal/server/admin_pagination.go b/backend/internal/server/admin_pagination.go deleted file mode 100644 index 9177be8..0000000 --- a/backend/internal/server/admin_pagination.go +++ /dev/null @@ -1,79 +0,0 @@ -package server - -import ( - "math" - "math/big" - "regexp" - "strings" - "unicode" -) - -var adminSortField = regexp.MustCompile(`^[A-Za-z_][A-Za-z0-9_.]*$`) - -func adminListPage(raw string) (float64, float64, M, bool, error) { - values := parseExtendedQuery(raw).object - pageText, err := values["page"].stringValue() - if err != nil { - return 0, 0, nil, false, err - } - page := adminParseInt(pageText, 1) - limitText, err := values["limit"].stringValue() - if err != nil { - return 0, 0, nil, false, err - } - limit := math.Min(adminParseInt(limitText, 10), 1000) - field, scalar := values["sort"].scalarValue() - if !scalar || !adminSortField.MatchString(field) { - field = "_id" - } - direction := int64(-1) - if value, ok := values["direction"].scalarValue(); ok && value == "asc" { - direction = 1 - } - format, _ := values["format"].scalarValue() - return page, limit, M{field: direction}, format == "csv", nil -} - -// parseInt without a radix accepts a sign, decimal digits or a hexadecimal -// prefix, then rounds the integer to JavaScript's Number representation. -func adminParseInt(value string, fallback float64) float64 { - value = strings.TrimLeftFunc(value, func(r rune) bool { return unicode.IsSpace(r) && r != '\u0085' || r == '\ufeff' }) - sign := 1.0 - if len(value) > 0 && (value[0] == '+' || value[0] == '-') { - if value[0] == '-' { - sign = -1 - } - value = value[1:] - } - base := 10 - if strings.HasPrefix(value, "0x") || strings.HasPrefix(value, "0X") { - base = 16 - value = value[2:] - } - count := 0 - for _, c := range value { - if c >= '0' && c <= '9' || base == 16 && (c >= 'a' && c <= 'f' || c >= 'A' && c <= 'F') { - count++ - } else { - break - } - } - if count == 0 { - return fallback - } - n, ok := new(big.Int).SetString(value[:count], base) - if !ok || n.Sign() == 0 { - return fallback - } - out, _ := n.Float64() - return sign * out -} - -// Statistics history retains its separately specified positive window bounds. -func adminPageInt(value string, fallback, upper int64) int64 { - n := adminParseInt(value, float64(fallback)) - if n < 1 { - return fallback - } - return int64(math.Min(n, float64(upper))) -} diff --git a/backend/internal/server/admin_pagination_test.go b/backend/internal/server/admin_pagination_test.go deleted file mode 100644 index c28828e..0000000 --- a/backend/internal/server/admin_pagination_test.go +++ /dev/null @@ -1,63 +0,0 @@ -package server - -import ( - "encoding/json" - "net/url" - "os" - "reflect" - "testing" -) - -func TestTypeScriptAdminPagination(t *testing.T) { - raw, err := os.ReadFile("testdata/admin-pagination.json") - if err != nil { - t.Fatal(err) - } - var cases []struct { - Kind string - Query M - Expected M - RawQuery string - Error bool - } - if err := json.Unmarshal(raw, &cases); err != nil { - t.Fatal(err) - } - for _, c := range cases { - values := url.Values{} - for key, value := range c.Query { - if list, ok := value.([]any); ok { - for _, v := range list { - values.Add(key, str(v)) - } - } else { - values.Set(key, str(value)) - } - } - rawQuery := values.Encode() - if c.RawQuery != "" { - rawQuery = c.RawQuery - } - t.Run(c.Kind+"/"+rawQuery, func(t *testing.T) { - page, limit, sort, _, err := adminListPage(rawQuery) - if c.Error { - if err == nil { - t.Fatal("expected coercion error") - } - return - } - if err != nil { - t.Fatal(err) - } - actual := M{"page": page, "limit": limit, "sort": sort} - raw, _ := json.Marshal(actual) - var normalized M - if err := json.Unmarshal(raw, &normalized); err != nil { - t.Fatal(err) - } - if !reflect.DeepEqual(normalized, c.Expected) { - t.Fatalf("got %s; expected %#v", raw, c.Expected) - } - }) - } -} diff --git a/backend/internal/server/admin_query_test.go b/backend/internal/server/admin_query_test.go deleted file mode 100644 index 4c1a606..0000000 --- a/backend/internal/server/admin_query_test.go +++ /dev/null @@ -1,51 +0,0 @@ -package server - -import ( - "encoding/json" - "os" - "testing" -) - -func TestAdminQueryContracts(t *testing.T) { - data, err := os.ReadFile("testdata/admin-query.json") - if err != nil { - t.Fatal(err) - } - var fixture struct { - Queue []struct { - Query, Queue, Range, Error string - Minutes int64 - } - Errors []struct { - Query, Error string - Offset, Limit int64 - } - } - if err = json.Unmarshal(data, &fixture); err != nil { - t.Fatal(err) - } - for _, row := range fixture.Queue { - name, selected, minutes, err := queueMetricSelection(row.Query) - if row.Error != "" { - if err == nil || err.Error() != row.Error { - t.Fatal(row, err) - } - continue - } - if err != nil || name != row.Queue || selected != row.Range || minutes != row.Minutes { - t.Fatal(row, name, selected, minutes, err) - } - } - for _, row := range fixture.Errors { - offset, limit, err := errorQueryPage(row.Query) - if row.Error != "" { - if err == nil || err.Error() != row.Error { - t.Fatal(row, err) - } - continue - } - if err != nil || offset != row.Offset || limit != row.Limit { - t.Fatal(row, offset, limit, err) - } - } -} diff --git a/backend/internal/server/admin_queue_integration_test.go b/backend/internal/server/admin_queue_integration_test.go deleted file mode 100644 index b4176ac..0000000 --- a/backend/internal/server/admin_queue_integration_test.go +++ /dev/null @@ -1,168 +0,0 @@ -package server - -import ( - "context" - "errors" - "fmt" - "net/http/httptest" - "testing" - "time" - - "go.mongodb.org/mongo-driver/v2/bson" -) - -func runAdminQueueIntegration(t *testing.T, base *Server) { - t.Run("queue controls preserve job identities and group expiry", func(t *testing.T) { - ctx := context.Background() - db := base.Store.DB.Client().Database("admin_queue_" + bson.NewObjectID().Hex()) - defer db.Drop(ctx) - s := &Server{Store: &Store{DB: db, Redis: base.Store.Redis}} - if err := s.Store.ensureIndexes(ctx); err != nil { - t.Fatal(err) - } - call := func(method, queue, operation string) (any, error) { - return s.adminQueues(&request{Server: s, R: httptest.NewRequest(method, "/?queue="+queue, nil), Params: map[string]string{"name": queue, "operation": operation}}) - } - expectError := func(method, queue, operation, code string, status int) { - t.Helper() - _, err := call(method, queue, operation) - var api *APIError - if !errors.As(err, &api) || api.Code != code || api.Status != status { - t.Fatalf("%s %s %s: %v", method, queue, operation, err) - } - } - insert := func(id, kind, action, state string) { - t.Helper() - _, err := db.Collection("gojobs").InsertOne(ctx, M{"_id": id, "kind": kind, "resourceId": "shared", "action": action, "state": state, "createdAt": time.Now(), "attempts": 3}) - if err != nil { - t.Fatal(err) - } - } - state := func(id, want string) { - t.Helper() - row, err := s.Store.one(ctx, "gojobs", M{"_id": id}) - if err != nil || (want == "" && row != nil) || (want != "" && str(row["state"]) != want) { - t.Fatalf("%s want %s got %v: %v", id, want, row, err) - } - } - insert("repo:shared:remove", "repo", "remove", "failed") - insert("gist:shared:expire", "gist", "expire", "failed") - insert("pr:shared:prepare", "pr", "prepare", "failed") - insert("repo:shared:cache", "repo", "cache", "active") - _, err := db.Collection(collection("pr")).InsertOne(ctx, M{idKey("pr"): "shared", "status": "error", "source": M{"provider": "fixture"}}) - if err != nil { - t.Fatal(err) - } - output, err := call("GET", "remove", "") - if err != nil { - t.Fatal(err) - } - result := output.(M) - jobs := result["jobs"].([]M) - if len(jobs) != 2 { - t.Fatalf("expiry absent from remove queue: %v", jobs) - } - for _, queue := range result["queues"].([]M) { - if queue["key"] == "remove" && number(obj(queue["counts"])["failed"]) != 2 { - t.Fatal("expiry missing from counts", queue) - } - } - for _, method := range []string{"POST", "DELETE"} { - expectError(method, "download", "absent", "job_not_found", 404) - expectError(method, "download", "gist:shared:expire", "job_not_found", 404) - expectError(method, "unknown", "absent", "queue_not_found", 404) - } - expectError("POST", "cache", "repo:shared:cache", "job_is_active", 409) - if _, err := call("POST", "download", "pr:shared:prepare"); err != nil { - t.Fatal(err) - } - state("pr:shared:prepare", "waiting") - resource, err := s.Store.one(ctx, collection("pr"), M{idKey("pr"): "shared"}) - if err != nil || resource["status"] != "preparing" { - t.Fatal("document retry did not prepare its resource", resource, err) - } - if count, err := db.Collection("gojobs").CountDocuments(ctx, M{}); err != nil || count != 4 { - t.Fatal("single retry created a different job", count, err) - } - output, err = call("POST", "remove", "retry-failed") - if err != nil || number(obj(output)["total"]) != 2 || number(obj(output)["retried"]) != 2 { - t.Fatal("remove retry omitted expiry", output, err) - } - state("gist:shared:expire", "waiting") - state("repo:shared:remove", "waiting") - insert("expiry-delayed", "gist", "expire", "delayed") - if _, err := call("POST", "remove", "drain"); err != nil { - t.Fatal(err) - } - state("gist:shared:expire", "") - state("expiry-delayed", "") - state("repo:shared:remove", "") - state("pr:shared:prepare", "waiting") - insert("expiry-completed", "gist", "expire", "completed") - insert("expiry-active", "gist", "expire", "active") - if _, err := call("POST", "remove", "empty"); err != nil { - t.Fatal(err) - } - state("expiry-completed", "") - state("expiry-active", "") - insert("expiry-active", "gist", "expire", "active") - if _, err := call("DELETE", "remove", "expiry-active"); err != nil { - t.Fatal(err) - } - state("expiry-active", "") - insert("empty", "gist", "expire", "failed") - if _, err := call("DELETE", "remove", "empty"); err != nil { - t.Fatal(err) - } - state("empty", "") - state("pr:shared:prepare", "waiting") - // Removing an active job must not let its old worker finish a replacement. - if _, err := call("DELETE", "cache", "repo:shared:cache"); err != nil { - t.Fatal(err) - } - if err := s.enqueue(ctx, "repo", "shared", "cache"); err != nil { - t.Fatal(err) - } - changed, err := s.Store.update(ctx, "gojobs", M{"_id": "repo:shared:cache", "lease": "old-worker"}, M{"$set": M{"state": "completed"}}) - if err != nil || changed { - t.Fatal("old worker changed replacement", err) - } - state("repo:shared:cache", "waiting") - - if _, err := db.Collection("gojobs").DeleteMany(ctx, M{}); err != nil { - t.Fatal(err) - } - rows := []any{} - states := []string{"active", "waiting", "delayed", "failed", "completed"} - for _, status := range states { - for i := 0; i < 201; i++ { - rows = append(rows, M{"_id": fmt.Sprintf("%s-%03d", status, i), "kind": "repo", "resourceId": "resource-name", "action": "prepare", "state": status, "createdAt": time.Unix(int64(i), 0)}) - } - } - if _, err := db.Collection("gojobs").InsertMany(ctx, rows); err != nil { - t.Fatal(err) - } - output, err = call("GET", "unknown", "") - if err != nil { - t.Fatal(err) - } - result = output.(M) - jobs = result["jobs"].([]M) - if result["selectedQueue"] != "download" || len(jobs) != 1000 { - t.Fatal("queue fallback or per-state bounds differ", result["selectedQueue"], len(jobs)) - } - for i, job := range jobs { - if job["_state"] != states[i/200] { - t.Fatal("job priority order differs", i, job) - } - } - output, err = s.adminQueues(&request{Server: s, R: httptest.NewRequest("GET", "/?search=ACTIVE-200", nil), Params: map[string]string{}}) - if err != nil { - t.Fatal(err) - } - jobs = output.(M)["jobs"].([]M) - if len(jobs) != 1 || jobs[0]["id"] != "active-200" { - t.Fatal("job ID search differs", jobs) - } - }) -} diff --git a/backend/internal/server/admin_tokens_integration_test.go b/backend/internal/server/admin_tokens_integration_test.go deleted file mode 100644 index 2e2c3e7..0000000 --- a/backend/internal/server/admin_tokens_integration_test.go +++ /dev/null @@ -1,109 +0,0 @@ -package server - -import ( - "bytes" - "context" - "encoding/json" - "net/http/httptest" - "strings" - "testing" - - "github.com/tdurieux/anonymous_github/backend/internal/security" - "go.mongodb.org/mongo-driver/v2/bson" -) - -func runAdminTokensIntegration(t *testing.T, s *Server) { - t.Run("admin token lifecycle", func(t *testing.T) { - ctx := context.Background() - id := bson.NewObjectID() - bootstrap := "synthetic-admin-token-bootstrap" - user := M{"_id": id, "username": "admin-token-fixture", "status": "active", "isAdmin": true, "apiTokens": []M{{"_id": bson.NewObjectID(), "name": "bootstrap", "tokenHash": security.HashToken(bootstrap)}}} - if _, err := s.Store.DB.Collection("users").InsertOne(ctx, user); err != nil { - t.Fatal(err) - } - call := func(method, path, token string, body any) *httptest.ResponseRecorder { - raw, _ := json.Marshal(body) - req := httptest.NewRequest(method, path, bytes.NewReader(raw)) - req.RemoteAddr = "198.51.100.23:1234" - req.Header.Set("Authorization", "Bearer "+token) - req.Header.Set("Content-Type", "application/json") - w := httptest.NewRecorder() - s.ServeHTTP(w, req) - return w - } - w := call("POST", "/api/admin/tokens", bootstrap, M{"name": []any{" Alice ", "Bob"}}) - if w.Code != 200 { - t.Fatal(w.Code, w.Body) - } - var created M - if err := json.Unmarshal(w.Body.Bytes(), &created); err != nil { - t.Fatal(err) - } - token := str(created["token"]) - if len(token) != 64 || created["name"] != "Alice ,Bob" || len(created) != 4 { - t.Fatal("invalid creation shape", created) - } - saved, err := s.Store.one(ctx, "users", M{"_id": id}) - if err != nil { - t.Fatal(err) - } - entries := arr(saved["apiTokens"]) - if len(entries) != 2 { - t.Fatal("missing token") - } - stored := obj(entries[1]) - if stored["tokenHash"] != security.HashToken(token) || stored["token"] != nil || str(stored["_id"]) != str(created["id"]) { - t.Fatal("plaintext storage or incorrect token identity") - } - w = call("GET", "/api/admin/tokens", token, nil) - if w.Code != 200 || strings.Contains(w.Body.String(), token) || strings.Contains(w.Body.String(), "tokenHash") { - t.Fatal("token list leaked secret", w.Code, w.Body) - } - var listed []M - if err := json.Unmarshal(w.Body.Bytes(), &listed); err != nil { - t.Fatal(err) - } - if len(listed) != 2 || listed[1]["lastUsedAt"] == nil { - t.Fatal("list did not reload last-used metadata", listed) - } - for i := 0; i < 2; i++ { - w = call("DELETE", "/api/admin/tokens/"+str(created["id"]), bootstrap, nil) - var result M - if err := json.Unmarshal(w.Body.Bytes(), &result); err != nil { - t.Fatal(err) - } - if w.Code != 200 || number(result["removed"]) != int64(1-i) { - t.Fatal("delete result", w.Code, w.Body) - } - } - if w := call("GET", "/api/admin/tokens", token, nil); w.Code != 401 { - t.Fatal("revoked token still accepted", w.Code) - } - if w := call("DELETE", "/api/admin/tokens/invalid", bootstrap, nil); w.Code != 500 || !strings.Contains(w.Body.String(), "internal_error") { - t.Fatal("invalid ID parity", w.Code, w.Body) - } - if _, err := s.Store.update(ctx, "users", M{"_id": id}, M{"$set": M{"isAdmin": false}}); err != nil { - t.Fatal(err) - } - for _, method := range []string{"GET", "POST", "DELETE"} { - path := "/api/admin/tokens" - if method == "DELETE" { - path += "/" + str(created["id"]) - } - if w := call(method, path, bootstrap, nil); w.Code != 401 { - t.Fatal("non-admin accepted", method, w.Code) - } - } - // Simulate deletion after authentication but before handler execution. - if _, err := s.Store.DB.Collection("users").DeleteOne(ctx, M{"_id": id}); err != nil { - t.Fatal(err) - } - for _, method := range []string{"GET", "POST"} { - q := &request{Server: s, User: user, R: httptest.NewRequest(method, "/", nil), Body: M{}} - result, err := s.tokens(q) - if err == nil || err.Error() != "user_not_found" || result != nil { - t.Fatal("vanished user accepted", method, err) - } - } - }) -} diff --git a/backend/internal/server/admin_user.go b/backend/internal/server/admin_user.go deleted file mode 100644 index 2a1f552..0000000 --- a/backend/internal/server/admin_user.go +++ /dev/null @@ -1,76 +0,0 @@ -package server - -import ( - "context" - "time" - - "go.mongodb.org/mongo-driver/v2/bson" -) - -func defaults(value M, fields M) { - for key, fallback := range fields { - if _, present := value[key]; !present { - value[key] = fallback - } - } -} -func omitEmptyObject(value M, key string) { - if field, present := value[key]; present && field != nil { - switch field.(type) { - case M, map[string]any, bson.D: - if len(obj(field)) == 0 { - delete(value, key) - } - } - } -} -func adminUserJSON(user M, repositories []M, now time.Time) M { - // Explicit public metadata prevents legacy token fields and credential - // envelopes from becoming part of this administrator response. - out := selectFields(user, "_id", "__v", "username", "photo", "status", "isAdmin", "emails", "dateOfEntry", "externalIDs", "accessTokenDates", "projectNames", "default") - defaults(out, M{"isAdmin": false, "status": "active", "dateOfEntry": now, "emails": []any{}}) - for _, key := range []string{"externalIDs", "accessTokenDates"} { - omitEmptyObject(out, key) - } - if value, present := out["default"]; !present || value != nil { - value := selectFields(obj(value), "terms", "options") - defaults(value, M{"terms": []any{}}) - omitEmptyObject(value, "options") - out["default"] = value - } - indexed := map[string]M{} - for _, repository := range repositories { - value := selectFields(repository, "_id", "__v", "externalId", "name", "url", "source", "provider", "providerRepositoryId", "hasPage", "pageSource", "branches", "defaultBranch", "size", "status", "dateOfEntry") - defaults(value, M{"source": "github", "hasPage": false, "status": "ready", "dateOfEntry": now, "branches": []any{}}) - omitEmptyObject(value, "pageSource") - indexed[str(repository["_id"])] = value - } - populated := []M{} - for _, id := range arr(user["repositories"]) { - if repository := indexed[str(id)]; repository != nil { - populated = append(populated, repository) - } - } - out["repositories"] = populated - if value, present := user["repositories"]; present && value == nil { - out["repositories"] = nil - } - return out -} -func (s *Server) adminUserDetail(ctx context.Context, user M) (M, error) { - ids := []bson.ObjectID{} - for _, value := range arr(user["repositories"]) { - if id, err := oid(str(value)); err == nil { - ids = append(ids, id) - } - } - repositories := []M{} - if len(ids) > 0 { - var err error - repositories, err = s.Store.list(ctx, "repositories", M{"_id": M{"$in": ids}}, int64(len(ids)), nil) - if err != nil { - return nil, err - } - } - return adminUserJSON(user, repositories, time.Now().Truncate(time.Millisecond)), nil -} diff --git a/backend/internal/server/admin_user_integration_test.go b/backend/internal/server/admin_user_integration_test.go deleted file mode 100644 index 9f64774..0000000 --- a/backend/internal/server/admin_user_integration_test.go +++ /dev/null @@ -1,97 +0,0 @@ -package server - -import ( - "context" - "encoding/json" - "net/http/httptest" - "reflect" - "strings" - "testing" - "time" - - "github.com/tdurieux/anonymous_github/backend/internal/security" - "go.mongodb.org/mongo-driver/v2/bson" -) - -func runAdminUserDetailIntegration(t *testing.T, s *Server, nonAdminToken string) { - t.Run("admin user detail populates provider metadata without credentials", func(t *testing.T) { - ctx := context.Background() - token := "synthetic-admin-user-detail" - if _, err := s.Store.DB.Collection("users").InsertOne(ctx, M{"_id": bson.NewObjectID(), "username": "admin-user-detail-reader", "status": "active", "isAdmin": true, "apiTokens": []M{{"tokenHash": security.HashToken(token)}}}); err != nil { - t.Fatal(err) - } - anonymous, err := s.Store.one(ctx, collection("repo"), M{"repoId": "second-provider"}) - if err != nil { - t.Fatal(err) - } - cachedID, err := oid(str(obj(anonymous["source"])["repositoryId"])) - if err != nil { - t.Fatal(err) - } - cached, err := s.Store.one(ctx, "repositories", M{"_id": cachedID}) - if err != nil || cached == nil { - t.Fatal(cached, err) - } - if cached["source"] != "fixture" { - t.Fatal("provider metadata lost its source", cached) - } - second := M{"_id": bson.NewObjectID(), "externalId": "detail_second", "source": "second-forge", "name": "nested/group/repo", "accessToken": "synthetic-private-repo-token"} - if _, err := s.Store.DB.Collection("repositories").InsertOne(ctx, second); err != nil { - t.Fatal(err) - } - at := time.Date(2030, 1, 2, 3, 4, 5, 0, time.UTC) - user := M{"_id": bson.NewObjectID(), "username": "admin-user-detail-target", "status": "banned", "externalIDs": M{"github": "detail-identity"}, "accessTokenDates": M{"github": at}, "dateOfEntry": at, "default": M{"terms": []string{"Alice"}, "options": M{"image": false}}, "projectNames": M{"repo:example": "Project"}, "repositories": []any{cachedID.Hex(), bson.NewObjectID().Hex(), str(second["_id"]), cachedID.Hex()}, "accessTokens": M{"github": "synthetic-private-user-token"}, "apiTokens": []M{{"tokenHash": "synthetic-private-hash"}}, "encryptedToken": "synthetic-private-envelope"} - if _, err := s.Store.DB.Collection("users").InsertOne(ctx, user); err != nil { - t.Fatal(err) - } - before, err := s.Store.one(ctx, "users", M{"_id": user["_id"]}) - if err != nil { - t.Fatal(err) - } - call := func(auth, name string) *httptest.ResponseRecorder { - req := httptest.NewRequest("GET", "/api/admin/users/"+name, nil) - req.RemoteAddr = "198.51.100.19:1234" - req.Header.Set("Authorization", "Bearer "+auth) - w := httptest.NewRecorder() - s.ServeHTTP(w, req) - return w - } - if w := call(nonAdminToken, str(user["username"])); w.Code != 401 { - t.Fatal(w.Code, w.Body) - } - if w := call(token, "admin-user-detail-missing"); w.Code != 404 { - t.Fatal(w.Code, w.Body) - } - w := call(token, str(user["username"])) - if w.Code != 200 { - t.Fatal(w.Code, w.Body) - } - if strings.Contains(w.Body.String(), "synthetic-private") { - t.Fatal("credential data exposed") - } - var out M - if err := json.Unmarshal(w.Body.Bytes(), &out); err != nil { - t.Fatal(err) - } - if out["_id"] != str(user["_id"]) || obj(out["externalIDs"])["github"] != "detail-identity" || obj(out["projectNames"])["repo:example"] != "Project" || obj(out["accessTokenDates"])["github"] != "2030-01-02T03:04:05.000Z" { - t.Fatal("user metadata missing", out) - } - if out["isAdmin"] != false || len(arr(out["emails"])) != 0 || len(arr(obj(out["default"])["terms"])) != 1 || obj(obj(out["default"])["options"])["image"] != false { - t.Fatal("user defaults missing", out) - } - repositories := arr(out["repositories"]) - if len(repositories) != 3 || obj(repositories[0])["_id"] != cachedID.Hex() || obj(repositories[1])["_id"] != str(second["_id"]) || obj(repositories[2])["_id"] != cachedID.Hex() { - t.Fatal("population order/missing/duplicates", repositories) - } - if obj(repositories[0])["source"] != "fixture" || obj(repositories[1])["source"] != "second-forge" || obj(repositories[1])["status"] != "ready" || obj(repositories[1])["hasPage"] != false { - t.Fatal("provider metadata/defaults", repositories) - } - after, err := s.Store.one(ctx, "users", M{"_id": user["_id"]}) - if err != nil { - t.Fatal(err) - } - if !reflect.DeepEqual(before, after) { - t.Fatal("detail read mutated stored user") - } - }) -} diff --git a/backend/internal/server/admin_user_test.go b/backend/internal/server/admin_user_test.go deleted file mode 100644 index 1c44db8..0000000 --- a/backend/internal/server/admin_user_test.go +++ /dev/null @@ -1,43 +0,0 @@ -package server - -import ( - "encoding/json" - "os" - "reflect" - "testing" - "time" -) - -func TestTypeScriptAdminUser(t *testing.T) { - raw, err := os.ReadFile("testdata/admin-user.json") - if err != nil { - t.Fatal(err) - } - var fixture struct { - Now time.Time - Cases []struct { - Name string - User, Expected M - Repositories []M - } - } - if err := json.Unmarshal(raw, &fixture); err != nil { - t.Fatal(err) - } - for _, c := range fixture.Cases { - t.Run(c.Name, func(t *testing.T) { - value := adminUserJSON(c.User, c.Repositories, fixture.Now) - raw, err := json.Marshal(responseJSON(value)) - if err != nil { - t.Fatal(err) - } - var actual M - if err := json.Unmarshal(raw, &actual); err != nil { - t.Fatal(err) - } - if !reflect.DeepEqual(actual, c.Expected) { - t.Fatalf("got %s; expected %#v", raw, c.Expected) - } - }) - } -} diff --git a/backend/internal/server/app_refresh_integration_test.go b/backend/internal/server/app_refresh_integration_test.go deleted file mode 100644 index 74da041..0000000 --- a/backend/internal/server/app_refresh_integration_test.go +++ /dev/null @@ -1,181 +0,0 @@ -package server - -import ( - "context" - "encoding/json" - "io" - "net/http" - "net/http/httptest" - "strings" - "sync" - "sync/atomic" - "testing" - "time" - - "go.mongodb.org/mongo-driver/v2/bson" -) - -func runAppRefreshIntegration(t *testing.T, s *Server) { - t.Run("App token refresh coordination", func(t *testing.T) { - ctx := context.Background() - oldHTTP, enabled := s.HTTP, s.Config.AppEnabled - s.Config.AppEnabled = true - defer func() { s.HTTP = oldHTTP; s.Config.AppEnabled = enabled }() - q := &request{Server: s, R: httptest.NewRequest("GET", "/github/app/callback", nil)} - tokens := func(access, refresh string) M { - return M{"access_token": access, "refresh_token": refresh, "expires_in": float64(3600), "refresh_token_expires_in": float64(7200)} - } - seed := func() bson.ObjectID { - t.Helper() - owner := bson.NewObjectID() - if _, err := s.Store.DB.Collection("users").InsertOne(ctx, M{"_id": owner, "username": "refresh-" + owner.Hex(), "status": "active"}); err != nil { - t.Fatal(err) - } - if err := s.saveGrant(q, owner, "github-app-user", tokens("seed-access", "seed-refresh")); err != nil { - t.Fatal(err) - } - if _, err := s.Store.update(ctx, "credentials", M{"ownerId": owner, "provider": "github-app-user"}, M{"$set": M{"expiresAt": time.Now().Add(-time.Minute)}}); err != nil { - t.Fatal(err) - } - return owner - } - load := func(owner bson.ObjectID) M { - t.Helper() - row, err := s.Store.one(ctx, "credentials", M{"ownerId": owner, "provider": "github-app-user"}) - if err != nil { - t.Fatal(err) - } - return row - } - configure := func(hook func(*http.Request) error) *atomic.Int64 { - count := &atomic.Int64{} - s.HTTP = &http.Client{Transport: roundTrip(func(r *http.Request) (*http.Response, error) { - count.Add(1) - if deadline, ok := r.Context().Deadline(); !ok || time.Until(deadline) > 20*time.Second { - t.Error("token exchange has no bounded deadline") - } - var body M - if err := json.NewDecoder(r.Body).Decode(&body); err != nil { - return nil, err - } - if body["grant_type"] != "refresh_token" || body["refresh_token"] != "seed-refresh" { - t.Error("unexpected refresh request") - } - if hook != nil { - if err := hook(r); err != nil { - return nil, err - } - } - raw, _ := json.Marshal(tokens("rotated-access", "rotated-refresh")) - return &http.Response{StatusCode: 200, Header: http.Header{}, Body: io.NopCloser(strings.NewReader(string(raw)))}, nil - })} - return count - } - t.Run("concurrent callers rotate once", func(t *testing.T) { - owner := seed() - count := configure(func(*http.Request) error { time.Sleep(30 * time.Millisecond); return nil }) - var group sync.WaitGroup - results := make(chan string, 8) - failures := make(chan error, 8) - for i := 0; i < 8; i++ { - group.Add(1) - go func() { - defer group.Done() - value, err := s.credential(ctx, owner, "github-app-user") - results <- value - failures <- err - }() - } - group.Wait() - close(results) - close(failures) - for err := range failures { - if err != nil { - t.Fatal(err) - } - } - for value := range results { - if value != "rotated-access" { - t.Fatal("unexpected access token") - } - } - if count.Load() != 1 { - t.Fatal("duplicate refresh", count.Load()) - } - row := load(owner) - if row["refreshLock"] != nil || row["refreshLockUntil"] != nil { - t.Fatal("refresh lock retained") - } - encrypted, err := envelope(row["encryptedRefreshToken"]) - if err != nil { - t.Fatal(err) - } - value, err := s.Config.Cipher.Decrypt(encrypted, owner.Hex(), "github-app-user", "encryptedRefreshToken") - if err != nil || value != "rotated-refresh" { - t.Fatal("refresh credential did not rotate", err) - } - }) - t.Run("revocation wins over an in-flight refresh", func(t *testing.T) { - owner := seed() - configure(func(*http.Request) error { - _, err := s.Store.update(ctx, "credentials", M{"ownerId": owner, "provider": "github-app-user"}, M{"$set": M{"revoked": true, "revision": "revoked-during-refresh"}}) - return err - }) - value, err := s.credential(ctx, owner, "github-app-user") - if err == nil || value != "" { - t.Fatal("revoked token returned") - } - row := load(owner) - if !boolean(row["revoked"]) || row["revision"] != "revoked-during-refresh" || row["refreshLock"] != nil { - t.Fatal("refresh revived revoked grant") - } - }) - t.Run("new login wins over an in-flight refresh", func(t *testing.T) { - owner := seed() - configure(func(*http.Request) error { - return s.saveGrant(q, owner, "github-app-user", tokens("new-login-access", "new-login-refresh")) - }) - value, err := s.credential(ctx, owner, "github-app-user") - if err != nil || value != "new-login-access" { - t.Fatal("refresh overwrote newer login", err) - } - }) - for _, replacement := range []bool{false, true} { - name := "cancel releases own lock" - if replacement { - name = "cancel preserves replacement lock" - } - t.Run(name, func(t *testing.T) { - owner := seed() - work, cancel := context.WithCancel(ctx) - defer cancel() - configure(func(r *http.Request) error { - if replacement { - if _, err := s.Store.update(ctx, "credentials", M{"ownerId": owner, "provider": "github-app-user"}, M{"$set": M{"refreshLock": "replacement-lock", "refreshLockUntil": time.Now().Add(time.Minute)}}); err != nil { - return err - } - } - cancel() - return r.Context().Err() - }) - if _, err := s.credential(work, owner, "github-app-user"); err == nil { - t.Fatal("cancelled exchange succeeded") - } - row := load(owner) - if replacement { - if row["refreshLock"] != "replacement-lock" { - t.Fatal("replacement lock removed") - } - } else { - if row["refreshLock"] != nil || row["refreshLockUntil"] != nil { - t.Fatal("cancelled refresh retained lock") - } - configure(nil) - if value, err := s.credential(ctx, owner, "github-app-user"); err != nil || value != "rotated-access" { - t.Fatal("cancel prevented immediate retry", err) - } - } - }) - } - }) -} diff --git a/backend/internal/server/auth.go b/backend/internal/server/auth.go deleted file mode 100644 index ff7a22f..0000000 --- a/backend/internal/server/auth.go +++ /dev/null @@ -1,405 +0,0 @@ -package server - -import ( - "crypto/subtle" - "encoding/json" - "errors" - "net/http" - "net/url" - "strings" - "time" - - "github.com/redis/go-redis/v9" - "github.com/tdurieux/anonymous_github/backend/internal/security" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/mongo/options" -) - -func identity(user M) security.Identity { - return security.Identity{ID: str(user["_id"]), Username: str(user["username"]), GitHubID: str(obj(user["externalIDs"])["github"]), Status: str(user["status"]), Admin: boolean(user["isAdmin"])} -} -func (s *Server) authenticate(q *request) error { - if cookie, err := q.R.Cookie("connect.sid"); err == nil { - value, err := url.QueryUnescape(cookie.Value) - if err == nil { - if sid, ok := security.VerifySession(value, s.Config.SessionSecret); ok { - raw, err := s.Store.Redis.Get(q.ctx(), "anoGH_session:"+sid).Bytes() - if err != nil && !errors.Is(err, redis.Nil) { - return fail("session_unavailable", 503) - } - if err == nil && json.Unmarshal(raw, &q.Session) == nil { - q.SessionID = sid - id, ok := obj(q.Session["passport"])["user"].(string) - if ok { - if oid, err := oid(id); err == nil { - user, err := s.Store.one(q.ctx(), "users", M{"_id": oid}) - if err != nil { - return fail("session_unavailable", 503) - } - if identity(user).Active() { - q.User = user - q.Identity = identity(user) - if err := q.refreshSession(raw); err != nil { - return err - } - } - } - } - } - } - } - } - header := q.R.Header.Get("Authorization") - if header != "" { - parts := strings.Fields(header) - if len(parts) != 2 || !strings.EqualFold(parts[0], "Bearer") || len(parts[1]) > 512 { - return fail("invalid_token", 401) - } - hash := security.HashToken(parts[1]) - user, err := s.Store.one(q.ctx(), "users", M{"apiTokens.tokenHash": hash}) - if err != nil { - return fail("authentication_unavailable", 503) - } - token := M{} - for _, v := range arr(user["apiTokens"]) { - if str(obj(v)["tokenHash"]) == hash { - token = obj(v) - break - } - } - if !identity(user).Active() || len(token) == 0 || !validAPIToken(token) { - return fail("invalid_token", 401) - } - if str(token["scope"]) != "" { - if !maintenanceAllows(q.R.Method, q.R.URL.Path, stringsOf(token["repoIds"])) { - return fail("token_scope_forbidden", 403) - } - q.Maintenance = true - } - q.User = user - q.Identity = identity(user) - _, err = s.Store.update(q.ctx(), "users", M{"_id": user["_id"], "apiTokens.tokenHash": hash}, M{"$set": M{"apiTokens.$.lastUsedAt": time.Now()}}) - if err != nil { - return err - } - } - - return nil -} -func (q *request) saveSession(rotate bool) error { - if q.Session == nil { - q.Session = M{} - } - old := q.SessionID - if old == "" || rotate { - token, err := security.RandomToken() - if err != nil { - return err - } - q.SessionID = token - } - ttl := 24 * time.Hour - if q.Identity.Active() { - ttl = authenticatedSessionTTL - } - q.sessionCookieMetadata(ttl) - b, err := json.Marshal(q.Session) - if err != nil { - return err - } - if err = q.Server.Store.Redis.Set(q.ctx(), "anoGH_session:"+q.SessionID, b, ttl).Err(); err != nil { - return fail("session_unavailable", 503) - } - if rotate && old != "" && old != q.SessionID { - if err = q.Server.Store.Redis.Del(q.ctx(), "anoGH_session:"+old).Err(); err != nil { - return fail("session_unavailable", 503) - } - } - q.setSessionCookie(ttl) - return nil -} -func (q *request) login(user M) error { - q.User = user - q.Identity = identity(user) - q.Session["passport"] = M{"user": str(user["_id"])} - return q.saveSession(true) -} -func (s *Server) logout(q *request) (any, error) { - if q.SessionID != "" { - if err := s.Store.Redis.Del(q.ctx(), "anoGH_session:"+q.SessionID).Err(); err != nil { - return nil, err - } - } - http.SetCookie(q.W, &http.Cookie{Name: "connect.sid", Value: "", Path: "/", MaxAge: -1, HttpOnly: true, Secure: s.Config.SecureCookies, SameSite: http.SameSiteLaxMode}) - return q.redirect("/"), nil -} -func (s *Server) loginToken(q *request) (any, error) { - token := strings.TrimSpace(str(q.Body["token"])) - parts := strings.Fields(q.R.Header.Get("Authorization")) - if len(parts) == 2 && strings.EqualFold(parts[0], "Bearer") { - token = parts[1] - } - if token == "" { - return nil, fail("missing_token", 400) - } - u, err := s.Store.one(q.ctx(), "users", M{"apiTokens.tokenHash": security.HashToken(token)}) - if err != nil { - return nil, err - } - if u == nil { - return nil, fail("invalid_token", 401) - } - if !identity(u).Active() { - if str(u["status"]) == "banned" { - return nil, fail("user_banned", 403) - } - return nil, fail("not_connected", 401) - } - for _, v := range arr(u["apiTokens"]) { - t := obj(v) - if str(t["tokenHash"]) == security.HashToken(token) && (str(t["scope"]) != "" || !validAPIToken(t)) { - return nil, fail("invalid_token", 401) - } - } - if err = q.login(u); err != nil { - return nil, err - } - return M{"ok": true, "username": u["username"]}, nil -} - -type authFlow struct { - State string `json:"state"` - SessionID string `json:"sid"` - OwnerID string `json:"ownerId,omitempty"` - GitHubID string `json:"githubId,omitempty"` - ReturnTo string `json:"returnTo"` - Provider string `json:"provider"` - Expires time.Time `json:"expires"` - Install bool `json:"install,omitempty"` - Repository string `json:"repository,omitempty"` -} - -// One pending attempt per browser session and authorization provider. Both -// replacement and consumption are atomic across API instances. -const replaceOAuthFlow = `local old=redis.call('get',KEYS[1]); if old then redis.call('del',ARGV[4]..old) end; redis.call('set',KEYS[2],ARGV[2],'PX',ARGV[3]); redis.call('set',KEYS[1],ARGV[1],'PX',ARGV[3]); return 1` -const consumeOAuthFlow = `local state=redis.call('get',KEYS[1]); if not state then return false end; redis.call('del',KEYS[1]); local key=ARGV[1]..state; local flow=redis.call('get',key); redis.call('del',key); return flow` - -func oauthPendingKey(sessionID string, app bool) string { - provider := "github" - if app { - provider = "github-app-user" - } - return "go:oauth-pending:" + provider + ":" + sessionID -} - -func (s *Server) oauthStart(q *request) (any, error) { - app := strings.Contains(q.R.URL.Path, "/app/") - if app && (!s.Config.AppEnabled || !s.Config.AppNewConnections) { - return nil, fail("github_app_disabled", 503) - } - if !app && !s.Config.OAuthEnabled { - return nil, fail("github_oauth_disabled", 503) - } - if err := q.saveSession(false); err != nil { - return nil, err - } - state, err := security.RandomToken() - if err != nil { - return nil, err - } - query := parseExtendedQuery(q.R.URL.RawQuery).object - returnTo, _ := query["returnTo"].scalarValue() - fallback := "/dashboard" - if app { - fallback = "/connections" - if !query["returnTo"].truthy() { - returnTo = "/dashboard" - if q.Identity.Active() { - returnTo = "/connections" - } - } - } - flow := authFlow{State: state, SessionID: q.SessionID, OwnerID: q.Identity.ID, GitHubID: q.Identity.GitHubID, ReturnTo: security.ReturnTo(returnTo, fallback), Provider: "github", Expires: time.Now().Add(10 * time.Minute)} - clientID, callback := s.Config.ClientID, s.Config.Callback - if app { - clientID, callback = s.Config.AppClientID, s.Config.AppCallback - flow.Provider = "github-app-user" - install, _ := query["install"].scalarValue() - flow.Install = install == "1" - if repository, ok := query["repository"].scalarValue(); ok && safeRepositoryName(repository) { - flow.Repository = repository - } - } - b, _ := json.Marshal(flow) - if err = s.Store.Redis.Eval(q.ctx(), replaceOAuthFlow, []string{oauthPendingKey(q.SessionID, app), "go:oauth:" + state}, state, b, (10 * time.Minute).Milliseconds(), "go:oauth:").Err(); err != nil { - return nil, err - } - values := url.Values{"client_id": {clientID}, "redirect_uri": {callback}, "state": {state}} - if !app { - values.Set("scope", "repo") - } - return q.redirect("https://github.com/login/oauth/authorize?" + values.Encode()), nil -} -func (s *Server) oauthCallback(q *request) (any, error) { - app := strings.Contains(q.R.URL.Path, "/app/") - if app && (!s.Config.AppEnabled || !s.Config.AppNewConnections) { - return nil, fail("github_app_disabled", 503) - } - if !app && !s.Config.OAuthEnabled { - return nil, fail("github_oauth_disabled", 503) - } - query := parseExtendedQuery(q.R.URL.RawQuery).object - parsedState, scalarState := query["state"].scalarValue() - if q.SessionID == "" { - return nil, fail("invalid_auth_state", 400) - } - // Consume this browser's pending attempt before checking returned parameters. - // Missing, malformed and superseded states cannot leave a retryable flow. - raw, err := s.Store.Redis.Eval(q.ctx(), consumeOAuthFlow, []string{oauthPendingKey(q.SessionID, app)}, "go:oauth:").Text() - if err != nil { - return nil, fail("invalid_auth_state", 400) - } - var flow authFlow - if !scalarState || json.Unmarshal([]byte(raw), &flow) != nil || flow.Expires.Before(time.Now()) || flow.SessionID != q.SessionID || subtle.ConstantTimeCompare([]byte(flow.State), []byte(parsedState)) != 1 { - return nil, fail("invalid_auth_state", 400) - } - if flow.OwnerID != q.Identity.ID { - return nil, fail("github_identity_mismatch", 409) - } - if app != (flow.Provider == "github-app-user") { - return nil, fail("invalid_auth_state", 400) - } - code, scalarCode := query["code"].scalarValue() - if !scalarCode || !app && code == "" || query["error"].truthy() { - return nil, fail("github_app_authorization_cancelled", 400) - } - clientID, secret, callback := s.Config.ClientID, s.Config.ClientSecret, s.Config.Callback - if app { - clientID, secret, callback = s.Config.AppClientID, s.Config.AppClientSecret, s.Config.AppCallback - } - tokens, err := s.exchange(q.ctx(), M{"client_id": clientID, "client_secret": secret, "code": code, "redirect_uri": callback}) - if err != nil { - return nil, err - } - if app { - if _, _, err := appTokenLifetimes(tokens); err != nil { - return nil, err - } - } - profile, err := s.githubObject(q.ctx(), "GET", "/user", str(tokens["access_token"]), nil) - if err != nil { - return nil, err - } - if app { - if err := validateAppProfile(profile); err != nil { - return nil, err - } - } - githubID := str(profile["id"]) - login := str(profile["login"]) - if githubID == "" || login == "" { - return nil, fail("github_identity_mismatch", 409) - } - if flow.GitHubID != "" && flow.GitHubID != githubID { - return nil, fail("github_identity_mismatch", 409) - } - user, err := s.Store.one(q.ctx(), "users", M{"externalIDs.github": githubID}) - if err != nil { - return nil, err - } - if user == nil { - existing, err := s.Store.one(q.ctx(), "users", M{"username": login}) - if err != nil { - return nil, err - } - if existing != nil { - return nil, fail("github_identity_mismatch", 409) - } - if flow.OwnerID != "" { - return nil, fail("github_identity_mismatch", 409) - } - user = M{"_id": bson.NewObjectID(), "username": login, "externalIDs": M{"github": githubID}, "photo": profile["avatar_url"], "emails": []any{}, "status": "active", "dateOfEntry": time.Now(), "isAdmin": false, "apiTokens": []any{}} - if _, err = s.Store.DB.Collection("users").InsertOne(q.ctx(), user); err != nil { - return nil, err - } - } - if !identity(user).Active() { - return nil, fail("not_connected", 403) - } - if flow.OwnerID != "" && flow.OwnerID != str(user["_id"]) { - return nil, fail("github_identity_mismatch", 409) - } - if err = s.saveGrant(q, user["_id"], flow.Provider, tokens); err != nil { - return nil, err - } - if err = q.login(user); err != nil { - return nil, err - } - if app && flow.Install { - encode := func(value string) string { return strings.ReplaceAll(url.QueryEscape(value), "+", "%20") } - return q.redirect("/github/app/install?returnTo=" + encode(flow.ReturnTo) + "&repository=" + encode(flow.Repository)), nil - } - return q.redirect(flow.ReturnTo), nil -} -func (s *Server) saveGrant(q *request, owner any, provider string, tokens M) error { - if provider == "github-app-user" { - if _, _, err := appTokenLifetimes(tokens); err != nil { - return err - } - } - access, valid := tokens["access_token"].(string) - if !valid || access == "" { - return fail("github_app_reconnect_required", 401) - } - envelope, err := s.Config.Cipher.Encrypt(access, str(owner), provider, "") - if err != nil { - return err - } - revision, err := security.RandomToken() - if err != nil { - return err - } - set := M{"encryptedToken": envelope, "updatedAt": time.Now(), "revoked": false, "reconciliationPending": false, "revision": revision} - unset := M{"refreshLock": "", "refreshLockUntil": "", "encryptedRefreshToken": "", "expiresAt": "", "refreshExpiresAt": ""} - if refresh, ok := tokens["refresh_token"].(string); ok && refresh != "" { - encrypted, err := s.Config.Cipher.Encrypt(refresh, str(owner), provider, "encryptedRefreshToken") - if err != nil { - return err - } - set["encryptedRefreshToken"] = encrypted - delete(unset, "encryptedRefreshToken") - } - if expires, ok := tokenLifetime(tokens["expires_in"]); ok { - set["expiresAt"] = time.Now().Add(expires) - delete(unset, "expiresAt") - } - if expires, ok := tokenLifetime(tokens["refresh_token_expires_in"]); ok { - set["refreshExpiresAt"] = time.Now().Add(expires) - delete(unset, "refreshExpiresAt") - } - _, err = s.Store.DB.Collection("credentials").UpdateOne(q.ctx(), M{"ownerId": owner, "provider": provider}, M{"$set": set, "$unset": unset}, options.UpdateOne().SetUpsert(true)) - if err != nil { - return err - } - _, err = s.Store.update(q.ctx(), "users", M{"_id": owner}, M{"$set": M{"repositories": []any{}}, "$inc": M{"repositoryDiscoveryRevision": 1}}) - return err -} - -func validAPIToken(t M) bool { - expires := date(t["expiresAt"]) - scope := str(t["scope"]) - hasExpiry := t["expiresAt"] != nil - return (!hasExpiry || expires.After(time.Now())) && (scope == "" || scope == "repository-maintenance" && hasExpiry) -} -func maintenanceAllows(method, path string, ids []string) bool { - path = strings.TrimSuffix(path, "/") - for _, id := range ids { - if (method == "GET" || method == "PATCH") && path == "/api/maintenance/repositories/"+id { - return true - } - if method == "POST" && (path == "/api/repo/"+id+"/refresh" || path == "/api/repo/"+id+"/extend") { - return true - } - } - return false -} diff --git a/backend/internal/server/auth_test.go b/backend/internal/server/auth_test.go deleted file mode 100644 index 2b7d70b..0000000 --- a/backend/internal/server/auth_test.go +++ /dev/null @@ -1,44 +0,0 @@ -package server - -import ( - "go.mongodb.org/mongo-driver/v2/bson" - "testing" - "time" -) - -func TestMaintenanceTokenBoundary(t *testing.T) { - for _, tc := range []struct { - method, path string - allowed bool - }{ - {"GET", "/api/maintenance/repositories/example", true}, {"PATCH", "/api/maintenance/repositories/example/", true}, {"POST", "/api/repo/example/refresh", true}, - {"GET", "/api/user", false}, {"POST", "/github/login-token", false}, {"POST", "/api/admin/tokens", false}, {"PATCH", "/api/maintenance/repositories/other", false}, {"GET", "/api/repo/example", false}, {"DELETE", "/api/repo/example", false}, {"POST", "/api/repo/example/refresh/extra", false}, - } { - if got := maintenanceAllows(tc.method, tc.path, []string{"example"}); got != tc.allowed { - t.Errorf("%s %s: %v", tc.method, tc.path, got) - } - } - for _, token := range []M{{"scope": "unknown", "expiresAt": time.Now().Add(time.Hour)}, {"scope": "repository-maintenance"}, {"expiresAt": time.Now().Add(-time.Second)}} { - if validAPIToken(token) { - t.Error("invalid token accepted") - } - } - if !validAPIToken(M{"scope": "repository-maintenance", "expiresAt": time.Now().Add(time.Hour)}) { - t.Fatal("valid token denied") - } -} - -func TestAPITokenExpiryPresence(t *testing.T) { - for _, scope := range []string{"", "repository-maintenance"} { - for _, expiry := range []any{time.Time{}, bson.NewDateTimeFromTime(time.Time{}), time.UnixMilli(0), bson.DateTime(0)} { - if validAPIToken(M{"scope": scope, "expiresAt": expiry}) { - t.Fatalf("expired token accepted: scope=%q expiry=%v", scope, expiry) - } - } - } - for _, token := range []M{{}, {"expiresAt": nil}} { - if !validAPIToken(token) { - t.Fatal("unscoped token without expiry rejected") - } - } -} diff --git a/backend/internal/server/body.go b/backend/internal/server/body.go deleted file mode 100644 index cf2677c..0000000 --- a/backend/internal/server/body.go +++ /dev/null @@ -1,22 +0,0 @@ -package server - -import "io" - -// Detect truncated responses even when upstream uses chunked transfer encoding. -// Returning a read error prevents the worker from publishing partial output. -type completeBody struct { - io.ReadCloser - expected, received int64 -} - -func checkedBody(body io.ReadCloser, expected int64) io.ReadCloser { - return &completeBody{ReadCloser: body, expected: expected} -} -func (b *completeBody) Read(p []byte) (int, error) { - n, e := b.ReadCloser.Read(p) - b.received += int64(n) - if e == io.EOF && b.received < b.expected { - e = io.ErrUnexpectedEOF - } - return n, e -} diff --git a/backend/internal/server/body_test.go b/backend/internal/server/body_test.go deleted file mode 100644 index 8137ae1..0000000 --- a/backend/internal/server/body_test.go +++ /dev/null @@ -1,21 +0,0 @@ -package server - -import ( - "errors" - "io" - "strings" - "testing" -) - -func TestTruncatedBody(t *testing.T) { - for _, tc := range []struct { - body string - expected int64 - truncated bool - }{{"abc", 4, true}, {"abc", 3, false}, {"abcd", 3, false}} { - _, e := io.ReadAll(checkedBody(io.NopCloser(strings.NewReader(tc.body)), tc.expected)) - if errors.Is(e, io.ErrUnexpectedEOF) != tc.truncated { - t.Fatalf("expected=%d got=%v", tc.expected, e) - } - } -} diff --git a/backend/internal/server/bullmq_handoff_integration_test.go b/backend/internal/server/bullmq_handoff_integration_test.go deleted file mode 100644 index f2fa88f..0000000 --- a/backend/internal/server/bullmq_handoff_integration_test.go +++ /dev/null @@ -1,171 +0,0 @@ -package server - -import ( - "context" - "os" - "os/exec" - "path/filepath" - "strings" - "sync" - "testing" - "time" - - "github.com/tdurieux/anonymous_github/backend/internal/provider" - "go.mongodb.org/mongo-driver/v2/bson" -) - -type handoffProvider struct { - fixtureProvider - mu sync.Mutex - order []string -} - -func (p *handoffProvider) Tree(ctx context.Context, a provider.Access) ([]provider.Entry, error) { - p.mu.Lock() - p.order = append(p.order, a.Ref.AnonymousID) - count := 0 - for _, id := range p.order { - if id == a.Ref.AnonymousID { - count++ - } - } - p.mu.Unlock() - if a.Ref.AnonymousID == "handoff-exhausted" || (a.Ref.AnonymousID == "handoff-retry" && count == 1) { - return nil, provider.ErrUpstream - } - return p.fixtureProvider.Tree(ctx, a) -} - -func TestBullMQHandoffIntegration(t *testing.T) { - uri, address := os.Getenv("GO_TEST_MONGODB_URI"), os.Getenv("GO_TEST_REDIS_ADDR") - if uri == "" || address == "" { - t.Skip("requires disposable MongoDB/Redis and Node dependencies") - } - if !strings.HasPrefix(uri, "mongodb://127.0.0.1:") || !strings.HasPrefix(address, "127.0.0.1:") { - t.Fatal("requires local disposable services") - } - ctx, cancel := context.WithTimeout(t.Context(), 45*time.Second) - defer cancel() - database := "bull_handoff_" + bson.NewObjectID().Hex() - config := Config{MongoURI: uri, Database: database, RedisAddress: address, Root: t.TempDir(), PublicDir: t.TempDir(), Workers: 1, Mask: "XXXX", Storage: "filesystem"} - store, err := Connect(ctx, config) - if err != nil { - t.Fatal(err) - } - defer store.Close(context.Background()) - defer store.DB.Drop(context.Background()) - command := exec.CommandContext(ctx, "node", filepath.Join("..", "..", "scripts", "test-bullmq-handoff.cjs")) - command.Env = append(os.Environ(), "GO_TEST_MONGODB_DATABASE="+database) - if output, err := command.CombinedOutput(); err != nil { - t.Fatalf("BullMQ rehearsal: %v\n%s", err, output) - } - p := &handoffProvider{} - s, err := New(config, store, p) - if err != nil { - t.Fatal(err) - } - defer s.Close() - // Maintenance sees the imported live jobs instead of introducing duplicates. - if err := s.enqueue(ctx, "repo", "handoff-duplicate", "prepare"); err != nil { - t.Fatal(err) - } - if n, err := store.DB.Collection("gojobs").CountDocuments(ctx, M{"resourceId": "handoff-duplicate"}); err != nil || n != 2 { - t.Fatal("imported jobs duplicated", n, err) - } - if err := s.recoverImportedRemovalJobs(ctx); err != nil { - t.Fatal(err) - } - work, stop := context.WithCancel(ctx) - done := make(chan struct{}) - go func() { - defer close(done) - var workers sync.WaitGroup - for _, queue := range workerQueues { - workers.Go(func() { s.jobLoop(work, queue.name) }) - } - workers.Wait() - }() - defer func() { stop(); <-done }() - for { - count, err := store.DB.Collection("gojobs").CountDocuments(ctx, M{"state": M{"$in": []string{"waiting", "active"}}}) - if err != nil { - t.Fatal(err) - } - if count == 0 { - break - } - select { - case <-ctx.Done(): - t.Fatal("imported jobs did not finish") - case <-time.After(20 * time.Millisecond): - } - } - for _, id := range []string{"handoff-ready", "handoff-duplicate", "handoff-high", "handoff-low", "handoff-retry"} { - r, err := store.one(ctx, "anonymizedrepositories", M{"repoId": id}) - if err != nil || r["status"] != "ready" { - t.Fatal(id, r, err) - } - } - for _, id := range []string{"handoff-remove", "handoff-terminal", "handoff-failed-remove"} { - r, err := store.one(ctx, "anonymizedrepositories", M{"repoId": id}) - if err != nil || r["status"] != "removed" { - t.Fatal(id, r, err) - } - } - retried, err := store.one(ctx, "gojobs", M{"resourceId": "handoff-retry"}) - if err != nil || retried["state"] != "completed" || number(retried["attempts"]) != 2 { - t.Fatal("imported retry policy ignored", retried, err) - } - exhausted, err := store.one(ctx, "gojobs", M{"resourceId": "handoff-exhausted"}) - if err != nil || exhausted["state"] != "failed" || number(exhausted["attempts"]) != 1 { - t.Fatal("imported attempt limit ignored", exhausted, err) - } - failedResource, err := store.one(ctx, "anonymizedrepositories", M{"repoId": "handoff-exhausted"}) - if err != nil || failedResource["status"] != "error" { - t.Fatal("final imported failure not published", failedResource, err) - } - delayed, err := store.one(ctx, "gojobs", M{"resourceId": "handoff-delayed"}) - if err != nil || delayed["state"] != "delayed" || number(delayed["attempts"]) != 0 { - t.Fatal("delayed job ran early", delayed, err) - } - p.mu.Lock() - order := append([]string{}, p.order...) - p.mu.Unlock() - index := func(id string) int { - for i, v := range order { - if v == id { - return i - } - } - return -1 - } - fifo := []string{"handoff-ready", "handoff-retry", "handoff-exhausted", "handoff-duplicate"} - for i := 1; i < len(fifo); i++ { - if index(fifo[i-1]) < 0 || index(fifo[i]) <= index(fifo[i-1]) { - t.Fatal("waiting order not retained", order) - } - } - if index("handoff-high") < 0 || index("handoff-high") > index("handoff-low") { - t.Fatal("priority not retained", order) - } - if index("handoff-delayed") >= 0 { - t.Fatal("delayed provider called early", order) - } - if _, err := store.update(ctx, "gojobs", M{"_id": delayed["_id"]}, M{"$set": M{"availableAt": time.Now().Add(-time.Second)}}); err != nil { - t.Fatal(err) - } - for { - current, err := store.one(ctx, "gojobs", M{"_id": delayed["_id"]}) - if err != nil { - t.Fatal(err) - } - if current["state"] == "completed" { - break - } - select { - case <-ctx.Done(): - t.Fatal("due delayed job did not run") - case <-time.After(20 * time.Millisecond): - } - } -} diff --git a/backend/internal/server/cache_metrics.go b/backend/internal/server/cache_metrics.go deleted file mode 100644 index 9af40a0..0000000 --- a/backend/internal/server/cache_metrics.go +++ /dev/null @@ -1,278 +0,0 @@ -package server - -import ( - "context" - "errors" - "fmt" - "net/http" - "strings" - "sync" - "sync/atomic" - "time" - - "github.com/tdurieux/anonymous_github/backend/internal/blobcache" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/mongo" - "go.mongodb.org/mongo-driver/v2/mongo/options" -) - -var cacheLatencyBuckets = []float64{0.1, 1, 10, 100, 1000, 10000} - -type cacheTrafficKey struct{} - -func cacheTraffic(r *http.Request) string { - agent := strings.ToLower(r.UserAgent()) - if strings.Contains(agent, "uptime") || strings.Contains(agent, "healthcheck") || strings.Contains(agent, "monitor") { - return "monitor" - } - for _, part := range strings.Split(r.URL.Path, "/") { - if part == "zip" || part == "download" { - return "zip" - } - } - if strings.HasPrefix(r.URL.Path, "/w/") { - return "website" - } - return "file" -} - -type cacheMetricKey struct { - minute int64 - name, traffic string -} -type cacheSample struct { - count, bytes int64 - ms float64 - buckets [7]int64 -} -type cacheMetrics struct { - mu sync.Mutex - flushMu sync.Mutex - pending map[cacheMetricKey]cacheSample - dropped atomic.Int64 - lastFlush atomic.Int64 - instance string - stop chan struct{} - done chan struct{} -} - -func (s *Server) startCacheMetrics() { - if !s.Config.CacheMonitoring { - return - } - s.cacheMetrics = &cacheMetrics{pending: map[cacheMetricKey]cacheSample{}, instance: bson.NewObjectID().Hex(), stop: make(chan struct{}), done: make(chan struct{})} - go func() { - defer close(s.cacheMetrics.done) - ticker := time.NewTicker(5 * time.Second) - defer ticker.Stop() - for { - select { - case <-ticker.C: - ctx, cancel := context.WithTimeout(context.Background(), 3*time.Second) - s.flushCacheMetrics(ctx) - cancel() - case <-s.cacheMetrics.stop: - return - } - } - }() -} -func (s *Server) observeCache(ctx context.Context, name string, bytes int64, elapsed time.Duration) { - s.observeCacheAt(ctx, name, bytes, elapsed, time.Now()) -} -func (s *Server) observeCacheAt(ctx context.Context, name string, bytes int64, elapsed time.Duration, now time.Time) { - // Match TypeScript's legacy cache-result counters independently of optional - // detailed cache monitoring. Shared-cache results have their own report. - if s.requestMetrics != nil && traceFrom(ctx) != nil { - metric := "" - switch name { - case "legacy_source_hit": - metric = "source_hit" - case "legacy_source_miss": - metric = "source_miss" - case "legacy_result_hit": - metric = "transformed_hit" - case "legacy_result_miss": - metric = "transformed_miss" - } - if metric != "" { - s.requestMetrics.observe(requestMetricKey{now.Truncate(time.Minute).UnixMilli(), metric, "all", "all"}, 0, 0, false, false, false) - } - } - - m := s.cacheMetrics - if m == nil { - return - } - // Only fixed event labels may enter persistent telemetry. - switch name { - case "legacy_source_hit", "legacy_source_miss", "decision_hit", "decision_miss", "decision_bypass", "rewrite_changed", "rewrite_unchanged", "rewrite_binary", "rewrite_changed_cached", "rewrite_unchanged_cached", "result_hit", "result_miss", "result_fill", "result_stored", "result_fill_wait", "result_bypass", "result_error", "result_deduplicated", "result_corrupt", "result_refetch", "result_known_miss", "result_first_seen_miss", "result_reuse_1h", "result_reuse_1d", "result_reuse_7d", "result_eviction", "source_legacy_promotion", "source_deduplicated", "source_corrupt", "source_refetch", "source_known_miss", "source_first_seen_miss", "source_reuse_1h", "source_reuse_1d", "source_reuse_7d", "source_eviction", "compress", "decompress", "legacy_result_hit", "legacy_result_miss", "source_hit", "source_miss", "source_fill", "source_stored", "source_fill_wait", "source_bypass", "source_error": - default: - return - } - traffic, _ := ctx.Value(cacheTrafficKey{}).(string) - switch traffic { - case "file", "website", "zip", "monitor": - default: - traffic = "background" - } - key := cacheMetricKey{now.Truncate(time.Minute).UnixMilli(), name, traffic} - m.mu.Lock() - defer m.mu.Unlock() - v, exists := m.pending[key] - if !exists && len(m.pending) >= 512 { - m.dropped.Add(1) - return - } - v.count++ - v.bytes += max(0, bytes) - ms := max(0, float64(elapsed)/float64(time.Millisecond)) - v.ms += ms - bucket := len(cacheLatencyBuckets) - for i, bound := range cacheLatencyBuckets { - if ms <= bound { - bucket = i - break - } - } - v.buckets[bucket]++ - m.pending[key] = v -} -func (s *Server) flushCacheMetrics(ctx context.Context) error { - m := s.cacheMetrics - if m == nil { - return nil - } - if !m.flushMu.TryLock() { - return errors.New("cache_metrics_flush_busy") - } - defer m.flushMu.Unlock() - m.mu.Lock() - pending := m.pending - m.pending = map[cacheMetricKey]cacheSample{} - m.mu.Unlock() - models := []mongo.WriteModel{} - var count int64 - for key, v := range pending { - count += v.count - for _, period := range []int64{60000, 3600000} { - bucket := key.minute / period * period - retention := 48 * time.Hour - if period == 3600000 { - retention = 30 * 24 * time.Hour - } - inc := M{"count": v.count, "bytes": v.bytes, "ms": v.ms} - for i, n := range v.buckets { - inc[fmt.Sprintf("b%d", i)] = n - } - id := fmt.Sprintf("%d:%d:%s:%s", period, bucket, key.name, key.traffic) - models = append(models, mongo.NewUpdateOneModel().SetFilter(M{"_id": id}).SetUpsert(true).SetUpdate(M{"$inc": inc, "$setOnInsert": M{"period": period, "bucket": bucket, "name": key.name, "traffic": key.traffic, "expires": time.UnixMilli(bucket).Add(retention)}})) - } - } - coll := s.Store.DB.Collection("gocachemetrics") - if len(models) > 0 { - if _, err := coll.BulkWrite(ctx, models, options.BulkWrite().SetOrdered(false)); err != nil { - // A partially successful flush is not replayed, avoiding double counting. - // Dropped is a conservative upper bound when the write result is uncertain. - m.dropped.Add(count) - return err - } - } - now := time.Now() - _, err := coll.UpdateOne(ctx, M{"_id": "health:" + m.instance}, M{"$set": M{"period": 0, "dropped": m.dropped.Load(), "expires": now.Add(30 * 24 * time.Hour)}}, options.UpdateOne().SetUpsert(true)) - if err == nil { - m.lastFlush.Store(now.UnixMilli()) - } - return err -} -func (s *Server) adminCache(q *request) (any, error) { - q.W.Header().Set("Cache-Control", "no-store") - report, err := s.cacheTelemetry(q) - if err != nil { - return nil, err - } - out := obj(report) - out["enabled"] = s.Config.SharedCacheEnabled - out["filesystemSupported"] = s.Config.Storage == "filesystem" - out["source"], out["results"] = nil, nil - ctx, cancel := context.WithTimeout(q.ctx(), 5*time.Second) - defer cancel() - for name, cache := range map[string]*blobcache.Cache{"source": s.sourceCache, "results": s.resultCache} { - if cache == nil { - continue - } - stats, err := cache.Stats(ctx) - if err != nil { - return M{"available": false, "reason": "The cache index is unavailable", "rows": []M{}}, nil - } - out[name] = stats - } - return out, nil -} - -func (s *Server) cacheTelemetry(q *request) (any, error) { - rawMinutes, err := extendedQueryString(q.R.URL.RawQuery, "minutes") - if err != nil { - return nil, err - } - unavailable := func(reason string) (any, error) { - out := M{"available": false, "reason": reason, "rows": []M{}} - if s.cacheMetrics != nil { - out["dropped"] = s.cacheMetrics.dropped.Load() - } - return out, nil - } - if s.cacheMetrics == nil { - return unavailable("Monitoring is disabled") - } - ctx, cancel := context.WithTimeout(q.ctx(), 5*time.Second) - defer cancel() - if err := s.flushCacheMetrics(ctx); err != nil { - return unavailable("Cache telemetry could not be read") - } - minutes := cacheWindow([]string{rawMinutes}) - period := int64(60000) - if minutes > 2880 { - period = 3600000 - } - now := time.Now() - group := M{"_id": M{"name": "$name", "traffic": "$traffic"}} - project := M{"_id": 0, "name": "$_id.name", "traffic": "$_id.traffic"} - for _, field := range []string{"count", "bytes", "ms", "b0", "b1", "b2", "b3", "b4", "b5", "b6"} { - group[field] = M{"$sum": "$" + field} - project[field] = 1 - } - query := []M{{"$match": M{"period": period, "bucket": M{"$gte": now.Add(-time.Duration(minutes) * time.Minute).UnixMilli()}}}, {"$group": group}, {"$project": project}, {"$sort": bson.D{{Key: "name", Value: 1}, {Key: "traffic", Value: 1}}}} - cursor, err := s.Store.DB.Collection("gocachemetrics").Aggregate(ctx, query) - if err != nil { - return unavailable("Cache telemetry could not be read") - } - defer cursor.Close(ctx) - rows := []M{} - if err = cursor.All(ctx, &rows); err != nil { - return unavailable("Cache telemetry could not be read") - } - health, err := s.Store.DB.Collection("gocachemetrics").Aggregate(ctx, []M{{"$match": M{"period": 0, "expires": M{"$gt": now}}}, {"$group": M{"_id": nil, "dropped": M{"$sum": "$dropped"}}}}) - if err != nil { - return unavailable("Cache telemetry could not be read") - } - defer health.Close(ctx) - totals := []M{} - if err = health.All(ctx, &totals); err != nil { - return unavailable("Cache telemetry could not be read") - } - var dropped int64 - if len(totals) > 0 { - dropped = number(totals[0]["dropped"]) - } - return M{"available": true, "windowMinutes": minutes, "sampledAt": now.UnixMilli(), "lastFlush": s.cacheMetrics.lastFlush.Load(), "dropped": dropped, "rows": rows, "latencyBucketsMs": cacheLatencyBuckets}, nil -} - -func cacheWindow(values []string) int { - n := queryWindowNumber(strings.Join(values, ",")) - switch n { - case 15, 60, 1440, 10080: - return int(n) - } - return 60 -} diff --git a/backend/internal/server/cache_metrics_integration_test.go b/backend/internal/server/cache_metrics_integration_test.go deleted file mode 100644 index 82b886d..0000000 --- a/backend/internal/server/cache_metrics_integration_test.go +++ /dev/null @@ -1,216 +0,0 @@ -package server - -import ( - "context" - "encoding/json" - "github.com/tdurieux/anonymous_github/backend/internal/blobcache" - "github.com/tdurieux/anonymous_github/backend/internal/security" - "go.mongodb.org/mongo-driver/v2/bson" - "io" - "net/http/httptest" - "strings" - "sync" - "testing" - "time" -) - -func runCacheMetricsIntegration(t *testing.T, base *Server) { - t.Run("persistent cache telemetry", func(t *testing.T) { - ctx := context.Background() - db := base.Store.DB.Client().Database("cache_metrics_" + bson.NewObjectID().Hex()) - defer db.Drop(ctx) - s := &Server{Store: &Store{DB: db, Redis: base.Store.Redis}, cacheMetrics: testCacheMetrics(), Config: Config{Storage: "filesystem"}} - other := &Server{Store: s.Store, cacheMetrics: testCacheMetrics()} - other.cacheMetrics.instance = "second" - if err := s.Store.ensureIndexes(ctx); err != nil { - t.Fatal(err) - } - now := time.Now() - s.observeCacheAt(ctx, "source_hit", 20, time.Millisecond, now) - other.observeCacheAt(ctx, "source_hit", 30, 2*time.Millisecond, now) - s.observeCacheAt(ctx, "source_miss", 10, 0, now.Add(-2*time.Hour)) - var wg sync.WaitGroup - for _, server := range []*Server{s, other} { - wg.Add(1) - go func(s *Server) { - defer wg.Done() - if err := s.flushCacheMetrics(ctx); err != nil { - t.Error(err) - } - }(server) - } - wg.Wait() - report := func(window string) M { - result, err := s.adminCache(&request{W: httptest.NewRecorder(), R: httptest.NewRequest("GET", "/?minutes="+window, nil)}) - if err != nil { - t.Fatal(err) - } - return obj(result) - } - out := report("60") - rows := out["rows"].([]M) - if !boolean(out["available"]) || len(rows) != 1 || number(rows[0]["count"]) != 2 || number(rows[0]["bytes"]) != 50 || number(rows[0]["b1"]) != 1 || number(rows[0]["b2"]) != 1 { - t.Fatal(out) - } - - // Live blob counters are independent of historical telemetry rows. - source, err := blobcache.New(ctx, blobcache.Options{Root: t.TempDir(), Budget: 65536, MaxObject: 4096}) - if err != nil { - t.Fatal(err) - } - defer source.Close() - results, err := blobcache.New(ctx, blobcache.Options{Root: t.TempDir(), Budget: 32768, MaxObject: 2048}) - if err != nil { - t.Fatal(err) - } - defer results.Close() - s.Config.SharedCacheEnabled = true - s.sourceCache = source - s.resultCache = results - reader, err := source.GetOrFill(ctx, "report-source", func(context.Context) (io.ReadCloser, error) { - return io.NopCloser(strings.NewReader("live source bytes")), nil - }, nil, nil) - if err != nil { - t.Fatal(err) - } - if err := results.SaveDecision(ctx, "decision", reader.Record().Digest, false); err != nil { - reader.Close() - t.Fatal(err) - } - liveReport := report("60") - src, ok := liveReport["source"].(blobcache.Stats) - if !ok { - t.Fatal(liveReport) - } - res, ok := liveReport["results"].(blobcache.Stats) - if !ok { - t.Fatal(liveReport) - } - if !boolean(liveReport["enabled"]) || !boolean(liveReport["filesystemSupported"]) || src.Blobs != 1 || src.OriginalBytes != 17 || src.ActiveReaders != 1 || src.BudgetBytes != 65536 || res.Decisions != 1 || res.BudgetBytes != 32768 { - t.Fatal(liveReport) - } - reader.Close() - if stats := report("60")["source"].(blobcache.Stats); stats.ActiveReaders != 0 { - t.Fatal("reader count not live", stats) - } - if got := report("10080"); len(got["rows"].([]M)) != 2 { - t.Fatal("hourly history missing", got) - } - // A canceled flush drops its detached batch and reports loss after recovery. - s.observeCache(ctx, "source_fill", 7, 0) - canceled, cancel := context.WithCancel(ctx) - cancel() - if err := s.flushCacheMetrics(canceled); err == nil { - t.Fatal("canceled flush succeeded") - } - out = report("60") - if number(out["dropped"]) != 1 || len(out["rows"].([]M)) != 1 { - t.Fatal("lost or replayed batch", out) - } - // Exercise production startup/shutdown, including the worker's final flush. - config := base.Config - config.CacheMonitoring = true - live, err := New(config, s.Store) - if err != nil { - t.Fatal(err) - } - live.observeCache(ctx, "source_fill_wait", 0, 0) - live.Close() - out = report("60") - found := false - for _, row := range out["rows"].([]M) { - if row["name"] == "source_fill_wait" && number(row["count"]) == 1 { - found = true - } - } - if !found { - t.Fatal("shutdown did not flush pending events", out) - } - docs, err := s.Store.list(ctx, "gocachemetrics", M{"period": 60000}, 0, nil) - if err != nil { - t.Fatal(err) - } - for _, doc := range docs { - expected := time.UnixMilli(number(doc["bucket"])).Add(48 * time.Hour) - if !date(doc["expires"]).Equal(expected) { - t.Fatal("incorrect retention", doc) - } - } - s.observeCache(ctx, "source_error", 0, 0) - failedContext, stop := context.WithCancel(ctx) - stop() - telemetry, err := s.cacheTelemetry(&request{R: httptest.NewRequest("GET", "/?minutes=60", nil).WithContext(failedContext)}) - failedTelemetry := obj(telemetry) - if err != nil || boolean(failedTelemetry["available"]) || failedTelemetry["reason"] != "Cache telemetry could not be read" || number(failedTelemetry["dropped"]) != 2 { - t.Fatal("telemetry failure lost drop count", failedTelemetry, err) - } - results.Close() - failed := report("60") - if boolean(failed["available"]) || failed["reason"] != "The cache index is unavailable" || failed["source"] != nil || failed["results"] != nil { - t.Fatal("failed cache leaked partial statistics", failed) - } - - }) -} - -func runCacheReportHTTPIntegration(t *testing.T, base *Server) { - t.Run("live cache report authorization", func(t *testing.T) { - ctx := t.Context() - config := base.Config - config.Storage = "filesystem" - config.SharedCacheEnabled = true - config.SharedCacheDecisions = true - config.SharedResultBytes = 32768 - config.CacheMonitoring = false - config.SharedCache = blobcache.Options{Root: t.TempDir(), Budget: 65536, MaxObject: 4096} - live, err := New(config, base.Store) - if err != nil { - t.Fatal(err) - } - defer live.Close() - reader, err := live.sourceCache.GetOrFill(ctx, "http-report", func(context.Context) (io.ReadCloser, error) { return io.NopCloser(strings.NewReader("cached")), nil }, nil, nil) - if err != nil { - t.Fatal(err) - } - reader.Close() - tokens := []string{"cache-report-admin-" + bson.NewObjectID().Hex(), "cache-report-user-" + bson.NewObjectID().Hex()} - for i, token := range tokens { - id := bson.NewObjectID() - if _, err := base.Store.DB.Collection("users").InsertOne(ctx, M{"_id": id, "username": "cache-report-fixture-" + id.Hex(), "status": "active", "isAdmin": i == 0, "apiTokens": []M{{"tokenHash": security.HashToken(token)}}}); err != nil { - t.Fatal(err) - } - defer base.Store.DB.Collection("users").DeleteOne(context.Background(), M{"_id": id}) - } - call := func(token string) *httptest.ResponseRecorder { - req := httptest.NewRequest("GET", "/api/admin/cache", nil) - if token != "" { - req.Header.Set("Authorization", "Bearer "+token) - } - out := httptest.NewRecorder() - live.ServeHTTP(out, req) - return out - } - for _, token := range []string{"", tokens[1]} { - out := call(token) - if out.Code != 401 || strings.Contains(out.Body.String(), "budgetBytes") { - t.Fatal("cache stats leaked", out.Code, out.Body) - } - } - out := call(tokens[0]) - if out.Code != 200 || out.Header().Get("Cache-Control") != "no-store" { - t.Fatal(out.Code, out.Header(), out.Body) - } - var report M - if err := json.Unmarshal(out.Body.Bytes(), &report); err != nil { - t.Fatal(err) - } - if report["reason"] != "Monitoring is disabled" || !boolean(report["enabled"]) || number(obj(report["source"])["blobs"]) != 1 || number(obj(report["results"])["budgetBytes"]) != 32768 { - t.Fatal(report) - } - live.sourceCache.Close() - out = call(tokens[0]) - if out.Code != 200 || !strings.Contains(out.Body.String(), "The cache index is unavailable") || strings.Contains(out.Body.String(), config.SharedCache.Root) { - t.Fatal(out.Code, out.Body) - } - }) -} diff --git a/backend/internal/server/cache_metrics_test.go b/backend/internal/server/cache_metrics_test.go deleted file mode 100644 index 5803d4d..0000000 --- a/backend/internal/server/cache_metrics_test.go +++ /dev/null @@ -1,104 +0,0 @@ -package server - -import ( - "context" - "encoding/json" - "net/http/httptest" - "os" - "reflect" - "sync" - "testing" - "time" -) - -func testCacheMetrics() *cacheMetrics { - return &cacheMetrics{pending: map[cacheMetricKey]cacheSample{}, instance: "fixture"} -} -func TestCacheMetricContracts(t *testing.T) { - raw, err := os.ReadFile("testdata/cache-metrics.json") - if err != nil { - t.Fatal(err) - } - var cases []struct { - Input any - WindowMinutes int - Period, Cutoff int64 - Buckets []float64 - } - if err = json.Unmarshal(raw, &cases); err != nil { - t.Fatal(err) - } - for _, c := range cases { - var values []string - switch v := c.Input.(type) { - case string: - values = []string{v} - case []any: - for _, entry := range v { - values = append(values, entry.(string)) - } - } - if got := cacheWindow(values); got != c.WindowMinutes { - t.Errorf("%v: got %d want %d", c.Input, got, c.WindowMinutes) - } - if !reflect.DeepEqual(cacheLatencyBuckets, c.Buckets) { - t.Fatal("latency bucket mismatch") - } - } -} -func TestCacheMetricBoundsAndPrivacy(t *testing.T) { - s := &Server{cacheMetrics: testCacheMetrics()} - ctx := context.WithValue(context.Background(), cacheTrafficKey{}, "private/repository") - now := time.Now() - s.observeCacheAt(ctx, "private/token", 10, time.Second, now) - if len(s.cacheMetrics.pending) != 0 { - t.Fatal("unrecognized label retained") - } - for i := 0; i < 513; i++ { - s.observeCacheAt(ctx, "source_hit", -1, -time.Second, now.Add(time.Duration(i)*time.Minute)) - } - if len(s.cacheMetrics.pending) != 512 || s.cacheMetrics.dropped.Load() != 1 { - t.Fatal("unbounded pending metrics") - } - for key, value := range s.cacheMetrics.pending { - if key.traffic != "background" || value.bytes != 0 || value.ms != 0 || value.buckets[0] != 1 { - t.Fatal(key, value) - } - } - s.cacheMetrics = testCacheMetrics() - var wg sync.WaitGroup - for i := 0; i < 20; i++ { - wg.Add(1) - go func() { - defer wg.Done() - for j := 0; j < 100; j++ { - s.observeCacheAt(context.Background(), "source_hit", 1, time.Millisecond, now) - } - }() - } - wg.Wait() - for _, v := range s.cacheMetrics.pending { - if v.count != 2000 || v.bytes != 2000 || v.buckets[1] != 2000 { - t.Fatal(v) - } - } -} -func TestCacheTraffic(t *testing.T) { - for _, c := range []struct{ path, agent, want string }{{"/api/repo/x/file/a", "", "file"}, {"/w/x/a", "", "website"}, {"/api/repo/x/zip", "", "zip"}, {"/w/x/a", "Uptime Monitor", "monitor"}} { - r := httptest.NewRequest("GET", c.path, nil) - r.Header.Set("User-Agent", c.agent) - r.Header.Set("X-Cache-Traffic", "private") - if got := cacheTraffic(r); got != c.want { - t.Fatal(c, got) - } - } -} - -func BenchmarkCacheMetricRecording(b *testing.B) { - s := &Server{cacheMetrics: testCacheMetrics()} - ctx := context.WithValue(context.Background(), cacheTrafficKey{}, "file") - b.ReportAllocs() - for b.Loop() { - s.observeCache(ctx, "source_hit", 4096, time.Millisecond) - } -} diff --git a/backend/internal/server/cache_presence_integration_test.go b/backend/internal/server/cache_presence_integration_test.go deleted file mode 100644 index 20cea69..0000000 --- a/backend/internal/server/cache_presence_integration_test.go +++ /dev/null @@ -1,126 +0,0 @@ -package server - -import ( - "context" - "io" - "strings" - "sync" - "testing" - "time" - - "go.mongodb.org/mongo-driver/v2/bson" -) - -func runCachePresenceIntegration(t *testing.T, s *Server, p *fixtureProvider) { - t.Run("cache presence metadata", func(t *testing.T) { - ctx := context.Background() - source, err := s.Store.one(ctx, collection("repo"), M{"repoId": "second-provider"}) - if err != nil { - t.Fatal(err) - } - r := selectFields(source, "owner", "source", "providerAccess", "options") - r["_id"], r["repoId"], r["status"], r["treeGeneration"] = bson.NewObjectID(), "cache-presence", "ready", "presence-tree" - before := time.Now().Add(-time.Hour).Truncate(time.Millisecond) - r["statusDate"], r["isReseted"], r["statusMessage"], r["size"] = before, true, "old-message", M{"storage": 0, "file": 0} - if _, err := s.Store.DB.Collection(collection("repo")).InsertOne(ctx, r); err != nil { - t.Fatal(err) - } - defer func() { p.onOpen = nil; p.revoked = false }() - load := func() M { - t.Helper() - v, e := s.Store.one(ctx, collection("repo"), M{"_id": r["_id"]}) - if e != nil { - t.Fatal(e) - } - return v - } - row := M{"path": "", "name": "Alice.txt", "sha": "blob:one", "size": len(fixtureContent)} - p.revoked = true - if _, _, _, err := s.transformed(ctx, r, row); err == nil { - t.Fatal("revoked read succeeded") - } - if current := load(); !boolean(current["isReseted"]) || !date(current["statusDate"]).Equal(before) { - t.Fatal("failed read changed metadata", current) - } - p.revoked = false - body, cleanup, _, err := s.transformed(ctx, r, row) - if err != nil { - t.Fatal(err) - } - _, err = io.ReadAll(body) - cleanup() - if err != nil { - t.Fatal(err) - } - current := load() - if boolean(current["isReseted"]) || !date(current["statusDate"]).After(before) || current["statusMessage"] != nil { - t.Fatal(current) - } - if !date(r["statusDate"]).Equal(date(current["statusDate"])) || boolean(r["isReseted"]) { - t.Fatal("caller snapshot not updated", r) - } - if number(obj(current["size"])["file"]) != 0 { - t.Fatal("file read recomputed size", current) - } - if err := s.resetContentCache(ctx, current); err != nil { - t.Fatal(err) - } - r = load() - // Independent request snapshots downloading and transforming concurrently. - snapshots := make([]M, 12) - for i := range snapshots { - snapshots[i] = load() - } - var group sync.WaitGroup - results := make(chan error, len(snapshots)) - for _, snapshot := range snapshots { - group.Add(1) - go func(v M) { - defer group.Done() - body, cleanup, _, err := s.transformed(ctx, v, row) - if err == nil { - _, err = io.Copy(io.Discard, body) - cleanup() - } - results <- err - }(snapshot) - } - group.Wait() - close(results) - for err := range results { - if err != nil { - t.Fatal(err) - } - } - current = load() - for _, snapshot := range snapshots { - if !date(snapshot["statusDate"]).Equal(date(current["statusDate"])) { - t.Fatal("inconsistent concurrent snapshot") - } - } - // A newer reset must not be marked present by an older reader. - stale := load() - stale["isReseted"] = true - if err := s.resetContentCache(ctx, current); err != nil { - t.Fatal(err) - } - if err := s.markCachePresent(ctx, stale); err == nil || err.Error() != "repository_changed" { - t.Fatal("older reader cleared new reset", err) - } - r = load() - p.onOpen = func() (io.ReadCloser, error) { - _, err := s.Store.update(ctx, collection("repo"), M{"_id": r["_id"]}, M{"$set": M{"status": "removing"}}) - if err != nil { - return nil, err - } - return io.NopCloser(strings.NewReader(fixtureContent)), nil - } - if _, _, _, err := s.transformed(ctx, r, row); err == nil { - t.Fatal("removal during read ignored") - } - current = load() - if current["status"] != "removing" || !boolean(current["isReseted"]) { - t.Fatal("late read changed removal", current) - } - }) -} diff --git a/backend/internal/server/cache_report_state_test.go b/backend/internal/server/cache_report_state_test.go deleted file mode 100644 index 55d4f02..0000000 --- a/backend/internal/server/cache_report_state_test.go +++ /dev/null @@ -1,72 +0,0 @@ -package server - -import ( - "encoding/json" - "net/http/httptest" - "os" - "reflect" - "testing" - - "github.com/tdurieux/anonymous_github/backend/internal/blobcache" -) - -func TestCacheReportStateContracts(t *testing.T) { - raw, err := os.ReadFile("testdata/cache-report-state.json") - if err != nil { - t.Fatal(err) - } - var fixtures []struct { - Input struct { - Name, Storage string - Enabled, Source, Results, SourceError, ResultError bool - } - Expected any - Headers map[string]string - } - if err = json.Unmarshal(raw, &fixtures); err != nil { - t.Fatal(err) - } - for _, f := range fixtures { - t.Run(f.Input.Name, func(t *testing.T) { - s := &Server{Config: Config{SharedCacheEnabled: f.Input.Enabled, Storage: f.Input.Storage}} - for _, entry := range []struct { - present, broken bool - dest **blobcache.Cache - }{{f.Input.Source, f.Input.SourceError, &s.sourceCache}, {f.Input.Results, f.Input.ResultError, &s.resultCache}} { - if !entry.present { - continue - } - c, err := blobcache.New(t.Context(), blobcache.Options{Root: t.TempDir(), Budget: 65536, MaxObject: 4096}) - if err != nil { - t.Fatal(err) - } - t.Cleanup(func() { c.Close() }) - *entry.dest = c - if entry.broken { - c.Close() - } - } - w := httptest.NewRecorder() - result, err := s.adminCache(&request{W: w, R: httptest.NewRequest("GET", "/api/admin/cache", nil)}) - if err != nil { - t.Fatal(err) - } - encoded, err := json.Marshal(result) - if err != nil { - t.Fatal(err) - } - var got any - if err = json.Unmarshal(encoded, &got); err != nil { - t.Fatal(err) - } - if !reflect.DeepEqual(got, f.Expected) { - t.Fatal(string(encoded), f.Expected) - } - for name, value := range f.Headers { - if w.Header().Get(name) != value { - t.Fatal(name, w.Header(), value) - } - } - }) - } -} diff --git a/backend/internal/server/cache_telemetry_import_integration_test.go b/backend/internal/server/cache_telemetry_import_integration_test.go deleted file mode 100644 index 05581c1..0000000 --- a/backend/internal/server/cache_telemetry_import_integration_test.go +++ /dev/null @@ -1,86 +0,0 @@ -package server - -import ( - "context" - "encoding/json" - "net/http/httptest" - "os" - "os/exec" - "path/filepath" - "reflect" - "strings" - "testing" - "time" - - "go.mongodb.org/mongo-driver/v2/bson" -) - -func TestCacheTelemetryImportIntegration(t *testing.T) { - uri, address := os.Getenv("GO_TEST_MONGODB_URI"), os.Getenv("GO_TEST_REDIS_ADDR") - if uri == "" || address == "" { - t.Skip("requires disposable MongoDB/Redis and Node dependencies") - } - if !strings.HasPrefix(uri, "mongodb://127.0.0.1:") || !strings.HasPrefix(address, "127.0.0.1:") { - t.Fatal("requires local disposable services") - } - ctx, cancel := context.WithTimeout(t.Context(), 45*time.Second) - defer cancel() - database := "cache_import_" + bson.NewObjectID().Hex() - config := Config{MongoURI: uri, Database: database, RedisAddress: address} - store, err := Connect(ctx, config) - if err != nil { - t.Fatal(err) - } - defer store.Close(context.Background()) - defer store.DB.Drop(context.Background()) - command := exec.CommandContext(ctx, "node", filepath.Join("..", "..", "scripts", "test-cache-telemetry-import.cjs")) - command.Env = append(os.Environ(), "GO_TEST_MONGODB_DATABASE="+database) - var stderr strings.Builder - command.Stderr = &stderr - output, err := command.Output() - if err != nil { - t.Fatalf("telemetry import: %v\n%s", err, stderr.String()) - } - var expected map[string]M - if err = json.Unmarshal(output, &expected); err != nil { - t.Fatal(err, string(output)) - } - s := &Server{Store: store, cacheMetrics: testCacheMetrics()} - for _, minutes := range []string{"15", "60", "1440", "10080"} { - t.Run(minutes, func(t *testing.T) { - out, err := s.cacheTelemetry(&request{W: httptest.NewRecorder(), R: httptest.NewRequest("GET", "/?minutes="+minutes, nil)}) - if err != nil || !boolean(obj(out)["available"]) { - t.Fatal(out, err) - } - got := M{"rows": obj(out)["rows"], "dropped": obj(out)["dropped"]} - data, err := json.Marshal(got) - if err != nil { - t.Fatal(err) - } - var normalized M - json.Unmarshal(data, &normalized) - if !reflect.DeepEqual(normalized, expected[minutes]) { - t.Fatalf("Go report %s\nNode report %v", data, expected[minutes]) - } - }) - } - // New Go observations add to the same report without touching imported rows. - s.observeCache(context.Background(), "source_hit", 123, time.Millisecond) - if err = s.flushCacheMetrics(ctx); err != nil { - t.Fatal(err) - } - out, err := s.cacheTelemetry(&request{W: httptest.NewRecorder(), R: httptest.NewRequest("GET", "/?minutes=60", nil)}) - if err != nil { - t.Fatal(err) - } - var before, after int64 - for _, row := range expected["60"]["rows"].([]any) { - before += number(obj(row)["count"]) - } - for _, row := range obj(out)["rows"].([]M) { - after += number(row["count"]) - } - if after != before+1 { - t.Fatalf("live count=%d, imported=%d", after, before) - } -} diff --git a/backend/internal/server/coauthors.go b/backend/internal/server/coauthors.go deleted file mode 100644 index ef060de..0000000 --- a/backend/internal/server/coauthors.go +++ /dev/null @@ -1,55 +0,0 @@ -package server - -import ( - "errors" - "strings" - - "github.com/tdurieux/anonymous_github/backend/internal/security" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/mongo" - "go.mongodb.org/mongo-driver/v2/mongo/options" -) - -// Preserve the original BSON array for the compare-and-swap predicate: MongoDB -// compares embedded document field order, which decoding into maps would lose. -func coauthorResource(q *request) (M, any, error) { - id := q.Params["id"] - if id == "" || id == "undefined" { - return nil, nil, fail(missing("repo"), 404) - } - var raw bson.Raw - err := q.Server.Store.DB.Collection(collection("repo")).FindOne(q.ctx(), resourceFilter("repo", id), options.FindOne().SetCollation(&options.Collation{Locale: "en", Strength: 2})).Decode(&raw) - if errors.Is(err, mongo.ErrNoDocuments) { - return nil, nil, fail(missing("repo"), 404) - } - if err != nil { - return nil, nil, err - } - var row M - if err := bson.Unmarshal(raw, &row); err != nil { - return nil, nil, err - } - var original any - if value, err := raw.LookupErr("coauthors"); err == nil { - original = value - } - return row, original, nil -} - -func coauthorSelf(user security.Identity, list []any, target string) bool { - if !user.Active() { - return false - } - for _, entry := range list { - row := obj(entry) - if !strings.EqualFold(str(row["username"]), target) { - continue - } - // Match the first username entry, as TypeScript's Array.find does. - if id := str(row["githubId"]); id != "" { - return id == user.GitHubID - } - break - } - return user.Username != "" && strings.EqualFold(user.Username, target) -} diff --git a/backend/internal/server/coauthors_integration_test.go b/backend/internal/server/coauthors_integration_test.go deleted file mode 100644 index fdd68b2..0000000 --- a/backend/internal/server/coauthors_integration_test.go +++ /dev/null @@ -1,97 +0,0 @@ -package server - -import ( - "bytes" - "context" - "encoding/json" - "net/http/httptest" - "reflect" - "testing" - - "github.com/tdurieux/anonymous_github/backend/internal/security" - "go.mongodb.org/mongo-driver/v2/bson" -) - -func runCoauthorsIntegration(t *testing.T, s *Server) { - t.Run("coauthor method permissions", func(t *testing.T) { - ctx := context.Background() - users := map[string]bson.ObjectID{} - for _, name := range []string{"owner", "admin", "member", "stranger", "legacy"} { - id := bson.NewObjectID() - users[name] = id - if _, err := s.Store.DB.Collection("users").InsertOne(ctx, M{"_id": id, "username": "coauthor-" + name, "status": "active", "isAdmin": name == "admin", "externalIDs": M{"github": "coauthor-id-" + name}, "apiTokens": []M{{"tokenHash": security.HashToken("synthetic-coauthor-" + name)}}}); err != nil { - t.Fatal(err) - } - } - id := bson.NewObjectID() - original := bson.A{ - bson.D{{Key: "photo", Value: "avatar"}, {Key: "githubId", Value: "coauthor-id-member"}, {Key: "username", Value: "old-member-name"}}, - bson.D{{Key: "username", Value: "COAUTHOR-LEGACY"}}, - } - if _, err := s.Store.DB.Collection(collection("repo")).InsertOne(ctx, M{"_id": id, "repoId": "coauthor-permissions", "owner": users["owner"], "status": "removed", "coauthors": original}); err != nil { - t.Fatal(err) - } - baseline, err := s.Store.one(ctx, collection("repo"), M{"_id": id}) - if err != nil { - t.Fatal(err) - } - for _, c := range []struct { - name, method, actor, target string - status int - remaining int - }{ - {"owner reads removed repository", "GET", "owner", "", 200, 2}, - {"stable ID reads", "GET", "member", "", 200, 2}, - {"stranger read denied", "GET", "stranger", "", 403, 2}, - {"legacy read is case sensitive", "GET", "legacy", "", 403, 2}, - {"stranger add denied", "POST", "stranger", "", 401, 2}, - {"member add denied", "POST", "member", "", 401, 2}, - {"owner empty add", "POST", "owner", "", 400, 2}, - {"admin empty add", "POST", "admin", "", 400, 2}, - {"member cannot remove absent stranger", "DELETE", "member", "absent", 401, 2}, - {"stranger cannot remove member", "DELETE", "stranger", "old-member-name", 401, 2}, - {"stable ID self removal", "DELETE", "member", "OLD-MEMBER-NAME", 200, 1}, - {"legacy self removal ignores case", "DELETE", "legacy", "coauthor-legacy", 200, 1}, - {"absent self removal is idempotent", "DELETE", "stranger", "COAUTHOR-STRANGER", 200, 2}, - {"owner removal", "DELETE", "owner", "old-member-name", 200, 1}, - {"admin removal", "DELETE", "admin", "old-member-name", 200, 1}, - } { - t.Run(c.name, func(t *testing.T) { - if _, err := s.Store.update(ctx, collection("repo"), M{"_id": id}, M{"$set": M{"coauthors": original}}); err != nil { - t.Fatal(err) - } - path := "/api/repo/COAUTHOR-PERMISSIONS/coauthors" - if c.target != "" { - path += "/" + c.target - } - req := httptest.NewRequest(c.method, path, bytes.NewBufferString(`{}`)) - req.RemoteAddr = "198.51.100.22:1234" - req.Header.Set("Authorization", "Bearer synthetic-coauthor-"+c.actor) - req.Header.Set("Content-Type", "application/json") - w := httptest.NewRecorder() - s.ServeHTTP(w, req) - if w.Code != c.status { - t.Fatalf("%d %s", w.Code, w.Body) - } - saved, err := s.Store.one(ctx, collection("repo"), M{"_id": id}) - if err != nil { - t.Fatal(err) - } - if len(arr(saved["coauthors"])) != c.remaining { - t.Fatal("unexpected saved list", saved["coauthors"]) - } - if c.status == 200 { - var response any - if err := json.Unmarshal(w.Body.Bytes(), &response); err != nil { - t.Fatal(err) - } - if !reflect.DeepEqual(response, defaultsJSON(t, saved["coauthors"])) { - t.Fatal("response differs from persisted list", response) - } - } else if !reflect.DeepEqual(defaultsJSON(t, saved["coauthors"]), defaultsJSON(t, baseline["coauthors"])) { - t.Fatal("denied operation mutated list") - } - }) - } - }) -} diff --git a/backend/internal/server/coauthors_test.go b/backend/internal/server/coauthors_test.go deleted file mode 100644 index 16addca..0000000 --- a/backend/internal/server/coauthors_test.go +++ /dev/null @@ -1,32 +0,0 @@ -package server - -import ( - "github.com/tdurieux/anonymous_github/backend/internal/security" - "testing" -) - -func TestCoauthorSelfIdentity(t *testing.T) { - user := security.Identity{ID: "user", Username: "alice", GitHubID: "123", Status: "active"} - for _, c := range []struct { - name, target string - list []any - want bool - }{ - {"stable identity survives rename", "former-name", []any{M{"username": "former-name", "githubId": "123"}}, true}, - {"reused username cannot override identity", "alice", []any{M{"username": "alice", "githubId": "other"}}, false}, - {"legacy username", "ALICE", []any{M{"username": "Alice"}}, true}, - {"absent self", "ALICE", nil, true}, - {"absent stranger", "bob", nil, false}, - {"first matching identity wins", "alice", []any{M{"username": "alice", "githubId": "other"}, M{"username": "ALICE", "githubId": "123"}}, false}, - } { - t.Run(c.name, func(t *testing.T) { - if got := coauthorSelf(user, c.list, c.target); got != c.want { - t.Fatalf("got %v want %v", got, c.want) - } - }) - } - user.Status = "banned" - if coauthorSelf(user, nil, "alice") { - t.Fatal("inactive identity accepted") - } -} diff --git a/backend/internal/server/compression.go b/backend/internal/server/compression.go deleted file mode 100644 index 6ba5a93..0000000 --- a/backend/internal/server/compression.go +++ /dev/null @@ -1,271 +0,0 @@ -// Response selection follows the MIT-licensed compression and negotiator packages. -// See LICENSE.compression and LICENSE.negotiator. -package server - -import ( - "compress/gzip" - "compress/zlib" - "io" - "math" - "net/http" - "regexp" - "sort" - "strconv" - "strings" - - "github.com/andybalholm/brotli" - "github.com/tdurieux/anonymous_github/backend/internal/filetype" -) - -var compressionFilePath = regexp.MustCompile(`^/api/repo/.+/file/`) -var compressionNoTransform = regexp.MustCompile(`(?i)(?:^|,)\s*no-transform\s*(?:,|$)`) -var encodingToken = regexp.MustCompile(`^\s*([^\s;]+)\s*(?:;(.*))?$`) -var qualityPrefix = regexp.MustCompile(`^[+-]?(?:Infinity|(?:[0-9]+(?:\.[0-9]*)?|\.[0-9]+)(?:[eE][+-]?[0-9]+)?)`) - -type encodingPreference struct { - name string - quality float64 - specificity, order, index int -} - -func compressionEncoding(header string) string { - if header == "" { - return "" - } - accepted := []encodingPreference{} - identity := false - minimum := float64(1) - fields := strings.Split(header, ",") - for i, field := range fields { - m := encodingToken.FindStringSubmatch(strings.TrimSpace(field)) - if m == nil { - continue - } - q := float64(1) - for _, param := range strings.Split(m[2], ";") { - parts := strings.Split(strings.TrimSpace(param), "=") - if parts[0] != "q" { - continue - } - q = math.NaN() - if len(parts) > 1 { - prefix := qualityPrefix.FindString(strings.TrimSpace(parts[1])) - if prefix == "Infinity" || prefix == "+Infinity" { - q = math.Inf(1) - } else if prefix == "-Infinity" { - q = math.Inf(-1) - } else if prefix != "" { - q, _ = strconv.ParseFloat(prefix, 64) - } - } - break - } - name := strings.ToLower(m[1]) - identity = identity || name == "identity" || name == "*" - if q != 0 && !math.IsNaN(q) { - minimum = math.Min(minimum, q) - } - accepted = append(accepted, encodingPreference{name: name, quality: q, order: i}) - } - if !identity { - accepted = append(accepted, encodingPreference{name: "identity", quality: minimum, order: len(fields)}) - } - choices := []encodingPreference{} - for index, name := range []string{"br", "gzip", "deflate", "identity"} { - priority := encodingPreference{name: name, order: -1, index: index} - for _, a := range accepted { - specificity := 0 - if a.name == name { - specificity = 1 - } else if a.name != "*" { - continue - } - diff := float64(priority.specificity - specificity) - if diff == 0 { - diff = priority.quality - a.quality - } - if diff == 0 || math.IsNaN(diff) { - diff = float64(priority.order - a.order) - } - if diff < 0 { - priority = encodingPreference{name: name, quality: a.quality, specificity: specificity, order: a.order, index: index} - } - } - if priority.quality > 0 { - choices = append(choices, priority) - } - } - sort.SliceStable(choices, func(i, j int) bool { - a, b := choices[i], choices[j] - if a.quality != b.quality { - return a.quality > b.quality - } - if a.index < 2 || b.index < 2 { - return a.index < b.index - } - if a.specificity != b.specificity { - return a.specificity > b.specificity - } - if a.order != b.order { - return a.order < b.order - } - return a.index < b.index - }) - if len(choices) == 0 || choices[0].name == "identity" { - return "" - } - return choices[0].name -} - -type compressionWriter struct { - http.ResponseWriter - request *http.Request - encoder io.WriteCloser - started bool - status int - failure error -} - -func (w *compressionWriter) Unwrap() http.ResponseWriter { return w.ResponseWriter } -func (w *compressionWriter) WriteHeader(status int) { - if status >= 100 && status < 200 { - w.ResponseWriter.WriteHeader(status) - return - } - if w.started { - return - } - w.started = true - w.status = status - h := w.Header() - if !compressionFilePath.MatchString(w.request.URL.Path) && filetype.Compressible(h.Get("Content-Type")) && !compressionNoTransform.MatchString(h.Get("Cache-Control")) { - vary := strings.Join(h.Values("Vary"), ", ") - present := false - for _, field := range strings.Split(vary, ",") { - if strings.TrimSpace(field) == "*" || strings.EqualFold(strings.TrimSpace(field), "Accept-Encoding") { - present = true - } - } - if !present { - if vary != "" { - vary += ", " - } - h.Set("Vary", vary+"Accept-Encoding") - } - length, err := strconv.ParseInt(h.Get("Content-Length"), 10, 64) - encoding := h.Get("Content-Encoding") - if (err != nil || length >= 1024) && (encoding == "" || encoding == "identity") && w.request.Method != "HEAD" { - method := compressionEncoding(strings.Join(w.request.Header.Values("Accept-Encoding"), ", ")) - if method != "" { - h.Set("Content-Encoding", method) - h.Del("Content-Length") - if status != 204 && status != 304 { - switch method { - case "gzip": - w.encoder = gzip.NewWriter(w.ResponseWriter) - case "deflate": - w.encoder = zlib.NewWriter(w.ResponseWriter) - case "br": - w.encoder = brotli.NewWriterLevel(w.ResponseWriter, 4) - } - } - } - } - } - // Prevent net/http from inventing a compressed Content-Length after - // buffering a small stream. Node commits these responses as chunked. - if h.Get("Content-Length") == "" && status != 204 && status != 304 && w.request.Method != "HEAD" && w.request.ProtoMajor == 1 && w.request.ProtoMinor >= 1 { - h.Set("Transfer-Encoding", "chunked") - } - w.ResponseWriter.WriteHeader(status) -} -func (w *compressionWriter) Write(data []byte) (int, error) { - if err := w.request.Context().Err(); err != nil { - w.failure = err - return 0, err - } - if !w.started { - w.WriteHeader(http.StatusOK) - } - if w.failure != nil { - return 0, w.failure - } - if w.status == http.StatusNoContent || w.status == http.StatusNotModified { - return 0, http.ErrBodyNotAllowed - } - if w.encoder != nil { - n, err := w.encoder.Write(data) - w.failure = err - return n, err - } - n, err := w.ResponseWriter.Write(data) - w.failure = err - return n, err -} -func (w *compressionWriter) Flush() { - if err := w.request.Context().Err(); err != nil { - w.failure = err - return - } - if !w.started { - w.WriteHeader(http.StatusOK) - } - if encoder, ok := w.encoder.(interface{ Flush() error }); ok { - if err := encoder.Flush(); err != nil { - w.failure = err - return - } - } - if err := http.NewResponseController(w.ResponseWriter).Flush(); err != nil { - w.failure = err - } -} -func (w *compressionWriter) finish() error { - if err := w.request.Context().Err(); err != nil { - return err - } - if w.failure != nil { - return w.failure - } - if w.encoder != nil { - return w.encoder.Close() - } - return nil -} - -// Redirect responses are complete small bodies, not unknown-length streams. -// Defer their status until http.Redirect supplies the encoded body length. -type redirectLengthWriter struct { - http.ResponseWriter - status int - committed, head bool -} - -func (w *redirectLengthWriter) WriteHeader(status int) { - if !w.committed { - w.status = status - } -} -func (w *redirectLengthWriter) Write(data []byte) (int, error) { - if !w.committed { - w.Header().Set("Content-Length", strconv.Itoa(len(data))) - w.ResponseWriter.WriteHeader(w.status) - w.committed = true - } - if w.head { - return len(data), nil - } - return w.ResponseWriter.Write(data) -} -func redirectKnownLength(w http.ResponseWriter, r *http.Request, target string, status int) { - deferred := &redirectLengthWriter{ResponseWriter: w, status: status, head: r.Method == http.MethodHead} - if deferred.head { - r = r.Clone(r.Context()) - r.Method = http.MethodGet - } - http.Redirect(deferred, r, target, status) - if !deferred.committed { - deferred.Header().Set("Content-Length", "0") - deferred.ResponseWriter.WriteHeader(deferred.status) - } -} diff --git a/backend/internal/server/compression_test.go b/backend/internal/server/compression_test.go deleted file mode 100644 index 84db601..0000000 --- a/backend/internal/server/compression_test.go +++ /dev/null @@ -1,310 +0,0 @@ -package server - -import ( - "bytes" - "compress/gzip" - "compress/zlib" - "context" - "crypto/sha256" - "encoding/hex" - "encoding/json" - "errors" - "io" - "net/http" - "net/http/httptest" - "os" - "strconv" - "strings" - "testing" - - "github.com/andybalholm/brotli" -) - -func TestCompressionHTTPContracts(t *testing.T) { - raw, err := os.ReadFile("testdata/compression.json") - if err != nil { - t.Fatal(err) - } - var cases []struct { - Name, Path, Method, Type, Accept, Control, Vary, Preset string - Size, Status int - Stream bool - Expected struct { - Status int - Encoding, Vary, Length, SHA256 string - BodyBytes int - } - } - if err = json.Unmarshal(raw, &cases); err != nil { - t.Fatal(err) - } - server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - index, _ := strconv.Atoi(r.Header.Get("X-Fixture")) - c := cases[index] - compressed := &compressionWriter{ResponseWriter: w, request: r} - w = compressed - if c.Type != "" { - w.Header().Set("Content-Type", c.Type) - } - if c.Control != "" { - w.Header().Set("Cache-Control", c.Control) - } - if c.Vary != "" { - w.Header().Set("Vary", c.Vary) - } - if c.Preset != "" { - w.Header().Set("Content-Encoding", c.Preset) - } - if !c.Stream { - w.Header().Set("Content-Length", strconv.Itoa(c.Size)) - } - status := c.Status - if status == 0 { - status = 200 - } - w.WriteHeader(status) - w.Write(bytes.Repeat([]byte("x"), c.Size)) - if err := compressed.finish(); err != nil { - t.Errorf("finish %s: %v", c.Name, err) - } - })) - defer server.Close() - transport := &http.Transport{DisableCompression: true} - defer transport.CloseIdleConnections() - client := &http.Client{Transport: transport} - for i, c := range cases { - t.Run(c.Name, func(t *testing.T) { - request, err := http.NewRequest(c.Method, server.URL+c.Path, nil) - if err != nil { - t.Fatal(err) - } - request.Header.Set("X-Fixture", strconv.Itoa(i)) - if c.Accept != "" { - request.Header.Set("Accept-Encoding", c.Accept) - } - response, err := client.Do(request) - if err != nil { - t.Fatal(err) - } - defer response.Body.Close() - wire, err := io.ReadAll(response.Body) - if err != nil { - t.Fatal(err) - } - if response.StatusCode != c.Expected.Status || response.Header.Get("Content-Encoding") != c.Expected.Encoding || response.Header.Get("Vary") != c.Expected.Vary || response.Header.Get("Content-Length") != c.Expected.Length { - t.Errorf("headers got status=%d encoding=%q vary=%q length=%q; want %+v", response.StatusCode, response.Header.Get("Content-Encoding"), response.Header.Get("Vary"), response.Header.Get("Content-Length"), c.Expected) - } - var reader io.Reader = bytes.NewReader(wire) - if len(wire) > 0 && (c.Preset == "" || c.Preset == "identity") { - switch response.Header.Get("Content-Encoding") { - case "gzip": - decoded, err := gzip.NewReader(reader) - if err != nil { - t.Fatal(err) - } - defer decoded.Close() - reader = decoded - case "deflate": - decoded, err := zlib.NewReader(reader) - if err != nil { - t.Fatal(err) - } - defer decoded.Close() - reader = decoded - case "br": - reader = brotli.NewReader(reader) - } - } - body, err := io.ReadAll(reader) - if err != nil { - t.Fatal(err) - } - digest := sha256.Sum256(body) - if len(body) != c.Expected.BodyBytes || hex.EncodeToString(digest[:]) != c.Expected.SHA256 { - t.Fatalf("body differs: length %d, error %v", len(body), err) - } - }) - } -} -func TestCompressionFlush(t *testing.T) { - recorder := httptest.NewRecorder() - request := httptest.NewRequest("GET", "/stream", nil) - request.Header.Set("Accept-Encoding", "gzip") - w := &compressionWriter{ResponseWriter: recorder, request: request} - w.Header().Set("Content-Type", "text/event-stream") - if _, err := w.Write([]byte("data: first\n\n")); err != nil { - t.Fatal(err) - } - w.Flush() - if !recorder.Flushed || recorder.Body.Len() == 0 { - t.Fatal("compressed stream was not flushed") - } - if _, err := w.Write([]byte("data: second\n\n")); err != nil { - t.Fatal(err) - } - if err := w.finish(); err != nil { - t.Fatal(err) - } - reader, err := gzip.NewReader(bytes.NewReader(recorder.Body.Bytes())) - if err != nil { - t.Fatal(err) - } - defer reader.Close() - body, err := io.ReadAll(reader) - if err != nil || string(body) != "data: first\n\ndata: second\n\n" { - t.Fatal(string(body), err) - } -} -func TestCompressionJSONLength(t *testing.T) { - for _, size := range []int{10, 2048} { - recorder := httptest.NewRecorder() - request := httptest.NewRequest("GET", "/api/example", nil) - request.Header.Set("Accept-Encoding", "gzip") - w := &compressionWriter{ResponseWriter: recorder, request: request} - writeJSON(w, M{"body": strings.Repeat("x", size)}) - if err := w.finish(); err != nil { - t.Fatal(err) - } - if (recorder.Header().Get("Content-Encoding") == "gzip") != (size >= 1024) { - t.Fatal("JSON threshold mismatch", size, recorder.Header()) - } - } -} - -func TestServerCompressionPlacement(t *testing.T) { - root := t.TempDir() - body := strings.Repeat("body { color: black; }\n", 200) - if err := os.WriteFile(root+"/fixture.css", []byte(body), 0600); err != nil { - t.Fatal(err) - } - public, err := os.OpenRoot(root) - if err != nil { - t.Fatal(err) - } - defer public.Close() - s := &Server{public: public} - for _, method := range []string{"GET", "HEAD"} { - recorder := httptest.NewRecorder() - request := httptest.NewRequest(method, "/fixture.css", nil) - request.Header.Set("Accept-Encoding", "br, gzip") - s.ServeHTTP(recorder, request) - if recorder.Code != 200 || recorder.Header().Get("Vary") != "Accept-Encoding" { - t.Fatal(recorder.Code, recorder.Header()) - } - if method == "GET" { - if recorder.Header().Get("Content-Encoding") != "br" { - t.Fatal("static response not compressed", recorder.Header()) - } - decoded, err := io.ReadAll(brotli.NewReader(bytes.NewReader(recorder.Body.Bytes()))) - if err != nil || string(decoded) != body { - t.Fatal("static output", err) - } - } else if recorder.Header().Get("Content-Encoding") != "" || recorder.Body.Len() != 0 { - t.Fatal("HEAD compressed or emitted body") - } - } - recorder := httptest.NewRecorder() - request := httptest.NewRequest("POST", "/github/app/webhook", nil) - request.Header.Set("Accept-Encoding", "gzip") - s.ServeHTTP(recorder, request) - if recorder.Code != 401 || recorder.Header().Get("Vary") != "" || recorder.Header().Get("Content-Encoding") != "" { - t.Fatal("webhook compression placement", recorder.Code, recorder.Header()) - } -} - -type compressionBrokenWriter struct{ header http.Header } - -func (w *compressionBrokenWriter) Header() http.Header { return w.header } -func (w *compressionBrokenWriter) WriteHeader(int) {} -func (w *compressionBrokenWriter) Write([]byte) (int, error) { return 0, io.ErrClosedPipe } -func TestCompressionFailure(t *testing.T) { - for _, encoding := range []string{"gzip", "deflate", "br"} { - request := httptest.NewRequest("GET", "/stream", nil) - request.Header.Set("Accept-Encoding", encoding) - broken := &compressionBrokenWriter{header: http.Header{"Content-Type": []string{"text/plain"}}} - w := &compressionWriter{ResponseWriter: broken, request: request} - w.Write([]byte(strings.Repeat("x", 2048))) - if err := w.finish(); !errors.Is(err, io.ErrClosedPipe) { - t.Fatal("compression hid write failure", encoding, err) - } - } - ctx, cancel := context.WithCancel(context.Background()) - cancel() - request := httptest.NewRequest("GET", "/stream", nil).WithContext(ctx) - recorder := httptest.NewRecorder() - w := &compressionWriter{ResponseWriter: recorder, request: request} - if _, err := w.Write([]byte("body")); !errors.Is(err, context.Canceled) { - t.Fatal(err) - } - if err := w.finish(); !errors.Is(err, context.Canceled) || recorder.Body.Len() != 0 { - t.Fatal("canceled response continued", err) - } -} - -func TestCompressionHTTP2(t *testing.T) { - server := httptest.NewUnstartedServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - encoded := &compressionWriter{ResponseWriter: w, request: r} - writeJSON(encoded, M{"body": strings.Repeat("x", 4096)}) - if err := encoded.finish(); err != nil { - t.Error(err) - } - })) - server.EnableHTTP2 = true - server.StartTLS() - defer server.Close() - request, _ := http.NewRequest("GET", server.URL, nil) - request.Header.Set("Accept-Encoding", "gzip") - response, err := server.Client().Do(request) - if err != nil { - t.Fatal(err) - } - defer response.Body.Close() - if response.ProtoMajor != 2 || response.Header.Get("Content-Encoding") != "gzip" || response.Header.Get("Transfer-Encoding") != "" { - t.Fatal(response.Proto, response.Header) - } - decoded, err := gzip.NewReader(response.Body) - if err != nil { - t.Fatal(err) - } - defer decoded.Close() - body, err := io.ReadAll(decoded) - if err != nil || !bytes.Contains(body, []byte(strings.Repeat("x", 4096))) { - t.Fatal("HTTP/2 output", err) - } -} - -func TestCompressionKnownSmallBodies(t *testing.T) { - for _, method := range []string{"GET", "HEAD"} { - recorder := httptest.NewRecorder() - request := httptest.NewRequest(method, "/from", nil) - request.Header.Set("Accept-Encoding", "gzip") - w := &compressionWriter{ResponseWriter: recorder, request: request} - redirectKnownLength(w, request, "/target?x=1&y=2", 302) - if err := w.finish(); err != nil { - t.Fatal(err) - } - if recorder.Code != 302 || recorder.Header().Get("Content-Encoding") != "" || recorder.Header().Get("Content-Length") == "" || recorder.Header().Get("Location") != "/target?x=1&y=2" { - t.Fatal(recorder.Code, recorder.Header()) - } - if method == "HEAD" && recorder.Body.Len() != 0 { - t.Fatal("HEAD redirect body") - } - } - root := t.TempDir() - if err := os.WriteFile(root+"/index.html", []byte("small page"), 0600); err != nil { - t.Fatal(err) - } - public, err := os.OpenRoot(root) - if err != nil { - t.Fatal(err) - } - defer public.Close() - s := &Server{public: public} - recorder := httptest.NewRecorder() - request := httptest.NewRequest("GET", "/", nil) - request.Header.Set("Accept-Encoding", "gzip") - s.ServeHTTP(recorder, request) - if recorder.Code != 200 || recorder.Header().Get("Content-Encoding") != "" || recorder.Body.String() != "small page" { - t.Fatal("small SPA response", recorder.Code, recorder.Header()) - } -} diff --git a/backend/internal/server/conference_capacity_integration_test.go b/backend/internal/server/conference_capacity_integration_test.go deleted file mode 100644 index 2ae225a..0000000 --- a/backend/internal/server/conference_capacity_integration_test.go +++ /dev/null @@ -1,197 +0,0 @@ -package server - -import ( - "context" - "errors" - "fmt" - "io/fs" - "net/http/httptest" - "os" - "strings" - "sync/atomic" - "testing" - "time" - - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/event" - "go.mongodb.org/mongo-driver/v2/mongo" - "go.mongodb.org/mongo-driver/v2/mongo/options" -) - -func runConferenceCapacityIntegration(t *testing.T, base *Server) { - t.Run("conference operations exceed former list and removal limits", func(t *testing.T) { - ctx := context.Background() - owner := bson.NewObjectID() - db := base.Store.DB.Client().Database("conference_capacity_" + owner.Hex()) - defer db.Drop(ctx) - s := &Server{Config: base.Config, Store: &Store{DB: db, Redis: base.Store.Redis}, content: base.content, providers: base.providers} - q := &request{Server: s, User: M{"_id": owner}, R: httptest.NewRequest("GET", "/api/conferences", nil), W: httptest.NewRecorder(), Params: map[string]string{}} - q.Identity.ID = owner.Hex() - conferences := make([]any, 0, 10001) - for i := 0; i < 10001; i++ { - c := M{"conferenceID": fmt.Sprintf("capacity-%05d", i), "owners": []any{owner}, "status": "removed", "repositories": []any{}, "endDate": time.Now().Add(-time.Hour)} - if i == 10000 { - c["status"] = "ready" - } - conferences = append(conferences, c) - } - if _, err := db.Collection("conferences").InsertMany(ctx, conferences); err != nil { - t.Fatal(err) - } - var finds atomic.Int64 - monitor := &event.CommandMonitor{Started: func(_ context.Context, e *event.CommandStartedEvent) { - if e.CommandName == "find" { - finds.Add(1) - } - }} - observed, err := mongo.Connect(options.Client().ApplyURI(os.Getenv("GO_TEST_MONGODB_URI")).SetBSONOptions(&options.BSONOptions{DefaultDocumentM: true}).SetMonitor(monitor)) - if err != nil { - t.Fatal(err) - } - defer observed.Disconnect(ctx) - s.Store.DB = observed.Database(db.Name()) - result, err := s.conferences(q) - s.Store.DB = db - if finds.Load() != 22 { - t.Fatal("conference listing performed per-record reads", finds.Load()) - } - if err != nil { - t.Fatal(err) - } - listed := result.([]M) - if len(listed) != 10001 { - t.Fatal("conference list truncated", len(listed)) - } - seen := map[string]bool{} - for _, row := range listed { - id := str(row["conferenceID"]) - if seen[id] { - t.Fatal("duplicate conference", id) - } - seen[id] = true - } - tail, err := s.Store.one(ctx, "conferences", M{"conferenceID": "capacity-10000"}) - if err != nil || tail["status"] != "expired" { - t.Fatal("tail conference expiry skipped", err) - } - // A transition crossing discovery batches must still update both histories - // at the saved event time. Unrelated pending work must not be replayed. - member := bson.NewObjectID() - at := time.Now().Add(-30 * time.Minute).Truncate(time.Millisecond) - from, to := "capacity-00000", "capacity-00500" - if _, err := s.Store.update(ctx, "conferences", M{"conferenceID": from}, M{"$set": M{"repositories": []M{{"id": member, "addDate": at.Add(-time.Hour)}}}}); err != nil { - t.Fatal(err) - } - if _, err := db.Collection(collection("repo")).InsertMany(ctx, []any{ - M{"_id": member, "conference": to, "conferenceMembership": M{"id": bson.NewObjectID(), "from": from, "to": to, "at": at}}, - M{"conferenceMembership": M{"id": bson.NewObjectID(), "from": "unrelated-from", "to": "unrelated-to", "at": "invalid"}}, - }); err != nil { - t.Fatal(err) - } - result, err = s.conferences(q) - if err != nil { - t.Fatal(err) - } - counts := map[string]int64{} - for _, row := range result.([]M) { - counts[str(row["conferenceID"])] = number(row["nbRepositories"]) - } - if counts[from] != 0 || counts[to] != 1 { - t.Fatal("listing returned stale membership counts", counts[from], counts[to]) - } - oldConference, err := s.Store.one(ctx, "conferences", M{"conferenceID": from}) - if err != nil { - t.Fatal(err) - } - newConference, err := s.Store.one(ctx, "conferences", M{"conferenceID": to}) - if err != nil { - t.Fatal(err) - } - if !date(obj(arr(oldConference["repositories"])[0])["removeDate"]).Equal(at) || !date(obj(arr(newConference["repositories"])[0])["addDate"]).Equal(at) { - t.Fatal("reconciliation changed billing timestamps") - } - savedMember, err := s.Store.one(ctx, collection("repo"), M{"_id": member}) - if err != nil || savedMember["conferenceMembership"] != nil { - t.Fatal("transition not completed", err) - } - pending, err := db.Collection(collection("repo")).CountDocuments(ctx, M{"conferenceMembership.id": M{"$exists": true}}) - if err != nil || pending != 1 { - t.Fatal("unrelated pending work changed", pending, err) - } - if _, err := db.Collection(collection("repo")).DeleteMany(ctx, M{}); err != nil { - t.Fatal(err) - } - if _, err := db.Collection("conferences").DeleteMany(ctx, M{}); err != nil { - t.Fatal(err) - } - - const count = 100001 - records := make([]any, 0, count) - history := make([]any, 0, count) - prefix := "capacity-" + owner.Hex() - lastID := "" - for i := 0; i < count; i++ { - id := bson.NewObjectID() - repoID := fmt.Sprintf("%s-%06d", prefix, i) - status := "archived" - if i == count-1 { - status = "ready" - lastID = repoID - } - records = append(records, M{"_id": id, "repoId": repoID, "owner": owner, "status": status, "statusDate": time.Now(), "source": M{"provider": "fixture"}}) - history = append(history, M{"id": id, "addDate": time.Now().Add(-time.Hour)}) - } - if _, err := db.Collection(collection("repo")).InsertMany(ctx, records); err != nil { - t.Fatal(err) - } - c := M{"_id": bson.NewObjectID(), "conferenceID": prefix, "owners": []any{owner}, "status": "ready", "repositories": history, "endDate": time.Now().Add(time.Hour)} - if _, err := db.Collection("conferences").InsertOne(ctx, c); err != nil { - t.Fatal(err) - } - // Direct lifecycle invocation below needs no membership replay; detail does. - q.Params["id"] = prefix - result, err = s.conferences(q) - if err != nil { - t.Fatal(err) - } - repositories := arr(obj(result)["repositories"]) - if len(repositories) != count { - t.Fatal("conference membership view truncated", len(repositories)) - } - seen = map[string]bool{} - for _, value := range repositories { - id := str(obj(value)["repoId"]) - if seen[id] { - t.Fatal("duplicate member", id) - } - seen[id] = true - } - if !seen[lastID] { - t.Fatal("tail conference member omitted") - } - if err := s.content.Put(ctx, lastID, "raw", strings.NewReader("private fixture"), 15, 15); err != nil { - t.Fatal(err) - } - defer s.content.Remove(ctx, lastID, "") - err = s.removeConference(ctx, c) - if err == nil || err.Error() != "conference_repository_removal_failed" { - t.Fatal("archived members did not report partial failure", err) - } - last, err := s.Store.one(ctx, collection("repo"), M{"repoId": lastID}) - if err != nil || last["status"] != "removed" { - t.Fatal("removal skipped tail member", err) - } - entries, err := s.content.List(ctx, lastID) - if err != nil && !errors.Is(err, fs.ErrNotExist) || len(entries) != 0 { - t.Fatal("tail member content survived removal", len(entries), err) - } - archived, err := db.Collection(collection("repo")).CountDocuments(ctx, M{"status": "archived"}) - if err != nil || archived != count-1 { - t.Fatal("archived members changed", archived, err) - } - saved, err := s.Store.one(ctx, "conferences", M{"_id": c["_id"]}) - if err != nil || saved["status"] != "removed" { - t.Fatal("conference removal not durable", err) - } - }) -} diff --git a/backend/internal/server/conference_dates_test.go b/backend/internal/server/conference_dates_test.go deleted file mode 100644 index 7ef966a..0000000 --- a/backend/internal/server/conference_dates_test.go +++ /dev/null @@ -1,36 +0,0 @@ -package server - -import ( - "encoding/json" - "os" - "reflect" - "testing" -) - -func TestConferenceDatePersistenceContracts(t *testing.T) { - raw, err := os.ReadFile("testdata/conference-dates.json") - if err != nil { - t.Fatal(err) - } - var cases []struct { - Body M - Error bool - Expected M - } - if err = json.Unmarshal(raw, &cases); err != nil { - t.Fatal(err) - } - for _, row := range cases { - start, end, err := conferenceFormDates(row.Body) - if (err != nil) != row.Error { - t.Fatal(row, err) - } - if err != nil { - continue - } - got := defaultsJSON(t, responseJSON(M{"startDate": start, "endDate": end})) - if !reflect.DeepEqual(got, defaultsJSON(t, row.Expected)) { - t.Fatal(row, got) - } - } -} diff --git a/backend/internal/server/conference_lifecycle.go b/backend/internal/server/conference_lifecycle.go deleted file mode 100644 index eaf78eb..0000000 --- a/backend/internal/server/conference_lifecycle.go +++ /dev/null @@ -1,91 +0,0 @@ -package server - -import ( - "context" - "errors" - "time" - - "go.mongodb.org/mongo-driver/v2/bson" -) - -// Conference membership is recorded as intervals. Only open intervals take -// part in a conference-wide lifecycle change; closed intervals are billing history. -func conferenceRepositoryIDs(c M) []bson.ObjectID { - ids := []bson.ObjectID{} - for _, value := range arr(c["repositories"]) { - entry := obj(value) - // A BSON Date at year 0001 or the Unix epoch is still a closed interval. - if inputTruthy(entry["removeDate"]) { - continue - } - if id, err := oid(str(entry["id"])); err == nil { - ids = append(ids, id) - } - } - return ids -} - -func (s *Server) expireConference(ctx context.Context, c M) error { - if str(c["status"]) != "ready" || !date(c["endDate"]).Before(time.Now()) { - return nil - } - // Match Repository.markExpired(true): an already inactive repository keeps - // its status and timestamp, even when its own expiration mode is "never". - _, err := s.Store.DB.Collection(collection("repo")).UpdateMany(ctx, - M{"_id": M{"$in": conferenceRepositoryIDs(c)}, "status": M{"$nin": []string{"archived", "removed", "removing", "expired", "expiring"}}}, - M{"$set": M{"status": "expiring", "statusDate": time.Now()}}) - if err != nil { - return err - } - ok, err := s.Store.update(ctx, "conferences", M{"_id": c["_id"], "status": "ready", "endDate": c["endDate"]}, M{"$set": M{"status": "expired"}}) - if err != nil { - return err - } - if !ok { - return fail("conference_changed", 409) - } - c["status"] = "expired" - return nil -} - -// The conference route waits for cleanup and attempts every member even if one -// fails. The removed conference and any unfinished removing repositories remain -// durable so maintenance or a repeated request can finish interrupted work. -func (s *Server) removeConference(ctx context.Context, c M) error { - ok, err := s.Store.update(ctx, "conferences", M{"_id": c["_id"], "status": c["status"]}, M{"$set": M{"status": "removed"}}) - if err != nil { - return err - } - if !ok { - return fail("conference_changed", 409) - } - c["status"] = "removed" - rows, err := s.Store.list(ctx, collection("repo"), M{"_id": M{"$in": conferenceRepositoryIDs(c)}}, 0, nil) - if err != nil { - return err - } - failed := false - for _, r := range rows { - if str(r["status"]) == "archived" { - failed = true - continue - } - claimed, err := s.Store.update(ctx, collection("repo"), revisionFilter(r), M{"$set": M{"status": "removing", "statusDate": time.Now()}}) - if err != nil || !claimed { - failed = true - continue - } - if err := s.runJob(ctx, M{"kind": "repo", "resourceId": r["repoId"], "action": "remove"}); err != nil { - failed = true - continue - } - current, err := s.Store.one(ctx, collection("repo"), M{"_id": r["_id"]}) - if err != nil || current == nil || str(current["status"]) != "removed" { - failed = true - } - } - if failed { - return errors.New("conference_repository_removal_failed") - } - return nil -} diff --git a/backend/internal/server/conference_lifecycle_integration_test.go b/backend/internal/server/conference_lifecycle_integration_test.go deleted file mode 100644 index c521057..0000000 --- a/backend/internal/server/conference_lifecycle_integration_test.go +++ /dev/null @@ -1,233 +0,0 @@ -package server - -import ( - "context" - "encoding/json" - "errors" - "io/fs" - "net/http/httptest" - "strings" - "testing" - "time" - - "go.mongodb.org/mongo-driver/v2/bson" -) - -func runConferenceLifecycleIntegration(t *testing.T, s *Server, token string, owner any) { - t.Run("conference expiry uses open membership and preserves inactive repositories", func(t *testing.T) { - ctx := context.Background() - before := time.Now().Add(-time.Hour).Truncate(time.Millisecond) - conf := M{"_id": bson.NewObjectID(), "conferenceID": "conference-expiry", "name": "Expired conference", "owners": []any{owner}, "status": "ready", "startDate": before.Add(-time.Hour), "endDate": before, "plan": M{"pricePerRepository": 0}} - history := []any{} - repositories := []M{} - states := []string{"ready", "preparing", "queue", "download", "error", "archived", "removed", "removing", "expired", "expiring"} - for _, state := range states { - row := M{"_id": bson.NewObjectID(), "repoId": "conference-expiry-" + state, "owner": owner, "status": state, "statusDate": before, "conference": conf["conferenceID"], "options": M{"expirationMode": "never"}} - if _, err := s.Store.DB.Collection(collection("repo")).InsertOne(ctx, row); err != nil { - t.Fatal(err) - } - history = append(history, M{"id": row["_id"], "addDate": before.Add(-time.Hour)}) - repositories = append(repositories, row) - } - for _, name := range []string{"closed", "closed-zero", "closed-epoch", "not-member"} { - row := M{"_id": bson.NewObjectID(), "repoId": "conference-expiry-" + name, "owner": owner, "status": "ready", "statusDate": before, "conference": conf["conferenceID"]} - if _, err := s.Store.DB.Collection(collection("repo")).InsertOne(ctx, row); err != nil { - t.Fatal(err) - } - if name != "not-member" { - removed := before - if name == "closed-zero" { - removed = time.Time{} - } - if name == "closed-epoch" { - removed = time.UnixMilli(0) - } - history = append(history, M{"id": row["_id"], "addDate": time.Date(0, 1, 1, 0, 0, 0, 0, time.UTC), "removeDate": removed}) - } - repositories = append(repositories, row) - } - conf["repositories"] = history - if _, err := s.Store.DB.Collection("conferences").InsertOne(ctx, conf); err != nil { - t.Fatal(err) - } - req := httptest.NewRequest("GET", "/api/conferences", nil) - req.RemoteAddr = "198.51.100.11:1234" - req.Header.Set("Authorization", "Bearer "+token) - w := httptest.NewRecorder() - s.ServeHTTP(w, req) - if w.Code != 200 { - t.Fatal(w.Code, w.Body) - } - var output []M - if err := json.Unmarshal(w.Body.Bytes(), &output); err != nil { - t.Fatal(err) - } - found := false - for _, c := range output { - if c["conferenceID"] == conf["conferenceID"] { - found = true - if c["status"] != "expired" { - t.Fatal(c) - } - } - } - if !found { - t.Fatal("conference absent from response") - } - for i, original := range repositories { - current, err := s.Store.one(ctx, collection("repo"), M{"_id": original["_id"]}) - if err != nil { - t.Fatal(err) - } - want := str(original["status"]) - if i < 5 { - want = "expiring" - } - if current["status"] != want { - t.Fatal(original["repoId"], current["status"], want) - } - if i < 5 { - if !date(current["statusDate"]).After(before) { - t.Fatal("missing expiry timestamp", current) - } - } else if !date(current["statusDate"]).Equal(before) { - t.Fatal("inactive or non-member timestamp changed", current) - } - } - saved, err := s.Store.one(ctx, "conferences", M{"_id": conf["_id"]}) - if err != nil { - t.Fatal(err) - } - if saved["status"] != "expired" { - t.Fatal(saved) - } - // An already expired conference must not affect a repository restored later. - restored := repositories[0] - if _, err := s.Store.update(ctx, collection("repo"), M{"_id": restored["_id"]}, M{"$set": M{"status": "ready", "statusDate": before}}); err != nil { - t.Fatal(err) - } - if err := s.expireConference(ctx, saved); err != nil { - t.Fatal(err) - } - current, err := s.Store.one(ctx, collection("repo"), M{"_id": restored["_id"]}) - if err != nil { - t.Fatal(err) - } - if current["status"] != "ready" { - t.Fatal("repeat expiry changed restored repository") - } - }) -} - -func runConferenceRemovalIntegration(t *testing.T, s *Server, token, otherToken string, owner any) { - t.Run("conference removal completes cleanup and continues after member failures", func(t *testing.T) { - ctx := context.Background() - call := func(id, auth string) *httptest.ResponseRecorder { - req := httptest.NewRequest("DELETE", "/api/conferences/"+id, nil) - req.RemoteAddr = "198.51.100.12:1234" - req.Header.Set("Authorization", "Bearer "+auth) - w := httptest.NewRecorder() - s.ServeHTTP(w, req) - return w - } - for _, broken := range []bool{false, true} { - id := "conference-remove-success" - if broken { - id = "conference-remove-partial" - } - history := []any{} - rows := []M{} - for _, name := range []string{"first", "second", "closed", "closed-zero", "closed-epoch"} { - state := "ready" - if broken && name == "first" { - state = "archived" - } - r := M{"_id": bson.NewObjectID(), "repoId": id + "-" + name, "owner": owner, "status": state, "conference": id} - if _, err := s.Store.DB.Collection(collection("repo")).InsertOne(ctx, r); err != nil { - t.Fatal(err) - } - entry := M{"id": r["_id"], "addDate": time.Now().Add(-time.Hour)} - if strings.HasPrefix(name, "closed") { - entry["removeDate"] = time.Now() - if name == "closed-zero" { - entry["removeDate"] = time.Time{} - } - if name == "closed-epoch" { - entry["removeDate"] = time.UnixMilli(0) - } - } - history = append(history, entry) - rows = append(rows, r) - if err := s.content.Put(ctx, str(r["repoId"]), "raw", strings.NewReader("raw"), 3, 3); err != nil { - t.Fatal(err) - } - for _, coll := range []string{"files", "anonymizedpaths"} { - if _, err := s.Store.DB.Collection(coll).InsertOne(ctx, M{"repoId": r["repoId"], "path": "", "name": "raw"}); err != nil { - t.Fatal(err) - } - } - } - conf := M{"_id": bson.NewObjectID(), "conferenceID": id, "owners": []any{owner}, "status": "ready", "repositories": history} - if _, err := s.Store.DB.Collection("conferences").InsertOne(ctx, conf); err != nil { - t.Fatal(err) - } - if w := call(id, otherToken); w.Code != 401 { - t.Fatal(w.Code, w.Body) - } - w := call(id, token) - expected := 200 - if broken { - expected = 500 - } - if w.Code != expected { - t.Fatal(w.Code, w.Body) - } - current, err := s.Store.one(ctx, "conferences", M{"_id": conf["_id"]}) - if err != nil || current["status"] != "removed" { - t.Fatal(current, err) - } - for i, r := range rows { - cleaned := i < 2 && !(broken && i == 0) - current, err := s.Store.one(ctx, collection("repo"), M{"_id": r["_id"]}) - if err != nil { - t.Fatal(err) - } - want := r["status"] - if cleaned { - want = "removed" - } - if current["status"] != want { - t.Fatal(r["repoId"], current["status"], want) - } - for _, coll := range []string{"files", "anonymizedpaths"} { - count, err := s.Store.DB.Collection(coll).CountDocuments(ctx, M{"repoId": r["repoId"]}) - if err != nil { - t.Fatal(err) - } - wantCount := int64(1) - if cleaned { - wantCount = 0 - } - if count != wantCount { - t.Fatal(coll, count, wantCount) - } - } - entries, err := s.content.List(ctx, str(r["repoId"])) - if err != nil && !errors.Is(err, fs.ErrNotExist) { - t.Fatal(err) - } - if cleaned && len(entries) != 0 { - t.Fatal("storage remains after successful removal") - } - if !cleaned && len(entries) == 0 { - t.Fatal("protected content removed") - } - } - if !broken { - if w := call(id, token); w.Code != 200 { - t.Fatal("repeat conference removal", w.Code, w.Body) - } - } - } - }) -} diff --git a/backend/internal/server/conference_membership.go b/backend/internal/server/conference_membership.go deleted file mode 100644 index daf9a32..0000000 --- a/backend/internal/server/conference_membership.go +++ /dev/null @@ -1,198 +0,0 @@ -package server - -import ( - "context" - "errors" - "go.mongodb.org/mongo-driver/v2/mongo" - "go.mongodb.org/mongo-driver/v2/mongo/options" - "time" - - "go.mongodb.org/mongo-driver/v2/bson" -) - -// Replay only recorded transitions. Inferring changes from current repository -// status would rewrite TypeScript billing history after expiry or removal. -func (s *Server) reconcileConference(ctx context.Context, c M) (M, error) { - if err := s.replayConferenceMemberships(ctx, str(c["conferenceID"])); err != nil { - return nil, err - } - return s.Store.one(ctx, "conferences", M{"_id": c["_id"]}) -} - -// Find pending transitions in bounded batches before listing conferences. Most -// listings need no per-conference replay or reload; affected histories still use -// the existing revision-guarded reconciliation path. -func (s *Server) pendingConferences(ctx context.Context, conferences []M) (map[string]bool, error) { - affected := map[string]bool{} - ids := []string{} - bytes := 0 - scan := func() error { - if len(ids) == 0 { - return nil - } - filter := M{"conferenceMembership.id": M{"$exists": true}, "$or": []M{{"conferenceMembership.from": M{"$in": ids}}, {"conferenceMembership.to": M{"$in": ids}}}} - cursor, err := s.Store.DB.Collection(collection("repo")).Find(ctx, filter, options.Find().SetProjection(M{"_id": 0, "conferenceMembership.from": 1, "conferenceMembership.to": 1})) - if err != nil { - return err - } - defer cursor.Close(ctx) - for cursor.Next(ctx) { - var row M - if err := cursor.Decode(&row); err != nil { - return err - } - event := obj(row["conferenceMembership"]) - affected[str(event["from"])] = true - affected[str(event["to"])] = true - } - return cursor.Err() - } - for _, conference := range conferences { - id := str(conference["conferenceID"]) - if len(ids) > 0 && (len(ids) >= 500 || bytes+len(id) > 1024*1024) { - if err := scan(); err != nil { - return nil, err - } - ids = nil - bytes = 0 - } - ids = append(ids, id) - bytes += len(id) - } - if err := scan(); err != nil { - return nil, err - } - return affected, nil -} - -func (s *Server) replayConferenceMemberships(ctx context.Context, conferenceID string) error { - filter := M{"conferenceMembership.id": M{"$exists": true}} - if conferenceID != "" { - filter["$or"] = []M{{"conferenceMembership.from": conferenceID}, {"conferenceMembership.to": conferenceID}} - } - rows, err := s.Store.list(ctx, collection("repo"), filter, 1000, nil) - if err != nil { - return err - } - for _, r := range rows { - if err := s.flushConferenceMembership(ctx, r); err != nil { - return err - } - } - if len(rows) == 1000 { - return fail("conference_replay_pending", 503) - } - return nil -} - -func (s *Server) flushConferenceMembership(ctx context.Context, r M) error { - event := obj(r["conferenceMembership"]) - if len(event) == 0 { - return nil - } - at, valid := storedDate(event["at"]) - if !valid || event["id"] == nil { - return fail("invalid_conference_transition", 500) - } - if err := s.saveConferenceMembership(ctx, r["_id"], str(event["from"]), str(event["to"]), at); err != nil { - return err - } - _, err := s.Store.update(ctx, collection("repo"), M{"_id": r["_id"], "conferenceMembership.id": event["id"]}, M{"$unset": M{"conferenceMembership": ""}}) - if err == nil { - delete(r, "conferenceMembership") - } - return err -} - -func membershipSaveFilter(kind string, previous M) M { - filter := revisionFilter(previous) - if kind == "repo" { - filter["conferenceMembership"] = M{"$exists": false} - } - return filter -} - -func membershipSaveTime(previous M) time.Time { - now := time.Now().Truncate(time.Millisecond) - if previous != nil && !now.After(date(previous["settingsSavedAt"])) { - now = date(previous["settingsSavedAt"]).Add(time.Millisecond) - } - return now -} - -func recordConferenceMembership(record M, from, to string, at time.Time) { - if from != to { - record["conferenceMembership"] = M{"id": bson.NewObjectID(), "from": from, "to": to, "at": at} - } -} - -// Record membership at save time. Rejoining resets the first matching interval, -// matching the TypeScript route's existing history format. -func (s *Server) saveConferenceMembership(ctx context.Context, repositoryID any, from, to string, at time.Time) error { - if from == to { - return nil - } - change := func(id string, joining bool) error { - if id == "" { - return nil - } - for attempt := 0; attempt < 3; attempt++ { - var snapshot struct { - ID bson.ObjectID `bson:"_id"` - Repositories []bson.D `bson:"repositories"` - } - err := s.Store.DB.Collection("conferences").FindOne(ctx, M{"conferenceID": id}).Decode(&snapshot) - if errors.Is(err, mongo.ErrNoDocuments) { - return nil - } - if err != nil { - return err - } - original := make([]any, len(snapshot.Repositories)) - history := make([]any, len(snapshot.Repositories)) - matches := []int{} - for i, entry := range snapshot.Repositories { - original[i] = entry - copy := obj(entry) - history[i] = copy - if str(copy["id"]) == str(repositoryID) { - matches = append(matches, i) - } - } - // A delayed replay must not undo a later transition. Save timestamps - // increase by at least one millisecond for each repository revision. - for _, i := range matches { - entry := obj(history[i]) - if date(entry["addDate"]).After(at) || date(entry["removeDate"]).After(at) { - return nil - } - } - if joining { - if len(matches) == 0 { - history = append(history, M{"id": repositoryID, "addDate": at}) - } else { - entry := obj(history[matches[0]]) - entry["addDate"] = at - delete(entry, "removeDate") - } - } else { - if len(matches) != 1 { - return nil - } - obj(history[matches[0]])["removeDate"] = at - } - ok, err := s.Store.update(ctx, "conferences", M{"_id": snapshot.ID, "repositories": original}, M{"$set": M{"repositories": history}}) - if err != nil { - return err - } - if ok { - return nil - } - } - return fail("conference_changed", 409) - } - if err := change(to, true); err != nil { - return err - } - return change(from, false) -} diff --git a/backend/internal/server/conference_membership_integration_test.go b/backend/internal/server/conference_membership_integration_test.go deleted file mode 100644 index 20f21da..0000000 --- a/backend/internal/server/conference_membership_integration_test.go +++ /dev/null @@ -1,93 +0,0 @@ -package server - -import ( - "bytes" - "context" - "encoding/json" - "net/http/httptest" - "testing" - "time" - - "go.mongodb.org/mongo-driver/v2/bson" -) - -func runConferenceMembershipIntegration(t *testing.T, s *Server, token string, owner any) { - t.Run("repository saves update conference history immediately", func(t *testing.T) { - ctx := context.Background() - for _, id := range []string{"membership-a", "membership-b"} { - c := M{"_id": bson.NewObjectID(), "conferenceID": id, "status": "ready", "owners": []any{owner}, "startDate": time.Now().Add(-time.Hour), "endDate": time.Now().Add(time.Hour), "repositories": []any{}} - if _, err := s.Store.DB.Collection("conferences").InsertOne(ctx, c); err != nil { - t.Fatal(err) - } - } - template, err := s.Store.one(ctx, collection("repo"), M{"repoId": "second-provider"}) - if err != nil { - t.Fatal(err) - } - source := obj(template["source"]) - body := M{"repoId": "conference-membership-test", "fullName": source["repositoryName"], "source": M{"provider": "fixture", "branch": source["branch"], "commit": source["commit"]}, "terms": []any{}, "options": M{"expirationMode": "never"}} - save := func(conference string, create bool) { - t.Helper() - body["conference"] = conference - raw, _ := json.Marshal(body) - url := "/api/repo" - if !create { - url += "/conference-membership-test" - } - req := httptest.NewRequest("POST", url, bytes.NewReader(raw)) - req.RemoteAddr = "198.51.100.13:1234" - req.Header.Set("Content-Type", "application/json") - req.Header.Set("Authorization", "Bearer "+token) - w := httptest.NewRecorder() - s.ServeHTTP(w, req) - if w.Code != 200 { - t.Fatal(w.Code, w.Body) - } - } - history := func(id string) []any { - t.Helper() - c, err := s.Store.one(ctx, "conferences", M{"conferenceID": id}) - if err != nil { - t.Fatal(err) - } - return arr(c["repositories"]) - } - save("membership-a", true) - r, err := s.Store.one(ctx, collection("repo"), M{"repoId": body["repoId"]}) - if err != nil { - t.Fatal(err) - } - a := history("membership-a") - if len(a) != 1 || str(obj(a[0])["id"]) != str(r["_id"]) || date(obj(a[0])["addDate"]).IsZero() { - t.Fatal(a) - } - first := time.Now().Add(-24 * time.Hour).Truncate(time.Millisecond) - if _, err := s.Store.update(ctx, "conferences", M{"conferenceID": "membership-a"}, M{"$set": M{"repositories.0.addDate": first}}); err != nil { - t.Fatal(err) - } - save("membership-a", false) - if !date(obj(history("membership-a")[0])["addDate"]).Equal(first) { - t.Fatal("unchanged membership reset billing date") - } - save("membership-b", false) - if date(obj(history("membership-a")[0])["removeDate"]).IsZero() || len(history("membership-b")) != 1 { - t.Fatal("switch did not close old and open new membership") - } - save("membership-a", false) - a = history("membership-a") - if len(a) != 1 || !date(obj(a[0])["removeDate"]).IsZero() || !date(obj(a[0])["addDate"]).After(first) { - t.Fatal("rejoin did not reset existing entry", a) - } - if date(obj(history("membership-b")[0])["removeDate"]).IsZero() { - t.Fatal("previous conference remains open") - } - if _, err := s.Store.update(ctx, "conferences", M{"conferenceID": "membership-a"}, M{"$set": M{"status": "expired", "endDate": time.Now().Add(-time.Hour)}}); err != nil { - t.Fatal(err) - } - save("membership-a", false) - save("", false) - if date(obj(history("membership-a")[0])["removeDate"]).IsZero() { - t.Fatal("leaving did not close membership") - } - }) -} diff --git a/backend/internal/server/conference_options.go b/backend/internal/server/conference_options.go deleted file mode 100644 index ada2a12..0000000 --- a/backend/internal/server/conference_options.go +++ /dev/null @@ -1,65 +0,0 @@ -package server - -import ( - "math" -) - -// Mongoose minimizes empty option objects, but retains explicit null and other -// falsy scalar values. Match its stored representation and supported casts. -func conferenceOptions(body M) (M, error) { - value, present := body["options"] - if !present { - return M{}, nil - } - if !inputTruthy(value) { - return M{"options": value}, nil - } - switch value.(type) { - case M, map[string]any, []any: - default: - return nil, fail("internal_error", 500) - } - opt := selectFields(obj(value), "expirationMode", "expirationDate", "update", "image", "pdf", "notebook", "link", "page") - for _, key := range []string{"update", "image", "pdf", "notebook", "link", "page"} { - if value, ok := opt[key]; ok { - converted, valid := optionBoolean(value) - if !valid { - return nil, fail("internal_error", 500) - } - opt[key] = converted - } - } - if value, ok := opt["expirationMode"]; ok && value != nil { - converted, valid := termString(value) - if !valid { - return nil, fail("internal_error", 500) - } - opt["expirationMode"] = converted - } - if value, ok := opt["expirationDate"]; ok { - if value == nil || value == "" { - opt["expirationDate"] = nil - } else { - // Mongoose rejects booleans and treats numeric strings outside its - // year range as milliseconds before invoking Date construction. - if _, boolean := value.(bool); boolean { - return nil, fail("internal_error", 500) - } - if text, ok := value.(string); ok { - n := queryWindowNumber(text) - if !math.IsNaN(n) && (n >= 275761 || n < -271820) { - value = n - } - } - parsed, valid, err := javascriptDateValue(value) - if err != nil || !valid { - return nil, fail("internal_error", 500) - } - opt["expirationDate"] = parsed - } - } - if len(opt) == 0 { - return M{}, nil - } - return M{"options": opt}, nil -} diff --git a/backend/internal/server/conference_options_integration_test.go b/backend/internal/server/conference_options_integration_test.go deleted file mode 100644 index 209ea2b..0000000 --- a/backend/internal/server/conference_options_integration_test.go +++ /dev/null @@ -1,81 +0,0 @@ -package server - -import ( - "bytes" - "context" - "encoding/json" - "fmt" - "net/http/httptest" - "reflect" - "testing" - "time" - - "go.mongodb.org/mongo-driver/v2/bson" -) - -func runConferenceOptionsIntegration(t *testing.T, s *Server, token, otherToken string, owner any) { - t.Run("conference option casts persist and appear in public output", func(t *testing.T) { - ctx := context.Background() - id := "conference-options" - seed := M{"_id": bson.NewObjectID(), "conferenceID": id, "name": "Original", "status": "ready", "owners": []any{owner}, "repositories": []any{}, "billing": M{"name": "Private payer"}} - if _, err := s.Store.DB.Collection("conferences").InsertOne(ctx, seed); err != nil { - t.Fatal(err) - } - requestCount := 0 - call := func(method, auth string, body M) *httptest.ResponseRecorder { - raw, _ := json.Marshal(body) - req := httptest.NewRequest(method, "/api/conferences/"+id, bytes.NewReader(raw)) - req.RemoteAddr = fmt.Sprintf("198.51.101.%d:1234", requestCount/40+1) - requestCount++ - req.Header.Set("Authorization", "Bearer "+auth) - req.Header.Set("Content-Type", "application/json") - w := httptest.NewRecorder() - s.ServeHTTP(w, req) - return w - } - for _, c := range conferenceOptionCases(t) { - if _, err := s.Store.update(ctx, "conferences", M{"_id": seed["_id"]}, M{"$set": M{"options": M{"image": true, "link": true}, "name": "Original"}}); err != nil { - t.Fatal(err) - } - body := selectFields(c.Body, "options") - body["name"], body["conferenceID"], body["startDate"], body["endDate"], body["plan"] = "Changed", id, time.Now().Add(-time.Hour), time.Now().Add(time.Hour), M{"planID": "free_conference"} - before, err := s.Store.one(ctx, "conferences", M{"_id": seed["_id"]}) - if err != nil { - t.Fatal(err) - } - w := call("POST", token, body) - current, err := s.Store.one(ctx, "conferences", M{"_id": seed["_id"]}) - if err != nil { - t.Fatal(err) - } - if c.Rejected { - if w.Code != 500 || !reflect.DeepEqual(current, before) { - t.Fatal(c.Name, w.Code, w.Body, "rejected edit changed data") - } - continue - } - if w.Code != 200 { - t.Fatal(c.Name, w.Code, w.Body) - } - stored := selectFields(current, "options") - if raw := obj(stored["options"])["expirationDate"]; raw != nil { - value := date(raw) - obj(stored["options"])["expirationDate"] = responseDate(value) - } - if !reflect.DeepEqual(conferenceOptionsJSON(t, stored), c.Expected) { - t.Fatalf("%s persisted %#v, expected %#v", c.Name, stored, c.Expected) - } - w = call("GET", otherToken, nil) - var output M - if err := json.Unmarshal(w.Body.Bytes(), &output); err != nil { - t.Fatal(err) - } - if w.Code != 200 || !reflect.DeepEqual(selectFields(output, "options"), c.Expected) { - t.Fatal(c.Name, w.Code, w.Body) - } - if _, present := output["billing"]; present { - t.Fatal("billing exposed to non-owner") - } - } - }) -} diff --git a/backend/internal/server/conference_options_test.go b/backend/internal/server/conference_options_test.go deleted file mode 100644 index c5c2854..0000000 --- a/backend/internal/server/conference_options_test.go +++ /dev/null @@ -1,63 +0,0 @@ -package server - -import ( - "encoding/json" - "os" - "reflect" - "testing" - "time" -) - -type conferenceOptionCase struct { - Name string - Body, Expected M - Rejected bool -} - -func conferenceOptionCases(t *testing.T) []conferenceOptionCase { - t.Helper() - raw, err := os.ReadFile("testdata/conference-options.json") - if err != nil { - t.Fatal(err) - } - var cases []conferenceOptionCase - if err := json.Unmarshal(raw, &cases); err != nil { - t.Fatal(err) - } - return cases -} -func TestTypeScriptConferenceOptions(t *testing.T) { - for _, c := range conferenceOptionCases(t) { - t.Run(c.Name, func(t *testing.T) { - got, err := conferenceOptions(c.Body) - if c.Rejected { - if err == nil { - t.Fatal("invalid options accepted") - } - return - } - if err != nil { - t.Fatal(err) - } - if value, ok := obj(got["options"])["expirationDate"].(time.Time); ok { - obj(got["options"])["expirationDate"] = responseDate(value) - } - if !reflect.DeepEqual(conferenceOptionsJSON(t, got), c.Expected) { - t.Fatalf("got %#v, expected %#v", got, c.Expected) - } - }) - } -} - -func conferenceOptionsJSON(t *testing.T, value M) M { - t.Helper() - raw, err := json.Marshal(value) - if err != nil { - t.Fatal(err) - } - var out M - if err := json.Unmarshal(raw, &out); err != nil { - t.Fatal(err) - } - return out -} diff --git a/backend/internal/server/conference_output_test.go b/backend/internal/server/conference_output_test.go deleted file mode 100644 index 959f1b6..0000000 --- a/backend/internal/server/conference_output_test.go +++ /dev/null @@ -1,43 +0,0 @@ -package server - -import ( - "encoding/json" - "os" - "reflect" - "testing" - "time" -) - -func TestTypeScriptConferenceOutput(t *testing.T) { - raw, err := os.ReadFile("testdata/conference-output.json") - if err != nil { - t.Fatal(err) - } - var fixture struct { - Now time.Time - Cases []struct { - Name string - Record M - Expected M - } - } - if err := json.Unmarshal(raw, &fixture); err != nil { - t.Fatal(err) - } - for _, c := range fixture.Cases { - t.Run(c.Name, func(t *testing.T) { - value := conferenceJSONAt(c.Record, fixture.Now) - raw, err := json.Marshal(value) - if err != nil { - t.Fatal(err) - } - var actual M - if err := json.Unmarshal(raw, &actual); err != nil { - t.Fatal(err) - } - if !reflect.DeepEqual(actual, c.Expected) { - t.Fatalf("got %s; expected %+v", raw, c.Expected) - } - }) - } -} diff --git a/backend/internal/server/conference_recovery_integration_test.go b/backend/internal/server/conference_recovery_integration_test.go deleted file mode 100644 index d6e08af..0000000 --- a/backend/internal/server/conference_recovery_integration_test.go +++ /dev/null @@ -1,127 +0,0 @@ -package server - -import ( - "bytes" - "context" - "encoding/json" - "net/http/httptest" - "testing" - "time" - - "go.mongodb.org/mongo-driver/v2/bson" -) - -func runConferenceRecoveryIntegration(t *testing.T, s *Server, token string, owner any) { - t.Run("membership replay retains save time after failure", func(t *testing.T) { - ctx := context.Background() - original, err := s.Store.one(ctx, collection("repo"), M{"repoId": "second-provider"}) - if err != nil { - t.Fatal(err) - } - r := selectFields(original, "source", "providerAccess", "options") - r["_id"], r["repoId"], r["owner"], r["status"], r["conference"] = bson.NewObjectID(), "membership-recovery", owner, "ready", "recovery-a" - r["settingsSavedAt"] = time.Now().Add(-time.Hour).Truncate(time.Millisecond) - if _, err := s.Store.DB.Collection(collection("repo")).InsertOne(ctx, r); err != nil { - t.Fatal(err) - } - for _, id := range []string{"recovery-a", "recovery-b"} { - history := []any{} - if id == "recovery-a" { - history = append(history, M{"id": r["_id"], "addDate": r["settingsSavedAt"]}) - } - c := M{"_id": bson.NewObjectID(), "conferenceID": id, "owners": []any{owner}, "status": "ready", "startDate": time.Now().Add(-time.Hour), "endDate": time.Now().Add(time.Hour), "repositories": history} - if _, err := s.Store.DB.Collection("conferences").InsertOne(ctx, c); err != nil { - t.Fatal(err) - } - } - call := func(to string) *httptest.ResponseRecorder { - source := obj(r["source"]) - body := M{"repoId": r["repoId"], "fullName": source["repositoryName"], "source": M{"provider": "fixture", "branch": source["branch"], "commit": source["commit"]}, "terms": []any{}, "options": M{"expirationMode": "never"}, "conference": to} - raw, _ := json.Marshal(body) - req := httptest.NewRequest("POST", "/api/repo/membership-recovery", bytes.NewReader(raw)) - req.RemoteAddr = "198.51.100.14:1234" - req.Header.Set("Content-Type", "application/json") - req.Header.Set("Authorization", "Bearer "+token) - w := httptest.NewRecorder() - s.ServeHTTP(w, req) - return w - } - validator := func(v M) error { - return s.Store.DB.RunCommand(ctx, bson.D{{Key: "collMod", Value: "conferences"}, {Key: "validator", Value: v}, {Key: "validationLevel", Value: "strict"}, {Key: "validationAction", Value: "error"}}).Err() - } - if err := validator(M{"reject_test_write": M{"$exists": true}}); err != nil { - t.Fatal(err) - } - defer func() { - if err := validator(M{}); err != nil { - t.Error(err) - } - }() - if w := call("recovery-b"); w.Code != 500 { - t.Fatal(w.Code, w.Body) - } - pending, err := s.Store.one(ctx, collection("repo"), M{"_id": r["_id"]}) - if err != nil { - t.Fatal(err) - } - event := obj(pending["conferenceMembership"]) - at := date(event["at"]) - if pending["conference"] != "recovery-b" || at.IsZero() || event["from"] != "recovery-a" || event["to"] != "recovery-b" { - t.Fatal(pending) - } - if err := validator(M{}); err != nil { - t.Fatal(err) - } - if err := s.replayConferenceMemberships(ctx, ""); err != nil { - t.Fatal(err) - } - read := func(id string) M { - t.Helper() - c, err := s.Store.one(ctx, "conferences", M{"conferenceID": id}) - if err != nil { - t.Fatal(err) - } - rows := arr(c["repositories"]) - if len(rows) != 1 { - t.Fatal(id, rows) - } - return obj(rows[0]) - } - if !date(read("recovery-a")["removeDate"]).Equal(at) || !date(read("recovery-b")["addDate"]).Equal(at) { - t.Fatal("replay changed event time") - } - current, err := s.Store.one(ctx, collection("repo"), M{"_id": r["_id"]}) - if err != nil { - t.Fatal(err) - } - if current["conferenceMembership"] != nil { - t.Fatal("completed event remains") - } - if w := call("recovery-a"); w.Code != 200 { - t.Fatal(w.Code, w.Body) - } - latest := date(read("recovery-a")["addDate"]) - if !latest.After(at) { - t.Fatal("transition timestamps did not increase") - } - if err := s.flushConferenceMembership(ctx, pending); err != nil { - t.Fatal(err) - } - if !date(read("recovery-a")["addDate"]).Equal(latest) || !date(read("recovery-a")["removeDate"]).IsZero() || !date(read("recovery-b")["removeDate"]).Equal(latest) { - t.Fatal("stale replay changed newer membership") - } - if _, err := s.Store.update(ctx, collection("repo"), M{"_id": r["_id"]}, M{"$set": M{"status": "removed"}}); err != nil { - t.Fatal(err) - } - c, err := s.Store.one(ctx, "conferences", M{"conferenceID": "recovery-a"}) - if err != nil { - t.Fatal(err) - } - if _, err := s.reconcileConference(ctx, c); err != nil { - t.Fatal(err) - } - if !date(read("recovery-a")["removeDate"]).IsZero() { - t.Fatal("repository status rewrote membership history") - } - }) -} diff --git a/backend/internal/server/conferences.go b/backend/internal/server/conferences.go deleted file mode 100644 index 9a078e3..0000000 --- a/backend/internal/server/conferences.go +++ /dev/null @@ -1,260 +0,0 @@ -package server - -import ( - "go.mongodb.org/mongo-driver/v2/bson" - "math" - "strings" - "time" -) - -var plans = []M{ - {"id": "free_conference", "name": "Free", "pricePerRepo": 0, "storagePerRepo": -1, "description": "
  • Quota is deducted from user account
  • \n
  • No-download
  • \n
  • Conference dashboard
  • "}, - {"id": "premium_conference", "name": "Premium", "pricePerRepo": 0.5, "storagePerRepo": 500 * 8 * 1024, "description": "
  • 500Mo / repository
  • \n
  • Repository download
  • \n
  • Conference dashboard
  • "}, - {"id": "unlimited_conference", "name": "Unlimited", "pricePerRepo": 3, "storagePerRepo": 0, "description": "
  • Unlimited repository size
  • \n
  • Repository download
  • \n
  • Conference dashboard
  • "}, -} - -func conferenceOwner(q *request, c M) bool { - if q.Identity.Admin { - return true - } - for _, v := range arr(c["owners"]) { - if str(v) == q.Identity.ID { - return true - } - } - return false -} -func conferenceJSON(c M) M { - return conferenceJSONAt(c, time.Now()) -} -func conferenceJSONAt(c M, now time.Time) M { - out := selectFields(c, "conferenceID", "name", "url", "startDate", "endDate", "status", "options", "plan", "billing") - today := now - if end := date(c["endDate"]); c["endDate"] != nil && end.Before(today) { - today = end - } - price := float64(0) - plan := obj(c["plan"]) - rate := decimal(plan["pricePerRepository"]) / 30 - if _, present := plan["pricePerRepository"]; !present { - rate = math.NaN() - } - active := 0 - for _, value := range arr(c["repositories"]) { - r := obj(value) - end := today - if removed := date(r["removeDate"]); inputTruthy(r["removeDate"]) && removed.Before(end) { - end = removed - } - if !inputTruthy(r["removeDate"]) { - active++ - } - start := date(r["addDate"]) - // Follow JavaScript's millisecond arithmetic and operation order. A Go - // duration saturates at about 292 years and changes fractional rounding. - days := math.Max(float64(end.UnixMilli())-float64(start.UnixMilli()), 0) / 1000 / 60 / 60 / 24 - charge := float64(days * rate) - price += charge - } - out["price"] = price - if math.IsNaN(price) || math.IsInf(price, 0) { - out["price"] = nil - } - out["nbRepositories"] = active - return out -} -func (s *Server) conferences(q *request) (any, error) { - id := q.Params["id"] - if id == "" && q.R.Method == "GET" { - rows, err := s.Store.list(q.ctx(), "conferences", M{"owners": q.User["_id"]}, 0, nil) - if err != nil { - return nil, err - } - pending, err := s.pendingConferences(q.ctx(), rows) - if err != nil { - return nil, err - } - out := []M{} - for _, c := range rows { - if pending[str(c["conferenceID"])] { - var err error - c, err = s.reconcileConference(q.ctx(), c) - if err != nil { - return nil, err - } - } - if err := s.expireConference(q.ctx(), c); err != nil { - return nil, err - } - out = append(out, conferenceJSON(c)) - } - return out, nil - } - var c M - var err error - if id != "" { - c, err = s.Store.one(q.ctx(), "conferences", M{"conferenceID": id}) - if err != nil { - return nil, err - } - if c == nil { - if q.R.Method == "POST" { - return nil, fail("conference_not_found", 404) - } - if q.R.Method == "DELETE" { - return nil, fail("conf_not_found", 400) - } - return nil, fail("conf_not_found", 404) - } - } - if q.R.Method == "GET" { - if !conferenceOwner(q, c) { - return selectFields(c, "conferenceID", "name", "url", "startDate", "endDate", "options"), nil - } - c, err = s.reconcileConference(q.ctx(), c) - if err != nil { - return nil, err - } - out := conferenceJSON(c) - rows, err := s.Store.list(q.ctx(), "anonymizedrepositories", M{"_id": M{"$in": conferenceRepositoryIDs(c)}}, 0, nil) - if err != nil { - return nil, err - } - repos := []M{} - for _, r := range rows { - repos = append(repos, resourceJSON("repo", r)) - } - out["repositories"] = repos - return out, nil - } - if c != nil && !conferenceOwner(q, c) { - return nil, fail("not_authorized", 401) - } - if q.R.Method == "DELETE" { - c, err = s.reconcileConference(q.ctx(), c) - if err != nil { - return nil, err - } - if err := s.removeConference(q.ctx(), c); err != nil { - return nil, err - } - return q.text("ok"), nil - } - body := q.Body - plan, err := validateConferenceForm(body, time.Now()) - if err != nil { - return nil, err - } - start, end, err := conferenceFormDates(body) - if err != nil { - return nil, err - } - newID := str(body["conferenceID"]) - if c == nil && !resourceID.MatchString(newID) { - return nil, fail("invalid_conference_id", 400) - } - set := selectFields(body, "name", "url") - set["startDate"] = start - set["endDate"] = end - set["status"] = "ready" - options, err := conferenceOptions(body) - if err != nil { - return nil, err - } - for key, value := range options { - set[key] = value - } - if c == nil { - planID := str(obj(body["plan"])["planID"]) - set["_id"] = bson.NewObjectID() - set["conferenceID"] = newID - set["owners"] = []any{q.User["_id"]} - set["repositories"] = []any{} - set["status"] = "ready" - set["dateOfEntry"] = time.Now() - set["plan"] = M{"planID": planID, "pricePerRepository": plan["pricePerRepo"], "quota": M{"size": plan["storagePerRepo"], "file": 0, "repository": 0}} - if body["billing"] != nil { - set["billing"] = selectFields(obj(body["billing"]), "name", "email", "address", "address2", "city", "zip", "country", "vat") - } - if _, err = s.Store.DB.Collection("conferences").InsertOne(q.ctx(), set); err != nil { - return nil, fail("conf_id_used", 400) - } - } else { - update := M{"$set": set} - if _, present := options["options"]; !present { - update["$unset"] = M{"options": ""} - } - if _, err = s.Store.update(q.ctx(), "conferences", M{"_id": c["_id"]}, update); err != nil { - return nil, err - } - } - return q.text("ok"), nil -} -func (s *Server) validateConference(q *request, id string) error { - if strings.TrimSpace(id) == "" { - return nil - } - c, err := s.Store.one(q.ctx(), "conferences", M{"conferenceID": id}) - if err != nil { - return err - } - if c == nil { - return fail("conf_not_found", 404) - } - now := time.Now() - if str(c["status"]) != "ready" || date(c["startDate"]).After(now) || date(c["endDate"]).Before(now) { - return fail("conf_not_activated", 400) - } - return nil -} - -// Keep validation order aligned with the TypeScript form for both creates and -// edits. The selected plan is validated on edits but is only saved on creation. -func validateConferenceForm(body M, now time.Time) (M, error) { - for _, field := range []struct{ name, code string }{ - {"name", "conf_name_missing"}, - {"conferenceID", "conf_id_missing"}, - {"startDate", "conf_start_date_missing"}, - {"endDate", "conf_end_date_missing"}, - } { - if !inputTruthy(body[field.name]) { - return nil, fail(field.code, 400) - } - } - start, startOK, err := javascriptDateValue(body["startDate"]) - if err != nil { - return nil, err - } - end, endOK, err := javascriptDateValue(body["endDate"]) - if err != nil { - return nil, err - } - if startOK && endOK && start.After(end) { - return nil, fail("conf_start_date_invalid", 400) - } - if endOK && now.After(end) { - return nil, fail("conf_end_date_invalid", 400) - } - var plan M - for _, candidate := range plans { - if str(candidate["id"]) == str(obj(body["plan"])["planID"]) { - plan = candidate - break - } - } - if plan == nil { - return nil, fail("invalid_plan", 400) - } - if decimal(plan["pricePerRepo"]) > 0 { - if !inputTruthy(body["billing"]) { - return nil, fail("billing_missing", 400) - } - billing := obj(body["billing"]) - for _, field := range []string{"name", "email", "address", "city", "zip", "country"} { - if !inputTruthy(billing[field]) { - return nil, fail("billing_"+field+"_missing", 400) - } - } - } - return plan, nil -} diff --git a/backend/internal/server/conferences_integration_test.go b/backend/internal/server/conferences_integration_test.go deleted file mode 100644 index 4394465..0000000 --- a/backend/internal/server/conferences_integration_test.go +++ /dev/null @@ -1,153 +0,0 @@ -package server - -import ( - "bytes" - "context" - "encoding/json" - "fmt" - "net/http/httptest" - "reflect" - "testing" - "time" - - "go.mongodb.org/mongo-driver/v2/bson" -) - -func runConferenceFormIntegration(t *testing.T, s *Server, token, otherToken string, owner any) { - t.Run("conference forms preserve history and restore status", func(t *testing.T) { - ctx := context.Background() - call := func(method, id, auth string, body M) *httptest.ResponseRecorder { - raw, _ := json.Marshal(body) - path := "/api/conferences" - if id != "" { - path += "/" + id - } - req := httptest.NewRequest(method, path, bytes.NewReader(raw)) - req.RemoteAddr = "198.51.100.10:1234" - req.Header.Set("Authorization", "Bearer "+auth) - req.Header.Set("Content-Type", "application/json") - w := httptest.NewRecorder() - s.ServeHTTP(w, req) - return w - } - valid := func() M { - return M{"name": "Updated", "conferenceID": "ignored-edit-id", "startDate": time.Now().Add(-time.Hour), "endDate": time.Now().Add(24 * time.Hour), "plan": M{"planID": "free_conference"}, "options": M{"image": true}} - } - checkError := func(w *httptest.ResponseRecorder, status int, code string) { - t.Helper() - var response M - if err := json.Unmarshal(w.Body.Bytes(), &response); err != nil { - t.Fatal(err, w.Body) - } - if w.Code != status || str(response["error"]) != code { - t.Fatalf("want %d %s, got %d %s", status, code, w.Code, w.Body) - } - } - for _, status := range []string{"ready", "expired", "removed"} { - id := "conference-form-" + status - document := M{"_id": bson.NewObjectID(), "conferenceID": id, "name": "Original", "owners": []any{owner}, "status": status, - "plan": M{"planID": "premium_conference", "pricePerRepository": 0.5}, "billing": M{"name": "Original payer"}, - "repositories": []any{M{"id": bson.NewObjectID(), "addDate": time.Now().Add(-48 * time.Hour).Truncate(time.Millisecond), "removeDate": time.Now().Add(-24 * time.Hour).Truncate(time.Millisecond)}}} - if _, err := s.Store.DB.Collection("conferences").InsertOne(ctx, document); err != nil { - t.Fatal(err) - } - before, err := s.Store.one(ctx, "conferences", M{"conferenceID": id}) - if err != nil { - t.Fatal(err) - } - checkError(call("POST", id, otherToken, M{}), 401, "not_authorized") - checkError(call("POST", id, token, M{}), 400, "conf_name_missing") - body := valid() - body["plan"] = M{"planID": "unknown"} - checkError(call("POST", id, token, body), 400, "invalid_plan") - body = valid() - body["plan"] = M{"planID": "premium_conference"} - checkError(call("POST", id, token, body), 400, "billing_missing") - after, err := s.Store.one(ctx, "conferences", M{"conferenceID": id}) - if err != nil { - t.Fatal(err) - } - if !reflect.DeepEqual(before, after) { - t.Fatal("rejected edit mutated conference") - } - body = valid() - body["billing"] = M{"name": "Ignored payer"} - w := call("POST", id, token, body) - if w.Code != 200 || w.Body.String() != "ok" { - t.Fatal(w.Code, w.Body) - } - after, err = s.Store.one(ctx, "conferences", M{"conferenceID": id}) - if err != nil { - t.Fatal(err) - } - if after["status"] != "ready" || after["name"] != "Updated" { - t.Fatal(after) - } - for _, field := range []string{"_id", "conferenceID", "owners", "repositories", "plan", "billing"} { - if !reflect.DeepEqual(after[field], before[field]) { - t.Fatal("edit changed", field) - } - } - } - checkError(call("POST", "conference-missing", token, valid()), 404, "conference_not_found") - checkError(call("GET", "conference-missing", token, nil), 404, "conf_not_found") - checkError(call("DELETE", "conference-missing", token, nil), 400, "conf_not_found") - body := valid() - body["conferenceID"] = "conference-form-create" - w := call("POST", "", token, body) - if w.Code != 200 { - t.Fatal(w.Code, w.Body) - } - created, err := s.Store.one(ctx, "conferences", M{"conferenceID": body["conferenceID"]}) - if err != nil { - t.Fatal(err) - } - if created["status"] != "ready" || len(arr(created["repositories"])) != 0 || str(obj(created["plan"])["planID"]) != "free_conference" { - t.Fatal(created) - } - expectedDate := time.Date(2099, 3, 1, 0, 0, 0, 0, time.UTC) - for index, test := range []struct { - Value any - Expected time.Time - }{ - {"March 1 2099", expectedDate}, {"2099-02-29", expectedDate}, {"2099-02-28T24:00:00Z", expectedDate}, - {[]string{"2099", "3", "1"}, expectedDate}, {float64(expectedDate.UnixMilli()), expectedDate}, - {"0001-01-01", time.Date(1, 1, 1, 0, 0, 0, 0, time.UTC)}, {true, time.UnixMilli(1).UTC()}, - } { - id := fmt.Sprintf("conference-date-%d", index) - body := valid() - body["conferenceID"] = id - body["startDate"] = test.Value - body["endDate"] = "April 1 2099" - w := call("POST", "", token, body) - if w.Code != 200 { - t.Fatal("date creation", test, w.Code, w.Body) - } - document, err := s.Store.one(ctx, "conferences", M{"conferenceID": id}) - if err != nil || !date(document["startDate"]).Equal(test.Expected) || !date(document["endDate"]).Equal(time.Date(2099, 4, 1, 0, 0, 0, 0, time.UTC)) { - t.Fatal("stored date", test, document, err) - } - body["startDate"] = "May 1 2099" - body["endDate"] = []string{"2099", "6", "1"} - if w = call("POST", id, token, body); w.Code != 200 { - t.Fatal("date edit", w.Code, w.Body) - } - before, err := s.Store.one(ctx, "conferences", M{"conferenceID": id}) - if err != nil { - t.Fatal(err) - } - if !date(before["startDate"]).Equal(time.Date(2099, 5, 1, 0, 0, 0, 0, time.UTC)) || !date(before["endDate"]).Equal(time.Date(2099, 6, 1, 0, 0, 0, 0, time.UTC)) { - t.Fatal("edited dates", before) - } - for _, invalid := range []any{"invalid", M{"toString": "bad"}} { - body["startDate"] = invalid - checkError(call("POST", id, token, body), 500, "internal_error") - after, err := s.Store.one(ctx, "conferences", M{"conferenceID": id}) - if err != nil || !reflect.DeepEqual(before, after) { - t.Fatal("invalid date mutated conference", err) - } - } - } - - }) -} diff --git a/backend/internal/server/conferences_test.go b/backend/internal/server/conferences_test.go deleted file mode 100644 index c533657..0000000 --- a/backend/internal/server/conferences_test.go +++ /dev/null @@ -1,52 +0,0 @@ -package server - -import ( - "encoding/json" - "errors" - "os" - "testing" - "time" -) - -type conferenceFormCase struct { - Name string - Body M - Expected *struct { - Code string - Status int - } -} - -func conferenceFormCases(t *testing.T) (time.Time, []conferenceFormCase) { - t.Helper() - raw, err := os.ReadFile("testdata/conferences.json") - if err != nil { - t.Fatal(err) - } - var fixture struct { - Now time.Time - Cases []conferenceFormCase - } - if err := json.Unmarshal(raw, &fixture); err != nil { - t.Fatal(err) - } - return fixture.Now, fixture.Cases -} -func TestTypeScriptConferenceForms(t *testing.T) { - now, cases := conferenceFormCases(t) - for _, c := range cases { - t.Run(c.Name, func(t *testing.T) { - _, err := validateConferenceForm(c.Body, now) - if c.Expected == nil { - if err != nil { - t.Fatal(err) - } - return - } - var api *APIError - if !errors.As(err, &api) || api.Code != c.Expected.Code || api.Status != c.Expected.Status { - t.Fatalf("got %v; expected %+v", err, c.Expected) - } - }) - } -} diff --git a/backend/internal/server/config.go b/backend/internal/server/config.go deleted file mode 100644 index 2ce70a3..0000000 --- a/backend/internal/server/config.go +++ /dev/null @@ -1,125 +0,0 @@ -package server - -import ( - "errors" - "github.com/tdurieux/anonymous_github/backend/internal/blobcache" - "github.com/tdurieux/anonymous_github/backend/internal/security" - "math" - "net" - "net/url" - "os" - "path/filepath" - "strconv" - "strings" - "time" -) - -type Config struct { - GitHubPermissionTTL time.Duration - SharedCacheDecisions bool - SharedResultBytes int64 - SharedCacheEnabled bool - SharedCache blobcache.Options - Storage, S3Bucket, S3Region, S3Endpoint, S3ID, S3Secret string - Address, MongoURI, Database, RedisAddress, SessionSecret, Root, PublicDir, Hostname, Mask string - ClientID, ClientSecret, Callback string - AppID, AppClientID, AppClientSecret, AppCallback, AppSlug, AppPrivateKey, AppWebhookSecret string - AppEnabled, AppNewConnections, OAuthEnabled, Download, SecureCookies bool - CacheMonitoring bool - TrustedHops int - RateLimit, Workers int - Cipher *security.Cipher - TrustedProxies []*net.IPNet -} - -func env(key, fallback string) string { - if s, ok := os.LookupEnv(key); ok { - return s - } - return fallback -} -func envBool(key string, fallback bool) bool { - s, ok := os.LookupEnv(key) - if !ok { - return fallback - } - return s == "true" || s == "1" -} -func envInt(key string, fallback int) int { - v, err := strconv.Atoi(os.Getenv(key)) - if err != nil || v <= 0 { - return fallback - } - return v -} -func LoadConfig() (Config, error) { - c := Config{CacheMonitoring: envBool("CACHE_MONITORING_ENABLED", true), Storage: env("STORAGE", "filesystem"), S3Bucket: os.Getenv("S3_BUCKET"), S3Region: os.Getenv("S3_REGION"), S3Endpoint: os.Getenv("S3_ENDPOINT"), S3ID: os.Getenv("S3_CLIENT_ID"), S3Secret: os.Getenv("S3_CLIENT_SECRET"), Address: ":" + env("PORT", "5000"), MongoURI: os.Getenv("MONGODB_URI"), Database: env("MONGODB_DATABASE", "production"), RedisAddress: net.JoinHostPort(env("REDIS_HOSTNAME", "redis"), env("REDIS_PORT", "6379")), SessionSecret: os.Getenv("SESSION_SECRET"), Root: env("FOLDER", "repositories"), PublicDir: env("PUBLIC_DIR", "public"), Hostname: env("APP_HOSTNAME", "localhost:5000"), Mask: env("ANONYMIZATION_MASK", "XXXX"), ClientID: os.Getenv("CLIENT_ID"), ClientSecret: os.Getenv("CLIENT_SECRET"), Callback: env("AUTH_CALLBACK", "http://localhost:5000/github/auth"), AppID: os.Getenv("GITHUB_APP_ID"), AppClientID: os.Getenv("GITHUB_APP_CLIENT_ID"), AppClientSecret: os.Getenv("GITHUB_APP_CLIENT_SECRET"), AppCallback: env("GITHUB_APP_CALLBACK", "http://localhost:5000/github/app/callback"), AppSlug: os.Getenv("GITHUB_APP_SLUG"), AppPrivateKey: os.Getenv("GITHUB_APP_PRIVATE_KEY"), AppWebhookSecret: os.Getenv("GITHUB_APP_WEBHOOK_SECRET"), AppEnabled: envBool("GITHUB_APP_ENABLED", false), AppNewConnections: envBool("GITHUB_APP_NEW_CONNECTIONS", true), OAuthEnabled: envBool("GITHUB_OAUTH_ENABLED", true), Download: envBool("ENABLE_DOWNLOAD", true), SecureCookies: envBool("COOKIE_SECURE", os.Getenv("NODE_ENV") == "production"), RateLimit: envInt("RATE_LIMIT", 1000), Workers: envInt("ANONYMIZATION_WORKERS", 1)} - if raw, ok := os.LookupEnv("GITHUB_PERMISSION_CACHE_SECONDS"); ok { - seconds, err := strconv.Atoi(raw) - if err != nil || seconds < 0 || seconds > 3600 { - return c, errors.New("invalid_GITHUB_PERMISSION_CACHE_SECONDS") - } - c.GitHubPermissionTTL = time.Duration(seconds) * time.Second - } - c.SharedCacheEnabled = envBool("SHARED_CACHE_ENABLED", false) - c.SharedCacheDecisions = envBool("SHARED_CACHE_DECISIONS", true) - c.SharedResultBytes = 512 * 1024 * 1024 - saving, low := 0.1, 0.9 - for key, value := range map[string]*float64{"SHARED_CACHE_GZIP_MIN_SAVING": &saving, "SHARED_CACHE_LOW_WATER": &low} { - if raw, ok := os.LookupEnv(key); ok { - parsed, err := strconv.ParseFloat(raw, 64) - if err != nil || math.IsNaN(parsed) || math.IsInf(parsed, 0) || parsed < 0 || parsed > 1 { - return c, errors.New("invalid_" + key) - } - *value = parsed - } - } - c.SharedCache = blobcache.Options{Root: env("SHARED_CACHE_PATH", filepath.Join(c.Root, ".shared-cache-v1")), Budget: 10 * 1024 * 1024 * 1024, MaxObject: 32 * 1024 * 1024, Gzip: envBool("SHARED_CACHE_GZIP", true), Saving: &saving, LowWater: &low, FreeBytes: 1024 * 1024 * 1024} - for key, dest := range map[string]*int64{"SHARED_CACHE_RESULT_BYTES": &c.SharedResultBytes, "SHARED_CACHE_BYTES": &c.SharedCache.Budget, "SHARED_CACHE_MAX_FILE_BYTES": &c.SharedCache.MaxObject} { - if raw, ok := os.LookupEnv(key); ok { - value, err := strconv.ParseInt(raw, 10, 64) - if err != nil || value <= 0 { - return c, errors.New("invalid_" + key) - } - *dest = value - } - } - if raw, ok := os.LookupEnv("SHARED_CACHE_FREE_BYTES"); ok { - value, err := strconv.ParseInt(raw, 10, 64) - if err != nil || value < 0 { - return c, errors.New("invalid_SHARED_CACHE_FREE_BYTES") - } - c.SharedCache.FreeBytes = value - } - if c.SessionSecret == "" { - return c, errors.New("SESSION_SECRET is required") - } - if c.MongoURI == "" { - c.MongoURI = "mongodb://" + url.UserPassword(os.Getenv("DB_USERNAME"), os.Getenv("DB_PASSWORD")).String() + "@" + net.JoinHostPort(env("DB_HOSTNAME", "mongodb"), "27017") + "/production?authSource=admin" - } else { - u, e := url.Parse(c.MongoURI) - if e != nil { - return c, errors.New("invalid_mongodb_uri") - } - if u.Path != "" && u.Path != "/" { - c.Database = strings.TrimPrefix(u.Path, "/") - } - } - var err error - c.Cipher, err = security.NewCipher(os.Getenv("CREDENTIAL_KEYS"), os.Getenv("CREDENTIAL_ACTIVE_KEY_ID")) - if err != nil { - return c, err - } - if err = configureProxy(&c, os.Getenv("TRUST_PROXY")); err != nil { - return c, err - } - - if file := os.Getenv("GITHUB_APP_PRIVATE_KEY_FILE"); file != "" { - b, e := os.ReadFile(file) - if e != nil { - return c, errors.New("cannot_read_app_private_key") - } - c.AppPrivateKey = string(b) - } - return c, nil -} diff --git a/backend/internal/server/connection_migration_integration_test.go b/backend/internal/server/connection_migration_integration_test.go deleted file mode 100644 index bd5a70b..0000000 --- a/backend/internal/server/connection_migration_integration_test.go +++ /dev/null @@ -1,144 +0,0 @@ -package server - -import ( - "context" - "encoding/json" - "io" - "net/http" - "net/http/httptest" - "strings" - "testing" - "time" - - "go.mongodb.org/mongo-driver/v2/bson" -) - -func runConnectionMigrationIntegration(t *testing.T, base *Server) { - t.Run("connection migration preserves immutable identity and concurrent bindings", func(t *testing.T) { - ctx := context.Background() - db := base.Store.DB.Client().Database("connection_migration_" + bson.NewObjectID().Hex()) - defer db.Drop(ctx) - for _, scenario := range []string{"rename", "preview", "replacement", "stale-pr", "fresh-pr", "changed-binding", "changed-status-date", "wrong-id-type"} { - t.Run(scenario, func(t *testing.T) { - owner, cached := bson.NewObjectID(), bson.NewObjectID() - s := &Server{Config: base.Config, Store: &Store{DB: db, Redis: base.Store.Redis}} - s.Config.AppEnabled = true - s.Config.AppNewConnections = true - user := M{"_id": owner, "username": owner.Hex(), "status": "active"} - if _, err := db.Collection("users").InsertOne(ctx, user); err != nil { - t.Fatal(err) - } - req := httptest.NewRequest("POST", "/github/connections/migrate", nil) - req.Header.Set("X-CSRF-Token", "synthetic-csrf") - q := &request{Server: s, User: user, R: req, W: httptest.NewRecorder(), Session: M{"githubConnectionCSRF": "synthetic-csrf"}} - if err := s.saveGrant(q, owner, "github-app-user", M{"access_token": "synthetic-app-token", "refresh_token": "synthetic-refresh", "expires_in": float64(3600), "refresh_token_expires_in": float64(7200)}); err != nil { - t.Fatal(err) - } - kind, typ, nameField := "repo", "repository", "repositoryName" - if strings.Contains(scenario, "pr") && scenario != "preview" || scenario == "changed-status-date" { - kind, typ, nameField = "pr", "pull-request", "repositoryFullName" - } - status := "ready" - statusDate := time.Now().Add(-10 * time.Minute) - if kind == "pr" { - status = "download" - } - if scenario == "fresh-pr" { - statusDate = time.Now() - } - id := owner.Hex() - // Ordered source and binding documents catch embedded-document equality bugs. - source := bson.D{{Key: nameField, Value: "old/project"}, {Key: "provider", Value: "github"}, {Key: "commit", Value: strings.Repeat("a", 40)}, {Key: "pullRequestId", Value: int64(7)}, {Key: "repositoryId", Value: cached}} - binding := bson.D{{Key: "publicRead", Value: true}, {Key: "repositoryId", Value: int64(10)}, {Key: "kind", Value: "github-app"}, {Key: "revision", Value: "original"}} - if _, err := db.Collection(collection(kind)).InsertOne(ctx, M{idKey(kind): id, "owner": owner, "status": status, "statusDate": statusDate, "source": source, "githubAccess": binding}); err != nil { - t.Fatal(err) - } - if _, err := db.Collection("repositories").InsertOne(ctx, M{"_id": cached, "externalId": "gh_10", "name": "old/project", "url": "https://github.com/old/project"}); err != nil { - t.Fatal(err) - } - q.Body = M{"type": typ, "id": id, "connection": "github-app", "preview": scenario == "preview"} - if scenario == "wrong-id-type" { - q.Body["id"] = 123 - } - calls := 0 - s.HTTP = &http.Client{Transport: roundTrip(func(r *http.Request) (*http.Response, error) { - calls++ - var data M - switch { - case r.URL.Path == "/user/installations": - data = M{"installations": []any{}} - case r.URL.Path == "/repositories/10" || r.URL.Path == "/repos/new/project": - repositoryID := 10 - if scenario == "replacement" { - repositoryID = 11 - } - data = M{"id": repositoryID, "full_name": "new/project", "private": false, "visibility": "public"} - case strings.HasPrefix(r.URL.Path, "/repos/new/project/commits/") || r.URL.Path == "/repos/new/project/pulls/7": - data = M{"id": 7} - if scenario == "changed-binding" { - // Preserve the revision to ensure the full binding is compared. - if _, err := s.Store.update(ctx, collection(kind), M{idKey(kind): id}, M{"$set": M{"githubAccess.repositoryId": int64(99)}}); err != nil { - t.Fatal(err) - } - } - if scenario == "changed-status-date" { - if _, err := s.Store.update(ctx, collection(kind), M{idKey(kind): id}, M{"$set": M{"statusDate": time.Now()}}); err != nil { - t.Fatal(err) - } - } - default: - t.Fatal("migration followed old/replacement name", r.URL) - } - body, err := json.Marshal(data) - if err != nil { - t.Fatal(err) - } - return &http.Response{StatusCode: 200, Header: http.Header{}, Body: io.NopCloser(strings.NewReader(string(body)))}, nil - })} - _, err := s.connections(q) - expected := "" - switch scenario { - case "replacement", "changed-binding", "changed-status-date": - expected = "connection_changed" - case "fresh-pr": - expected = "repository_busy" - case "wrong-id-type": - expected = "invalid_connection" - } - if expected == "" && err != nil || expected != "" && (err == nil || err.Error() != expected) { - t.Fatal("unexpected migration result", err, expected) - } - if (scenario == "fresh-pr" || scenario == "wrong-id-type") && calls != 0 { - t.Fatal("invalid migration contacted GitHub") - } - saved, err := s.Store.one(ctx, collection(kind), M{idKey(kind): id}) - if err != nil { - t.Fatal(err) - } - metadata, err := s.Store.one(ctx, "repositories", M{"_id": cached}) - if err != nil { - t.Fatal(err) - } - applied := expected == "" && scenario != "preview" - if applied { - if obj(saved["source"])[nameField] != "new/project" || number(obj(saved["githubAccess"])["repositoryId"]) != 10 || obj(saved["githubAccess"])["revision"] == "original" { - t.Fatal("rename or binding not saved", saved) - } - if kind == "repo" && (metadata["name"] != "new/project" || metadata["url"] != "https://github.com/new/project") { - t.Fatal("shared identity metadata not renamed", metadata) - } - } else { - if obj(saved["source"])[nameField] != "old/project" { - t.Fatal("preview/failure changed source") - } - if scenario == "preview" && (metadata["name"] != "old/project" || obj(saved["githubAccess"])["revision"] != "original") { - t.Fatal("preview wrote state") - } - if scenario == "changed-binding" && number(obj(saved["githubAccess"])["repositoryId"]) != 99 { - t.Fatal("concurrent binding overwritten") - } - } - }) - } - }) -} diff --git a/backend/internal/server/connection_reads.go b/backend/internal/server/connection_reads.go deleted file mode 100644 index 14e0c86..0000000 --- a/backend/internal/server/connection_reads.go +++ /dev/null @@ -1,65 +0,0 @@ -package server - -import ( - "context" - "errors" - - "go.mongodb.org/mongo-driver/v2/mongo" - "go.mongodb.org/mongo-driver/v2/mongo/options" -) - -func (s *Server) connectionGrants(ctx context.Context, owner any) ([]M, error) { - cursor, err := s.Store.DB.Collection("credentials").Find(ctx, M{"ownerId": owner, "provider": M{"$in": []string{"github", "github-app-user"}}}, options.Find().SetProjection(M{"_id": 0, "provider": 1, "revoked": 1})) - if err != nil { - return nil, err - } - defer cursor.Close(ctx) - rows := []M{} - err = cursor.All(ctx, &rows) - return rows, err -} - -func (s *Server) storedGrantEnvelope(ctx context.Context, owner any, provider string) (M, error) { - var row M - err := s.Store.DB.Collection("credentials").FindOne(ctx, M{"ownerId": owner, "provider": provider}, options.FindOne().SetProjection(M{"_id": 0, "encryptedToken": 1})).Decode(&row) - if errors.Is(err, mongo.ErrNoDocuments) { - return nil, nil - } - return row, err -} - -// Stream only the fields displayed by the connection page. Large PR payloads, -// source credentials and provider-private metadata never enter the summary read. -func (s *Server) connectionResources(ctx context.Context, owner any) ([]M, error) { - resources := []M{} - for _, kind := range []string{"repo", "pr"} { - typ, nameField := "repository", "repositoryName" - if kind == "pr" { - typ, nameField = "pull-request", "repositoryFullName" - } - projection := M{"_id": 0, idKey(kind): 1, "source." + nameField: 1, "githubAccess.kind": 1, "status": 1, "statusDate": 1} - cursor, err := s.Store.DB.Collection(collection(kind)).Find(ctx, githubSources(M{"owner": owner, "status": M{"$ne": "removed"}}), options.Find().SetProjection(projection)) - if err != nil { - return nil, err - } - err = func() error { - defer cursor.Close(ctx) - for cursor.Next(ctx) { - var row M - if err := cursor.Decode(&row); err != nil { - return err - } - connection := str(obj(row["githubAccess"])["kind"]) - if connection == "" { - connection = "oauth" - } - resources = append(resources, M{"type": typ, "id": row[idKey(kind)], "name": str(obj(row["source"])[nameField]), "connection": connection, "status": row["status"], "statusDate": row["statusDate"]}) - } - return cursor.Err() - }() - if err != nil { - return nil, err - } - } - return resources, nil -} diff --git a/backend/internal/server/connections.go b/backend/internal/server/connections.go deleted file mode 100644 index a9764af..0000000 --- a/backend/internal/server/connections.go +++ /dev/null @@ -1,389 +0,0 @@ -package server - -import ( - "bytes" - "context" - "crypto/subtle" - "encoding/json" - "errors" - "github.com/tdurieux/anonymous_github/backend/internal/security" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/mongo" - "go.mongodb.org/mongo-driver/v2/mongo/options" - "io" - "net/http" - "net/url" - "time" -) - -func (s *Server) connections(q *request) (any, error) { - if q.R.Method != "GET" { - csrf := str(q.Session["githubConnectionCSRF"]) - if csrf == "" || subtle.ConstantTimeCompare([]byte(csrf), []byte(q.R.Header.Get("X-CSRF-Token"))) != 1 { - return nil, fail("invalid_auth_state", 403) - } - } - if q.R.Method == "GET" { - if str(q.Session["githubConnectionCSRF"]) == "" { - token, e := security.RandomToken() - if e != nil { - return nil, e - } - q.Session["githubConnectionCSRF"] = token - } - if e := q.saveSession(false); e != nil { - return nil, e - } - grants, e := s.connectionGrants(q.ctx(), q.User["_id"]) - if e != nil { - return nil, e - } - app, seenApp := false, false - for _, g := range grants { - if str(g["provider"]) == "github-app-user" { - seenApp = true - app = !boolean(g["revoked"]) - } - } - oauthToken, e := s.storedGrantToken(q.ctx(), q.User["_id"], "github") - if e != nil { - return nil, e - } - installations := []M{} - out := M{"csrf": q.Session["githubConnectionCSRF"], "appEnabled": s.Config.AppEnabled && s.Config.AppNewConnections, "oauthEnabled": s.Config.OAuthEnabled, "oauthConnected": oauthToken != "", "appConnected": app, "gistConnection": "oauth"} - if seenApp && s.Config.AppEnabled { - out["gistConnection"] = "github-app" - } - if app && s.Config.AppEnabled { - items, e := s.installations(q.ctx(), q.User["_id"]) - if e != nil { - out["appError"] = "github_app_reconnect_required" - var api *APIError - if errors.As(e, &api) { - out["appError"] = api.Code - } - } else { - for _, v := range items { - installations = append(installations, M{"id": v["id"], "account": obj(v["account"])["login"], "suspended": inputTruthy(v["suspended_at"])}) - } - } - } - out["installations"] = installations - resources, e := s.connectionResources(q.ctx(), q.User["_id"]) - if e != nil { - return nil, e - } - count, e := s.Store.DB.Collection(collection("gist")).CountDocuments(q.ctx(), githubSources(M{"owner": q.User["_id"], "status": M{"$ne": "removed"}})) - if e != nil { - return nil, e - } - out["gistCount"] = count - out["resources"] = resources - return out, nil - } - if q.R.URL.Path == "/github/connections/disconnect-oauth" { - if _, e := s.installations(q.ctx(), q.User["_id"]); e != nil { - return nil, fail("another_login_required", 409) - } - for _, kind := range []string{"repo", "pr"} { - r, e := s.Store.one(q.ctx(), collection(kind), githubSources(M{"owner": q.User["_id"], "status": M{"$ne": "removed"}, "githubAccess.kind": M{"$ne": "github-app"}})) - if e != nil { - return nil, e - } - if r != nil { - return nil, fail("oauth_resources_remaining", 409) - } - } - if e := s.revokeGrant(q.ctx(), q.User["_id"], "github"); e != nil { - return nil, e - } - return M{"disconnected": true}, nil - } - resourceID, validID := q.Body["id"].(string) - if !validID { - return nil, fail("invalid_connection", 400) - } - kind := "repo" - if str(q.Body["type"]) == "pull-request" { - kind = "pr" - } else if str(q.Body["type"]) != "repository" { - return nil, fail("invalid_connection", 400) - } - conn := str(q.Body["connection"]) - if conn != "oauth" && conn != "github-app" { - return nil, fail("invalid_connection", 400) - } - if conn == "github-app" && (!s.Config.AppEnabled || !s.Config.AppNewConnections) { - return nil, fail("github_app_disabled", 503) - } - filter := resourceFilter(kind, resourceID) - filter["owner"] = q.User["_id"] - var raw bson.Raw - findOptions := options.FindOne() - if kind == "repo" { - findOptions.SetCollation(&options.Collation{Locale: "en", Strength: 2}) - } - e := s.Store.DB.Collection(collection(kind)).FindOne(q.ctx(), filter, findOptions).Decode(&raw) - if errors.Is(e, mongo.ErrNoDocuments) { - return nil, fail("repo_not_found", 404) - } - if e != nil { - return nil, e - } - var r M - if e = bson.Unmarshal(raw, &r); e != nil { - return nil, e - } - if r == nil || str(r["status"]) == "removed" || str(r["status"]) == "archived" { - return nil, fail("repo_not_found", 404) - } - stalePR := kind == "pr" && str(r["status"]) == "download" && (date(r["statusDate"]).IsZero() || !date(r["statusDate"]).After(time.Now().Add(-5*time.Minute))) - if !stalePR { - switch str(r["status"]) { - case "preparing", "queue", "download", "removing", "expiring": - return nil, fail("repository_busy", 409) - } - } - source := obj(r["source"]) - id, e := sourceProvider(source) - if e != nil { - return nil, e - } - if id != "github" { - return nil, fail("provider_capability_not_supported", 400) - } - name := str(source["repositoryName"]) - if kind == "pr" { - name = str(source["repositoryFullName"]) - } - old := obj(r["githubAccess"]) - repositoryID := "" - if str(old["kind"]) == "github-app" && conn == "github-app" { - repositoryID = str(old["repositoryId"]) - } - token, binding, fullName, e := s.selectAccessIdentity(q.ctx(), q.User["_id"], name, conn, repositoryID) - if e != nil { - return nil, e - } - if str(old["kind"]) == "github-app" && conn == "github-app" && str(old["repositoryId"]) != str(binding["repositoryId"]) { - return nil, fail("connection_changed", 409) - } - resolvedName := name - if fullName != "" { - resolvedName = fullName - } - endpoint := "/repos/" + resolvedName + "/commits/" + segment(str(source["commit"])) - if kind == "pr" { - endpoint = "/repos/" + resolvedName + "/pulls/" + segment(str(source["pullRequestId"])) - } - if _, e = s.github(q.ctx(), "GET", endpoint, token, nil); e != nil { - return nil, e - } - if boolean(q.Body["preview"]) { - return M{"eligible": true, "connection": conn}, nil - } - if kind == "repo" && source["repositoryId"] != nil && fullName != "" && str(binding["kind"]) == "github-app" { - cachedID, err := oid(str(source["repositoryId"])) - if err != nil { - return nil, err - } - if _, err = s.Store.update(q.ctx(), "repositories", M{"_id": cachedID, "externalId": "gh_" + str(binding["repositoryId"])}, M{"$set": M{"name": fullName, "url": "https://github.com/" + fullName}}); err != nil { - return nil, err - } - } - cas := revisionFilter(r) - cas["source"] = raw.Lookup("source") - if bindingValue, err := raw.LookupErr("githubAccess"); err == nil { - cas["githubAccess"] = bindingValue - } else { - cas["githubAccess"] = M{"$exists": false} - } - cas["owner"] = q.User["_id"] - fields := M{"githubAccess": binding} - if fullName != "" && fullName != name { - field := "source.repositoryName" - if kind == "pr" { - field = "source.repositoryFullName" - } - fields[field] = fullName - } - ok, e := s.Store.update(q.ctx(), collection(kind), cas, M{"$set": fields}) - if e != nil { - return nil, e - } - if !ok { - return nil, fail("connection_changed", 409) - } - return M{"connection": conn}, nil -} -func (s *Server) appInstall(q *request) (any, error) { - if !s.Config.AppEnabled || !s.Config.AppNewConnections { - return nil, fail("github_app_disabled", 503) - } - if q.R.URL.Path == "/github/app/setup" { - flow := obj(q.Session["githubInstallFlow"]) - delete(q.Session, "githubInstallFlow") - if e := q.saveSession(false); e != nil { - return nil, e - } - if !q.Identity.Active() { - return q.redirect("/github/app/login"), nil - } - query := parseExtendedQuery(q.R.URL.RawQuery).object - state, scalarState := query["state"].scalarValue() - owned := str(flow["ownerId"]) == q.Identity.ID && number(flow["expires"]) > time.Now().UnixMilli() - if !query["state"].truthy() { - if owned { - return q.redirect(security.ReturnTo(str(flow["returnTo"]), "/connections")), nil - } - return q.redirect("/connections"), nil - } - if !scalarState || str(flow["ownerId"]) != q.Identity.ID || number(flow["expires"]) < time.Now().UnixMilli() || subtle.ConstantTimeCompare([]byte(state), []byte(str(flow["state"]))) != 1 { - return nil, fail("invalid_auth_state", 400) - } - setupAction, _ := query["setup_action"].scalarValue() - if setupAction != "request" { - items, e := s.installations(q.ctx(), q.User["_id"]) - if e != nil { - return nil, e - } - found := false - for _, v := range items { - installationID, scalarID := query["installation_id"].scalarValue() - found = found || (scalarID && str(v["id"]) == installationID) - } - if !found { - return nil, fail("github_app_access_required", 403) - } - } - if _, e := s.Store.update(q.ctx(), "users", M{"_id": q.User["_id"]}, M{"$set": M{"repositories": []any{}}, "$inc": M{"repositoryDiscoveryRevision": 1}}); e != nil { - return nil, e - } - return q.redirect(security.ReturnTo(str(flow["returnTo"]), "/connections")), nil - } - if !q.Identity.Active() { - return nil, fail("not_connected", 401) - } - items, e := s.installations(q.ctx(), q.User["_id"]) - if e != nil { - return nil, e - } - query := parseExtendedQuery(q.R.URL.RawQuery).object - target, e := s.installationTarget(q.ctx(), q.User["_id"], query, items) - if e != nil { - return nil, e - } - state, e := security.RandomToken() - if e != nil { - return nil, e - } - returnTo, _ := query["returnTo"].scalarValue() - q.Session["githubInstallFlow"] = M{"state": state, "ownerId": q.Identity.ID, "expires": time.Now().Add(10 * time.Minute).UnixMilli(), "returnTo": security.ReturnTo(returnTo, "/connections")} - if e = q.saveSession(false); e != nil { - return nil, e - } - destination, e := url.Parse(target) - if e != nil { - return nil, e - } - values := destination.Query() - values.Set("state", state) - destination.RawQuery = values.Encode() - return q.redirect(destination.String()), nil -} - -// storedGrantToken mirrors the encrypted-token read used by TypeScript's -// connection summary and revocation. It does not refresh or reject old grants. -func (s *Server) storedGrantToken(ctx context.Context, owner any, provider string) (string, error) { - row, err := s.storedGrantEnvelope(ctx, owner, provider) - if err != nil { - return "", err - } - if row == nil { - return "", nil - } - encrypted, err := envelope(row["encryptedToken"]) - if err != nil { - return "", fail("credential_decryption_failed", 500) - } - token, err := s.Config.Cipher.Decrypt(encrypted, str(owner), provider, "") - if err != nil { - return "", fail("credential_decryption_failed", 500) - } - return token, nil -} - -func (s *Server) revokeGrant(ctx context.Context, owner any, provider string) error { - token, e := s.storedGrantToken(ctx, owner, provider) - if e != nil { - return e - } - if token != "" { - client, secret := s.Config.ClientID, s.Config.ClientSecret - if provider == "github-app-user" { - client, secret = s.Config.AppClientID, s.Config.AppClientSecret - } - body, _ := json.Marshal(M{"access_token": token}) - requestCtx, cancel := context.WithTimeout(ctx, 20*time.Second) - defer cancel() - req, e := http.NewRequestWithContext(requestCtx, "DELETE", "https://api.github.com/applications/"+url.PathEscape(client)+"/grant", bytes.NewReader(body)) - if e != nil { - return e - } - req.SetBasicAuth(client, secret) - req.Header.Set("Content-Type", "application/json") - req.Header.Set("Accept", "application/vnd.github+json") - resp, e := s.HTTP.Do(req) - if e != nil { - return fail("github_grant_revocation_failed", 502) - } - io.Copy(io.Discard, io.LimitReader(resp.Body, 4096)) - resp.Body.Close() - if (resp.StatusCode < 200 || resp.StatusCode >= 300) && resp.StatusCode != 404 && resp.StatusCode != 422 { - return fail("github_grant_revocation_failed", 502) - } - } - if _, e = s.Store.DB.Collection("credentials").DeleteMany(ctx, M{"ownerId": owner, "provider": provider}); e != nil { - return e - } - change := M{"$set": M{"repositories": []any{}}, "$inc": M{"repositoryDiscoveryRevision": 1}} - if provider == "github" { - change["$unset"] = M{"accessTokens.github": "", "accessTokenDates.github": ""} - } - _, e = s.Store.update(ctx, "users", M{"_id": owner}, change) - return e -} -func (s *Server) deleteAccount(q *request) (any, error) { - if err := s.removeAccountResources(q); err != nil { - return nil, err - } - owner := q.User["_id"] - // Removed records remain as tombstones and may still carry legacy credentials. - for _, kind := range []string{"repo", "pr", "gist"} { - if _, err := s.Store.DB.Collection(collection(kind)).UpdateMany(q.ctx(), M{"owner": owner}, M{"$unset": M{"source.accessToken": "", "accessToken": ""}}); err != nil { - return nil, err - } - } - // Revocation is best effort; it must not uninstall a shared organization App. - for _, provider := range []string{"github", "github-app-user"} { - if err := s.revokeGrant(q.ctx(), owner, provider); err != nil { - s.recordError(q.ctx(), fail("github_grant_revocation_failed", 502)) - } - } - if _, err := s.Store.DB.Collection("credentials").DeleteMany(q.ctx(), M{"ownerId": owner}); err != nil { - return nil, err - } - if _, err := s.Store.DB.Collection("dashboardnames").DeleteMany(q.ctx(), M{"owner": owner}); err != nil { - return nil, err - } - _, err := s.Store.update(q.ctx(), "users", M{"_id": owner}, M{"$inc": M{"repositoryDiscoveryRevision": 1}, "$set": M{"status": "removed", "username": "deleted-" + str(owner), "emails": []any{}, "apiTokens": []any{}, "repositories": []any{}}, "$unset": M{"accessTokens": "", "accessTokenDates": "", "externalIDs": "", "photo": "", "default": "", "projectNames": ""}}) - if err != nil { - return nil, err - } - if q.SessionID != "" { - if err := s.Store.Redis.Del(q.ctx(), "anoGH_session:"+q.SessionID).Err(); err != nil { - return nil, err - } - } - return M{"status": "ok"}, nil -} diff --git a/backend/internal/server/connections_summary_integration_test.go b/backend/internal/server/connections_summary_integration_test.go deleted file mode 100644 index a42c4d4..0000000 --- a/backend/internal/server/connections_summary_integration_test.go +++ /dev/null @@ -1,185 +0,0 @@ -package server - -import ( - "bytes" - "context" - "fmt" - "io" - "net/http" - "net/http/httptest" - "os" - "strings" - "sync" - "testing" - "time" - - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/event" - "go.mongodb.org/mongo-driver/v2/mongo" - "go.mongodb.org/mongo-driver/v2/mongo/options" -) - -func runConnectionsSummaryIntegration(t *testing.T, base *Server) { - t.Run("connection summary retains all GitHub resources across providers", func(t *testing.T) { - ctx := context.Background() - owner := bson.NewObjectID() - db := base.Store.DB.Client().Database("connections_summary_" + owner.Hex()) - defer db.Drop(ctx) - s := &Server{Config: base.Config, Store: &Store{DB: db, Redis: base.Store.Redis}} - s.Config.AppEnabled = false - user := M{"_id": owner, "username": owner.Hex(), "status": "active"} - if _, err := db.Collection("users").InsertOne(ctx, user); err != nil { - t.Fatal(err) - } - q := &request{Server: s, User: user, Session: M{"githubConnectionCSRF": "synthetic-csrf"}, SessionID: "connections-" + owner.Hex(), R: httptest.NewRequest("GET", "/github/connections", nil), W: httptest.NewRecorder()} - defer s.Store.Redis.Del(ctx, "anoGH_session:"+q.SessionID) - for i := 0; i < 12; i++ { - if _, err := db.Collection("credentials").InsertOne(ctx, M{"ownerId": owner, "provider": fmt.Sprintf("other-forge-%d", i), "encryptedToken": "not-a-GitHub-envelope"}); err != nil { - t.Fatal(err) - } - } - for _, provider := range []string{"github", "github-app-user"} { - tokens := M{"access_token": "synthetic-token", "refresh_token": "synthetic-refresh", "expires_in": float64(3600), "refresh_token_expires_in": float64(7200)} - if err := s.saveGrant(q, owner, provider, tokens); err != nil { - t.Fatal(err) - } - } - // TypeScript's OAuth connection indicator reads the stored token regardless of revoked state. - if _, err := s.Store.update(ctx, "credentials", M{"ownerId": owner, "provider": "github"}, M{"$set": M{"revoked": true}}); err != nil { - t.Fatal(err) - } - const count = 10001 - for _, kind := range []string{"repo", "pr"} { - records := make([]any, 0, count+3) - for i := 0; i < count; i++ { - records = append(records, M{idKey(kind): fmt.Sprintf("%s-%d", kind, i), "owner": owner, "source": M{"provider": "github", "repositoryName": "team/repo", "repositoryFullName": "team/repo"}, "status": "ready", "statusDate": time.Now()}) - } - for _, extra := range []string{"other-provider", "removed", "other-owner"} { - row := M{idKey(kind): extra, "owner": owner, "source": M{"provider": "github"}, "status": "ready"} - switch extra { - case "other-provider": - row["source"] = M{"provider": "fixture"} - case "removed": - row["status"] = "removed" - case "other-owner": - row["owner"] = bson.NewObjectID() - } - records = append(records, row) - } - if _, err := db.Collection(collection(kind)).InsertMany(ctx, records); err != nil { - t.Fatal(err) - } - } - for _, provider := range []string{"github", "fixture"} { - if _, err := db.Collection(collection("gist")).InsertOne(ctx, M{"owner": owner, "source": M{"provider": provider}, "status": "ready"}); err != nil { - t.Fatal(err) - } - } - const privateMarker = "synthetic-not-part-of-connection-summary" - for _, kind := range []string{"repo", "pr"} { - if _, err := s.Store.update(ctx, collection(kind), M{idKey(kind): kind + "-0"}, M{"$set": M{"privatePayload": strings.Repeat(privateMarker, 32768), "source.accessToken": privateMarker, "githubAccess.privateBinding": privateMarker}}); err != nil { - t.Fatal(err) - } - } - if _, err := s.Store.update(ctx, "credentials", M{"ownerId": owner, "provider": "github"}, M{"$set": M{"privateMetadata": privateMarker}}); err != nil { - t.Fatal(err) - } - // Observe actual MongoDB replies, not just the already-filtered HTTP result. - var mu sync.Mutex - findCount, unprojected, leaked := 0, false, false - monitor := &event.CommandMonitor{ - Started: func(_ context.Context, e *event.CommandStartedEvent) { - if e.CommandName != "find" { - return - } - mu.Lock() - defer mu.Unlock() - findCount++ - if _, err := e.Command.LookupErr("projection"); err != nil { - unprojected = true - } - }, - Succeeded: func(_ context.Context, e *event.CommandSucceededEvent) { - if e.CommandName != "find" && e.CommandName != "getMore" { - return - } - if bytes.Contains(e.Reply, []byte(privateMarker)) { - mu.Lock() - leaked = true - mu.Unlock() - } - }, - } - observed, err := mongo.Connect(options.Client().ApplyURI(os.Getenv("GO_TEST_MONGODB_URI")).SetBSONOptions(&options.BSONOptions{DefaultDocumentM: true}).SetMonitor(monitor)) - if err != nil { - t.Fatal(err) - } - defer observed.Disconnect(ctx) - s.Store.DB = observed.Database(db.Name()) - result, err := s.connections(q) - s.Store.DB = db - mu.Lock() - observedFinds, missingProjection, privatePayloadRead := findCount, unprojected, leaked - mu.Unlock() - if observedFinds != 4 || missingProjection || privatePayloadRead { - t.Fatal("connection summary read unnecessary database payloads", observedFinds, missingProjection, privatePayloadRead) - } - if err != nil { - t.Fatal(err) - } - output := obj(result) - if !boolean(output["oauthConnected"]) || !boolean(output["appConnected"]) || output["gistConnection"] != "oauth" || number(output["gistCount"]) != 1 { - t.Fatal("provider grants hidden or mixed", output["oauthConnected"], output["appConnected"], output["gistCount"]) - } - resources := arr(output["resources"]) - if len(resources) != 2*count { - t.Fatal("resources truncated or foreign records included", len(resources)) - } - seen := map[string]bool{} - for _, value := range resources { - row := obj(value) - id := str(row["id"]) - if seen[id] || row["name"] != "team/repo" || row["connection"] != "oauth" { - t.Fatal("wrong resource summary", row) - } - seen[id] = true - } - if !seen["repo-10000"] || !seen["pr-10000"] { - t.Fatal("tail resources omitted") - } - // Remove bulk fixtures before exercising connection-state variations. - for _, kind := range []string{"repo", "pr"} { - if _, err := db.Collection(collection(kind)).DeleteMany(ctx, M{}); err != nil { - t.Fatal(err) - } - } - s.Config.AppEnabled = true - s.Config.AppID = "123" - status := 503 - s.HTTP = &http.Client{Transport: roundTrip(func(r *http.Request) (*http.Response, error) { - if r.URL.Path != "/user/installations" { - t.Fatal("unexpected upstream request", r.URL) - } - return &http.Response{StatusCode: status, Header: http.Header{}, Body: io.NopCloser(strings.NewReader(`{"installations":[{"id":42,"app_id":123,"account":{"login":"team"},"suspended_at":""}]}`))}, nil - })} - result, err = s.connections(q) - if err != nil || obj(result)["appError"] != "github_unavailable" { - t.Fatal("upstream error hidden", result, err) - } - status = 200 - result, err = s.connections(q) - if err != nil { - t.Fatal(err) - } - output = obj(result) - if output["gistConnection"] != "github-app" || output["appError"] != nil || len(arr(output["installations"])) != 1 || boolean(obj(arr(output["installations"])[0])["suspended"]) { - t.Fatal("installation output differs", output) - } - if _, err := s.Store.update(ctx, "credentials", M{"ownerId": owner, "provider": "github"}, M{"$set": M{"encryptedToken": "broken-envelope"}}); err != nil { - t.Fatal(err) - } - if _, err = s.connections(q); err == nil || err.Error() != "credential_decryption_failed" { - t.Fatal("invalid stored OAuth token reported connected", err) - } - }) -} diff --git a/backend/internal/server/content_cache.go b/backend/internal/server/content_cache.go deleted file mode 100644 index 6e0828a..0000000 --- a/backend/internal/server/content_cache.go +++ /dev/null @@ -1,270 +0,0 @@ -package server - -import ( - "context" - "crypto/sha256" - "encoding/hex" - "encoding/json" - "errors" - "io" - "io/fs" - "strings" - "time" - - "github.com/tdurieux/anonymous_github/backend/internal/anonymize" - "github.com/tdurieux/anonymous_github/backend/internal/provider" - "github.com/tdurieux/anonymous_github/backend/internal/security" -) - -func rawCachePath(r M, a provider.Access, entry provider.Entry) string { - identity, _ := json.Marshal([]any{"go-raw-v1", a.Ref.Provider, a.Ref.ID, a.Ref.Commit, entry.Revision, r["contentCacheRevision"]}) - digest := sha256.Sum256(identity) - return contentPrefix(r) + "/" + hex.EncodeToString(digest[:]) + "/" + entry.Path -} - -func contentRevisionFilter(r M) M { - filter := revisionFilter(r) - // Cache-presence bookkeeping changes statusDate without changing content. - // Status, generation, settings, grant and cache revisions fence publication. - delete(filter, "statusDate") - for _, field := range []string{"anonymizeDate", "contentCacheRevision"} { - if value, ok := r[field]; ok { - filter[field] = value - } else { - filter[field] = M{"$exists": false} - } - } - return filter -} - -func (s *Server) activeContentCache(ctx context.Context, r M) error { - filter := contentRevisionFilter(r) - current, err := s.Store.one(ctx, collection("repo"), filter) - if err != nil { - return err - } - if current == nil { - return fail("repository_changed", 409) - } - switch str(current["status"]) { - case "expiring", "expired", "removing", "removed", "archived": - return fail("repository_changed", 409) - } - marker := "__content/__retired/" + strings.TrimPrefix(contentPrefix(r), "__content/") + ".txt" - _, err = s.content.Size(ctx, str(r["repoId"]), marker) - if errors.Is(err, fs.ErrNotExist) { - return nil - } - if err != nil { - return err - } - return fail("repository_changed", 409) -} - -func (s *Server) cachedBlob(ctx context.Context, r M, p provider.Repositories, a provider.Access, entry provider.Entry) (result io.ReadCloser, resultErr error) { - // Archive originals are authoritative data, not an upstream cache. - if a.Ref.Provider == "archive" { - return s.openMeasuredSource(ctx, p, a, entry) - } - if _, err := security.RelativePath(entry.Path); err != nil { - return nil, fail("invalid_path", 400) - } - if s.sourceCache != nil { - return s.sharedSource(ctx, r, p, a, entry) - } - started := time.Now() - defer func() { - if resultErr != nil { - s.observeCache(ctx, "source_error", 0, time.Since(started)) - } - }() - requestContext := ctx - ctx, cancel := context.WithTimeout(ctx, 120*time.Second) - // This deadline covers filling, not the caller's subsequent read. - defer cancel() - id, cachePath := str(r["repoId"]), rawCachePath(r, a, entry) - hit := func() bool { - size, err := s.content.Size(ctx, id, cachePath) - return err == nil && size >= entry.Size && size <= anonymize.MaxInput - } - open := func() (io.ReadCloser, error) { - if err := s.activeContentCache(ctx, r); err != nil { - return nil, err - } - if err := s.authorizeMeasured(ctx, p, a); err != nil { - return nil, err - } - // Use the original request context for the returned S3 stream. - return s.content.Read(requestContext, id, cachePath) - } - if err := s.activeContentCache(ctx, r); err != nil { - return nil, err - } - if hit() { - result, resultErr = open() - if resultErr == nil { - s.observeCache(ctx, "legacy_source_hit", entry.Size, 0) - } - return result, resultErr - } - s.observeCache(ctx, "legacy_source_miss", entry.Size, 0) - if s.cacheFills.Add(1) > 64 { - s.cacheFills.Add(-1) - s.observeCache(ctx, "source_bypass", entry.Size, 0) - return nil, fail("cache_busy", 503) - } - defer s.cacheFills.Add(-1) - digest := sha256.Sum256([]byte(id + ":" + cachePath)) - lock := "go:content-fill:" + hex.EncodeToString(digest[:]) - token, err := security.RandomToken() - if err != nil { - return nil, err - } - waited := false - for { - if hit() { - return open() - } - acquired, lockErr := s.Store.Redis.SetNX(ctx, lock, token, 125*time.Second).Result() - // Coordination is optional, as in TypeScript. Atomic storage publication and - // generation checks remain mandatory when Redis is unavailable. - if lockErr != nil || acquired { - if acquired { - defer func() { - cleanup, stop := context.WithTimeout(context.WithoutCancel(ctx), 2*time.Second) - defer stop() - s.Store.Redis.Eval(cleanup, `if redis.call('GET',KEYS[1])==ARGV[1] then return redis.call('DEL',KEYS[1]) end;return 0`, []string{lock}, token) - }() - } - break - } - if !waited { - s.observeCache(ctx, "source_fill_wait", 0, 0) - waited = true - } - select { - case <-ctx.Done(): - return nil, fail("cache_busy", 503) - case <-time.After(100 * time.Millisecond): - } - } - // A prior leader may have published between the lookup and lock acquisition. - if hit() { - return open() - } - if err := s.activeContentCache(ctx, r); err != nil { - return nil, err - } - if err := s.authorizeMeasured(ctx, p, a); err != nil { - return nil, err - } - body, err := s.openMeasuredSource(ctx, p, a, entry) - if err != nil { - return nil, err - } - limited := &cacheLimitReader{reader: body, remaining: anonymize.MaxInput} - err = s.content.Put(ctx, id, cachePath, limited, entry.Size, anonymize.MaxInput) - body.Close() - if err != nil { - if err.Error() == "storage_write_size_mismatch" { - return nil, fail("storage_write_size_mismatch", 502) - } - return nil, err - } - if err = s.activeContentCache(ctx, r); err != nil { - cleanup, stop := context.WithTimeout(context.WithoutCancel(ctx), 5*time.Second) - defer stop() - if removeErr := s.content.Remove(cleanup, id, cachePath); removeErr != nil { - return nil, removeErr - } - return nil, err - } - storedBytes := anonymize.MaxInput - limited.remaining - s.observeCache(ctx, "source_fill", storedBytes, time.Since(started)) - s.observeCache(ctx, "source_stored", storedBytes, 0) - return open() -} - -// Fence in-flight fills before deleting cached bytes. Archived storage is kept -// for the separate resumable archive cleanup workflow. -func (s *Server) resetContentCache(ctx context.Context, r M) error { - if s.pool != nil { - s.pool.RemoveResults(str(r["repoId"])) - } - if str(r["status"]) == "archived" { - return nil - } - entries, err := s.content.List(ctx, str(r["repoId"])) - if err != nil { - return err - } - paths := make([]string, 0, len(entries)) - for _, entry := range entries { - paths = append(paths, entry.Path) - } - revision, err := security.RandomToken() - if err != nil { - return err - } - changed, err := s.Store.update(ctx, collection("repo"), revisionFilter(r), M{"$set": M{"contentCacheRevision": revision, "isReseted": true, "size": M{"storage": 0, "file": 0}}, "$unset": M{"sizeComputedAt": ""}}) - if err != nil { - return err - } - if !changed { - return fail("repository_changed", 409) - } - return s.content.RemoveFiles(ctx, str(r["repoId"]), paths) -} - -// Read one byte beyond the limit to distinguish oversized content from EOF. -type cacheLimitReader struct { - reader io.Reader - remaining int64 -} - -func (r *cacheLimitReader) Read(p []byte) (int, error) { - if int64(len(p)) > r.remaining+1 { - p = p[:r.remaining+1] - } - n, err := r.reader.Read(p) - r.remaining -= int64(n) - if r.remaining < 0 { - return n, fail("file_too_big", 413) - } - return n, err -} - -// The caller owns r. Update its snapshot along with the database so subsequent -// file/ZIP publication checks observe this request's status timestamp. -func (s *Server) markCachePresent(ctx context.Context, r M) error { - if !boolean(r["isReseted"]) { - return nil - } - if str(r["status"]) != "ready" { - return fail("repository_changed", 409) - } - filter := contentRevisionFilter(r) - filter["isReseted"] = true - now := time.Now().Truncate(time.Millisecond) - changed, err := s.Store.update(ctx, collection("repo"), filter, M{"$set": M{"isReseted": false, "statusDate": now}, "$unset": M{"statusMessage": ""}}) - if err != nil { - return err - } - if !changed { - // Another successful read can have completed the same transition. Accept - // only that ready, non-reset state with the same source/settings/cache. - delete(filter, "statusDate") - filter["isReseted"] = false - current, err := s.Store.one(ctx, collection("repo"), filter) - if err != nil { - return err - } - if current == nil { - return fail("repository_changed", 409) - } - now = date(current["statusDate"]) - } - r["isReseted"], r["statusDate"] = false, now - delete(r, "statusMessage") - return nil -} diff --git a/backend/internal/server/content_cache_integration_test.go b/backend/internal/server/content_cache_integration_test.go deleted file mode 100644 index 9829423..0000000 --- a/backend/internal/server/content_cache_integration_test.go +++ /dev/null @@ -1,188 +0,0 @@ -package server - -import ( - "context" - "errors" - "io" - "io/fs" - "strings" - "sync" - "testing" - "time" - - "github.com/tdurieux/anonymous_github/backend/internal/provider" - "go.mongodb.org/mongo-driver/v2/bson" -) - -func runRawCacheIntegration(t *testing.T, s *Server, p *fixtureProvider) { - t.Run("provider raw content cache", func(t *testing.T) { - ctx := context.Background() - original, err := s.Store.one(ctx, collection("repo"), M{"repoId": "second-provider"}) - if err != nil { - t.Fatal(err) - } - r := selectFields(original, "owner", "source", "providerAccess", "options") - r["_id"], r["repoId"], r["status"] = bson.NewObjectID(), "raw-cache-fixture", "ready" - r["treeGeneration"], r["anonymizeDate"] = "cache-generation", time.Now().Truncate(time.Millisecond) - if _, err := s.Store.DB.Collection(collection("repo")).InsertOne(ctx, r); err != nil { - t.Fatal(err) - } - defer func() { p.onOpen = nil; p.revoked = false }() - row := M{"path": "", "name": "Alice.txt", "sha": "blob:one", "size": int64(len(fixtureContent))} - a, err := s.providerAccess(r) - if err != nil { - t.Fatal(err) - } - key := rawCachePath(r, a, provider.Entry{Path: "Alice.txt", Revision: "blob:one"}) - cacheServer := &Server{Config: s.Config, Store: s.Store, content: s.content, providers: s.providers, cacheMetrics: testCacheMetrics()} - read := func() error { - body, err := cacheServer.blob(ctx, r, row) - if err != nil { - return err - } - defer body.Close() - data, err := io.ReadAll(body) - if err == nil && string(data) != fixtureContent { - return errors.New("unexpected cached bytes") - } - return err - } - start := p.openCount.Load() - for i := 0; i < 2; i++ { - if err := read(); err != nil { - t.Fatal(err) - } - } - if got := p.openCount.Load() - start; got != 1 { - t.Fatalf("two reads fetched upstream %d times", got) - } - counts := map[string]int64{} - for key, v := range cacheServer.cacheMetrics.pending { - counts[key.name] += v.count - } - for _, name := range []string{"legacy_source_hit", "legacy_source_miss", "source_fill", "source_stored"} { - if counts[name] != 1 { - t.Fatalf("cache instrumentation %s=%d", name, counts[name]) - } - } - if counts["source_hit"] != 0 || counts["source_miss"] != 0 { - t.Fatal("per-repository reads polluted shared-cache hit/miss counters", counts) - } - for key, value := range cacheServer.cacheMetrics.pending { - if key.name == "legacy_source_hit" || key.name == "legacy_source_miss" { - if value.bytes != int64(len(fixtureContent)) || value.ms != 0 { - t.Fatal("legacy source observation differs from TypeScript", key, value) - } - } - } - p.revoked = true - if err := read(); err == nil || err.Error() != "fixture_access_revoked" { - t.Fatal("cache bypassed revocation", err) - } - p.revoked = false - // A truncated existing object must be replaced, never returned as a hit. - if err := s.content.Put(ctx, str(r["repoId"]), key, strings.NewReader("short"), 5, 5); err != nil { - t.Fatal(err) - } - if err := read(); err != nil { - t.Fatal(err) - } - if p.openCount.Load()-start != 2 { - t.Fatal("short entry was not refilled") - } - if err := s.runJob(ctx, M{"kind": "repo", "resourceId": r["repoId"], "action": "cache"}); err != nil { - t.Fatal(err) - } - if err := read(); err == nil || err.Error() != "repository_changed" { - t.Fatal("old revision remained readable", err) - } - current, err := s.Store.one(ctx, collection("repo"), M{"_id": r["_id"]}) - if err != nil || !boolean(current["isReseted"]) || str(current["contentCacheRevision"]) == "" { - t.Fatal("cache reset state", current, err) - } - r["contentCacheRevision"] = current["contentCacheRevision"] - key = rawCachePath(r, a, provider.Entry{Path: "Alice.txt", Revision: "blob:one"}) - if err := read(); err != nil { - t.Fatal(err) - } - if p.openCount.Load()-start != 3 { - t.Fatal("new revision reused old cache") - } - if err := s.content.Remove(ctx, str(r["repoId"]), key); err != nil { - t.Fatal(err) - } - p.onOpen = func() (io.ReadCloser, error) { - time.Sleep(50 * time.Millisecond) - return io.NopCloser(strings.NewReader(fixtureContent)), nil - } - start = p.openCount.Load() - var group sync.WaitGroup - results := make(chan error, 12) - for i := 0; i < 12; i++ { - group.Add(1) - go func() { defer group.Done(); results <- read() }() - } - group.Wait() - close(results) - for err := range results { - if err != nil { - t.Fatal(err) - } - } - if got := p.openCount.Load() - start; got != 1 { - t.Fatalf("concurrent cache miss fetched %d times", got) - } - p.onOpen = nil - if err := s.content.Remove(ctx, str(r["repoId"]), key); err != nil { - t.Fatal(err) - } - p.onOpen = func() (io.ReadCloser, error) { return io.NopCloser(strings.NewReader("short")), nil } - if err := read(); err == nil { - t.Fatal("short download accepted") - } - if _, err := s.content.Size(ctx, str(r["repoId"]), key); !errors.Is(err, fs.ErrNotExist) { - t.Fatal("failed fill published", err) - } - p.onOpen = nil - if err := read(); err != nil { - t.Fatal("failed fill prevented retry", err) - } - if err := s.content.Remove(ctx, str(r["repoId"]), key); err != nil { - t.Fatal(err) - } - // Simulate expiration after downloading starts. The late publication is - // removed even if lifecycle cleanup has already deleted the storage root. - p.onOpen = func() (io.ReadCloser, error) { - _, err := s.Store.update(ctx, collection("repo"), M{"_id": r["_id"]}, M{"$set": M{"status": "removed"}}) - if err != nil { - return nil, err - } - if err := s.content.Remove(ctx, str(r["repoId"]), ""); err != nil { - return nil, err - } - return io.NopCloser(strings.NewReader(fixtureContent)), nil - } - if err := read(); err == nil || err.Error() != "repository_changed" { - t.Fatal("stale fill accepted", err) - } - if _, err := s.content.Size(ctx, str(r["repoId"]), key); !errors.Is(err, fs.ErrNotExist) { - t.Fatal("stale fill retained", err) - } - p.onOpen = nil - if _, err := s.Store.update(ctx, collection("repo"), M{"_id": r["_id"]}, M{"$set": M{"status": "ready"}}); err != nil { - t.Fatal(err) - } - marker := "__content/__retired/" + strings.TrimPrefix(contentPrefix(r), "__content/") + ".txt" - if err := s.content.Put(ctx, str(r["repoId"]), marker, strings.NewReader("retired"), 7, 7); err != nil { - t.Fatal(err) - } - start = p.openCount.Load() - if err := read(); err == nil || err.Error() != "repository_changed" { - t.Fatal("retirement marker ignored", err) - } - if p.openCount.Load() != start { - t.Fatal("retired generation fetched content") - } - - }) -} diff --git a/backend/internal/server/content_cache_test.go b/backend/internal/server/content_cache_test.go deleted file mode 100644 index c318172..0000000 --- a/backend/internal/server/content_cache_test.go +++ /dev/null @@ -1,23 +0,0 @@ -package server - -import ( - "io" - "strings" - "testing" -) - -func TestCacheReadLimit(t *testing.T) { - for _, input := range []string{"", "1234", "12345"} { - _, err := io.ReadAll(&cacheLimitReader{reader: strings.NewReader(input), remaining: 4}) - if len(input) <= 4 { - if err != nil { - t.Fatal(err) - } - continue - } - api, ok := err.(*APIError) - if !ok || api.Status != 413 || api.Code != "file_too_big" { - t.Fatal(err) - } - } -} diff --git a/backend/internal/server/content_cleanup.go b/backend/internal/server/content_cleanup.go deleted file mode 100644 index 4df8cd1..0000000 --- a/backend/internal/server/content_cleanup.go +++ /dev/null @@ -1,74 +0,0 @@ -package server - -import ( - "context" - "crypto/sha256" - "encoding/hex" - "errors" - "io/fs" - "regexp" - "strings" -) - -var contentPrefixPattern = regexp.MustCompile(`^__content/[a-f0-9]{64}$`) -var retainedContentPattern = regexp.MustCompile(`^__content/(?:[a-f0-9]{64}|__retired)(?:/|$)`) - -func contentGeneration(r M) string { - generation := str(r["treeGeneration"]) - if generation == "" { - generation = "legacy" - } - stamp := "" - if d, valid := storedDate(r["anonymizeDate"]); valid { - stamp = d.UTC().Format("2006-01-02T15:04:05.000Z") - } - return generation + ":" + stamp -} -func contentPrefix(r M) string { - sum := sha256.Sum256([]byte(contentGeneration(r))) - return "__content/" + hex.EncodeToString(sum[:]) -} -func (s *Server) cleanupContent(ctx context.Context, r M) error { - if s.pool != nil { - s.pool.RemoveResults(str(r["repoId"])) - } - // ZIP originals are source data, not disposable upstream cache. - if str(obj(r["source"])["type"]) == "Zip" { - return nil - } - id := str(r["repoId"]) - active := contentPrefix(r) - for _, prefix := range stringsOf(r["retiredContentPrefixes"]) { - if !contentPrefixPattern.MatchString(prefix) || prefix == active { - continue - } - marker := "__content/__retired/" + strings.TrimPrefix(prefix, "__content/") + ".txt" - if e := s.content.Put(ctx, id, marker, strings.NewReader("retired"), 7, 7); e != nil { - return e - } - if e := s.content.Remove(ctx, id, prefix); e != nil { - return e - } - if _, e := s.Store.update(ctx, collection("repo"), M{"_id": r["_id"]}, M{"$pull": M{"retiredContentPrefixes": prefix}}); e != nil { - return e - } - } - if boolean(r["legacyContentCleanupPending"]) && str(r["status"]) == "ready" { - rows, e := s.content.List(ctx, id) - if e != nil && !errors.Is(e, fs.ErrNotExist) { - return e - } - for _, entry := range rows { - if !retainedContentPattern.MatchString(entry.Path) { - if e = s.content.Remove(ctx, id, entry.Path); e != nil { - return e - } - } - } - if _, e = s.Store.update(ctx, collection("repo"), M{"_id": r["_id"], "status": "ready", "source.type": M{"$ne": "Zip"}}, M{"$unset": M{"legacyContentCleanupPending": ""}}); e != nil { - return e - } - } - _, e := s.Store.update(ctx, collection("repo"), M{"_id": r["_id"], "retiredContentPrefixes.0": M{"$exists": false}}, M{"$unset": M{"retiredContentPrefixes": ""}}) - return e -} diff --git a/backend/internal/server/dashboard.go b/backend/internal/server/dashboard.go deleted file mode 100644 index c9bc8ac..0000000 --- a/backend/internal/server/dashboard.go +++ /dev/null @@ -1,152 +0,0 @@ -package server - -import ( - "go.mongodb.org/mongo-driver/v2/bson" - "strings" - "time" -) - -func (s *Server) dashboard(q *request) (any, error) { - if e := s.ensureDashboardNames(q); e != nil { - return nil, e - } - pipeline, sortField, limit, err := dashboardPipeline(q, time.Now()) - if err != nil { - return nil, err - } - cur, err := s.Store.DB.Collection(collection("repo")).Aggregate(q.ctx(), pipeline) - if err != nil { - return nil, err - } - defer cur.Close(q.ctx()) - rows := []M{} - if err = cur.All(q.ctx(), &rows); err != nil { - return nil, err - } - if len(rows) == 0 { - return M{"items": []any{}, "cursor": nil, "total": 0, "attention": 0, "filtered": 0}, nil - } - result := rows[0] - items := arr(result["items"]) - var cursor any - if len(items) > limit { - items = items[:limit] - last := obj(items[len(items)-1]) - encoded, err := encodeDashboardCursor(sortField, last) - if err != nil { - return nil, err - } - cursor = encoded - } - for _, v := range items { - m := obj(v) - delete(m, "_sort") - delete(m, "_id") - } - totals := M{} - if a := arr(result["totals"]); len(a) > 0 { - totals = obj(a[0]) - } - filtered := int64(0) - if a := arr(result["filtered"]); len(a) > 0 { - filtered = number(obj(a[0])["count"]) - } - return M{"items": items, "cursor": cursor, "total": number(totals["total"]), "attention": number(totals["attention"]), "filtered": filtered}, nil -} - -func dashboardPipeline(q *request, now time.Time) ([]M, string, int, error) { - query := parseExtendedQuery(q.R.URL.RawQuery).object - sortField, err := query["sort"].stringDefault("-anonymizeDate") - if err != nil { - return nil, "", 0, err - } - field := strings.TrimPrefix(sortField, "-") - mapping := map[string]string{"_name": "_anonymousId", "_label": "_label", "status": "status", "anonymizeDate": "anonymizeDate", "lastView": "lastView", "pageView": "pageView", "options.expirationDate": "options.expirationDate"} - mapped, ok := mapping[field] - if !ok { - return nil, "", 0, fail("invalid_sort", 400) - } - direction := 1 - if strings.HasPrefix(sortField, "-") { - direction = -1 - } - rawLimit, err := query["limit"].stringValue() - if err != nil { - return nil, "", 0, err - } - limit := dashboardLimit([]string{rawLimit}) - project := func(kind string) M { - id := idKey(kind) - p := M{"_id": 1, "status": 1, "statusMessage": 1, "anonymizeDate": 1, "lastView": 1, "pageView": M{"$ifNull": []any{"$pageView", 0}}, "options": 1, "conference": 1, "_type": M{"$literal": kind}, "_anonymousId": M{"$ifNull": []any{"$" + id, ""}}, id: 1} - switch kind { - case "repo": - p["_source"] = "$source.repositoryName" - p["_fallbackLabel"] = "$source.repositoryName" - p["source"] = M{"fullName": "$source.repositoryName", "commit": "$source.commit"} - p["coauthors"] = 1 - p["size"] = 1 - p["role"] = M{"$cond": []any{M{"$eq": []any{"$owner", q.User["_id"]}}, "owner", "coauthor"}} - case "pr": - label := M{"$concat": []any{M{"$ifNull": []any{"$source.repositoryFullName", ""}}, "#", M{"$toString": "$source.pullRequestId"}}} - p["_source"] = label - p["_fallbackLabel"] = label - p["source"] = M{"repositoryFullName": "$source.repositoryFullName", "pullRequestId": "$source.pullRequestId"} - case "gist": - p["_source"] = "$source.gistId" - p["_fallbackLabel"] = M{"$concat": []any{"Gist ", M{"$ifNull": []any{"$gistId", "$source.gistId"}}}} - p["source"] = M{"gistId": "$source.gistId"} - p["isPublic"] = "$gist.isPublic" - } - return M{"$project": p} - } - pipeline := []M{{"$match": membership(q, "repo")}, project("repo"), {"$unionWith": M{"coll": collection("pr"), "pipeline": []M{{"$match": membership(q, "pr")}, project("pr")}}}, {"$unionWith": M{"coll": collection("gist"), "pipeline": []M{{"$match": membership(q, "gist")}, project("gist")}}}, - {"$lookup": M{"from": "dashboardnames", "let": M{"type": "$_type", "id": "$_anonymousId"}, "pipeline": []M{{"$match": M{"owner": q.User["_id"], "$expr": M{"$and": []any{M{"$eq": []any{"$type", "$$type"}}, M{"$eq": []any{"$artifactId", "$$id"}}}}}}, {"$project": M{"name": 1}}}, "as": "_privateName"}}, - {"$set": M{"projectName": M{"$ifNull": []any{M{"$arrayElemAt": []any{"$_privateName.name", 0}}, ""}}}}, - {"$unset": "_privateName"}, - {"$set": M{"status": M{"$cond": []any{M{"$and": []any{M{"$eq": []any{"$status", "ready"}}, M{"$ne": []any{"$options.expirationMode", "never"}}, M{"$ne": []any{M{"$ifNull": []any{"$options.expirationDate", nil}}, nil}}, M{"$lte": []any{"$options.expirationDate", now}}}}, "expired", "$status"}}, "_label": M{"$cond": []any{M{"$ne": []any{"$projectName", ""}}, "$projectName", M{"$ifNull": []any{"$_fallbackLabel", "$_anonymousId"}}}}}}, - {"$set": M{"_statusKey": M{"$switch": M{"branches": []M{{"case": M{"$in": []any{"$status", []string{"ready", "error"}}}, "then": "$status"}, {"case": M{"$in": []any{"$status", []string{"expired", "expiring"}}}, "then": "expired"}, {"case": M{"$in": []any{"$status", []string{"removed", "removing"}}}, "then": "removed"}}, "default": "progress"}}}}, - } - fallback := any("") - if field == "pageView" { - fallback = 0 - } else if strings.Contains(field, "Date") || field == "lastView" { - fallback = time.Unix(0, 0) - } - lastActivity := M{"$ifNull": []any{"$anonymizeDate", "$lastView"}} - stale := M{"$and": []any{ - M{"$eq": []any{"$_statusKey", "progress"}}, - M{"$ne": []any{lastActivity, nil}}, - M{"$lt": []any{lastActivity, now.Add(-2 * time.Hour)}}, - }} - attention := M{"$or": []any{M{"$eq": []any{"$status", "error"}}, M{"$eq": []any{"$_anonymousId", ""}}, stale}} - pipeline = append(pipeline, M{"$set": M{"_attention": attention, "_sort": M{"$ifNull": []any{"$" + mapped, fallback}}}}) - - if field == "_name" || field == "_label" || field == "status" { - pipeline = append(pipeline, M{"$set": M{"_sort": M{"$toLower": "$_sort"}}}) - } - filter, err := dashboardFilter(query) - if err != nil { - return nil, "", 0, err - } - page := []M{{"$match": filter}} - if query["cursor"].truthy() { - cursor, err := query["cursor"].stringValue() - if err != nil { - return nil, "", 0, fail("invalid_cursor", 400) - } - c, err := dashboardCursor(cursor, sortField, field) - if err != nil { - return nil, "", 0, err - } - value, id := c["value"], c["id"] - op := "$gt" - if direction < 0 { - op = "$lt" - } - page = append(page, M{"$match": M{"$or": []M{{"_sort": M{op: value}}, {"_sort": value, "_type": M{"$gt": c["type"]}}, {"_sort": value, "_type": c["type"], "_id": M{"$gt": id}}}}}) - } - page = append(page, M{"$sort": bson.D{{Key: "_sort", Value: direction}, {Key: "_type", Value: 1}, {Key: "_id", Value: 1}}}, M{"$limit": limit + 1}) - pipeline = append(pipeline, M{"$facet": M{"totals": []M{{"$group": M{"_id": nil, "total": M{"$sum": 1}, "attention": M{"$sum": M{"$cond": []any{"$_attention", 1, 0}}}}}}, "filtered": []M{{"$match": filter}, {"$count": "count"}}, "items": page}}) - - return pipeline, sortField, limit, nil -} diff --git a/backend/internal/server/dashboard_cache.go b/backend/internal/server/dashboard_cache.go deleted file mode 100644 index 5bc14d9..0000000 --- a/backend/internal/server/dashboard_cache.go +++ /dev/null @@ -1,83 +0,0 @@ -package server - -import ( - "context" - "errors" - "sync" - "time" -) - -type dashboardCacheEntry struct { - done chan struct{} - err error - expires time.Time - order uint64 -} - -type dashboardCache struct { - mu sync.Mutex - entries map[string]*dashboardCacheEntry - sequence uint64 - now func() time.Time -} - -func (c *dashboardCache) clock() time.Time { - if c.now != nil { - return c.now() - } - return time.Now() -} -func (c *dashboardCache) clear() { c.mu.Lock(); c.entries = nil; c.mu.Unlock() } - -// Match AsyncCache's 64-entry FIFO bound and five-minute TTL after success. -// In-flight entries do not expire, failed work is retried, and clearing cannot -// let an older completion replace or remove a newer entry for the same user. -func (c *dashboardCache) run(ctx context.Context, key string, calculate func() error) (err error) { - c.mu.Lock() - now := c.clock() - for key, entry := range c.entries { - if !entry.expires.IsZero() && !entry.expires.After(now) { - delete(c.entries, key) - } - } - if cached := c.entries[key]; cached != nil { - c.mu.Unlock() - select { - case <-cached.done: - return cached.err - case <-ctx.Done(): - return ctx.Err() - } - } - if len(c.entries) >= 64 { - var oldest string - var first *dashboardCacheEntry - for key, entry := range c.entries { - if first == nil || entry.order < first.order { - oldest, first = key, entry - } - } - delete(c.entries, oldest) - } - if c.entries == nil { - c.entries = map[string]*dashboardCacheEntry{} - } - c.sequence++ - entry := &dashboardCacheEntry{done: make(chan struct{}), order: c.sequence} - c.entries[key] = entry - c.mu.Unlock() - err = errors.New("dashboard_reconciliation_interrupted") - defer func() { - c.mu.Lock() - entry.err = err - if err == nil { - entry.expires = c.clock().Add(5 * time.Minute) - } else if c.entries[key] == entry { - delete(c.entries, key) - } - close(entry.done) - c.mu.Unlock() - }() - err = calculate() - return err -} diff --git a/backend/internal/server/dashboard_cache_test.go b/backend/internal/server/dashboard_cache_test.go deleted file mode 100644 index 71227bc..0000000 --- a/backend/internal/server/dashboard_cache_test.go +++ /dev/null @@ -1,130 +0,0 @@ -package server - -import ( - "context" - "errors" - "fmt" - "sync" - "sync/atomic" - "testing" - "time" -) - -func TestDashboardCacheExpiryAndCapacity(t *testing.T) { - now := time.Unix(1000, 0) - cache := dashboardCache{now: func() time.Time { return now }} - calls := 0 - calculate := func() error { calls++; return nil } - ctx := context.Background() - cache.run(ctx, "user", calculate) - now = now.Add(4 * time.Minute) - cache.run(ctx, "user", calculate) - if calls != 1 { - t.Fatal("cache miss before expiry") - } - now = now.Add(time.Minute) - cache.run(ctx, "user", calculate) - if calls != 2 { - t.Fatal("entry did not expire") - } - cache.clear() - for i := 0; i < 64; i++ { - cache.run(ctx, fmt.Sprint(i), calculate) - } - before := calls - cache.run(ctx, "0", calculate) // Reads do not change FIFO order. - cache.run(ctx, "64", calculate) - cache.run(ctx, "1", calculate) - if calls != before+1 || len(cache.entries) != 64 { - t.Fatal("capacity or FIFO mismatch") - } - cache.run(ctx, "0", calculate) - if calls != before+2 { - t.Fatal("oldest entry not evicted") - } -} -func TestDashboardCacheConcurrency(t *testing.T) { - var cache dashboardCache - var calls atomic.Int64 - var wg sync.WaitGroup - started, release := make(chan struct{}), make(chan struct{}) - calculate := func() error { - if calls.Add(1) == 1 { - close(started) - } - <-release - return nil - } - for i := 0; i < 16; i++ { - wg.Add(1) - go func() { - defer wg.Done() - if err := cache.run(context.Background(), "user", calculate); err != nil { - t.Error(err) - } - }() - } - <-started - close(release) - wg.Wait() - if calls.Load() != 1 { - t.Fatal("duplicate work", calls.Load()) - } -} -func TestDashboardCacheRetryAndInvalidation(t *testing.T) { - ctx := context.Background() - var cache dashboardCache - failure := errors.New("fixture failure") - if err := cache.run(ctx, "user", func() error { return failure }); err != failure { - t.Fatal(err) - } - if err := cache.run(ctx, "user", func() error { return nil }); err != nil { - t.Fatal(err) - } - cache.clear() - started, release, finished := make(chan struct{}), make(chan struct{}), make(chan struct{}) - go func() { - cache.run(ctx, "user", func() error { close(started); <-release; return failure }) - close(finished) - }() - <-started - canceled, cancel := context.WithCancel(ctx) - cancel() - if err := cache.run(canceled, "user", func() error { t.Error("waiter calculated"); return nil }); !errors.Is(err, context.Canceled) { - t.Fatal(err) - } - cache.clear() - if err := cache.run(ctx, "user", func() error { return nil }); err != nil { - t.Fatal(err) - } - close(release) - <-finished - if err := cache.run(ctx, "user", func() error { t.Error("old failure removed new entry"); return nil }); err != nil { - t.Fatal(err) - } -} - -func TestDashboardCacheTTLStartsOnCompletion(t *testing.T) { - now := time.Unix(1000, 0) - cache := dashboardCache{now: func() time.Time { return now }} - ctx := context.Background() - cache.run(ctx, "user", func() error { now = now.Add(10 * time.Minute); return nil }) - now = now.Add(4 * time.Minute) - cache.run(ctx, "user", func() error { t.Fatal("TTL started before completion"); return nil }) -} - -func TestDashboardCachePanicDoesNotStrandEntry(t *testing.T) { - var cache dashboardCache - func() { - defer func() { - if recover() == nil { - t.Error("panic was swallowed") - } - }() - cache.run(context.Background(), "user", func() error { panic("fixture") }) - }() - called := false - if err := cache.run(context.Background(), "user", func() error { called = true; return nil }); err != nil || !called { - t.Fatal("panic stranded cache entry", err) - } -} diff --git a/backend/internal/server/dashboard_cursor.go b/backend/internal/server/dashboard_cursor.go deleted file mode 100644 index 9665c8c..0000000 --- a/backend/internal/server/dashboard_cursor.go +++ /dev/null @@ -1,73 +0,0 @@ -package server - -import ( - "encoding/base64" - "encoding/json" - "strings" - "time" -) - -func dashboardCursor(encoded, sort, field string) (M, error) { - invalid := func() (M, error) { return nil, fail("invalid_cursor", 400) } - if utf16Length(encoded) > 2048 { - return invalid() - } - // Node's base64url decoder accepts both alphabets, optional padding and - // whitespace. JSON validation still applies to the complete decoded payload. - encoded = strings.SplitN(encoded, "=", 2)[0] - encoded = strings.Map(func(r rune) rune { - switch { - case r >= 'A' && r <= 'Z' || r >= 'a' && r <= 'z' || r >= '0' && r <= '9': - return r - case r == '-' || r == '+': - return '-' - case r == '_' || r == '/': - return '_' - } - return -1 - }, encoded) - if len(encoded)%4 == 1 { - encoded = encoded[:len(encoded)-1] - } - raw, err := base64.RawURLEncoding.DecodeString(encoded) - if err != nil { - return invalid() - } - var cursor M - if json.Unmarshal(raw, &cursor) != nil { - return invalid() - } - actualSort, sortOK := cursor["sort"].(string) - _, typeOK := cursor["type"].(string) - idText, idOK := cursor["id"].(string) - if !sortOK || actualSort != sort || !typeOK || !idOK { - return invalid() - } - id, err := oid(idText) - if err != nil { - return invalid() - } - value, present := cursor["value"] - if !present { - return invalid() - } - if field == "anonymizeDate" || field == "lastView" || field == "options.expirationDate" { - parsed, ok := dashboardCursorDate(value) - if !ok { - return invalid() - } - value = parsed - } else { - switch value.(type) { - case string, float64: - default: - return invalid() - } - } - return M{"sort": sort, "type": cursor["type"], "id": id, "value": value}, nil -} - -func dashboardCursorDate(value any) (time.Time, bool) { - parsed, ok, err := javascriptDateValue(value) - return parsed, ok && err == nil -} diff --git a/backend/internal/server/dashboard_cursor_encode.go b/backend/internal/server/dashboard_cursor_encode.go deleted file mode 100644 index ad92beb..0000000 --- a/backend/internal/server/dashboard_cursor_encode.go +++ /dev/null @@ -1,61 +0,0 @@ -package server - -import ( - "bytes" - "encoding/base64" - "encoding/json" - "math" -) - -func encodeDashboardCursor(sort string, last M) (string, error) { - value := responseJSON(last["_sort"]) - switch n := value.(type) { - case int: - value = float64(n) - case int32: - value = float64(n) - case int64: - value = float64(n) - case float32: - value = float64(n) - } - if n, ok := value.(float64); ok { - if math.IsInf(n, 0) || math.IsNaN(n) { - value = nil - } else if n == 0 { - value = float64(0) - } - } - // JSON.stringify preserves this property order. Dates use JavaScript's - // millisecond representation before the bytes are base64url encoded. - payload := struct { - Sort string `json:"sort"` - Value any `json:"value"` - Type string `json:"type"` - ID string `json:"id"` - }{sort, value, str(last["_type"]), str(last["_id"])} - var buffer bytes.Buffer - encoder := json.NewEncoder(&buffer) - encoder.SetEscapeHTML(false) - if err := encoder.Encode(payload); err != nil { - return "", err - } - raw := bytes.TrimSuffix(buffer.Bytes(), []byte{'\n'}) - // Go escapes JavaScript line separators even with EscapeHTML disabled. - // Skip escaped backslashes so literal text such as "\\u2028" stays literal. - normalized := make([]byte, 0, len(raw)) - for i := 0; i < len(raw); i++ { - if raw[i] == '\\' && i+1 < len(raw) { - if i+5 < len(raw) && string(raw[i:i+5]) == `\u202` && (raw[i+5] == '8' || raw[i+5] == '9') { - normalized = append(normalized, 0xe2, 0x80, 0xa8+raw[i+5]-'8') - i += 5 - continue - } - normalized = append(normalized, raw[i], raw[i+1]) - i++ - continue - } - normalized = append(normalized, raw[i]) - } - return base64.RawURLEncoding.EncodeToString(normalized), nil -} diff --git a/backend/internal/server/dashboard_cursor_encode_test.go b/backend/internal/server/dashboard_cursor_encode_test.go deleted file mode 100644 index a276329..0000000 --- a/backend/internal/server/dashboard_cursor_encode_test.go +++ /dev/null @@ -1,44 +0,0 @@ -package server - -import ( - "encoding/json" - "os" - "strings" - "testing" - "time" -) - -func TestTypeScriptDashboardCursorEncoding(t *testing.T) { - raw, err := os.ReadFile("testdata/dashboard-cursor-output.json") - if err != nil { - t.Fatal(err) - } - var cases []struct { - Sort, Type, ID, Expected string - Value any - Date bool - } - if err := json.Unmarshal(raw, &cases); err != nil { - t.Fatal(err) - } - for i, c := range cases { - value := c.Value - if c.Date { - value = time.UnixMilli(int64(value.(float64))).UTC() - } - id, err := oid(c.ID) - if err != nil { - t.Fatal(err) - } - got, err := encodeDashboardCursor(c.Sort, M{"_sort": value, "_type": c.Type, "_id": id}) - if err != nil || got != c.Expected { - t.Fatalf("case %d: got %s %v want %s", i, got, err, c.Expected) - } - if c.Date { - decoded, err := dashboardCursor(got, c.Sort, strings.TrimPrefix(c.Sort, "-")) - if err != nil || !decoded["value"].(time.Time).Equal(value.(time.Time)) { - t.Fatalf("case %d date round trip: %v %v", i, decoded, err) - } - } - } -} diff --git a/backend/internal/server/dashboard_cursor_integration_test.go b/backend/internal/server/dashboard_cursor_integration_test.go deleted file mode 100644 index 2ead67d..0000000 --- a/backend/internal/server/dashboard_cursor_integration_test.go +++ /dev/null @@ -1,157 +0,0 @@ -package server - -import ( - "context" - "encoding/base64" - "encoding/json" - "fmt" - "net/http/httptest" - "net/url" - "os" - "testing" - "time" - - "github.com/tdurieux/anonymous_github/backend/internal/security" - "go.mongodb.org/mongo-driver/v2/bson" -) - -func runDashboardCursorIntegration(t *testing.T, s *Server) { - t.Run("dashboard cursor HTTP contracts", func(t *testing.T) { - ctx := context.Background() - owner := bson.NewObjectID() - token := "synthetic-dashboard-cursors" - if _, err := s.Store.DB.Collection("users").InsertOne(ctx, M{"_id": owner, "username": "dashboard-cursor-fixture", "status": "active", "apiTokens": []M{{"tokenHash": security.HashToken(token)}}}); err != nil { - t.Fatal(err) - } - for index, name := range []string{"cursor-a", "cursor-b", "cursor-c"} { - repoID, err := oid(fmt.Sprintf("eeddcc00000000000000000%d", index+1)) - if err != nil { - t.Fatal(err) - } - if _, err := s.Store.DB.Collection(collection("repo")).InsertOne(ctx, M{"_id": repoID, "repoId": name, "anonymizeDate": time.Date(2024, 3, index+1, 0, 0, 0, 0, time.UTC), "owner": owner, "status": "ready", "options": M{"expirationMode": "never"}, "source": M{"provider": "fixture", "repositoryName": "nested/team/project"}}); err != nil { - t.Fatal(err) - } - } - requests := 0 - call := func(query url.Values) *httptest.ResponseRecorder { - req := httptest.NewRequest("GET", "/api/user/dashboard?"+query.Encode(), nil) - // Authentication throttling has separate tests. Keep each batch - // below its per-IP attempt budget while exercising cursor cases. - requests++ - req.RemoteAddr = fmt.Sprintf("198.51.100.%d:1234", 200+requests/40) - req.Header.Set("Authorization", "Bearer "+token) - w := httptest.NewRecorder() - s.ServeHTTP(w, req) - return w - } - raw, err := os.ReadFile("testdata/dashboard-cursors.json") - if err != nil { - t.Fatal(err) - } - var cases []struct { - Sort, Cursor string - Rejected bool - HTTP bool - } - if err := json.Unmarshal(raw, &cases); err != nil { - t.Fatal(err) - } - for i, c := range cases { - if !c.HTTP { - continue - } - w := call(url.Values{"sort": {c.Sort}, "cursor": {c.Cursor}}) - want := 200 - if c.Rejected { - want = 400 - } - if w.Code != want { - t.Fatalf("case %d: %d %s", i, w.Code, w.Body) - } - } - for _, value := range []any{"March 1 2024", "2024-02-30", "2024-02-29T24:00:00Z", []string{"2024", "3", "1"}} { - payload, err := json.Marshal(M{"sort": "anonymizeDate", "type": "repo", "id": "eeddcc000000000000000001", "value": value}) - if err != nil { - t.Fatal(err) - } - w := call(url.Values{"sort": {"anonymizeDate"}, "limit": {"1"}, "cursor": {base64.RawURLEncoding.EncodeToString(payload)}}) - var result M - if err = json.Unmarshal(w.Body.Bytes(), &result); err != nil || w.Code != 200 { - t.Fatal(value, w.Code, w.Body) - } - items := arr(result["items"]) - if len(items) != 1 || str(obj(items[0])["repoId"]) != "cursor-b" || number(result["total"]) != 3 || number(result["filtered"]) != 3 { - t.Fatal("date cursor boundary", value, result) - } - } - - limitRaw, err := os.ReadFile("testdata/dashboard-limits.json") - if err != nil { - t.Fatal(err) - } - var limits []struct { - Values []string - Expected int - } - if err := json.Unmarshal(limitRaw, &limits); err != nil { - t.Fatal(err) - } - for _, c := range limits { - w := call(url.Values{"sort": {"_name"}, "limit": c.Values}) - if w.Code != 200 { - t.Fatal(c, w.Code, w.Body) - } - var result M - if err := json.Unmarshal(w.Body.Bytes(), &result); err != nil { - t.Fatal(err) - } - if len(arr(result["items"])) != min(3, c.Expected) || (result["cursor"] != nil) != (c.Expected < 3) { - t.Fatal("limit page mismatch", c, result) - } - } - outputRaw, err := os.ReadFile("testdata/dashboard-cursor-output.json") - if err != nil { - t.Fatal(err) - } - var outputs []struct { - Value any - Expected string - HTTP bool - } - if err := json.Unmarshal(outputRaw, &outputs); err != nil { - t.Fatal(err) - } - expectedCursors := map[string]string{} - for _, output := range outputs { - if output.HTTP { - expectedCursors[str(output.Value)] = output.Expected - } - } - cursor := "" - for _, name := range []string{"cursor-a", "cursor-b", "cursor-c"} { - query := url.Values{"sort": {"_name"}, "limit": {"1"}} - if cursor != "" { - query.Set("cursor", cursor) - } - w := call(query) - if w.Code != 200 { - t.Fatal(w.Code, w.Body) - } - var result M - if err := json.Unmarshal(w.Body.Bytes(), &result); err != nil { - t.Fatal(err) - } - items := arr(result["items"]) - if len(items) != 1 || obj(items[0])["repoId"] != name || number(result["total"]) != 3 || number(result["filtered"]) != 3 { - t.Fatal("page mismatch", result) - } - cursor = str(result["cursor"]) - if cursor != expectedCursors[name] { - t.Fatal("cursor differs from TypeScript bytes", name, cursor, expectedCursors[name]) - } - if (name == "cursor-c") != (cursor == "") { - t.Fatal("unexpected next cursor", result) - } - } - }) -} diff --git a/backend/internal/server/dashboard_cursor_test.go b/backend/internal/server/dashboard_cursor_test.go deleted file mode 100644 index 6db2816..0000000 --- a/backend/internal/server/dashboard_cursor_test.go +++ /dev/null @@ -1,36 +0,0 @@ -package server - -import ( - "encoding/json" - "os" - "reflect" - "strings" - "testing" -) - -func TestTypeScriptDashboardCursors(t *testing.T) { - raw, err := os.ReadFile("testdata/dashboard-cursors.json") - if err != nil { - t.Fatal(err) - } - var cases []struct { - Sort, Cursor string - Rejected bool - Expected M - } - if err := json.Unmarshal(raw, &cases); err != nil { - t.Fatal(err) - } - for i, c := range cases { - got, err := dashboardCursor(c.Cursor, c.Sort, strings.TrimPrefix(c.Sort, "-")) - if c.Rejected { - if err == nil { - t.Fatalf("case %d accepted invalid cursor", i) - } - continue - } - if err != nil || !reflect.DeepEqual(defaultsJSON(t, responseJSON(got)), defaultsJSON(t, c.Expected)) { - t.Fatalf("case %d: %#v %v want %#v", i, got, err, c.Expected) - } - } -} diff --git a/backend/internal/server/dashboard_filters.go b/backend/internal/server/dashboard_filters.go deleted file mode 100644 index 1fa6e7a..0000000 --- a/backend/internal/server/dashboard_filters.go +++ /dev/null @@ -1,53 +0,0 @@ -package server - -import ( - "regexp" - "strings" - "unicode" - "unicode/utf16" -) - -func dashboardFilter(query map[string]*queryValue) (M, error) { - filter := M{} - kind, err := query["type"].stringValue() - if err != nil { - return nil, err - } - if collection(kind) != "" { - filter["_type"] = query["type"].nativeValue() - } - if value := query["attention"]; value != nil && value.kind == 's' && value.scalar == "true" { - filter["_attention"] = true - } - statuses, err := query["statuses"].stringDefault("ready,progress,error,expired") - if err != nil { - return nil, err - } - valid := []string{} - for _, status := range strings.Split(statuses, ",") { - switch status { - case "ready", "progress", "error", "expired", "removed": - valid = append(valid, status) - } - } - filter["_statusKey"] = M{"$in": valid} - rawSearch, err := query["q"].stringDefault("") - if err != nil { - return nil, err - } - search := strings.TrimFunc(rawSearch, func(r rune) bool { return unicode.IsSpace(r) && r != '\u0085' || r == '\ufeff' }) - units := utf16.Encode([]rune(search)) - if len(units) > 256 { - units = units[:256] - } - // A split surrogate is encoded as U+FFFD by Node's BSON UTF-8 writer. - search = string(utf16.Decode(units)) - if search != "" { - clauses := []M{} - for _, field := range []string{"_anonymousId", "_label", "_source", "conference"} { - clauses = append(clauses, M{field: M{"$regex": regexp.QuoteMeta(search), "$options": "i"}}) - } - filter["$or"] = clauses - } - return filter, nil -} diff --git a/backend/internal/server/dashboard_filters_integration_test.go b/backend/internal/server/dashboard_filters_integration_test.go deleted file mode 100644 index be568d4..0000000 --- a/backend/internal/server/dashboard_filters_integration_test.go +++ /dev/null @@ -1,95 +0,0 @@ -package server - -import ( - "context" - "encoding/json" - "net/http/httptest" - "net/url" - "strings" - "testing" - "time" - - "github.com/tdurieux/anonymous_github/backend/internal/security" - "go.mongodb.org/mongo-driver/v2/bson" -) - -func runDashboardFiltersIntegration(t *testing.T, s *Server) { - t.Run("dashboard search and repeated query values", func(t *testing.T) { - ctx := context.Background() - owner := bson.NewObjectID() - token := "synthetic-dashboard-filters" - if _, err := s.Store.DB.Collection("users").InsertOne(ctx, M{"_id": owner, "username": "dashboard-filter-fixture", "status": "active", "apiTokens": []M{{"tokenHash": security.HashToken(token)}}}); err != nil { - t.Fatal(err) - } - for _, r := range []struct{ id, status, source string }{ - {"filter-long", "ready", strings.Repeat("é", 256)}, - {"filter-short", "error", strings.Repeat("é", 200)}, - {"filter-literal", "removed", "[x].*"}, - {"filter-split", "preparing", strings.Repeat("a", 255) + "\ufffd"}, - } { - if _, err := s.Store.DB.Collection(collection("repo")).InsertOne(ctx, M{"_id": bson.NewObjectID(), "repoId": r.id, "owner": owner, "status": r.status, "anonymizeDate": time.Now(), "source": M{"provider": "fixture", "repositoryName": r.source}, "options": M{"expirationMode": "never"}}); err != nil { - t.Fatal(err) - } - } - if _, err := s.Store.DB.Collection(collection("gist")).InsertOne(ctx, M{"_id": bson.NewObjectID(), "gistId": "filter-gist", "owner": owner, "status": "ready", "source": M{"gistId": "first,second"}, "options": M{"expirationMode": "never"}}); err != nil { - t.Fatal(err) - } - if _, err := s.Store.DB.Collection(collection("pr")).InsertOne(ctx, M{"_id": bson.NewObjectID(), "pullRequestId": "filter-pr", "owner": owner, "status": "ready", "source": M{"repositoryFullName": "first-only", "pullRequestId": 1}, "options": M{"expirationMode": "never"}}); err != nil { - t.Fatal(err) - } - for _, c := range []struct { - query url.Values - count int - id string - status int - }{ - {url.Values{}, 5, "", 200}, - {url.Values{"q": {strings.Repeat("é", 256) + "truncated"}}, 1, "filter-long", 200}, - {url.Values{"q": {strings.Repeat("a", 255) + "😀"}}, 1, "filter-split", 200}, - {url.Values{"q": {"[x].*"}, "statuses": {"removed"}}, 1, "filter-literal", 200}, - {url.Values{"q": {"first", "second"}}, 1, "filter-gist", 200}, - {url.Values{"q": {"\ufefffirst,second\ufeff"}}, 1, "filter-gist", 200}, - {url.Values{"q": {"\u0085first,second\u0085"}}, 0, "", 200}, - {url.Values{"statuses": {"ready", "removed"}}, 4, "", 200}, - {url.Values{"statuses": {"", ""}}, 0, "", 200}, - {url.Values{"attention": {"true"}}, 1, "filter-short", 200}, - {url.Values{"attention": {"true", "true"}}, 5, "", 200}, - {url.Values{"type": {"repo", "gist"}}, 5, "", 200}, - {url.Values{"sort": {"_name", "_label"}}, 0, "", 400}, - {url.Values{"q[]": {"first", "second"}}, 1, "filter-gist", 200}, - {url.Values{"q[1]": {"second"}, "q[0]": {"first"}}, 1, "filter-gist", 200}, - {url.Values{"q[]": {"first,second"}, "limit[]": {"1"}}, 1, "filter-gist", 200}, - {url.Values{"statuses[]": {""}}, 0, "", 200}, - {url.Values{"statuses[]": {"ready", "removed"}}, 4, "", 200}, - {url.Values{"type[]": {"repo"}}, 0, "", 200}, - {url.Values{"attention[]": {"true"}}, 5, "", 200}, - {url.Values{"sort[]": {""}}, 0, "", 400}, - {url.Values{"cursor[]": {""}}, 0, "", 400}, - {url.Values{"cursor[toString]": {"invalid"}}, 0, "", 400}, - {url.Values{"q[toString]": {"invalid"}}, 0, "", 500}, - } { - req := httptest.NewRequest("GET", "/api/user/dashboard?"+c.query.Encode(), nil) - req.RemoteAddr = "198.51.100.26:1234" - req.Header.Set("Authorization", "Bearer "+token) - w := httptest.NewRecorder() - s.ServeHTTP(w, req) - if w.Code != c.status { - t.Fatal(c.query, w.Code, w.Body) - } - if c.status != 200 { - continue - } - var result M - if err := json.Unmarshal(w.Body.Bytes(), &result); err != nil { - t.Fatal(err) - } - items := arr(result["items"]) - if len(items) != c.count || number(result["filtered"]) != int64(c.count) || number(result["total"]) != 6 { - t.Fatal(c.query, result) - } - if c.id != "" && obj(items[0])["_anonymousId"] != c.id { - t.Fatal("wrong search result", c.query, result) - } - } - }) -} diff --git a/backend/internal/server/dashboard_filters_test.go b/backend/internal/server/dashboard_filters_test.go deleted file mode 100644 index 76e8244..0000000 --- a/backend/internal/server/dashboard_filters_test.go +++ /dev/null @@ -1,39 +0,0 @@ -package server - -import ( - "encoding/json" - "net/url" - "os" - "reflect" - "testing" -) - -func TestTypeScriptDashboardFilters(t *testing.T) { - raw, err := os.ReadFile("testdata/dashboard-filters.json") - if err != nil { - t.Fatal(err) - } - var cases []struct{ Query, Expected M } - if err := json.Unmarshal(raw, &cases); err != nil { - t.Fatal(err) - } - for i, c := range cases { - query := url.Values{} - for key, value := range c.Query { - if values, ok := value.([]any); ok { - for _, v := range values { - query.Add(key, str(v)) - } - } else { - query.Set(key, str(value)) - } - } - got, err := dashboardFilter(parseExtendedQuery(query.Encode()).object) - if err != nil { - t.Fatal(err) - } - if !reflect.DeepEqual(defaultsJSON(t, got), defaultsJSON(t, c.Expected)) { - t.Fatalf("case %d: got %#v want %#v", i, got, c.Expected) - } - } -} diff --git a/backend/internal/server/dashboard_limit.go b/backend/internal/server/dashboard_limit.go deleted file mode 100644 index af2c2aa..0000000 --- a/backend/internal/server/dashboard_limit.go +++ /dev/null @@ -1,83 +0,0 @@ -package server - -import ( - "math" - "regexp" - "strconv" - "strings" - "unicode" -) - -var dashboardDecimal = regexp.MustCompile(`^[+-]?(?:[0-9]+(?:\.[0-9]*)?|\.[0-9]+)(?:[eE][+-]?[0-9]+)?$`) - -// Match Math.min(100, Math.max(1, Math.floor(Number(query.limit)) || 50)). -// Repeated query values stringify as an array, rather than selecting the first. -func dashboardLimit(values []string) int { - if len(values) == 0 { - return 50 - } - value := strings.TrimFunc(strings.Join(values, ","), func(r rune) bool { return unicode.IsSpace(r) && r != '\u0085' || r == '\ufeff' }) - if value == "" { - return 50 - } - if value == "Infinity" || value == "+Infinity" { - return 100 - } - if value == "-Infinity" { - return 1 - } - if len(value) >= 2 && value[0] == '0' { - base := 0 - switch value[1] { - case 'x', 'X': - base = 16 - case 'b', 'B': - base = 2 - case 'o', 'O': - base = 8 - } - if base != 0 { - if len(value) == 2 { - return 50 - } - n := 0 - for _, r := range value[2:] { - digit := -1 - switch { - case r >= '0' && r <= '9': - digit = int(r - '0') - case r >= 'a' && r <= 'f': - digit = int(r-'a') + 10 - case r >= 'A' && r <= 'F': - digit = int(r-'A') + 10 - } - if digit < 0 || digit >= base { - return 50 - } - n = min(100, n*base+digit) - } - if n == 0 { - return 50 - } - return n - } - } - if !dashboardDecimal.MatchString(value) { - return 50 - } - n, err := strconv.ParseFloat(value, 64) - if err != nil && !math.IsInf(n, 0) { - return 50 - } - n = math.Floor(n) - if n == 0 || math.IsNaN(n) { - return 50 - } - if n < 1 { - return 1 - } - if n > 100 { - return 100 - } - return int(n) -} diff --git a/backend/internal/server/dashboard_limit_test.go b/backend/internal/server/dashboard_limit_test.go deleted file mode 100644 index 62385eb..0000000 --- a/backend/internal/server/dashboard_limit_test.go +++ /dev/null @@ -1,26 +0,0 @@ -package server - -import ( - "encoding/json" - "os" - "testing" -) - -func TestTypeScriptDashboardLimits(t *testing.T) { - raw, err := os.ReadFile("testdata/dashboard-limits.json") - if err != nil { - t.Fatal(err) - } - var cases []struct { - Values []string - Expected int - } - if err := json.Unmarshal(raw, &cases); err != nil { - t.Fatal(err) - } - for _, c := range cases { - if got := dashboardLimit(c.Values); got != c.Expected { - t.Fatalf("%q: got %d want %d", c.Values, got, c.Expected) - } - } -} diff --git a/backend/internal/server/dashboard_names.go b/backend/internal/server/dashboard_names.go deleted file mode 100644 index 684d432..0000000 --- a/backend/internal/server/dashboard_names.go +++ /dev/null @@ -1,75 +0,0 @@ -package server - -import ( - "go.mongodb.org/mongo-driver/v2/mongo" - "go.mongodb.org/mongo-driver/v2/mongo/options" -) - -// The legacy user map remains authoritative so rollback retains private labels. -func (s *Server) ensureDashboardNames(q *request) error { - return s.dashboardNames.run(q.ctx(), str(q.User["_id"]), func() error { return s.reconcileDashboardNames(q) }) -} -func (s *Server) reconcileDashboardNames(q *request) error { - names := obj(q.User["projectNames"]) - // Stream both existing names and artifact IDs. Neither collection has a - // correctness cap, and full artifact bodies are never loaded for backfill. - reconcile := func(collection string, filter, projection M, change func(M) mongo.WriteModel) error { - cursor, err := s.Store.DB.Collection(collection).Find(q.ctx(), filter, options.Find().SetProjection(projection).SetBatchSize(250)) - if err != nil { - return err - } - defer cursor.Close(q.ctx()) - batch := make([]mongo.WriteModel, 0, 250) - flush := func() error { - if len(batch) == 0 { - return nil - } - _, err := s.Store.DB.Collection("dashboardnames").BulkWrite(q.ctx(), batch) - batch = batch[:0] - return err - } - for cursor.Next(q.ctx()) { - var row M - if err := cursor.Decode(&row); err != nil { - return err - } - if operation := change(row); operation != nil { - batch = append(batch, operation) - } - if len(batch) == 250 { - if err := flush(); err != nil { - return err - } - } - } - if err := cursor.Err(); err != nil { - return err - } - return flush() - } - if err := reconcile("dashboardnames", M{"owner": q.User["_id"]}, M{"type": 1, "artifactId": 1}, func(row M) mongo.WriteModel { - name := str(names[projectNameKey(str(row["type"]), str(row["artifactId"]))]) - if name == "" { - return mongo.NewDeleteOneModel().SetFilter(M{"_id": row["_id"]}) - } - return mongo.NewUpdateOneModel().SetFilter(M{"_id": row["_id"]}).SetUpdate(M{"$set": M{"name": name}}) - }); err != nil { - return err - } - if len(names) == 0 { - return nil - } - for _, kind := range []string{"repo", "pr", "gist"} { - if err := reconcile(collection(kind), membership(q, kind), M{idKey(kind): 1}, func(row M) mongo.WriteModel { - id := str(row[idKey(kind)]) - name := str(names[projectNameKey(kind, id)]) - if name == "" { - return nil - } - return mongo.NewUpdateOneModel().SetFilter(M{"owner": q.User["_id"], "type": kind, "artifactId": id}).SetUpdate(M{"$set": M{"name": name}}).SetUpsert(true) - }); err != nil { - return err - } - } - return nil -} diff --git a/backend/internal/server/dashboard_names_integration_test.go b/backend/internal/server/dashboard_names_integration_test.go deleted file mode 100644 index 8ab537b..0000000 --- a/backend/internal/server/dashboard_names_integration_test.go +++ /dev/null @@ -1,98 +0,0 @@ -package server - -import ( - "context" - "fmt" - "net/http/httptest" - "testing" - - "go.mongodb.org/mongo-driver/v2/bson" -) - -func runDashboardNamesIntegration(t *testing.T, s *Server) { - t.Run("dashboard names reconcile across batches", func(t *testing.T) { - ctx := context.Background() - owner, other := bson.NewObjectID(), bson.NewObjectID() - names := M{} - user := M{"_id": owner, "username": "dashboard-name-member", "externalIDs": M{"github": "dashboard-name-member-id"}, "projectNames": names} - repos := []any{} - existing := []any{} - for i := 0; i < 601; i++ { - id := fmt.Sprintf("name-recovery-%03d", i) - names[projectNameKey("repo", id)] = fmt.Sprintf("Private %d", i) - // Stable coauthor identity must survive a renamed account. - repos = append(repos, M{"_id": bson.NewObjectID(), "repoId": id, "owner": other, "coauthors": []M{{"username": "former-login", "githubId": "dashboard-name-member-id"}}}) - if i < 301 { - existing = append(existing, M{"owner": owner, "type": "repo", "artifactId": id, "name": "stale"}) - } - } - existing = append(existing, M{"owner": owner, "type": "repo", "artifactId": "orphan", "name": "removed private name"}, M{"owner": other, "type": "repo", "artifactId": "orphan", "name": "another user"}) - repos = append(repos, M{"_id": bson.NewObjectID(), "repoId": "name-recovery-forbidden", "owner": other}) - names[projectNameKey("repo", "name-recovery-forbidden")] = "must not backfill" - if _, err := s.Store.DB.Collection(collection("repo")).InsertMany(ctx, repos); err != nil { - t.Fatal(err) - } - if _, err := s.Store.DB.Collection("dashboardnames").InsertMany(ctx, existing); err != nil { - t.Fatal(err) - } - for _, kind := range []string{"pr", "gist"} { - id := "name-recovery-" + kind - names[projectNameKey(kind, id)] = kind + " private" - if _, err := s.Store.DB.Collection(collection(kind)).InsertOne(ctx, M{"_id": bson.NewObjectID(), idKey(kind): id, "owner": owner}); err != nil { - t.Fatal(err) - } - } - q := &request{Server: s, User: user, R: httptest.NewRequest("GET", "/api/user/dashboard", nil)} - for attempt := 0; attempt < 2; attempt++ { - if err := s.ensureDashboardNames(q); err != nil { - t.Fatal(err) - } - rows, err := s.Store.list(ctx, "dashboardnames", M{"owner": owner}, 0, nil) - if err != nil { - t.Fatal(err) - } - if len(rows) != 603 { - t.Fatalf("reconciled %d names; want 603", len(rows)) - } - for _, row := range rows { - want := names[projectNameKey(str(row["type"]), str(row["artifactId"]))] - if row["name"] != want { - t.Fatal("stale or unauthorized name", row) - } - } - } - filter := M{"owner": owner, "type": "repo", "artifactId": "name-recovery-000"} - if _, err := s.Store.update(ctx, "dashboardnames", filter, M{"$set": M{"name": "cached interval"}}); err != nil { - t.Fatal(err) - } - if err := s.ensureDashboardNames(q); err != nil { - t.Fatal(err) - } - cached, err := s.Store.one(ctx, "dashboardnames", filter) - if err != nil || cached["name"] != "cached interval" { - t.Fatal("repeated request reconciled during TTL", err) - } - s.dashboardNames.clear() - if err := s.ensureDashboardNames(q); err != nil { - t.Fatal(err) - } - cached, err = s.Store.one(ctx, "dashboardnames", filter) - if err != nil || cached["name"] != "Private 0" { - t.Fatal("invalidation did not reconcile", err) - } - // An interrupted clear is recovered even when the authoritative map is empty. - user["projectNames"] = M{} - s.dashboardNames.clear() - if err := s.ensureDashboardNames(q); err != nil { - t.Fatal(err) - } - count, err := s.Store.DB.Collection("dashboardnames").CountDocuments(ctx, M{"owner": owner}) - if err != nil || count != 0 { - t.Fatal("empty-map cleanup", count, err) - } - otherRow, err := s.Store.one(ctx, "dashboardnames", M{"owner": other, "artifactId": "orphan"}) - if err != nil || otherRow["name"] != "another user" { - t.Fatal("modified another user's name", err) - } - }) -} diff --git a/backend/internal/server/dashboard_pipeline_test.go b/backend/internal/server/dashboard_pipeline_test.go deleted file mode 100644 index b5eb3c8..0000000 --- a/backend/internal/server/dashboard_pipeline_test.go +++ /dev/null @@ -1,98 +0,0 @@ -package server - -import ( - "encoding/json" - "go.mongodb.org/mongo-driver/v2/bson" - "net/http/httptest" - "net/url" - "os" - "reflect" - "testing" - "time" -) - -func TestTypeScriptDashboardPipeline(t *testing.T) { - raw, err := os.ReadFile("testdata/dashboard-pipeline.json") - if err != nil { - t.Fatal(err) - } - var fixture struct { - Now, Owner string - Cases []struct { - Name string - RawQuery *string - Query M - Expected any - Error string - SortOrder []string - } - } - if err := json.Unmarshal(raw, &fixture); err != nil { - t.Fatal(err) - } - now, err := time.Parse(time.RFC3339, fixture.Now) - if err != nil { - t.Fatal(err) - } - owner, err := oid(fixture.Owner) - if err != nil { - t.Fatal(err) - } - for _, c := range fixture.Cases { - if !t.Run(c.Name, func(t *testing.T) { - query := url.Values{} - for key, value := range c.Query { - if values, ok := value.([]any); ok { - for _, v := range values { - query.Add(key, str(v)) - } - } else { - query.Set(key, str(value)) - } - } - rawQuery := query.Encode() - if c.RawQuery != nil { - rawQuery = *c.RawQuery - } - q := &request{User: M{"_id": owner}, R: httptest.NewRequest("GET", "/api/user/dashboard?"+rawQuery, nil)} - pipeline, _, _, err := dashboardPipeline(q, now) - if c.Error != "" { - if err == nil || err.Error() != c.Error { - t.Fatalf("error %v; want %s", err, c.Error) - } - return - } - if err != nil { - t.Fatal(err) - } - foundSort := false - for _, stage := range arr(obj(pipeline[len(pipeline)-1]["$facet"])["items"]) { - if value, present := obj(stage)["$sort"]; present { - foundSort = true - sort, ok := value.(bson.D) - if !ok { - t.Fatal("multi-key sort must use ordered BSON") - } - keys := []string{} - for _, entry := range sort { - keys = append(keys, entry.Key) - } - if !reflect.DeepEqual(keys, c.SortOrder) { - t.Fatalf("sort order %v; want %v", keys, c.SortOrder) - } - } - } - if !foundSort { - t.Fatal("missing sort stage") - } - got := defaultsJSON(t, responseJSON(pipeline)) - if !reflect.DeepEqual(got, c.Expected) { - actual, _ := json.Marshal(got) - expected, _ := json.Marshal(c.Expected) - t.Fatalf("pipeline mismatch\ngot %s\nwant %s", actual, expected) - } - }) { - return - } - } -} diff --git a/backend/internal/server/discovery_cache_integration_test.go b/backend/internal/server/discovery_cache_integration_test.go deleted file mode 100644 index 8e59ebb..0000000 --- a/backend/internal/server/discovery_cache_integration_test.go +++ /dev/null @@ -1,146 +0,0 @@ -package server - -import ( - "context" - "encoding/json" - "io" - "net/http" - "net/http/httptest" - "reflect" - "strings" - "testing" - - "github.com/tdurieux/anonymous_github/backend/internal/provider" - "go.mongodb.org/mongo-driver/v2/bson" -) - -func runDiscoveryCacheIntegration(t *testing.T, base *Server) { - t.Run("OAuth discovery cache and refresh", func(t *testing.T) { - ctx := context.Background() - owner := bson.NewObjectID() - user := M{"_id": owner, "username": "discovery-cache-" + owner.Hex(), "status": "active"} - if _, err := base.Store.DB.Collection("users").InsertOne(ctx, user); err != nil { - t.Fatal(err) - } - s := &Server{Config: base.Config, Store: base.Store} - s.Config.AppEnabled = false - adapter := &githubProvider{server: s} - var err error - s.providers, err = provider.New(adapter) - if err != nil { - t.Fatal(err) - } - grantRequest := &request{Server: s, R: httptest.NewRequest("GET", "/", nil)} - grant := func() { - t.Helper() - if err := s.saveGrant(grantRequest, owner, "github", M{"access_token": "synthetic-cache-token"}); err != nil { - t.Fatal(err) - } - } - grant() - repoID := "88190001" - body := []M{{"id": 88190001, "full_name": "cache/original", "html_url": "https://github.com/cache/original", "size": 42, "default_branch": "trunk"}} - calls := 0 - status := 200 - var duringFetch func() - s.HTTP = &http.Client{Transport: roundTrip(func(req *http.Request) (*http.Response, error) { - calls++ - if req.URL.Path != "/user/repos" || req.URL.Query().Get("sort") != "pushed" { - t.Fatalf("unexpected request %s", req.URL) - } - if duringFetch != nil { - duringFetch() - } - raw, err := json.Marshal(body) - if err != nil { - t.Fatal(err) - } - return &http.Response{StatusCode: status, Header: http.Header{}, Body: io.NopCloser(strings.NewReader(string(raw)))}, nil - })} - list := func(query string) ([]M, error) { - q := &request{Server: s, User: user, Params: map[string]string{}, R: httptest.NewRequest("GET", "/api/user/all_repositories"+query, nil)} - result, err := s.allRepositories(q) - if err != nil { - return nil, err - } - return result.([]M), nil - } - assertList := func(query, name string, wantCalls int) { - t.Helper() - rows, err := list(query) - if err != nil { - t.Fatal(err) - } - want := []M{{"id": "gh_" + repoID, "fullName": name}} - if !reflect.DeepEqual(rows, want) || calls != wantCalls { - t.Fatalf("rows=%v calls=%d; want %v calls=%d", rows, calls, want, wantCalls) - } - } - assertList("", "cache/original", 1) - cached, err := s.Store.one(ctx, "repositories", M{"externalId": "gh_" + repoID}) - if err != nil { - t.Fatal(err) - } - if cached["defaultBranch"] != "trunk" || number(cached["size"]) != 42 || cached["source"] != "github" { - t.Fatalf("missing metadata: %v", cached) - } - body[0]["full_name"] = "cache/renamed" - assertList("", "cache/original", 1) - assertList("?force=true", "cache/original", 1) - assertList("?force=1&force[]=1", "cache/original", 1) - assertList("?force[]=1", "cache/renamed", 2) - // TypeScript returns fresh metadata on refresh but reuses an existing - // database row unchanged; the next cached read reflects that row. - assertList("", "cache/original", 2) - stored, err := s.Store.one(ctx, "users", M{"_id": owner}) - if err != nil { - t.Fatal(err) - } - if len(arr(stored["repositories"])) != 1 || str(arr(stored["repositories"])[0]) != str(cached["_id"]) { - t.Fatal("reference not reused") - } - status = 500 - if _, err := list("?force=1"); err == nil { - t.Fatal("upstream failure swallowed") - } - status = 200 - assertList("", "cache/original", 3) - grant() - assertList("", "cache/renamed", 4) - // A grant replacement during the upstream request must win over publication. - duringFetch = grant - if _, err := list("?force=1"); err == nil || err.Error() != "connection_changed" { - t.Fatalf("stale publication accepted: %v", err) - } - duringFetch = nil - stored, err = s.Store.one(ctx, "users", M{"_id": owner}) - if err != nil || len(arr(stored["repositories"])) != 0 { - t.Fatal("invalidation overwritten", err) - } - body = []M{} - for i := 0; i < 2; i++ { - rows, err := list("") - if err != nil || len(rows) != 0 { - t.Fatal(rows, err) - } - } - if calls != 7 { - t.Fatalf("empty lists should refetch: %d", calls) - } - if _, err := s.Store.update(ctx, "users", M{"_id": owner}, M{"$set": M{"repositories": []any{bson.NewObjectID()}}}); err != nil { - t.Fatal(err) - } - rows, err := list("") - if err != nil || len(rows) != 0 || calls != 7 { - t.Fatal("missing refs should be omitted without fetching", rows, err, calls) - } - foreignID := bson.NewObjectID() - if _, err := s.Store.DB.Collection("repositories").InsertOne(ctx, M{"_id": foreignID, "externalId": "other-forge:opaque", "name": "private/other-forge"}); err != nil { - t.Fatal(err) - } - if _, err := s.Store.update(ctx, "users", M{"_id": owner}, M{"$set": M{"repositories": []any{cached["_id"], foreignID, cached["_id"], bson.NewObjectID()}}}); err != nil { - t.Fatal(err) - } - assertList("", "cache/original", 7) - }) -} diff --git a/backend/internal/server/discovery_integration_test.go b/backend/internal/server/discovery_integration_test.go deleted file mode 100644 index f4b0f19..0000000 --- a/backend/internal/server/discovery_integration_test.go +++ /dev/null @@ -1,149 +0,0 @@ -package server - -import ( - "context" - "encoding/json" - "errors" - "io" - "net/http" - "net/http/httptest" - "reflect" - "strings" - "testing" - - "github.com/tdurieux/anonymous_github/backend/internal/provider" - "go.mongodb.org/mongo-driver/v2/bson" -) - -func runDiscoveryIntegration(t *testing.T, base *Server) { - t.Run("GitHub discovery connection parity", func(t *testing.T) { - for _, c := range []struct { - name string - oauth, app bool - failure string - want []string - wantError bool - }{ - {"OAuth only", true, false, "", []string{"legacy/one", "legacy/two"}, false}, - {"App only", false, true, "", []string{"app/two", "app/three"}, false}, - {"combined order and replacement", true, true, "", []string{"legacy/one", "app/two", "app/three"}, false}, - {"installation failure fallback", true, true, "/user/installations", []string{"legacy/one", "legacy/two"}, false}, - {"repository failure fallback", true, true, "/user/installations/1/repositories", []string{"legacy/one", "legacy/two"}, false}, - {"discard partial App results", true, true, "/user/installations/2/repositories", []string{"legacy/one", "legacy/two"}, false}, - {"App failure without OAuth", false, true, "/user/installations/2/repositories", nil, true}, - {"OAuth failure remains fatal", true, true, "/user/repos", nil, true}, - } { - t.Run(c.name, func(t *testing.T) { - ctx := context.Background() - owner := bson.NewObjectID() - if _, err := base.Store.DB.Collection("users").InsertOne(ctx, M{"_id": owner, "username": "discovery-" + owner.Hex(), "status": "active"}); err != nil { - t.Fatal(err) - } - s := &Server{Config: base.Config, Store: base.Store} - s.Config.AppEnabled = true - s.Config.AppID = "12345" - q := &request{Server: s, R: httptest.NewRequest("GET", "/", nil)} - if c.oauth { - if err := s.saveGrant(q, owner, "github", M{"access_token": "synthetic-discovery-oauth"}); err != nil { - t.Fatal(err) - } - } - if c.app { - if err := s.saveGrant(q, owner, "github-app-user", M{"access_token": "synthetic-discovery-app", "refresh_token": "synthetic-refresh", "expires_in": float64(3600), "refresh_token_expires_in": float64(7200)}); err != nil { - t.Fatal(err) - } - } - oauthCalls := 0 - s.HTTP = &http.Client{Transport: roundTrip(func(req *http.Request) (*http.Response, error) { - path := req.URL.Path - expectedToken := "synthetic-discovery-app" - if path == "/user/repos" { - oauthCalls++ - expectedToken = "synthetic-discovery-oauth" - wantSort := "pushed" - if c.app { - wantSort = "" - } - if req.URL.Query().Get("sort") != wantSort { - t.Fatalf("unexpected sort: %s", req.URL) - } - } - if !strings.HasSuffix(req.Header.Get("Authorization"), expectedToken) { - t.Fatal("wrong connection credential") - } - if req.URL.Query().Get("per_page") != "100" || req.URL.Query().Get("page") != "1" { - t.Fatalf("unexpected pagination: %s", req.URL) - } - status := 200 - var body any - if path == c.failure { - status = 500 - body = M{"message": "synthetic private upstream detail"} - } else { - switch path { - case "/user/installations": - body = M{"installations": []M{ - {"id": 1, "app_id": 12345, "suspended_at": nil}, - {"id": 2, "app_id": 12345, "suspended_at": ""}, - {"id": 3, "app_id": 12345, "suspended_at": "2026-01-01"}, - {"id": 4, "app_id": 54321, "suspended_at": nil}, - }} - case "/user/installations/1/repositories": - body = M{"repositories": []M{{"id": 2, "full_name": "app/two"}}} - case "/user/installations/2/repositories": - body = M{"repositories": []M{{"id": 3, "full_name": "app/three"}}} - case "/user/repos": - body = []M{{"id": 1, "full_name": "legacy/one"}, {"id": 2, "full_name": "legacy/two"}} - default: - t.Fatalf("unexpected upstream request %s", req.URL) - } - } - raw, err := json.Marshal(body) - if err != nil { - t.Fatal(err) - } - return &http.Response{StatusCode: status, Header: http.Header{}, Body: io.NopCloser(strings.NewReader(string(raw)))}, nil - })} - adapter := &githubProvider{server: s} - repos, err := adapter.List(ctx, provider.ListRequest{OwnerID: owner.Hex()}) - if c.wantError { - var api *APIError - if !errors.As(err, &api) || strings.Contains(err.Error(), "private upstream") { - t.Fatalf("unexpected discovery error: %v", err) - } - if len(repos) != 0 { - t.Fatal("returned partial discovery on failure") - } - return - } - if err != nil { - t.Fatal(err) - } - names := []string{} - for _, r := range repos { - names = append(names, r.Name) - } - if !reflect.DeepEqual(names, c.want) { - t.Fatalf("repositories %v; want %v", names, c.want) - } - wantOAuthCalls := 1 - if c.app { - // App discovery always checks current installation access, - // even if an OAuth-style cached list could be available. - again, err := adapter.List(ctx, provider.ListRequest{OwnerID: owner.Hex()}) - if err != nil || !reflect.DeepEqual(again, repos) { - t.Fatal("App discovery repeat", again, err) - } - saved, err := s.Store.one(ctx, "users", M{"_id": owner}) - if err != nil || len(arr(saved["repositories"])) != 0 { - t.Fatal("App discovery persisted an OAuth cache", err) - } - wantOAuthCalls = 2 - } - if c.oauth && oauthCalls != wantOAuthCalls { - t.Fatalf("OAuth calls = %d", oauthCalls) - } - }) - } - }) -} diff --git a/backend/internal/server/discovery_test.go b/backend/internal/server/discovery_test.go deleted file mode 100644 index 114217f..0000000 --- a/backend/internal/server/discovery_test.go +++ /dev/null @@ -1,49 +0,0 @@ -package server - -import ( - "context" - "net/http/httptest" - "testing" - - "github.com/tdurieux/anonymous_github/backend/internal/provider" -) - -type discoveryFixture struct{ request provider.ListRequest } - -func (p *discoveryFixture) ID() string { return "other-forge" } -func (p *discoveryFixture) List(_ context.Context, r provider.ListRequest) ([]provider.Repository, error) { - p.request = r - return []provider.Repository{{ID: "opaque:123", Name: "team/subgroup/project"}}, nil -} -func (p *discoveryFixture) Branches(context.Context, provider.Access) ([]provider.Branch, error) { - return nil, nil -} -func (p *discoveryFixture) Readme(context.Context, provider.Access, string) (string, error) { - return "", nil -} - -func TestProviderDiscoveryRefresh(t *testing.T) { - for _, c := range []struct { - query string - force bool - }{{"", false}, {"?force=1", true}, {"?force=true", false}, {"?force=0", false}, {"?force=1&force=1", false}} { - p := &discoveryFixture{} - registry, err := provider.New(p) - if err != nil { - t.Fatal(err) - } - s := &Server{providers: registry} - q := &request{R: httptest.NewRequest("GET", "/"+c.query, nil), User: M{"_id": "owner"}, Params: map[string]string{"provider": p.ID()}} - result, err := s.allRepositories(q) - if err != nil { - t.Fatal(err) - } - if p.request.OwnerID != "owner" || p.request.Force != c.force { - t.Fatalf("%s: %+v", c.query, p.request) - } - rows := result.([]M) - if len(rows) != 1 || rows[0]["fullName"] != "team/subgroup/project" || rows[0]["id"] != externalRepositoryID(p.ID(), "opaque:123") { - t.Fatal(rows) - } - } -} diff --git a/backend/internal/server/document_cleanup.go b/backend/internal/server/document_cleanup.go deleted file mode 100644 index 82336ba..0000000 --- a/backend/internal/server/document_cleanup.go +++ /dev/null @@ -1,26 +0,0 @@ -package server - -// Preserve metadata that TypeScript's resetSate leaves on the tombstone, while -// removing the content and identity fields it explicitly clears. Copy first so -// preparing the update does not alter the loaded resource snapshot. -func clearedDocumentPayload(kind string, value any) M { - out := M{} - for key, value := range obj(value) { - out[key] = value - } - out["comments"] = []any{} - if kind == "gist" { - out["description"] = "" - out["files"] = []any{} - out["ownerLogin"] = "" - } else { - for _, key := range []string{"body", "title", "diff", "baseRepositoryFullName", "headRepositoryFullName"} { - out[key] = "" - } - out["state"] = "closed" - out["draft"] = false - out["merged"] = false - delete(out, "mergedDate") - } - return out -} diff --git a/backend/internal/server/document_cleanup_integration_test.go b/backend/internal/server/document_cleanup_integration_test.go deleted file mode 100644 index aeb8f8e..0000000 --- a/backend/internal/server/document_cleanup_integration_test.go +++ /dev/null @@ -1,45 +0,0 @@ -package server - -import ( - "context" - "fmt" - "go.mongodb.org/mongo-driver/v2/bson" - "reflect" - "testing" -) - -func runDocumentCleanupIntegration(t *testing.T, s *Server) { - t.Run("document removal and expiry preserve metadata", func(t *testing.T) { - ctx := context.Background() - for i, c := range documentCleanupCases(t) { - for _, action := range []string{"remove", "expire"} { - state, target := "removing", "removed" - if action == "expire" { - state, target = "expiring", "expired" - } - id := fmt.Sprintf("document-cleanup-%s-%d-%s", c.Kind, i, action) - field := "gist" - if c.Kind == "pr" { - field = "pullRequest" - } - row := M{"_id": bson.NewObjectID(), idKey(c.Kind): id, "owner": bson.NewObjectID(), "status": state, "source": M{"provider": "fixture"}, field: c.Input} - if _, err := s.Store.DB.Collection(collection(c.Kind)).InsertOne(ctx, row); err != nil { - t.Fatal(err) - } - if err := s.runJob(ctx, M{"kind": c.Kind, "resourceId": id, "action": action}); err != nil { - t.Fatal(err) - } - saved, err := s.Store.one(ctx, collection(c.Kind), M{"_id": row["_id"]}) - if err != nil { - t.Fatal(err) - } - if saved["status"] != target || !reflect.DeepEqual(defaultsJSON(t, saved[field]), defaultsJSON(t, c.Expected)) { - t.Fatal("persisted cleanup differs from TypeScript", id, saved[field]) - } - if err := s.runJob(ctx, M{"kind": c.Kind, "resourceId": id, "action": action}); err != nil { - t.Fatal("repeat cleanup", err) - } - } - } - }) -} diff --git a/backend/internal/server/document_cleanup_test.go b/backend/internal/server/document_cleanup_test.go deleted file mode 100644 index 34029df..0000000 --- a/backend/internal/server/document_cleanup_test.go +++ /dev/null @@ -1,38 +0,0 @@ -package server - -import ( - "encoding/json" - "os" - "reflect" - "testing" -) - -type documentCleanupCase struct { - Kind string - Input, Expected M -} - -func documentCleanupCases(t *testing.T) []documentCleanupCase { - t.Helper() - raw, err := os.ReadFile("testdata/document-cleanup.json") - if err != nil { - t.Fatal(err) - } - var cases []documentCleanupCase - if err := json.Unmarshal(raw, &cases); err != nil { - t.Fatal(err) - } - return cases -} -func TestTypeScriptDocumentCleanup(t *testing.T) { - for i, c := range documentCleanupCases(t) { - before := defaultsJSON(t, c.Input) - got := clearedDocumentPayload(c.Kind, c.Input) - if !reflect.DeepEqual(defaultsJSON(t, got), defaultsJSON(t, c.Expected)) { - t.Fatalf("case %d: got %#v want %#v", i, got, c.Expected) - } - if !reflect.DeepEqual(defaultsJSON(t, c.Input), before) { - t.Fatal("mutated source snapshot") - } - } -} diff --git a/backend/internal/server/document_identity_integration_test.go b/backend/internal/server/document_identity_integration_test.go deleted file mode 100644 index 2c20814..0000000 --- a/backend/internal/server/document_identity_integration_test.go +++ /dev/null @@ -1,98 +0,0 @@ -package server - -import ( - "bytes" - "context" - "encoding/json" - "errors" - "net/http/httptest" - "testing" - - "github.com/tdurieux/anonymous_github/backend/internal/provider" -) - -type documentIdentityProbe struct { - *fixtureProvider - connectedID string - seen []string -} - -func (p *documentIdentityProbe) ConnectDocument(ctx context.Context, q provider.DocumentRequest, choice string) (provider.Access, error) { - p.seen = append(p.seen, q.Access.Ref.ID) - a, e := p.fixtureProvider.ConnectDocument(ctx, q, choice) - a.Ref.ID = p.connectedID - return a, e -} -func (p *documentIdentityProbe) Document(ctx context.Context, q provider.DocumentRequest) (map[string]any, error) { - if q.Access.Ref.ID != "immutable:project" { - return nil, errors.New("immutable document identity lost") - } - return p.fixtureProvider.Document(ctx, q) -} -func runDocumentIdentityIntegration(t *testing.T, s *Server, p *fixtureProvider, token string) { - t.Run("document immutable provider identity", func(t *testing.T) { - original := s.providers - defer func() { s.providers = original }() - probe := &documentIdentityProbe{fixtureProvider: p, connectedID: "immutable:project"} - entries := original.All() - for i, entry := range entries { - if entry.ID() == "fixture" { - entries[i] = probe - } - } - registry, err := provider.New(entries...) - if err != nil { - t.Fatal(err) - } - s.providers = registry - call := func(method, path string, body any) *httptest.ResponseRecorder { - raw, _ := json.Marshal(body) - req := httptest.NewRequest(method, path, bytes.NewReader(raw)) - req.RemoteAddr = "198.51.100.8:1234" - req.Header.Set("Content-Type", "application/json") - req.Header.Set("Authorization", "Bearer "+token) - w := httptest.NewRecorder() - s.ServeHTTP(w, req) - return w - } - id := "document-immutable-identity" - body := M{"pullRequestId": id, "source": M{"provider": "fixture", "repositoryFullName": p.name, "pullRequestId": 1, "providerRepositoryId": "client-spoof"}, "terms": []any{}, "options": M{}} - if w := call("POST", "/api/pr", body); w.Code != 200 { - t.Fatal(w.Code, w.Body) - } - if len(probe.seen) != 1 || probe.seen[0] != "" { - t.Fatal("client supplied immutable ID", probe.seen) - } - load := func() M { - t.Helper() - r, e := s.Store.one(context.Background(), collection("pr"), M{"pullRequestId": id}) - if e != nil { - t.Fatal(e) - } - return r - } - r := load() - if obj(r["source"])["providerRepositoryId"] != "immutable:project" { - t.Fatal(r) - } - // Settings edits retain the saved identity despite a spoofed client source. - obj(body["source"])["repositoryFullName"] = "renamed/by/client" - if w := call("POST", "/api/pr/"+id, body); w.Code != 200 { - t.Fatal(w.Code, w.Body) - } - if len(probe.seen) != 2 || probe.seen[1] != "immutable:project" { - t.Fatal("edit lost immutable ID", probe.seen) - } - if w := call("POST", "/api/pr/"+id+"/refresh", nil); w.Code != 200 { - t.Fatal("refresh lost saved ID", w.Code, w.Body) - } - probe.connectedID = "another:project" - if w := call("POST", "/api/pr/"+id, body); w.Code != 409 { - t.Fatal("adapter changed saved identity", w.Code, w.Body) - } - r = load() - if obj(r["source"])["providerRepositoryId"] != "immutable:project" || r["status"] != "ready" { - t.Fatal("rejected edit changed resource", r) - } - }) -} diff --git a/backend/internal/server/document_lifecycle_integration_test.go b/backend/internal/server/document_lifecycle_integration_test.go deleted file mode 100644 index d90fde9..0000000 --- a/backend/internal/server/document_lifecycle_integration_test.go +++ /dev/null @@ -1,80 +0,0 @@ -package server - -import ( - "context" - "encoding/json" - "net/http/httptest" - "testing" -) - -func runDocumentLifecycleIntegration(t *testing.T, s *Server, p *fixtureProvider, call func(string, string, string, any) *httptest.ResponseRecorder, token string) { - ctx := context.Background() - for _, kind := range []string{"gist", "pr"} { - t.Run(kind+" synchronous lifecycle", func(t *testing.T) { - id := "document-lifecycle" - base := "/api/" + kind + "/" + id - body := M{idKey(kind): id, "source": M{"provider": "fixture", "gistId": "original-snippet", "repositoryFullName": p.name, "pullRequestId": 42}, "terms": []string{"Alice"}, "options": M{"expirationMode": "never", "title": true, "body": true, "content": true}} - checkDocument := func(w *httptest.ResponseRecorder) { - t.Helper() - var result M - if e := json.Unmarshal(w.Body.Bytes(), &result); e != nil { - t.Fatal(e) - } - field := "gist" - if kind == "pr" { - field = "pullRequest" - } - if w.Code != 200 || str(result["status"]) != "ready" || str(result[idKey(kind)]) != id || result[field] == nil { - t.Fatal("incomplete save response", w.Code, w.Body) - } - } - checkDocument(call("POST", "/api/"+kind, token, body)) - original := obj(body["source"]) - body["source"] = M{"provider": "fixture", "gistId": "changed", "repositoryFullName": "changed/project", "pullRequestId": 99} - checkDocument(call("POST", base, token, body)) - record, e := s.Store.one(ctx, collection(kind), M{idKey(kind): id}) - if e != nil { - t.Fatal(e) - } - if str(obj(record["source"])["gistId"]) != str(original["gistId"]) || str(obj(record["source"])["repositoryFullName"]) != str(original["repositoryFullName"]) { - t.Fatal("settings update rebound source", record) - } - p.revoked = true - defer func() { p.revoked = false }() - w := call("POST", base+"/refresh", token, nil) - if w.Code != 403 { - t.Fatal("upstream refresh failure hidden", w.Code, w.Body) - } - p.revoked = false - w = call("POST", base+"/refresh", token, nil) - var result M - json.Unmarshal(w.Body.Bytes(), &result) - if w.Code != 200 || str(result["status"]) != "ready" { - t.Fatal("refresh replied before completion", w.Code, w.Body) - } - job, e := s.Store.one(ctx, "gojobs", M{"_id": kind + ":" + id + ":prepare"}) - if e != nil || job != nil { - t.Fatal("synchronous document queued preparation", job, e) - } - w = call("DELETE", base, token, nil) - json.Unmarshal(w.Body.Bytes(), &result) - if w.Code != 200 || str(result["status"]) != "removed" { - t.Fatal("delete replied before removal", w.Code, w.Body) - } - w = call("GET", base+"/content", "", nil) - if w.Code != 410 { - t.Fatal("removed content exposed", w.Code, w.Body) - } - w = call("DELETE", base, token, nil) - if w.Code != 410 { - t.Fatal("repeat delete differs", w.Code, w.Body) - } - w = call("POST", base+"/refresh", token, nil) - json.Unmarshal(w.Body.Bytes(), &result) - if w.Code != 200 || str(result["status"]) != "ready" { - t.Fatal("owner could not restore document through explicit refresh", w.Code, w.Body) - } - - }) - } -} diff --git a/backend/internal/server/download_headers.go b/backend/internal/server/download_headers.go deleted file mode 100644 index afb2282..0000000 --- a/backend/internal/server/download_headers.go +++ /dev/null @@ -1,66 +0,0 @@ -package server - -import "strings" - -// downloadDisposition follows Express's installed content-disposition create -// path, including its ASCII fallback and UTF-8 extended filename. See -// LICENSE.content-disposition. The caller still validates storage paths. -func downloadDisposition(filename string) string { - // POSIX basename, as used by the Node runtime. Unlike path.Base, an empty - // filename remains empty and backslashes are ordinary filename characters. - filename = strings.TrimRight(filename, "/") - filename = filename[strings.LastIndexByte(filename, '/')+1:] - extended := false - var fallback strings.Builder - for _, r := range filename { - if r >= 0x20 && r <= 0x7e { - fallback.WriteByte(byte(r)) - } else { - extended = true - fallback.WriteByte('?') - // JavaScript's non-Unicode replacement regex sees UTF-16 code units. - if r > 0xffff { - fallback.WriteByte('?') - } - } - } - hex := func(b byte) bool { return b >= '0' && b <= '9' || b >= 'a' && b <= 'f' || b >= 'A' && b <= 'F' } - for i := 0; i+2 < len(filename); i++ { - if filename[i] == '%' && hex(filename[i+1]) && hex(filename[i+2]) { - extended = true - break - } - } - result := "attachment; filename=" + dispositionParameter(fallback.String()) - if !extended { - return result - } - var encoded strings.Builder - const digits = "0123456789ABCDEF" - for i := 0; i < len(filename); i++ { - b := filename[i] - if b >= 'a' && b <= 'z' || b >= 'A' && b <= 'Z' || b >= '0' && b <= '9' || strings.ContainsRune("!-._~", rune(b)) { - encoded.WriteByte(b) - } else { - encoded.WriteByte('%') - encoded.WriteByte(digits[b>>4]) - encoded.WriteByte(digits[b&15]) - } - } - return result + "; filename*=UTF-8''" + encoded.String() -} - -func dispositionParameter(value string) string { - token := len(value) > 0 - for i := 0; i < len(value); i++ { - b := value[i] - if !(b >= 'a' && b <= 'z' || b >= 'A' && b <= 'Z' || b >= '0' && b <= '9' || strings.ContainsRune("!#$%&'*+-.^_`|~", rune(b))) { - token = false - break - } - } - if token { - return value - } - return `"` + strings.NewReplacer(`\`, `\\`, `"`, `\"`).Replace(value) + `"` -} diff --git a/backend/internal/server/download_headers_test.go b/backend/internal/server/download_headers_test.go deleted file mode 100644 index 2ac1600..0000000 --- a/backend/internal/server/download_headers_test.go +++ /dev/null @@ -1,67 +0,0 @@ -package server - -import ( - "encoding/json" - "fmt" - "io" - "net/http" - "net/http/httptest" - "os" - "strings" - "testing" -) - -func TestDownloadHeaderContracts(t *testing.T) { - data, err := os.ReadFile("testdata/download-headers.json") - if err != nil { - t.Fatal(err) - } - var cases []struct{ Name, Expected string } - if err = json.Unmarshal(data, &cases); err != nil { - t.Fatal(err) - } - for _, c := range cases { - t.Run(c.Name, func(t *testing.T) { - got := downloadDisposition(c.Name) - if got != c.Expected { - t.Fatalf("got %q, want %q", got, c.Expected) - } - if strings.ContainsAny(got, "\r\n\x00") { - t.Fatalf("unsafe header %q", got) - } - }) - } -} - -// HTTP/1's net/http writer suppresses canonical Content-Type on 304. The -// public file route uses this spelling to retain Express attachment metadata; -// verify it remains valid and singular on both supported wire protocols. -func TestFileNotModifiedMIMEProtocols(t *testing.T) { - for _, h2 := range []bool{false, true} { - t.Run(fmt.Sprint(h2), func(t *testing.T) { - server := httptest.NewUnstartedServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - w.Header()["content-type"] = []string{"application/octet-stream"} - w.Header().Set("Content-Disposition", downloadDisposition("研究.txt")) - w.WriteHeader(http.StatusNotModified) - })) - server.EnableHTTP2 = h2 - server.StartTLS() - defer server.Close() - response, err := server.Client().Get(server.URL) - if err != nil { - t.Fatal(err) - } - defer response.Body.Close() - body, err := io.ReadAll(response.Body) - if err != nil || len(body) != 0 || response.StatusCode != 304 { - t.Fatal(response.StatusCode, string(body), err) - } - if got := response.Header.Values("Content-Type"); len(got) != 1 || got[0] != "application/octet-stream" { - t.Fatal(response.Header) - } - if response.ProtoMajor != map[bool]int{false: 1, true: 2}[h2] { - t.Fatal(response.Proto) - } - }) - } -} diff --git a/backend/internal/server/download_policy_test.go b/backend/internal/server/download_policy_test.go deleted file mode 100644 index f1ef3ef..0000000 --- a/backend/internal/server/download_policy_test.go +++ /dev/null @@ -1,18 +0,0 @@ -package server - -import ( - "errors" - "github.com/tdurieux/anonymous_github/backend/internal/security" - "testing" -) - -func TestDisabledDownloadIncludesAdministrators(t *testing.T) { - s := &Server{Config: Config{Download: false}} - for _, admin := range []bool{false, true} { - _, e := s.zip(&request{Identity: security.Identity{Admin: admin}}) - var api *APIError - if !errors.As(e, &api) || api.Code != "download_not_enabled" || api.Status != 403 { - t.Fatal(admin, e) - } - } -} diff --git a/backend/internal/server/embedded_refresh_integration_test.go b/backend/internal/server/embedded_refresh_integration_test.go deleted file mode 100644 index d9d04ee..0000000 --- a/backend/internal/server/embedded_refresh_integration_test.go +++ /dev/null @@ -1,90 +0,0 @@ -package server - -import ( - "context" - "net/http/httptest" - "testing" - "time" -) - -func runEmbeddedRefreshIntegration(t *testing.T, s *Server, p *fixtureProvider, call func(string, string, string, any) *httptest.ResponseRecorder, token string) { - ctx := context.Background() - for _, kind := range []string{"gist", "pr"} { - t.Run(kind+" public refresh", func(t *testing.T) { - filter := M{idKey(kind): "fixture-document"} - load := func() M { - t.Helper() - r, e := s.Store.one(ctx, collection(kind), filter) - if e != nil { - t.Fatal(e) - } - return r - } - set := func(v M) { - t.Helper() - if _, e := s.Store.update(ctx, collection(kind), filter, M{"$set": v}); e != nil { - t.Fatal(e) - } - } - calls := 0 - p.onDocument = func() { calls++ } - defer func() { p.onDocument = nil }() - stale := time.Now().Add(-48 * time.Hour) - set(M{"anonymizeDate": stale, "options.update": true}) - url := "/api/" + kind + "/fixture-document/options" - w := call("GET", url, token, nil) - if w.Code != 200 || calls != 0 { - t.Fatal("owner bypass", w.Code, calls, w.Body) - } - w = call("GET", url, "", nil) - if w.Code != 200 || calls != 1 || !date(load()["anonymizeDate"]).After(stale) { - t.Fatal("automatic update", w.Code, calls, w.Body) - } - w = call("GET", url, "", nil) - if w.Code != 200 || calls != 1 { - t.Fatal("fresh content redownloaded", w.Code, calls) - } - set(M{"anonymizeDate": stale, "options.update": false}) - w = call("GET", url, "", nil) - if w.Code != 200 || calls != 1 { - t.Fatal("update opt-out ignored", w.Code, calls) - } - set(M{"status": "error", "statusDate": time.Now().Add(-10 * time.Minute), "statusMessage": "old_failure"}) - expected := 425 - if kind == "pr" { - expected = 404 - } - w = call("GET", url, "", nil) - if w.Code != expected || calls != 2 || str(load()["status"]) != "ready" { - t.Fatal("forced recovery", w.Code, calls, w.Body) - } - w = call("GET", url, "", nil) - if w.Code != 200 { - t.Fatal("recovery did not publish", w.Code, w.Body) - } - set(M{"status": "preparing", "statusDate": time.Now()}) - w = call("GET", url, "", nil) - if w.Code != expected || calls != 2 { - t.Fatal("premature recovery", w.Code, calls, w.Body) - } - set(M{"status": "expired", "statusDate": stale}) - w = call("GET", url, "", nil) - if w.Code != 410 || calls != 2 { - t.Fatal("expired document refreshed", w.Code, calls) - } - set(M{"status": "ready", "options.update": true, "anonymizeDate": stale}) - p.revoked = true - w = call("GET", url, "", nil) - p.revoked = false - if w.Code != 403 || str(load()["status"]) != "error" { - t.Fatal("refresh authorization failure", w.Code, w.Body) - } - set(M{"status": "ready", "anonymizeDate": stale}) - p.onDocument = func() { set(M{"status": "removing", "statusDate": time.Now()}) } - w = call("GET", url, "", nil) - if w.Code != 409 || str(load()["status"]) != "removing" { - t.Fatal("refresh resurrected removed document", w.Code, w.Body) - } - }) - } -} diff --git a/backend/internal/server/error_log.go b/backend/internal/server/error_log.go deleted file mode 100644 index cb90532..0000000 --- a/backend/internal/server/error_log.go +++ /dev/null @@ -1,156 +0,0 @@ -package server - -import ( - "context" - "encoding/json" - "errors" - "log/slog" - "regexp" - "strings" - "sync" - "sync/atomic" - "time" - "unicode" -) - -const errorLogMax = 5000 -const errorLogBuffer = 128 - -var errorLogCode = regexp.MustCompile(`^[A-Za-z0-9_.-]{1,128}$`) - -type errorLogEvent struct { - at time.Time - level, module, message, code, bucket string - data []byte - skip bool -} -type errorLogBufferState struct { - mu sync.Mutex - flushMu sync.Mutex - pending []errorLogEvent - dropped atomic.Int64 -} - -func errorBucket(status int, level string) string { - switch { - case status >= 500: - return "error" - case status == 401 || status == 403 || status == 404: - return "info" - case status >= 400: - return "warn" - case level == "error": - return "error" - default: - return "warn" - } -} -func noisyError(code string) bool { - switch code { - case "repository_expired", "repository_not_ready", "repoId_already_used", "invalid_repoId", "page_not_supported_on_different_branch": - return true - } - return false -} -func (s *Server) recordError(ctx context.Context, err error) { - code, status := "server_error", 500 - var api *APIError - if errors.As(providerFailure(err), &api) { - code, status = api.Code, api.Status - } - if !errorLogCode.MatchString(code) { - code = "server_error" - } - level := "error" - if status >= 400 && status < 500 { - level = "warn" - } - detail := M{"code": code, "httpStatus": status} - if trace := traceFrom(ctx); trace != nil { - detail["requestId"] = trace.id - } - s.enqueueError(level, "route", code, code, status, detail) -} - -// Inputs are server-owned codes and fixed request fields, never upstream error -// text, request bodies, raw URLs, credentials or arbitrary provider metadata. -func (s *Server) enqueueError(level, module, message, code string, status int, detail M) { - severity := slog.LevelError - if level == "warn" { - severity = slog.LevelWarn - } - if !slog.Default().Enabled(context.Background(), severity) { - return - } - at := time.Now().UTC() - bucket := errorBucket(status, level) - data, err := json.Marshal(M{"ts": at, "module": module, "level": level, "message": message, "raw": []any{message, detail}}) - if err != nil || len(data) > 4096 { - s.errorLog.dropped.Add(1) - return - } - s.errorLog.mu.Lock() - defer s.errorLog.mu.Unlock() - if s.Store == nil || s.Store.Redis == nil || len(s.errorLog.pending) >= errorLogBuffer { - s.errorLog.dropped.Add(1) - return - } - s.errorLog.pending = append(s.errorLog.pending, errorLogEvent{at, level, module, message, code, bucket, data, bucket == "info" || noisyError(code)}) -} -func (s *Server) flushErrorLog(ctx context.Context) error { - s.errorLog.flushMu.Lock() - defer s.errorLog.flushMu.Unlock() - s.errorLog.mu.Lock() - entries := s.errorLog.pending - s.errorLog.pending = nil - s.errorLog.mu.Unlock() - if len(entries) == 0 { - return nil - } - ctx, cancel := context.WithTimeout(ctx, 2*time.Second) - defer cancel() - pipe := s.Store.Redis.TxPipeline() - for _, e := range entries { - if !e.skip { - pipe.LPush(ctx, "admin:errors", e.data) - pipe.LTrim(ctx, "admin:errors", 0, errorLogMax-1) - } - key := "admin:errors:hourly:" + e.at.Format("2006010215") - for _, field := range []string{"total", "bucket:" + e.bucket, "level:" + e.level, "module:" + e.module, "cb:" + e.bucket + ":" + e.code} { - pipe.HIncrBy(ctx, key, field, 1) - } - pipe.Expire(ctx, key, 48*time.Hour) - } - _, err := pipe.Exec(ctx) - // Never replay an uncertain transaction and duplicate entries/counters. - if err != nil { - s.errorLog.dropped.Add(int64(len(entries))) - } - return err -} - -// The errors endpoint uses parseInt(value, 10), unlike general admin pagination. -func errorPageInt(value string, fallback int64) int64 { - value = strings.TrimLeftFunc(value, func(r rune) bool { return unicode.IsSpace(r) && r != '\u0085' || r == '\ufeff' }) - negative := false - if len(value) > 0 && (value[0] == '+' || value[0] == '-') { - negative = value[0] == '-' - value = value[1:] - } - var n int64 - digits := 0 - for _, c := range value { - if c < '0' || c > '9' { - break - } - digits++ - n = min(int64(9007199254740991), n*10+int64(c-'0')) - } - if digits == 0 || n == 0 { - return fallback - } - if negative { - return -n - } - return n -} diff --git a/backend/internal/server/error_log_test.go b/backend/internal/server/error_log_test.go deleted file mode 100644 index 4b6693a..0000000 --- a/backend/internal/server/error_log_test.go +++ /dev/null @@ -1,181 +0,0 @@ -package server - -import ( - "context" - "encoding/json" - "io" - "log/slog" - "net/http/httptest" - "os" - "strings" - "testing" - "time" - - "github.com/redis/go-redis/v9" -) - -func TestErrorLogTypeScriptContracts(t *testing.T) { - data, err := os.ReadFile("testdata/error-log.json") - if err != nil { - t.Fatal(err) - } - var fixture struct { - Max int - Classification []struct { - Level string - Status int - Bucket string - } - Pagination []struct { - Input string - Offset, Limit int64 - } - Noisy []string - } - if err = json.Unmarshal(data, &fixture); err != nil { - t.Fatal(err) - } - if fixture.Max != errorLogMax { - t.Fatal(fixture.Max, errorLogMax) - } - for _, row := range fixture.Classification { - if got := errorBucket(row.Status, row.Level); got != row.Bucket { - t.Fatal(row, got) - } - } - for _, row := range fixture.Pagination { - offset := max(0, errorPageInt(row.Input, 0)) - limit := min(int64(errorLogMax), max(int64(1), errorPageInt(row.Input, 250))) - if offset != row.Offset || limit != row.Limit { - t.Fatal(row, offset, limit) - } - } - for _, code := range fixture.Noisy { - if !noisyError(code) { - t.Fatal(code) - } - } - if noisyError("rate_limited") { - t.Fatal("unexpected noisy code") - } -} -func TestErrorLogBoundedAndPrivate(t *testing.T) { - client := redis.NewClient(&redis.Options{Addr: "127.0.0.1:1"}) - defer client.Close() - s := &Server{Store: &Store{Redis: client}} - for i := 0; i < errorLogBuffer+10; i++ { - s.recordError(context.Background(), fail("upstream_failure", 502)) - } - if len(s.errorLog.pending) != errorLogBuffer || s.errorLog.dropped.Load() != 10 { - t.Fatal("unbounded error buffer") - } - s.errorLog.pending = nil - s.recordError(context.Background(), fail("secret https://user:password@example.org/private", 500)) - if strings.Contains(string(s.errorLog.pending[0].data), "password") || s.errorLog.pending[0].code != "server_error" { - t.Fatal("unsafe error text") - } - ctx, cancel := context.WithCancel(context.Background()) - cancel() - if s.flushErrorLog(ctx) == nil || len(s.errorLog.pending) != 0 || s.errorLog.dropped.Load() != 11 { - t.Fatal("uncertain batch replayed or not counted") - } -} -func runErrorLogIntegration(t *testing.T, base *Server) { - options := *base.Store.Redis.Options() - options.DB = 15 - client := redis.NewClient(&options) - defer client.Close() - ctx := context.Background() - if err := client.FlushDB(ctx).Err(); err != nil { - t.Fatal(err) - } - defer client.FlushDB(ctx) - s := &Server{Store: &Store{Redis: client}} - for _, row := range []struct { - code string - status int - }{{"server_error", 500}, {"not_found", 404}, {"repository_expired", 410}, {"rate_limited", 429}} { - s.recordError(ctx, fail(row.code, row.status)) - } - trace := newRequestTrace() - trace.logger = slog.New(slog.NewTextHandler(io.Discard, nil)) - requestCtx, cancel := context.WithCancel(context.WithValue(ctx, performanceContextKey{}, trace)) - r := httptest.NewRequest("GET", "/api/healthcheck", nil).WithContext(requestCtx) - done := s.monitorRequest(&responseState{ResponseWriter: httptest.NewRecorder()}, r) - cancel() - done() - query := func(method, path string) *request { - return &request{Server: s, R: httptest.NewRequest(method, path, nil)} - } - report, err := s.adminErrors(query("GET", "/api/admin/errors?limit=5001")) - if err != nil { - t.Fatal(err) - } - row := obj(report) - if number(row["total"]) != 3 || number(row["max"]) != 5000 || number(row["limit"]) != 5000 { - t.Fatal(row) - } - entries := arr(row["entries"]) - if obj(entries[0])["message"] != "request interrupted" { - t.Fatal(entries) - } - stats, err := s.errorStats(query("GET", "/api/admin/errors/stats")) - if err != nil { - t.Fatal(err) - } - summary := obj(stats) - severity := obj(summary["severity"]) - if number(summary["last24h"]) != 5 || number(severity["error"]) != 1 || number(severity["warn"]) != 3 || number(severity["info"]) != 1 { - t.Fatal(summary) - } - hourly := "admin:errors:hourly:" + time.Now().UTC().Format("2006010215") - counters, err := client.HGetAll(ctx, hourly).Result() - if err != nil { - t.Fatal(err) - } - if counters["level:warn"] != "4" || counters["module:requests"] != "1" || counters["cb:info:not_found"] != "1" { - t.Fatal(counters) - } - if ttl := client.TTL(ctx, hourly).Val(); ttl < 47*time.Hour || ttl > 48*time.Hour { - t.Fatal(ttl) - } - // Malformed legacy entries retain the TypeScript fallback shape. - client.LPush(ctx, "admin:errors", "malformed legacy entry") - report, err = s.adminErrors(query("GET", "/api/admin/errors?limit=1")) - if err != nil { - t.Fatal(err) - } - malformed := obj(arr(obj(report)["entries"])[0]) - if malformed["ts"] != nil || malformed["module"] != nil || len(arr(malformed["raw"])) != 0 { - t.Fatal(malformed) - } - // Ring trimming is independent from hourly history. - values := make([]any, errorLogMax) - for i := range values { - values[i] = `{"message":"fixture"}` - } - client.RPush(ctx, "admin:errors", values...) - s.recordError(ctx, fail("latest_failure", 500)) - if err = s.flushErrorLog(ctx); err != nil { - t.Fatal(err) - } - if n := client.LLen(ctx, "admin:errors").Val(); n != errorLogMax { - t.Fatal(n) - } - client.Set(ctx, "admin:errors:dropped", 7, 0) - client.HSet(ctx, "admin:errors:hourly:old", "total", 1) - client.Set(ctx, "unrelated-test-key", "preserved", 0) - report, err = s.adminErrors(query("DELETE", "/api/admin/errors")) - if err != nil { - t.Fatal(err) - } - if number(obj(report)["cleared"]) != errorLogMax || number(obj(report)["hourlyCleared"]) < 2 { - t.Fatal(report) - } - if n := client.Exists(ctx, "admin:errors", hourly, "admin:errors:hourly:old", "admin:errors:dropped").Val(); n != 0 { - t.Fatal("clear left history", n) - } - if client.Get(ctx, "unrelated-test-key").Val() != "preserved" { - t.Fatal("clear deleted unrelated data") - } -} diff --git a/backend/internal/server/extension.go b/backend/internal/server/extension.go deleted file mode 100644 index 12281de..0000000 --- a/backend/internal/server/extension.go +++ /dev/null @@ -1,82 +0,0 @@ -package server - -import ( - "context" - "time" -) - -func (s *Server) extendResource(ctx context.Context, kind string, r M) (M, error) { - switch str(r["status"]) { - case "archived": - return nil, fail("repository_archived", 410) - case "preparing", "removing", "expiring", "removed": - return nil, fail("invalid_status", 409) - } - now := time.Now() - base := date(obj(r["options"])["expirationDate"]) - if !base.After(now) { - base = now - } - next := base.In(time.Local).AddDate(0, 6, 0) - set := M{"options.expirationDate": next} - if kind == "repo" { - set["settingsSavedAt"] = now - if str(r["status"]) == "expired" { - set["status"] = "preparing" - set["statusDate"] = now - set["anonymizeDate"] = now - set["statusMessage"] = nil - } - } - changed, e := s.Store.update(ctx, collection(kind), revisionFilter(r), M{"$set": set}) - if e != nil { - return nil, e - } - if !changed { - return nil, fail("invalid_status", 409) - } - opt := obj(r["options"]) - opt["expirationDate"] = next - r["options"] = opt - for k, v := range set { - if k != "options.expirationDate" { - r[k] = v - } - } - if kind != "repo" { - if e = s.refreshEmbedded(ctx, kind, r); e != nil { - return nil, e - } - } else if str(r["status"]) == "preparing" { - if e = s.enqueueSavedSnapshot(ctx, r); e != nil { - return nil, e - } - } - return M{"status": r["status"], "expirationDate": next}, nil -} - -// The saved snapshot is sufficient for reactivation; no branch lookup is needed. -// A queue failure must not strand preparing resources or overwrite newer work. -func (s *Server) enqueueSavedSnapshot(ctx context.Context, r M) error { - e := s.enqueue(ctx, "repo", str(r["repoId"]), "prepare") - if e == nil { - return nil - } - filter := M{"_id": r["_id"], "status": "preparing", "statusDate": r["statusDate"], "anonymizeDate": r["anonymizeDate"]} - if v, ok := r["settingsSavedAt"]; ok { - filter["settingsSavedAt"] = v - } - field := "githubAccess" - if id, _ := sourceProvider(obj(r["source"])); id != "github" { - field = "providerAccess" - } - if v, ok := obj(r[field])["revision"]; ok { - filter[field+".revision"] = v - } else { - filter[field+".revision"] = M{"$exists": false} - } - cleanup, cancel := context.WithTimeout(context.WithoutCancel(ctx), 5*time.Second) - defer cancel() - s.Store.update(cleanup, collection("repo"), filter, M{"$set": M{"status": "error", "statusDate": time.Now(), "statusMessage": "preparation_interrupted"}}) - return e -} diff --git a/backend/internal/server/extension_integration_test.go b/backend/internal/server/extension_integration_test.go deleted file mode 100644 index dbb9591..0000000 --- a/backend/internal/server/extension_integration_test.go +++ /dev/null @@ -1,130 +0,0 @@ -package server - -import ( - "context" - "go.mongodb.org/mongo-driver/v2/bson" - "net/http/httptest" - "testing" - "time" -) - -func runExtensionIntegration(t *testing.T, s *Server, p *fixtureProvider, call func(string, string, string, any) *httptest.ResponseRecorder, token string, source M) { - ctx := context.Background() - calls := 0 - p.onDocument = func() { calls++ } - p.onRepository = func() { calls++ } - defer func() { p.onDocument = nil; p.onRepository = nil }() - for _, kind := range []string{"repo", "gist", "pr"} { - for _, status := range []string{"ready", "queue", "download", "expired", "error", "preparing", "removing", "expiring", "removed", "archived"} { - t.Run("extend/"+kind+"/"+status, func(t *testing.T) { - r := M{} - for k, v := range source { - r[k] = v - } - r["_id"] = bson.NewObjectID() - id := "extend-" + kind + "-" + status - r[idKey(kind)] = id - r["status"] = status - r["statusDate"] = time.Now() - r["options"] = M{"expirationMode": "redirect", "expirationDate": time.Date(2099, 8, 31, 12, 0, 0, 0, time.UTC), "terms": []string{}} - if kind != "repo" { - r["source"] = M{"provider": "fixture", "gistId": "snippet", "repositoryFullName": p.name, "pullRequestId": 1} - } - if _, e := s.Store.DB.Collection(collection(kind)).InsertOne(ctx, r); e != nil { - t.Fatal(e) - } - calls = 0 - w := call("POST", "/api/"+kind+"/"+id+"/extend", token, nil) - expected := 200 - switch status { - case "preparing", "removing", "expiring", "removed": - expected = 409 - case "archived": - expected = 410 - } - if w.Code != expected { - t.Fatal(w.Code, w.Body) - } - current, e := s.Store.one(ctx, collection(kind), M{"_id": r["_id"]}) - if e != nil { - t.Fatal(e) - } - if expected != 200 { - if calls != 0 || str(current["status"]) != status { - t.Fatal("invalid state modified", calls, current) - } - return - } - wantStatus := status - wantCalls := 0 - if kind != "repo" { - wantStatus = "ready" - wantCalls = 1 - } else if status == "expired" { - wantStatus = "preparing" - } - if calls != wantCalls || str(current["status"]) != wantStatus { - t.Fatal("wrong reactivation", calls, current) - } - wantDate := time.Date(2100, 3, 3, 12, 0, 0, 0, time.UTC) - if !date(obj(current["options"])["expirationDate"]).Equal(wantDate) { - t.Fatal("month overflow differs", current["options"]) - } - if kind == "repo" && str(obj(current["source"])["commit"]) != str(obj(r["source"])["commit"]) { - t.Fatal("reactivation changed saved commit") - } - if kind != "repo" && !date(current["settingsSavedAt"]).Equal(date(r["settingsSavedAt"]).Truncate(time.Millisecond)) { - t.Fatal("embedded extension changed settings timestamp") - } - }) - } - } - t.Run("reactivation enqueue failure is retryable and preserves concurrent removal", func(t *testing.T) { - r := M{} - for k, v := range source { - r[k] = v - } - r["_id"] = bson.NewObjectID() - r["repoId"] = "extension-failure" - r["status"] = "expired" - r["statusDate"] = time.Now() - if _, e := s.Store.DB.Collection(collection("repo")).InsertOne(ctx, r); e != nil { - t.Fatal(e) - } - command := func(v M) error { - return s.Store.DB.RunCommand(ctx, bson.D{{Key: "collMod", Value: "gojobs"}, {Key: "validator", Value: v}}).Err() - } - if e := command(M{"_id": M{"$ne": "repo:extension-failure:prepare"}}); e != nil { - t.Fatal(e) - } - defer func() { - if e := command(M{}); e != nil { - t.Error(e) - } - }() - w := call("POST", "/api/repo/extension-failure/extend", token, nil) - if w.Code != 500 { - t.Fatal(w.Code, w.Body) - } - current, e := s.Store.one(ctx, collection("repo"), M{"_id": r["_id"]}) - if e != nil || str(current["status"]) != "error" || str(current["statusMessage"]) != "preparation_interrupted" { - t.Fatal("reactivation stranded", current, e) - } - // The same helper also handles ordinary saves; an older request cannot overwrite removal. - stale := M{} - for k, v := range current { - stale[k] = v - } - stale["status"] = "preparing" - if _, e = s.Store.update(ctx, collection("repo"), M{"_id": r["_id"]}, M{"$set": M{"status": "removing"}}); e != nil { - t.Fatal(e) - } - if e = s.enqueueSavedSnapshot(ctx, stale); e == nil { - t.Fatal("expected real enqueue rejection") - } - current, e = s.Store.one(ctx, collection("repo"), M{"_id": r["_id"]}) - if e != nil || str(current["status"]) != "removing" { - t.Fatal("failed enqueue overwrote removal", current, e) - } - }) -} diff --git a/backend/internal/server/file_metadata_integration_test.go b/backend/internal/server/file_metadata_integration_test.go deleted file mode 100644 index 5162aa5..0000000 --- a/backend/internal/server/file_metadata_integration_test.go +++ /dev/null @@ -1,156 +0,0 @@ -package server - -import ( - "encoding/json" - "io" - "net/http" - "net/http/httptest" - neturl "net/url" - "os" - "strings" - "testing" - "time" - - "github.com/tdurieux/anonymous_github/backend/internal/blobcache" - "go.mongodb.org/mongo-driver/v2/bson" -) - -func runFileMetadataIntegration(t *testing.T, s *Server, p *fixtureProvider) { - t.Run("file metadata contracts", func(t *testing.T) { - data, err := os.ReadFile("testdata/file-metadata.json") - if err != nil { - t.Fatal(err) - } - var cases []struct { - Name string - Shared bool - Mode, Query string - Expected struct { - Status int - Type, Encoding, Length, Ranges, Vary, Csp, Control, Nosniff, Disposition string - Weak, Attachment bool - Bytes int - } - } - if err = json.Unmarshal(data, &cases); err != nil { - t.Fatal(err) - } - ctx := t.Context() - original, err := s.Store.one(ctx, collection("repo"), M{"repoId": "second-provider"}) - if err != nil { - t.Fatal(err) - } - r := selectFields(original, "owner", "source", "providerAccess") - r["_id"] = bson.NewObjectID() - r["repoId"] = "metadata-" + r["_id"].(bson.ObjectID).Hex() - r["status"] = "ready" - r["treeGeneration"] = "metadata-generation" - r["anonymizeDate"] = time.Now().Truncate(time.Millisecond) - r["options"] = M{"terms": []string{}, "image": true, "pdf": true, "expirationMode": "never"} - if _, err = s.Store.DB.Collection(collection("repo")).InsertOne(ctx, r); err != nil { - t.Fatal(err) - } - files := []any{} - seen := map[string]bool{} - for _, c := range cases { - if !seen[c.Name] { - seen[c.Name] = true - files = append(files, M{"repoId": r["repoId"], "treeGeneration": r["treeGeneration"], "path": "", "name": c.Name, "sha": "metadata-blob", "size": 10}) - } - } - if _, err = s.Store.DB.Collection("files").InsertMany(ctx, files); err != nil { - t.Fatal(err) - } - sources, err := blobcache.New(ctx, blobcache.Options{Root: t.TempDir(), Budget: 65536, MaxObject: 4096}) - if err != nil { - t.Fatal(err) - } - defer sources.Close() - results, err := blobcache.New(ctx, blobcache.Options{Root: t.TempDir(), Budget: 65536, MaxObject: 4096}) - if err != nil { - t.Fatal(err) - } - defer results.Close() - oldSource, oldResult, oldEnabled := s.sourceCache, s.resultCache, s.Config.SharedCacheEnabled - defer func() { s.sourceCache, s.resultCache, s.Config.SharedCacheEnabled = oldSource, oldResult, oldEnabled }() - opens, workers := p.openCount.Load(), s.pool.Stats()["workerStarts"].(uint64) - for _, c := range cases { - t.Run(c.Name+"/"+c.Mode+c.Query+map[bool]string{true: "/shared", false: "/legacy"}[c.Shared], func(t *testing.T) { - s.Config.SharedCacheEnabled = c.Shared - s.sourceCache, s.resultCache = nil, nil - if c.Shared { - s.sourceCache, s.resultCache = sources, results - } - server := httptest.NewServer(s) - defer server.Close() - transport := &http.Transport{DisableCompression: true} - defer transport.CloseIdleConnections() - client := &http.Client{Transport: transport} - url := server.URL + "/api/repo/" + str(r["repoId"]) + "/file/" + neturl.PathEscape(c.Name) + c.Query - do := func(method, tag string) (*http.Response, []byte) { - req, _ := http.NewRequest(method, url, nil) - accept := "gzip" - if c.Mode == "reject-encoding" { - accept = "*;q=0" - } - req.Header.Set("Accept-Encoding", accept) - if tag != "" { - req.Header.Set("If-None-Match", tag) - } - res, err := client.Do(req) - if err != nil { - t.Fatal(err) - } - body, err := io.ReadAll(res.Body) - res.Body.Close() - if err != nil { - t.Fatal(err) - } - return res, body - } - response, body := do("HEAD", "") - if c.Mode == "fresh" { - response, body = do("GET", response.Header.Get("ETag")) - } - want := c.Expected - if response.StatusCode != want.Status || len(body) != want.Bytes { - t.Fatal(response.StatusCode, string(body), want) - } - for key, value := range map[string]string{"Content-Type": want.Type, "Content-Encoding": want.Encoding, "Content-Length": want.Length, "Accept-Ranges": want.Ranges, "Vary": want.Vary, "Content-Security-Policy": want.Csp, "Cache-Control": want.Control, "X-Content-Type-Options": want.Nosniff, "Content-Disposition": want.Disposition} { - if got := response.Header.Get(key); got != value { - t.Errorf("%s=%q, want %q", key, got, value) - } - } - if strings.HasPrefix(response.Header.Get("ETag"), "W/") != want.Weak || (response.Header.Get("Content-Disposition") != "") != want.Attachment { - t.Fatal(response.Header, want) - } - }) - } - // Cached validators and unacceptable encodings must not bypass a revoked grant. - p.revoked = true - for _, method := range []string{"HEAD", "GET"} { - req := httptest.NewRequest(method, "/api/repo/"+str(r["repoId"])+"/file/data.txt", nil) - req.Header.Set("If-None-Match", "*") - req.Header.Set("Accept-Encoding", "*;q=0") - recorder := httptest.NewRecorder() - s.ServeHTTP(recorder, req) - if recorder.Code != http.StatusForbidden { - t.Errorf("revoked %s returned %d", method, recorder.Code) - } - } - p.revoked = false - if p.openCount.Load() != opens || s.pool.Stats()["workerStarts"].(uint64) != workers { - t.Fatal("metadata requests read or transformed file content") - } - row, err := s.Store.one(ctx, collection("repo"), M{"_id": r["_id"]}) - if err != nil || number(row["pageView"]) != 0 { - t.Fatal("metadata request counted a view", row, err) - } - for _, cache := range []*blobcache.Cache{sources, results} { - stats, err := cache.Stats(ctx) - if err != nil || stats.Blobs != 0 || stats.Decisions != 0 || stats.ActiveReaders != 0 { - t.Fatal("metadata populated shared cache", stats, err) - } - } - }) -} diff --git a/backend/internal/server/file_query_test.go b/backend/internal/server/file_query_test.go deleted file mode 100644 index 1929ec3..0000000 --- a/backend/internal/server/file_query_test.go +++ /dev/null @@ -1,41 +0,0 @@ -package server - -import ( - "encoding/json" - "os" - "testing" -) - -func TestFileQueryContracts(t *testing.T) { - data, err := os.ReadFile("testdata/file-query.json") - if err != nil { - t.Fatal(err) - } - var rows []struct { - Query string - Download, Force, Refresh, Error bool - } - if err = json.Unmarshal(data, &rows); err != nil { - t.Fatal(err) - } - for _, row := range rows { - query := parseExtendedQuery(row.Query).object - force, err := query["force"].looseStringEqual("1") - // The fixture evaluates the list's force coercion before the preview's - // short-circuiting refresh expression. - if (err != nil) != row.Error { - t.Fatal(row, err) - } - if row.Error { - continue - } - refresh, err := previewRefresh(row.Query) - if err != nil || force != row.Force || refresh != row.Refresh || query["download"].truthy() != row.Download { - t.Fatal(row, force, refresh, err) - } - } - refresh, err := previewRefresh("reconnect=1&force[toString]=x") - if err != nil || !refresh { - t.Fatal("reconnect must short-circuit force conversion", refresh, err) - } -} diff --git a/backend/internal/server/file_recovery.go b/backend/internal/server/file_recovery.go deleted file mode 100644 index e6eee52..0000000 --- a/backend/internal/server/file_recovery.go +++ /dev/null @@ -1,126 +0,0 @@ -package server - -import ( - "context" - "path" - "strings" - - "github.com/tdurieux/anonymous_github/backend/internal/provider" - "github.com/tdurieux/anonymous_github/backend/internal/security" - "go.mongodb.org/mongo-driver/v2/bson" -) - -func (s *Server) recoverTruncatedFile(ctx context.Context, r M, requested string) (M, error) { - if normalized, err := security.RelativePath(requested); err != nil || normalized != requested { - return nil, fail("file_not_found", 404) - } - directory := path.Dir(requested) - if directory == "." { - directory = "" - } - affected := false - for _, folder := range stringsOf(r["truncatedFolders"]) { - if folder == "" || folder == directory || strings.HasPrefix(directory, folder+"/") { - affected = true - break - } - } - if !affected { - return nil, fail("file_not_found", 404) - } - engine, err := s.engine(r, "repo") - if err != nil { - return nil, err - } - transformed, err := engine.Path(ctx, requested) - if err != nil { - return nil, err - } - if transformed != requested { - return nil, fail("file_not_found", 404) - } - p, a, err := s.repositoryProvider(r) - if err != nil { - return nil, err - } - metadata, ok := p.(provider.FileMetadata) - if !ok { - return nil, fail("file_not_found", 404) - } - if err = s.authorizeMeasured(ctx, p, a); err != nil { - return nil, err - } - entry, err := metadata.FileMetadata(ctx, a, requested) - if err != nil { - return nil, providerFailure(err) - } - if entry == nil || entry.Directory { - return nil, fail("file_not_found", 404) - } - if entry.Path != requested || entry.Revision == "" || entry.Size < 0 { - return nil, fail("invalid_file_metadata", 502) - } - if err = s.authorizeMeasured(ctx, p, a); err != nil { - return nil, err - } - if err = s.checkPathSnapshot(ctx, r); err != nil { - return nil, err - } - row := M{"_id": bson.NewObjectID(), "repoId": r["repoId"], "path": directory, "name": path.Base(requested), "sha": entry.Revision, "size": entry.Size, "metadataPending": true} - if generation, ok := r["treeGeneration"]; ok { - row["treeGeneration"] = generation - } - snapshot := pathSnapshotFilter(r) - delete(snapshot, "fileMetadataRevision") - row["recoverySnapshot"] = snapshot - if _, err = s.Store.DB.Collection("files").InsertOne(ctx, row); err != nil { - return nil, err - } - if err = s.completeRecoveredMetadata(ctx, r, row); err != nil { - return nil, err - } - return row, nil -} - -func (s *Server) completeRecoveredMetadata(ctx context.Context, r, row M) error { - return s.completeRecoveredMetadataState(ctx, r, row, false) -} -func (s *Server) completeRecoveredMetadataState(ctx context.Context, r, row M, maintenance bool) error { - if !boolean(row["metadataPending"]) { - return nil - } - if snapshot := obj(row["recoverySnapshot"]); len(snapshot) > 0 { - current, err := s.Store.one(ctx, collection("repo"), snapshot) - if err != nil { - return err - } - if current == nil { - if _, err := s.Store.DB.Collection("files").DeleteOne(ctx, M{"_id": row["_id"], "metadataPending": true}); err != nil { - return err - } - return fail("repository_changed", 409) - } - } - if err := s.checkPathSnapshotStatus(ctx, r, maintenance); err != nil { - return err - } - revision, err := security.RandomToken() - if err != nil { - return err - } - filter := pathSnapshotFilter(r) - updated, err := s.Store.update(ctx, collection("repo"), filter, M{"$set": M{"fileMetadataRevision": revision, "size": M{"storage": 0, "file": 0}}, "$unset": M{"pathIndexKey": "", "pathIndexBuiltAt": "", "sizeComputedAt": ""}}) - if err != nil { - return err - } - if !updated { - return fail("repository_changed", 409) - } - r["fileMetadataRevision"] = revision - if _, err = s.Store.DB.Collection("files").UpdateOne(ctx, M{"_id": row["_id"]}, M{"$unset": M{"metadataPending": "", "recoverySnapshot": ""}}); err != nil { - return err - } - delete(row, "metadataPending") - delete(row, "recoverySnapshot") - return nil -} diff --git a/backend/internal/server/file_recovery_test.go b/backend/internal/server/file_recovery_test.go deleted file mode 100644 index 0ecd302..0000000 --- a/backend/internal/server/file_recovery_test.go +++ /dev/null @@ -1,116 +0,0 @@ -package server - -import ( - "context" - "testing" - - "github.com/tdurieux/anonymous_github/backend/internal/provider" - "go.mongodb.org/mongo-driver/v2/bson" -) - -func runFileRecoveryIntegration(t *testing.T, s *Server, p *fixtureProvider) { - t.Run("truncated file recovery", func(t *testing.T) { - ctx := t.Context() - original, err := s.Store.one(ctx, collection("repo"), M{"repoId": "second-provider"}) - if err != nil || original == nil { - t.Fatal(err) - } - repo := selectFields(original, "owner", "source", "providerAccess") - id := "recovery-" + bson.NewObjectID().Hex() - repo["_id"], repo["repoId"], repo["status"], repo["treeGeneration"] = bson.NewObjectID(), id, "ready", "fixture" - repo["options"] = M{"terms": []string{"private => hidden"}} - repo["truncatedFolders"] = []string{"docs"} - if _, err = s.Store.DB.Collection(collection("repo")).InsertOne(ctx, repo); err != nil { - t.Fatal(err) - } - defer s.Store.DB.Collection(collection("repo")).DeleteOne(ctx, M{"repoId": id}) - defer s.Store.DB.Collection("files").DeleteMany(ctx, M{"repoId": id}) - old := p.onMetadata - defer func() { p.onMetadata = old; p.revoked = false }() - calls := 0 - p.onMetadata = func(_ context.Context, a provider.Access, requested string) (*provider.Entry, error) { - calls++ - if a.Ref.Provider != "fixture" || a.Ref.Commit != str(obj(repo["source"])["commit"]) { - t.Fatal(a.Ref) - } - return &provider.Entry{Path: requested, Revision: "opaque:recovered", Size: 17}, nil - } - for _, requested := range []string{"outside.txt", "docs-other/file.txt", "docs/private.txt"} { - if _, err := s.indexedFile(ctx, repo, requested); err == nil { - t.Fatal(requested, "unexpected recovery") - } - } - if calls != 0 { - t.Fatal("unexpected upstream lookup", calls) - } - row, err := s.indexedFile(ctx, repo, "docs/missing.txt") - if err != nil || row["sha"] != "opaque:recovered" || repo["fileMetadataRevision"] == nil { - t.Fatal(row, err) - } - if calls != 1 { - t.Fatal(calls) - } - cached, err := s.Store.one(ctx, "files", M{"repoId": id, "name": "missing.txt"}) - if err != nil || cached == nil || boolean(cached["metadataPending"]) { - t.Fatal(cached, err) - } - if _, err = s.indexedFile(ctx, repo, "docs/missing.txt"); err != nil || calls != 1 { - t.Fatal(calls, err) - } - p.revoked = true - if _, err = s.indexedFile(ctx, repo, "docs/denied.txt"); err == nil || calls != 1 { - t.Fatal("revocation bypass", calls, err) - } - p.revoked = false - // A pending row from an interrupted recovery finishes invalidation on retry. - cached["metadataPending"] = true - if _, err = s.Store.DB.Collection("files").UpdateOne(ctx, M{"_id": cached["_id"]}, M{"$set": M{"metadataPending": true}}); err != nil { - t.Fatal(err) - } - previous := repo["fileMetadataRevision"] - if _, err = s.indexedFile(ctx, repo, "docs/missing.txt"); err != nil || repo["fileMetadataRevision"] == previous { - t.Fatal(err) - } - - before := calls - if original, err := s.originalFolder(ctx, repo, "docs/listed-file.txt"); err != nil || original != "docs/listed-file.txt" || calls != before+1 { - t.Fatal(original, err, calls) - } - before = calls - if _, err := s.originalFolder(ctx, repo, "../unsafe"); err == nil || calls != before { - t.Fatal("unsafe folder recovery", calls, err) - } - // A persisted pending row belongs to its original commit/settings. - snapshot := pathSnapshotFilter(repo) - delete(snapshot, "fileMetadataRevision") - pending := M{"_id": bson.NewObjectID(), "repoId": id, "treeGeneration": "fixture", "path": "docs", "name": "old.txt", "sha": "old-commit", "size": 1, "metadataPending": true, "recoverySnapshot": snapshot} - if _, err = s.Store.DB.Collection("files").InsertOne(ctx, pending); err != nil { - t.Fatal(err) - } - if _, err = s.Store.DB.Collection(collection("repo")).UpdateOne(ctx, M{"repoId": id}, M{"$set": M{"source.commit": "new-commit"}}); err != nil { - t.Fatal(err) - } - repo["source"] = selectFields(obj(repo["source"]), "provider", "providerRepositoryId", "repositoryName", "branch") - obj(repo["source"])["commit"] = "new-commit" - if _, err = s.indexedFile(ctx, repo, "docs/old.txt"); err == nil || err.Error() != "repository_changed" { - t.Fatal("stale pending row accepted", err) - } - if count, err := s.Store.DB.Collection("files").CountDocuments(ctx, M{"_id": pending["_id"]}); err != nil || count != 0 { - t.Fatal("stale pending row retained", count, err) - } - // A concurrent repository change prevents persistence after the upstream call. - p.onMetadata = func(_ context.Context, a provider.Access, requested string) (*provider.Entry, error) { - _, err := s.Store.DB.Collection(collection("repo")).UpdateOne(ctx, M{"repoId": id}, M{"$set": M{"status": "archived"}}) - if err != nil { - t.Fatal(err) - } - return &provider.Entry{Path: requested, Revision: "opaque:new", Size: 1}, nil - } - if _, err = s.indexedFile(ctx, repo, "docs/stale.txt"); err == nil || err.Error() != "repository_changed" { - t.Fatal(err) - } - if count, err := s.Store.DB.Collection("files").CountDocuments(ctx, M{"repoId": id, "name": "stale.txt"}); err != nil || count != 0 { - t.Fatal(count, err) - } - }) -} diff --git a/backend/internal/server/file_search_query.go b/backend/internal/server/file_search_query.go deleted file mode 100644 index e90927e..0000000 --- a/backend/internal/server/file_search_query.go +++ /dev/null @@ -1,32 +0,0 @@ -package server - -import ( - "errors" - "strings" - "unicode" - "unicode/utf16" - - "golang.org/x/text/cases" - "golang.org/x/text/language" -) - -func fileSearchQuery(raw string) (string, bool, error) { - value := parseExtendedQuery(raw).object["q"] - if !value.truthy() { - return "", false, nil - } - query, scalar := value.scalarValue() - if !scalar { - return "", false, errors.New("invalid_query_value") - } - query = strings.TrimFunc(query, func(r rune) bool { return unicode.IsSpace(r) && r != '\u0085' || r == '\ufeff' }) - // JavaScript tests the trimmed UTF-16 length before lowercasing. - if len(utf16.Encode([]rune(query))) < 2 { - return "", false, nil - } - query = cases.Lower(language.Und).String(query) - if strings.Contains(query, "/") { - return "", false, nil - } - return query, true, nil -} diff --git a/backend/internal/server/file_search_query_test.go b/backend/internal/server/file_search_query_test.go deleted file mode 100644 index a7a74a3..0000000 --- a/backend/internal/server/file_search_query_test.go +++ /dev/null @@ -1,121 +0,0 @@ -package server - -import ( - "encoding/json" - "net/http/httptest" - "os" - "reflect" - "strings" - "testing" - - "go.mongodb.org/mongo-driver/v2/bson" - "golang.org/x/text/cases" - "golang.org/x/text/language" -) - -type fileSearchFixture struct { - Files []M - Cases []struct { - Query string - Expected []M - Error bool - } -} - -func readFileSearchFixture(t *testing.T) fileSearchFixture { - t.Helper() - data, err := os.ReadFile("testdata/file-search.json") - if err != nil { - t.Fatal(err) - } - var fixture fileSearchFixture - if err = json.Unmarshal(data, &fixture); err != nil { - t.Fatal(err) - } - return fixture -} -func TestFileSearchContracts(t *testing.T) { - fixture := readFileSearchFixture(t) - for _, row := range fixture.Cases { - query, usable, err := fileSearchQuery(row.Query) - if (err != nil) != row.Error { - t.Fatal(row, err) - } - if row.Error { - continue - } - result := []M{} - lower := cases.Lower(language.Und) - if usable { - for _, file := range fixture.Files { - if strings.Contains(lower.String(str(file["path"])+"/"+str(file["name"])), query) { - result = append(result, file) - } - } - } - if !reflect.DeepEqual(result, row.Expected) { - t.Fatal(row.Query, result, row.Expected) - } - } -} -func runFileSearchIntegration(t *testing.T, s *Server) { - t.Run("file search query and Unicode contracts", func(t *testing.T) { - ctx := t.Context() - fixture := readFileSearchFixture(t) - original, err := s.Store.one(ctx, collection("repo"), M{"repoId": "second-provider"}) - if err != nil || original == nil { - t.Fatal(err) - } - repo := selectFields(original, "owner", "source", "providerAccess") - id := "search-" + bson.NewObjectID().Hex() - repo["_id"], repo["repoId"], repo["status"], repo["treeGeneration"] = bson.NewObjectID(), id, "ready", "search-fixture" - repo["options"] = M{"terms": []string{}, "expirationMode": "never"} - if _, err := s.Store.DB.Collection(collection("repo")).InsertOne(ctx, repo); err != nil { - t.Fatal(err) - } - defer s.Store.DB.Collection(collection("repo")).DeleteOne(ctx, M{"repoId": id}) - defer s.Store.DB.Collection("files").DeleteMany(ctx, M{"repoId": id}) - for _, file := range fixture.Files { - doc := selectFields(file, "name", "path", "size") - doc["repoId"], doc["treeGeneration"] = id, "search-fixture" - if _, err := s.Store.DB.Collection("files").InsertOne(ctx, doc); err != nil { - t.Fatal(err) - } - } - call := func(query string) *httptest.ResponseRecorder { - r := httptest.NewRequest("GET", "/api/repo/"+id+"/files/search?"+query, nil) - r.RemoteAddr = "198.51.100.63:1234" - w := httptest.NewRecorder() - s.ServeHTTP(w, r) - return w - } - for _, row := range fixture.Cases { - w := call(row.Query) - status, cacheControl := 200, "no-cache" - if row.Error { - status, cacheControl = 500, "no-store" - } - if w.Code != status || w.Header().Get("Cache-Control") != cacheControl { - t.Fatal(row.Query, w.Code, w.Header(), w.Body) - } - if row.Error { - continue - } - var result []M - if err := json.Unmarshal(w.Body.Bytes(), &result); err != nil { - t.Fatal(err) - } - if !reflect.DeepEqual(result, row.Expected) { - t.Fatal(row.Query, result, row.Expected) - } - } - if _, err := s.Store.DB.Collection(collection("repo")).UpdateOne(ctx, M{"repoId": id}, M{"$set": M{"status": "archived"}}); err != nil { - t.Fatal(err) - } - for _, query := range []string{"q=a", "q=README", "q[]=README"} { - if w := call(query); w.Code != 410 { - t.Fatal("query bypassed archived repository check", query, w.Code, w.Body) - } - } - }) -} diff --git a/backend/internal/server/file_tree_scan_test.go b/backend/internal/server/file_tree_scan_test.go deleted file mode 100644 index bad69e0..0000000 --- a/backend/internal/server/file_tree_scan_test.go +++ /dev/null @@ -1,82 +0,0 @@ -package server - -import ( - "encoding/json" - "fmt" - "net/http/httptest" - "testing" - - "go.mongodb.org/mongo-driver/v2/bson" -) - -// The last row is deliberately beyond the former 100,000-row scan cap. -func runFileTreeScanIntegration(t *testing.T, s *Server) { - t.Run("large file tree scan", func(t *testing.T) { - ctx := t.Context() - id := "large-tree-" + bson.NewObjectID().Hex() - repo := M{"_id": bson.NewObjectID(), "repoId": id, "status": "ready", "treeGeneration": "fixture", "options": M{"terms": []string{}, "expirationMode": "never"}} - if _, err := s.Store.DB.Collection(collection("repo")).InsertOne(ctx, repo); err != nil { - t.Fatal(err) - } - defer s.Store.DB.Collection(collection("repo")).DeleteOne(ctx, M{"repoId": id}) - defer s.Store.DB.Collection("files").DeleteMany(ctx, M{"repoId": id}) - batch := make([]any, 0, 1000) - for i := 0; i < 100001; i++ { - path, name := "early", fmt.Sprintf("file-%06d", i) - if i == 100000 { - path, name = "zz-tail", "unique-tail.txt" - } - batch = append(batch, M{"repoId": id, "treeGeneration": "fixture", "path": path, "name": name, "size": 1}) - if len(batch) == 1000 || i == 100000 { - if _, err := s.Store.DB.Collection("files").InsertMany(ctx, batch); err != nil { - t.Fatal(err) - } - batch = batch[:0] - } - } - get := func(suffix string) *httptest.ResponseRecorder { - t.Helper() - r := httptest.NewRequest("GET", "/api/repo/"+id+"/files"+suffix, nil) - r.RemoteAddr = "198.51.100.64:1234" - w := httptest.NewRecorder() - s.ServeHTTP(w, r) - if w.Code != 200 { - t.Fatal(suffix, w.Code, w.Body) - } - return w - } - for _, suffix := range []string{"?path=zz-tail", "/search?q=unique-tail"} { - var result []M - if err := json.Unmarshal(get(suffix).Body.Bytes(), &result); err != nil { - t.Fatal(err) - } - if len(result) != 1 || result[0]["name"] != "unique-tail.txt" { - t.Fatal(suffix, result) - } - } - repo["options"] = M{"terms": []string{"unique-tail => transformed"}} - repo["fileMetadataRevision"] = "large-test" - if _, err := s.Store.DB.Collection(collection("repo")).UpdateOne(ctx, M{"repoId": id}, M{"$set": M{"options": repo["options"], "fileMetadataRevision": "large-test"}}); err != nil { - t.Fatal(err) - } - row, err := s.indexedFile(ctx, repo, "zz-tail/transformed.txt") - if err != nil || str(row["name"]) != "unique-tail.txt" { - t.Fatal("index truncated final row", row, err) - } - - var counts M - if err := json.Unmarshal(get("/counts").Body.Bytes(), &counts); err != nil { - t.Fatal(err) - } - if number(counts[""]) != 100001 || number(counts["zz-tail"]) != 1 { - t.Fatal(counts) - } - var matches []M - if err := json.Unmarshal(get("/search?q=file").Body.Bytes(), &matches); err != nil { - t.Fatal(err) - } - if len(matches) != 500 { - t.Fatal("search result cap", len(matches)) - } - }) -} diff --git a/backend/internal/server/files.go b/backend/internal/server/files.go deleted file mode 100644 index 88c5805..0000000 --- a/backend/internal/server/files.go +++ /dev/null @@ -1,522 +0,0 @@ -package server - -import ( - "bufio" - "context" - "crypto/sha1" - "encoding/hex" - "encoding/json" - "io" - "net/http" - "os" - "path" - "strings" - "time" - - "github.com/tdurieux/anonymous_github/backend/internal/anonymize" - "github.com/tdurieux/anonymous_github/backend/internal/blobcache" - "github.com/tdurieux/anonymous_github/backend/internal/filetype" - "github.com/tdurieux/anonymous_github/backend/internal/provider" - "github.com/tdurieux/anonymous_github/backend/internal/security" - "go.mongodb.org/mongo-driver/v2/mongo/options" -) - -var imageExtensions = map[string]bool{".png": true, ".jpg": true, ".jpeg": true, ".gif": true, ".svg": true, ".ico": true, ".bmp": true, ".tiff": true, ".tif": true, ".webp": true, ".avif": true, ".heif": true, ".heic": true} - -func fileAllowed(name string, opt M) bool { - ext := strings.ToLower(path.Ext(name)) - if ext == ".pdf" && !boolean(opt["pdf"]) { - return false - } - return !imageExtensions[ext] || boolean(opt["image"]) -} -func scriptableFile(name string) bool { - mimeType := strings.Split(filetype.MIME(path.Ext(name)), ";")[0] - if mimeType == "text/html" || mimeType == "text/xml" || mimeType == "application/xml" || strings.HasSuffix(mimeType, "+xml") || mimeType == "message/rfc822" || mimeType == "multipart/related" { - return true - } - switch strings.ToLower(path.Ext(name)) { - case ".html", ".htm", ".xhtml", ".xht", ".svg", ".xml", ".xsl", ".xslt", ".mhtml", ".mht": - return true - } - return false -} -func textFile(name string, sample []byte) bool { return filetype.Text(name, sample) } -func (s *Server) blob(ctx context.Context, r, row M) (io.ReadCloser, error) { - if number(row["size"]) > anonymize.MaxInput { - return nil, fail("file_too_big", 413) - } - p, a, e := s.repositoryProvider(r) - if e != nil { - return nil, e - } - // Cached sources authorize at cache access and again after waits/fills. - // Archive originals bypass that layer and need their own entry check. - if a.Ref.Provider == "archive" { - if e = s.authorizeMeasured(ctx, p, a); e != nil { - return nil, e - } - } - return s.cachedBlob(ctx, r, p, a, provider.Entry{Path: path.Join(str(row["path"]), str(row["name"])), Revision: str(row["sha"]), Size: number(row["size"])}) -} -func (s *Server) transformed(ctx context.Context, r, row M) (io.Reader, func(), bool, error) { - return s.transformedResponse(ctx, r, row, nil) -} -func (s *Server) transformedResponse(ctx context.Context, r, row M, response *sharedResponse) (io.Reader, func(), bool, error) { - var body io.ReadCloser - var err error - if s.sourceCache != nil && number(row["size"]) <= anonymize.MaxInput { - p, a, accessErr := s.repositoryProvider(r) - if accessErr != nil { - return nil, nil, false, accessErr - } - if a.Ref.Provider != "archive" { - entry := provider.Entry{Path: path.Join(str(row["path"]), str(row["name"])), Revision: str(row["sha"]), Size: number(row["size"])} - if _, err = security.RelativePath(entry.Path); err == nil { - body, err = s.sharedSourceRead(ctx, r, p, a, entry, true) - } - } else { - body, err = s.blob(ctx, r, row) - } - } else { - body, err = s.blob(ctx, r, row) - } - if err != nil { - return nil, nil, false, err - } - if err := s.markCachePresent(ctx, r); err != nil { - body.Close() - return nil, nil, false, err - } - if _, ok := body.(*blobcache.Reader); ok && s.resultCache != nil && response != nil { - response.eligible = true - response.encoding = sharedEncoding(response.accept, "gzip", "identity") - if response.encoding == "" { - body.Close() - if _, err := s.authorizeContent(ctx, r); err != nil { - return nil, nil, false, err - } - return nil, nil, false, errSharedEncoding - } - } - return s.transformBody(ctx, r, row, body) -} - -// transformBody consumes one authorized source entry, never the whole archive. -func (s *Server) transformBody(ctx context.Context, r, row M, body io.ReadCloser) (io.Reader, func(), bool, error) { - reader := bufio.NewReader(body) - sample, _ := reader.Peek(515) - name := str(row["name"]) - isText := textFile(name, sample) - if source, ok := body.(*blobcache.Reader); ok && s.resultCache != nil { - opt, err := s.anonymizerOptions(r, "repo") - if err != nil { - body.Close() - return nil, nil, isText, err - } - output, handled, err := s.sharedResult(ctx, r, row, source, isText, opt) - if handled { - body.Close() - if err != nil { - return nil, nil, isText, err - } - return output, func() { output.Close() }, isText, nil - } - } - if !isText { - file, e := os.CreateTemp("", "anonymous-go-binary-") - if e != nil { - body.Close() - return nil, nil, false, e - } - cleanup := func() { file.Close(); os.Remove(file.Name()) } - n, e := io.Copy(file, io.LimitReader(reader, anonymize.MaxInput+1)) - body.Close() - if e != nil || n > anonymize.MaxInput { - cleanup() - return nil, nil, false, fail("storage_write_size_mismatch", 502) - } - if _, e = file.Seek(0, 0); e != nil { - cleanup() - return nil, nil, false, e - } - if err := s.activeContentCache(ctx, r); err != nil { - cleanup() - return nil, nil, false, err - } - if _, err := s.authorizeContent(ctx, r); err != nil { - cleanup() - return nil, nil, false, err - } - return file, cleanup, false, nil - } - opt, err := s.anonymizerOptions(r, "repo") - if err != nil { - body.Close() - return nil, nil, false, err - } - scope, err := json.Marshal(contentRevisionFilter(r)) - if err != nil { - body.Close() - return nil, nil, true, err - } - file, _, cleanup, err := s.pool.Process(ctx, reader, anonymize.ProcessRequest{StageEvent: s.stageObserver(ctx), Options: opt, Context: anonymize.Context{Mask: s.Config.Mask, Hostname: s.Config.Hostname}, MaxOutput: anonymize.MaxOutput, CacheScope: string(scope), CacheOwner: str(r["repoId"]), CacheEvent: func(hit bool) { - name := "legacy_result_miss" - if hit { - name = "legacy_result_hit" - } - s.observeCache(ctx, name, 0, 0) - }}) - body.Close() - if err != nil { - return nil, nil, true, transformFailure(err) - } - if err := s.activeContentCache(ctx, r); err != nil { - cleanup() - s.pool.RemoveResults(str(r["repoId"])) - return nil, nil, true, err - } - if _, err := s.authorizeContent(ctx, r); err != nil { - cleanup() - s.pool.RemoveResults(str(r["repoId"])) - return nil, nil, true, err - } - return file, cleanup, true, nil -} -func (s *Server) file(q *request) (any, error) { - requested, err := security.RelativePath(q.Params["path"]) - if err != nil { - return nil, fail("invalid_path", 400) - } - r, err := q.resource("repo", false) - if err != nil { - return nil, err - } - if err = s.checkResource(q.ctx(), "repo", r); err != nil { - return nil, err - } - selected, err := s.indexedFile(q.ctx(), r, requested) - if err != nil { - return nil, err - } - if selected == nil { - return nil, fail("file_not_found", 404) - } - name := str(selected["name"]) - if !fileAllowed(name, obj(r["options"])) { - return nil, fail("file_not_supported", 403) - } - if number(selected["size"]) > anonymize.MaxInput { - return nil, fail("file_too_big", 413) - } - // These headers also belong on HEAD and conditional responses. - if parseExtendedQuery(q.R.URL.RawQuery).object["download"].truthy() { - q.W.Header().Set("Content-Disposition", downloadDisposition(requested)) - attachmentType := filetype.MIME(path.Ext(requested)) - if attachmentType == "" { - attachmentType = "application/octet-stream" - } - q.W.Header().Set("Content-Type", attachmentType) - } else if scriptableFile(name) || scriptableFile(requested) { - q.W.Header().Set("Content-Security-Policy", "sandbox allow-popups allow-forms allow-modals") - } - fingerprint, _ := json.Marshal([]any{obj(r["source"])["commit"], selected["sha"], requested, r["options"], s.Config.Mask, s.Config.Hostname, "go-v1"}) - hash := sha1.Sum(fingerprint) - etag := `"f-` + hex.EncodeToString(hash[:]) + `"` - if s.Config.SharedCacheEnabled { - etag = "W/" + etag - sharedVary(q.W.Header()) - } - q.W.Header().Set("ETag", etag) - q.W.Header().Set("Cache-Control", "private, no-cache, must-revalidate") - // Body reads authorize in the cache layer. Responses without a body must - // still authorize here, including conditional requests that return 304. - fresh := responseFresh(q.R, 200, q.W.Header()) - if fresh || q.R.Method == http.MethodHead { - if _, err = s.authorizeContent(q.ctx(), r); err != nil { - return nil, err - } - } - if fresh { - // Express's manual status(304).end() retains attachment MIME metadata. - // net/http suppresses the canonical Content-Type key on HTTP/1 304s; - // use its equivalent lowercase spelling only for this metadata response. - if values := q.W.Header().Values("Content-Type"); len(values) != 0 { - q.W.Header()["content-type"] = values - q.W.Header().Del("Content-Type") - } - q.W.WriteHeader(304) - return written{}, nil - } - contentType := filetype.MIME(path.Ext(name)) - if strings.HasSuffix(name, ".ts") || contentType == "" && textFile(name, nil) { - contentType = "text/plain; charset=utf-8" - } - if contentType != "" { - q.W.Header().Set("Content-Type", contentType) - } - // The public TypeScript route ends HEAD before sendSharedContent. Encoding - // negotiation and content reads belong only to the GET response path. - if q.R.Method == "HEAD" { - q.W.WriteHeader(200) - return written{}, nil - } - response := &sharedResponse{accept: strings.Join(q.R.Header.Values("Accept-Encoding"), ", ")} - reader, cleanup, text, err := s.transformedResponse(q.ctx(), r, selected, response) - if response.eligible { - sharedVary(q.W.Header()) - } - if err == errSharedEncoding { - q.W.Header().Set("Content-Length", "0") - q.W.WriteHeader(http.StatusNotAcceptable) - return written{}, nil - } - if err != nil { - return nil, err - } - defer cleanup() - current, e := s.Store.one(q.ctx(), collection("repo"), contentRevisionFilter(r)) - if e != nil { - return nil, e - } - if current == nil { - return nil, fail("repository_changed", 409) - } - if text { - q.W.Header().Set("Accept-Ranges", "none") - if contentType == "" { - q.W.Header().Set("Content-Type", "text/plain; charset=utf-8") - } - } else if contentType == "" { - q.W.Header().Set("Content-Type", "application/octet-stream") - } - handled := false - if blob, ok := reader.(*blobcache.Reader); ok && response.eligible { - handled, err = sendSharedBlob(q.ctx(), q.W, blob, response) - if err != nil { - if handled { - panic(http.ErrAbortHandler) - } - return nil, err - } - } - if !handled { - if _, err = io.Copy(q.W, reader); err != nil { - panic(http.ErrAbortHandler) - } - } - s.Store.update(q.ctx(), "anonymizedrepositories", M{"_id": r["_id"]}, M{"$inc": M{"pageView": 1}, "$set": M{"lastView": time.Now()}}) - return written{}, nil -} -func (s *Server) zip(q *request) (any, error) { - if !s.Config.Download { - return nil, fail("download_not_enabled", 403) - } - r, err := q.resource("repo", false) - if err != nil { - return nil, err - } - if err = s.checkResource(q.ctx(), "repo", r); err != nil { - return nil, err - } - if q.R.Method == http.MethodHead { - q.W.Header().Set("Content-Disposition", downloadDisposition(str(r["repoId"])+".zip")) - q.W.Header().Set("Content-Type", "application/zip") - q.W.WriteHeader(http.StatusOK) - return written{}, nil - } - - p, access, err := s.repositoryProvider(r) - if err != nil { - return nil, err - } - if archives, ok := p.(provider.Archives); ok { - return s.zipFromArchive(q, r, p, access, archives) - } - - e, err := s.engine(r, "repo") - if err != nil { - return nil, err - } - // Consume bounded metadata batches instead of retaining the entire tree. - // No limit: a successful ZIP must contain every eligible file. - rows, err := s.Store.DB.Collection("files").Find(q.ctx(), M{"repoId": r["repoId"], "treeGeneration": activeGeneration(r), "size": M{"$ne": nil}}, - options.Find().SetBatchSize(128).SetProjection(M{"_id": 0, "path": 1, "name": 1, "size": 1, "sha": 1})) - if err != nil { - return nil, err - } - defer rows.Close(q.ctx()) - if _, err = s.authorizeContent(q.ctx(), r); err != nil { - return nil, err - } - q.W.Header().Set("Content-Disposition", downloadDisposition(str(r["repoId"])+".zip")) - q.W.Header().Set("Content-Type", "application/zip") - q.W.Header().Set("Cache-Control", "private, no-cache") - // Nginx honors this per-response hint; other responses retain buffering. - q.W.Header().Set("X-Accel-Buffering", "no") - archive := newStreamZIP(q.W) - seen := map[string]bool{} - for rows.Next(q.ctx()) { - var row M - if err := rows.Decode(&row); err != nil { - panic(http.ErrAbortHandler) - } - if !fileAllowed(str(row["name"]), obj(r["options"])) { - continue - } - original := path.Join(str(row["path"]), str(row["name"])) - name, err := e.Path(q.ctx(), original) - if err != nil { - panic(http.ErrAbortHandler) - } - if _, err = security.RelativePath(name); err != nil || seen[name] { - panic(http.ErrAbortHandler) - } - seen[name] = true - reader, cleanup, _, err := s.transformed(q.ctx(), r, row) - if err != nil { - panic(http.ErrAbortHandler) - } - if current, e := s.Store.one(q.ctx(), collection("repo"), contentRevisionFilter(r)); e != nil || current == nil { - cleanup() - panic(http.ErrAbortHandler) - } - err = archive.add(q.ctx(), name, reader) - cleanup() - if err != nil { - panic(http.ErrAbortHandler) - } - } - // A failed or cancelled cursor must never produce a valid, partial ZIP. - if rows.Err() != nil || q.ctx().Err() != nil { - panic(http.ErrAbortHandler) - } - if archive.archive.Close() != nil { - panic(http.ErrAbortHandler) - } - return written{}, nil -} -func (s *Server) sourceRepository(mode string) handler { - return func(q *request) (any, error) { - id := q.Params["provider"] - name := q.R.URL.Query().Get("name") - if id == "" { - id = "github" - name = q.Params["owner"] + "/" + q.Params["repo"] - } - p, e := s.providers.Repositories(id) - if e != nil { - return nil, providerFailure(e) - } - a, e := s.previewRepositoryAccess(q, p, id, name) - if e != nil { - return nil, e - } - if e = p.Authorize(q.ctx(), a); e != nil { - return nil, e - } - var discovery provider.Discovery - if mode != "metadata" { - var supported bool - discovery, supported = p.(provider.Discovery) - if !supported { - return nil, providerFailure(provider.ErrCapability) - } - } - var r provider.Repository - var cached M - if previews, ok := p.(provider.RepositoryPreviews); ok { - refresh, err := previewRefresh(q.R.URL.RawQuery) - if err != nil { - return nil, err - } - var snapshot *provider.Repository - if !refresh { - cached, snapshot, e = s.previewMetadataSnapshot(q, id, a) - if e != nil { - return nil, e - } - } - r, e = previews.PreviewRepository(q.ctx(), a, snapshot) - } else { - r, e = p.Repository(q.ctx(), a) - } - if e != nil { - return nil, e - } - if e := validateRepositoryIdentity(a, r); e != nil { - return nil, e - } - a.Ref.ID, a.Ref.Name = r.ID, r.Name - var metadata M - if cached != nil { - if str(cached["externalId"]) != externalRepositoryID(id, r.ID) { - return nil, fail("connection_changed", 409) - } - metadata = providerRepositoryJSON(id, r, cached) - } else { - metadata, e = s.cacheProviderRepository(q, id, r) - if e != nil { - return nil, e - } - } - if mode == "metadata" { - return metadata, nil - } - d := discovery - refresh, err := previewRefresh(q.R.URL.RawQuery) - if err != nil { - return nil, err - } - previews, cachedDiscovery := p.(provider.DiscoveryPreviews) - if mode == "readme" { - if selected, ok := p.(provider.SelectedReadmePreviews); ok { - fallback := r.DefaultBranch - if fallback == "" { - fallback = "master" - } - value, err := selected.PreviewSelectedReadme(q.ctx(), a, previewBranchMatch(q.R.URL.RawQuery, fallback), refresh) - if err != nil { - return nil, err - } - return q.text(value), nil - } - fallback := "" - if cachedDiscovery { - fallback = r.DefaultBranch - } - branch, err := previewBranchQuery(q.R.URL.RawQuery, fallback) - if err != nil { - return nil, err - } - var value string - if cachedDiscovery { - value, e = previews.PreviewReadme(q.ctx(), a, branch, refresh) - } else { - value, e = d.Readme(q.ctx(), a, branch) - } - if e != nil { - return nil, e - } - return q.text(value), nil - } - var rows []provider.Branch - if cachedDiscovery { - rows, e = previews.PreviewBranches(q.ctx(), a, refresh) - } else { - rows, e = d.Branches(q.ctx(), a) - } - if e != nil { - return nil, e - } - out := []M{} - for _, branch := range rows { - out = append(out, previewBranchJSON(branch)) - } - return out, nil - } -} - -func (s *Server) authorizeContent(ctx context.Context, r M) (string, error) { - return "", s.authorizeSource(ctx, r) -} diff --git a/backend/internal/server/folder_counts.go b/backend/internal/server/folder_counts.go deleted file mode 100644 index a77753b..0000000 --- a/backend/internal/server/folder_counts.go +++ /dev/null @@ -1,54 +0,0 @@ -package server - -import ( - "context" - "strings" -) - -// Aggregate by original directory before transforming paths. The number of -// anonymizations now depends on folders, not on every file and ancestor pair. -func (s *Server) folderCounts(ctx context.Context, r M) (M, error) { - cursor, err := s.Store.DB.Collection("files").Aggregate(ctx, []M{ - {"$match": M{"repoId": r["repoId"], "treeGeneration": activeGeneration(r), "size": M{"$ne": nil}}}, - {"$group": M{"_id": "$path", "count": M{"$sum": 1}}}, - }) - if err != nil { - return nil, err - } - defer cursor.Close(ctx) - original := map[string]int64{} - for cursor.Next(ctx) { - var row M - if err := cursor.Decode(&row); err != nil { - return nil, err - } - p, count := str(row["_id"]), number(row["count"]) - for { - original[p] += count - if p == "" { - break - } - if i := strings.LastIndexByte(p, '/'); i >= 0 { - p = p[:i] - } else { - p = "" - } - } - } - if err := cursor.Err(); err != nil { - return nil, err - } - engine, err := s.engine(r, "repo") - if err != nil { - return nil, err - } - counts := M{} - for p, count := range original { - anonymous, err := engine.Path(ctx, p) - if err != nil { - return nil, err - } - counts[anonymous] = number(counts[anonymous]) + count - } - return counts, nil -} diff --git a/backend/internal/server/folder_path.go b/backend/internal/server/folder_path.go deleted file mode 100644 index fc39a44..0000000 --- a/backend/internal/server/folder_path.go +++ /dev/null @@ -1,127 +0,0 @@ -package server - -import ( - "context" - "errors" - "path" - "strings" - - "github.com/tdurieux/anonymous_github/backend/internal/anonymize" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/mongo/options" -) - -func folderQuery(raw string) (string, error) { - value := parseExtendedQuery(raw).object["path"] - if !value.truthy() { - return "", nil - } - requested, ok := value.scalarValue() - if !ok { - return "", errors.New("invalid_query_value") - } - return requested, nil -} - -func (s *Server) originalFolder(ctx context.Context, repo M, requested string) (string, error) { - resolve := strings.Contains(requested, s.Config.Mask) - for _, term := range arr(obj(repo["options"])["terms"]) { - _, _, custom := anonymize.ParseTerm(str(term)) - resolve = resolve || custom - } - if requested == "" || !resolve { - return requested, nil - } - filter := M{"repoId": repo["repoId"], "treeGeneration": activeGeneration(repo)} - directory, name := folderPathParts(requested) - filter["path"] = directory - if name != "" { - filter["name"] = name - } - exact, err := s.Store.one(ctx, "files", filter) - if err != nil { - return "", err - } - if exact != nil { - if err := s.completeRecoveredMetadata(ctx, repo, exact); err != nil { - return "", err - } - return path.Join(str(exact["path"]), str(exact["name"])), nil - } - delete(filter, "path") - delete(filter, "name") - cursor, err := s.Store.DB.Collection("files").Find(ctx, filter, options.Find().SetSort(bson.D{{Key: "path", Value: 1}, {Key: "name", Value: 1}}).SetBatchSize(256).SetProjection(M{"path": 1, "name": 1, "metadataPending": 1, "recoverySnapshot": 1})) - if err != nil { - return "", err - } - defer cursor.Close(ctx) - engine, err := s.engine(repo, "repo") - if err != nil { - return "", err - } - for cursor.Next(ctx) { - var row M - if err := cursor.Decode(&row); err != nil { - return "", err - } - original := path.Join(str(row["path"]), str(row["name"])) - transformed, err := engine.Path(ctx, original) - if err != nil { - return "", err - } - if transformed == requested { - if err := s.completeRecoveredMetadata(ctx, repo, row); err != nil { - return "", err - } - return original, nil - } - } - if err := cursor.Err(); err != nil { - return "", err - } - recovered, err := s.recoverTruncatedFile(ctx, repo, requested) - if err != nil { - return "", err - } - return path.Join(str(recovered["path"]), str(recovered["name"])), nil -} - -// Match the POSIX dirname/basename operations used by AnonymizedFile before -// its exact Mongo lookup, including trailing and repeated separators. -func folderPathParts(requested string) (string, string) { - directory := "." - if len(requested) > 0 { - root := requested[0] == '/' - end := -1 - trailing := true - for i := len(requested) - 1; i >= 1; i-- { - if requested[i] == '/' { - if !trailing { - end = i - break - } - } else { - trailing = false - } - } - if end < 0 { - if root { - directory = "/" - } - } else if root && end == 1 { - directory = "//" - } else { - directory = requested[:end] - } - } - if directory == "." { - directory = "" - } - directory = strings.TrimSuffix(directory, "/") - trimmed := strings.TrimRight(requested, "/") - name := trimmed - if i := strings.LastIndexByte(trimmed, '/'); i >= 0 { - name = trimmed[i+1:] - } - return directory, name -} diff --git a/backend/internal/server/folder_path_test.go b/backend/internal/server/folder_path_test.go deleted file mode 100644 index 4d9abd5..0000000 --- a/backend/internal/server/folder_path_test.go +++ /dev/null @@ -1,169 +0,0 @@ -package server - -import ( - "encoding/json" - "net/http/httptest" - "net/url" - "os" - "reflect" - "testing" - - "go.mongodb.org/mongo-driver/v2/bson" -) - -func TestFolderQuery(t *testing.T) { - for _, raw := range []string{"", "path="} { - if got, err := folderQuery(raw); err != nil || got != "" { - t.Fatal(raw, got, err) - } - } - for _, raw := range []string{"path[]=docs", "path[x]=docs", "path=docs&path=other", "path[]="} { - if _, err := folderQuery(raw); err == nil { - t.Fatal(raw, "accepted non-scalar") - } - } - if got, err := folderQuery("path=docs%2Fchild"); err != nil || got != "docs/child" { - t.Fatal(got, err) - } -} - -func runFolderPathIntegration(t *testing.T, s *Server) { - t.Run("folder path resolution", func(t *testing.T) { - ctx := t.Context() - id := "folder-" + bson.NewObjectID().Hex() - repo := M{"repoId": id, "status": "ready", "treeGeneration": "fixture", "options": M{"terms": []string{"alice => shared", "bob => shared"}, "expirationMode": "never"}} - if _, err := s.Store.DB.Collection(collection("repo")).InsertOne(ctx, repo); err != nil { - t.Fatal(err) - } - defer s.Store.DB.Collection(collection("repo")).DeleteOne(ctx, M{"repoId": id}) - defer s.Store.DB.Collection("files").DeleteMany(ctx, M{"repoId": id}) - for _, row := range []M{ - {"path": "", "name": "alice"}, {"path": "", "name": "bob"}, - {"path": "alice", "name": "first.txt", "size": 1}, {"path": "bob", "name": "second.txt", "size": 2}, - } { - row["repoId"], row["treeGeneration"] = id, "fixture" - if _, err := s.Store.DB.Collection("files").InsertOne(ctx, row); err != nil { - t.Fatal(err) - } - } - call := func(query string, status int) []M { - t.Helper() - r := httptest.NewRequest("GET", "/api/repo/"+id+"/files?"+query, nil) - r.RemoteAddr = "198.51.100.65:1234" - w := httptest.NewRecorder() - s.ServeHTTP(w, r) - if w.Code != status { - t.Fatal(query, w.Code, w.Body) - } - if status != 200 { - return nil - } - var rows []M - if err := json.Unmarshal(w.Body.Bytes(), &rows); err != nil { - t.Fatal(err) - } - return rows - } - for _, requested := range []string{"alice", "alice/", "alice//", "./alice/", "shared"} { - rows := call("path="+url.QueryEscape(requested), 200) - if len(rows) != 1 || rows[0]["name"] != "first.txt" || rows[0]["path"] != "shared" || rows[0]["sha"] != "da39a3ee" { - t.Fatal(requested, rows) - } - } - rows := call("path=bob", 200) - if len(rows) != 1 || rows[0]["name"] != "second.txt" { - t.Fatal(rows) - } - call("path=missing", 404) - for _, query := range []string{"path[]=alice", "path[x]=alice", "path=alice&path=bob", "path[]="} { - call(query, 500) - } - // An exact original folder wins over a replacement collision. - for _, row := range []M{{"path": "", "name": "shared"}, {"path": "shared", "name": "exact.txt", "size": 3}} { - row["repoId"], row["treeGeneration"] = id, "fixture" - if _, err := s.Store.DB.Collection("files").InsertOne(ctx, row); err != nil { - t.Fatal(err) - } - } - rows = call("path=shared", 200) - if len(rows) != 1 || rows[0]["name"] != "exact.txt" { - t.Fatal(rows) - } - // Compare the full output to the actual TypeScript tree projection. - var fixture struct { - Files []M - Expected []M - } - raw, err := os.ReadFile("testdata/folder-listing.json") - if err != nil { - t.Fatal(err) - } - if err = json.Unmarshal(raw, &fixture); err != nil { - t.Fatal(err) - } - if _, err = s.Store.DB.Collection("files").DeleteMany(ctx, M{"repoId": id}); err != nil { - t.Fatal(err) - } - for _, row := range fixture.Files { - row["repoId"], row["treeGeneration"] = id, "fixture" - if _, err = s.Store.DB.Collection("files").InsertOne(ctx, row); err != nil { - t.Fatal(err) - } - } - actual := call("", 200) - byName := map[string]M{} - for _, row := range actual { - byName[str(row["name"])] = row - } - if len(actual) != len(fixture.Expected) { - t.Fatal(actual) - } - for _, expected := range fixture.Expected { - if !reflect.DeepEqual(byName[str(expected["name"])], expected) { - t.Fatal(actual, fixture.Expected) - } - } - // Restore a directory to check default-mask and raw-path resolution. - for _, row := range []M{{"path": "", "name": "alice"}, {"path": "alice", "name": "first.txt", "size": 1}} { - row["repoId"], row["treeGeneration"] = id, "fixture" - if _, err = s.Store.DB.Collection("files").InsertOne(ctx, row); err != nil { - t.Fatal(err) - } - } - // Without custom terms, an ordinary unknown folder is an empty listing. - if _, err := s.Store.DB.Collection(collection("repo")).UpdateOne(ctx, M{"repoId": id}, M{"$set": M{"options.terms": []string{"alice"}}}); err != nil { - t.Fatal(err) - } - if rows := call("path=missing", 200); len(rows) != 0 { - t.Fatal(rows) - } - if rows := call("path=alice%2F", 200); len(rows) != 0 { - t.Fatal("unresolved scalar path was normalized", rows) - } - rows = call("path=alice", 200) - if len(rows) != 1 || rows[0]["name"] != "first.txt" { - t.Fatal(rows) - } - rows = call("path="+url.QueryEscape(s.Config.Mask+"-1"), 200) - if len(rows) != 1 || rows[0]["name"] != "first.txt" { - t.Fatal(rows) - } - }) -} - -func TestFolderPathParts(t *testing.T) { - raw, err := os.ReadFile("testdata/folder-paths.json") - if err != nil { - t.Fatal(err) - } - var cases []struct{ Requested, Directory, Name string } - if err = json.Unmarshal(raw, &cases); err != nil { - t.Fatal(err) - } - for _, c := range cases { - directory, name := folderPathParts(c.Requested) - if directory != c.Directory || name != c.Name { - t.Fatal(c, directory, name) - } - } -} diff --git a/backend/internal/server/github.go b/backend/internal/server/github.go deleted file mode 100644 index 56b053e..0000000 --- a/backend/internal/server/github.go +++ /dev/null @@ -1,569 +0,0 @@ -package server - -import ( - "bytes" - "context" - "crypto" - "crypto/rand" - "crypto/rsa" - "crypto/sha256" - "crypto/x509" - "encoding/base64" - "encoding/json" - "encoding/pem" - "errors" - "fmt" - "io" - "net/http" - "net/url" - "strings" - "time" - - "github.com/tdurieux/anonymous_github/backend/internal/security" - "go.mongodb.org/mongo-driver/v2/bson" -) - -func (s *Server) github(ctx context.Context, method, path, token string, body any) (any, error) { - result, _, err := s.githubResponse(ctx, method, path, token, body, false) - return result, err -} - -// Keep the upstream status for adapter decisions without changing public errors. -type githubHTTPError struct { - status int - err error -} - -func (e *githubHTTPError) Error() string { return e.err.Error() } -func (e *githubHTTPError) Unwrap() error { return e.err } - -func (s *Server) githubResponse(ctx context.Context, method, path, token string, body any, emptyConflict bool) (any, http.Header, error) { - ctx, cancel := context.WithTimeout(ctx, 20*time.Second) - defer cancel() - if !strings.HasPrefix(path, "/") || strings.HasPrefix(path, "//") || strings.ContainsAny(path, "\\\r\n") { - return nil, nil, fail("invalid_github_path", 400) - } - var reader io.Reader - if body != nil { - b, e := json.Marshal(body) - if e != nil { - return nil, nil, e - } - reader = bytes.NewReader(b) - } - req, err := http.NewRequestWithContext(ctx, method, "https://api.github.com"+path, reader) - if err != nil { - return nil, nil, fail("github_unavailable", 502) - } - req.Header.Set("Accept", "application/vnd.github+json") - req.Header.Set("Content-Type", "application/json") - req.Header.Set("X-GitHub-Api-Version", "2022-11-28") - req.Header.Set("User-Agent", "Anonymous-GitHub") - if token != "" { - req.Header.Set("Authorization", "Bearer "+token) - } - if err := s.checkGitHubQuota(ctx, token); err != nil { - return nil, nil, err - } - resp, err := s.HTTP.Do(req) - if err != nil { - return nil, nil, fail("github_unavailable", 502) - } - defer resp.Body.Close() - if githubLimited(resp) { - return nil, nil, &githubHTTPError{status: resp.StatusCode, err: s.recordGitHubQuota(ctx, token, resp.Header)} - } - if resp.StatusCode >= 500 { - return nil, nil, &githubHTTPError{status: resp.StatusCode, err: fail("github_unavailable", 502)} - } - if resp.StatusCode == 401 { - return nil, nil, &githubHTTPError{status: resp.StatusCode, err: fail("github_app_reconnect_required", 403)} - } - if emptyConflict && resp.StatusCode == 409 { - return []any{}, http.Header{}, nil - } - if resp.StatusCode >= 300 { - return nil, nil, &githubHTTPError{status: resp.StatusCode, err: fail("github_app_access_required", 403)} - } - if resp.StatusCode == 204 { - return nil, nil, nil - } - b, err := io.ReadAll(io.LimitReader(resp.Body, 32*1024*1024+1)) - if err != nil || len(b) > 32*1024*1024 { - return nil, nil, fail("github_response_too_large", 502) - } - var result any - if json.Unmarshal(b, &result) != nil { - return nil, nil, fail("github_invalid_response", 502) - } - return result, resp.Header, nil -} -func (s *Server) githubObject(ctx context.Context, method, path, token string, body any) (M, error) { - r, e := s.github(ctx, method, path, token, body) - if e != nil { - return nil, e - } - return obj(r), nil -} -func (s *Server) exchange(ctx context.Context, values M) (M, error) { - ctx, cancel := context.WithTimeout(ctx, 20*time.Second) - defer cancel() - b, _ := json.Marshal(values) - req, _ := http.NewRequestWithContext(ctx, "POST", "https://github.com/login/oauth/access_token", bytes.NewReader(b)) - req.Header.Set("Accept", "application/json") - req.Header.Set("Content-Type", "application/json") - resp, err := s.HTTP.Do(req) - if err != nil { - return nil, fail("github_unavailable", 502) - } - defer resp.Body.Close() - if resp.StatusCode >= 500 { - return nil, fail("github_unavailable", 502) - } - if resp.StatusCode == 429 { - return nil, githubRateLimit(resp.Header, time.Now()) - } - var tokens M - data, readErr := io.ReadAll(io.LimitReader(resp.Body, 65537)) - if readErr != nil || len(data) > 65536 || json.Unmarshal(data, &tokens) != nil || resp.StatusCode >= 300 { - return nil, fail("github_app_reconnect_required", 401) - } - if token, ok := tokens["access_token"].(string); !ok || token == "" { - return nil, fail("github_app_reconnect_required", 401) - } - return tokens, nil -} -func envelope(v any) (security.Envelope, error) { - var e security.Envelope - b, err := bson.Marshal(v) - if err != nil { - return e, err - } - err = bson.Unmarshal(b, &e) - return e, err -} -func (s *Server) credential(ctx context.Context, owner any, provider string) (string, error) { - return s.credentialForReconciliation(ctx, owner, provider, false) -} -func (s *Server) credentialForReconciliation(ctx context.Context, owner any, provider string, reconcile bool) (result string, resultErr error) { - defer func() { - if resultErr == nil && provider == "github-app-user" { - s.registerGitHubQuota(result, "app-user:"+str(owner)) - } - }() - - if provider == "github-app-user" && !s.Config.AppEnabled { - return "", fail("github_app_disabled", 503) - } - user, err := s.Store.one(ctx, "users", M{"_id": owner}) - if err != nil { - return "", err - } - if !identity(user).Active() { - return "", fail("not_connected", 403) - } - for attempt := 0; attempt < 30; attempt++ { - row, err := s.Store.one(ctx, "credentials", M{"ownerId": owner, "provider": provider}) - if err != nil { - return "", err - } - if row == nil || boolean(row["revoked"]) { - return "", fail("github_app_reconnect_required", 403) - } - if boolean(row["reconciliationPending"]) && !reconcile { - return "", fail("github_app_reconciliation_pending", 503) - } - e, err := envelope(row["encryptedToken"]) - if err != nil { - return "", fail("credential_decryption_failed", 500) - } - if provider != "github-app-user" || date(row["expiresAt"]).After(time.Now().Add(time.Minute)) { - token, err := s.Config.Cipher.Decrypt(e, str(owner), provider, "") - if err != nil { - return "", fail("credential_decryption_failed", 500) - } - return token, nil - } - if !date(row["refreshExpiresAt"]).After(time.Now()) { - return "", fail("github_app_reconnect_required", 403) - } - lock, err := security.RandomToken() - if err != nil { - return "", err - } - acquired, err := s.Store.update(ctx, "credentials", M{"_id": row["_id"], "revision": row["revision"], "revoked": M{"$ne": true}, "$or": []M{{"refreshLockUntil": M{"$exists": false}}, {"refreshLockUntil": M{"$lt": time.Now()}}}}, M{"$set": M{"refreshLock": lock, "refreshLockUntil": time.Now().Add(30 * time.Second)}}) - if err != nil { - return "", err - } - if !acquired { - select { - case <-ctx.Done(): - return "", ctx.Err() - case <-time.After(time.Second): - continue - } - } - token, err := func() (string, error) { - defer func() { - cleanup, stop := context.WithTimeout(context.WithoutCancel(ctx), 5*time.Second) - defer stop() - s.Store.update(cleanup, "credentials", M{"_id": row["_id"], "refreshLock": lock}, M{"$unset": M{"refreshLock": "", "refreshLockUntil": ""}}) - }() - e, err := envelope(row["encryptedRefreshToken"]) - if err != nil { - return "", fail("credential_decryption_failed", 500) - } - refresh, err := s.Config.Cipher.Decrypt(e, str(owner), provider, "encryptedRefreshToken") - if err != nil { - return "", fail("credential_decryption_failed", 500) - } - data, err := s.exchange(ctx, M{"client_id": s.Config.AppClientID, "client_secret": s.Config.AppClientSecret, "grant_type": "refresh_token", "refresh_token": refresh}) - if err != nil { - return "", err - } - accessTTL, refreshTTL, err := appTokenLifetimes(data) - if err != nil { - return "", err - } - access, err := s.Config.Cipher.Encrypt(str(data["access_token"]), str(owner), provider, "") - if err != nil { - return "", err - } - renew, err := s.Config.Cipher.Encrypt(str(data["refresh_token"]), str(owner), provider, "encryptedRefreshToken") - if err != nil { - return "", err - } - revision, err := security.RandomToken() - if err != nil { - return "", err - } - saved, err := s.Store.update(ctx, "credentials", M{"_id": row["_id"], "revision": row["revision"], "refreshLock": lock, "revoked": M{"$ne": true}}, M{"$set": M{"encryptedToken": access, "encryptedRefreshToken": renew, "expiresAt": time.Now().Add(accessTTL), "refreshExpiresAt": time.Now().Add(refreshTTL), "revision": revision, "updatedAt": time.Now()}, "$unset": M{"refreshLock": "", "refreshLockUntil": ""}}) - if err != nil { - return "", err - } - if !saved { - return "", nil - } - return str(data["access_token"]), nil - }() - if err != nil { - return "", err - } - if token != "" { - return token, nil - } - } - return "", fail("github_app_refresh_busy", 503) -} -func (s *Server) appJWT() (string, error) { - if !s.Config.AppEnabled { - return "", fail("github_app_disabled", 503) - } - block, _ := pem.Decode([]byte(s.Config.AppPrivateKey)) - if block == nil { - return "", errors.New("invalid_app_private_key") - } - var key *rsa.PrivateKey - if k, err := x509.ParsePKCS1PrivateKey(block.Bytes); err == nil { - key = k - } else { - k, err := x509.ParsePKCS8PrivateKey(block.Bytes) - if err != nil { - return "", errors.New("invalid_app_private_key") - } - var ok bool - key, ok = k.(*rsa.PrivateKey) - if !ok { - return "", errors.New("invalid_app_private_key") - } - } - encode := func(v any) string { b, _ := json.Marshal(v); return base64.RawURLEncoding.EncodeToString(b) } - now := time.Now().Unix() - payload := encode(M{"alg": "RS256", "typ": "JWT"}) + "." + encode(M{"iat": now - 60, "exp": now + 540, "iss": s.Config.AppClientID}) - hash := sha256.Sum256([]byte(payload)) - sig, err := rsa.SignPKCS1v15(rand.Reader, key, crypto.SHA256, hash[:]) - if err != nil { - return "", errors.New("app_signing_failed") - } - token := payload + "." + base64.RawURLEncoding.EncodeToString(sig) - s.registerGitHubQuota(token, "app:"+s.Config.AppID+":"+s.Config.AppClientID) - return token, nil -} -func (s *Server) boundToken(ctx context.Context, owner any, binding M, name string) (string, error) { - if str(binding["kind"]) != "github-app" { - return s.credential(ctx, owner, "github") - } - userToken, err := s.credential(ctx, owner, "github-app-user") - if err != nil { - return "", err - } - repositoryID := number(binding["repositoryId"]) - if !storedSafeInteger(binding["repositoryId"]) { - return "", fail("github_app_reconnect_required", 403) - } - if boolean(binding["publicRead"]) { - _, hasInstallation := binding["installationId"] - if hasInstallation || !safeRepositoryName(name) { - return "", fail("github_app_access_required", 403) - } - err := s.cachedPermission([]string{s.Config.AppID, str(owner), userToken, "public", str(repositoryID), name, str(binding["revision"])}, func() error { - r, err := s.githubObject(ctx, "GET", "/repos/"+name, userToken, nil) - if err != nil { - return err - } - if !jsonSafeInteger(r["id"]) || number(r["id"]) != repositoryID || r["private"] != false || str(r["visibility"]) != "public" { - return fail("github_app_access_required", 403) - } - return nil - }) - if err != nil { - return "", err - } - return userToken, nil - } - installationID := number(binding["installationId"]) - if !storedSafeInteger(binding["installationId"]) { - return "", fail("github_app_reconnect_required", 403) - } - - local, err := s.Store.one(ctx, "githubinstallations", M{"appId": s.Config.AppID, "installationId": installationID}) - if err != nil { - return "", err - } - if boolean(local["reconciliationPending"]) && str(local["revision"]) != "" { - jwt, err := s.appJWT() - if err != nil { - return "", err - } - if err = s.reconcileInstallation(ctx, installationID, str(local["revision"]), jwt); err != nil { - return "", err - } - local, err = s.Store.one(ctx, "githubinstallations", M{"appId": s.Config.AppID, "installationId": installationID}) - if err != nil { - return "", err - } - } - if boolean(local["blocked"]) { - return "", fail("github_app_access_required", 403) - } - - if err := s.cachedPermission([]string{s.Config.AppID, str(owner), userToken, "installation", str(installationID), str(repositoryID), str(local["revision"]), str(binding["revision"])}, func() error { - _, err := s.githubObject(ctx, "GET", fmt.Sprintf("/repositories/%d", repositoryID), userToken, nil) - return err - }); err != nil { - return "", err - } - - cacheKey := fmt.Sprintf("%s:%d:%d:%s", str(owner), installationID, repositoryID, str(local["revision"])) - value, err, _ := s.tokenFlights.Do(cacheKey, func() (any, error) { - s.tokenMu.Lock() - cached, found := s.appTokens[cacheKey] - s.tokenMu.Unlock() - if found && cached.expires.After(time.Now().Add(time.Minute)) { - return cached.token, nil - } - jwt, err := s.appJWT() - if err != nil { - return nil, err - } - installation, err := s.githubObject(ctx, "GET", fmt.Sprintf("/app/installations/%d", installationID), jwt, nil) - if err != nil { - return nil, err - } - permissions := obj(installation["permissions"]) - if str(installation["app_id"]) != s.Config.AppID || inputTruthy(installation["suspended_at"]) || str(permissions["contents"]) != "read" { - return nil, fail("github_app_access_required", 403) - } - for _, v := range permissions { - if v == "write" || v == "admin" { - return nil, fail("github_app_permissions_invalid", 403) - } - } - scopes := M{"contents": "read", "metadata": "read"} - for _, k := range []string{"pull_requests", "pages"} { - if permissions[k] == "read" { - scopes[k] = "read" - } - } - issued, err := s.githubObject(ctx, "POST", fmt.Sprintf("/app/installations/%d/access_tokens", installationID), jwt, M{"repository_ids": []int64{repositoryID}, "permissions": scopes}) - if err != nil { - return nil, err - } - token, validToken := issued["token"].(string) - expiry, validExpiry := issued["expires_at"].(string) - expires, parsedExpiry := dashboardCursorDate(expiry) - if !validToken || token == "" || !validExpiry || !parsedExpiry { - return nil, fail("github_app_reconnect_required", 403) - } - current, err := s.Store.one(ctx, "githubinstallations", M{"appId": s.Config.AppID, "installationId": installationID}) - if err != nil { - return nil, err - } - if boolean(current["blocked"]) || str(current["revision"]) != str(local["revision"]) { - return nil, fail("github_app_access_required", 403) - } - if expires.After(time.Now().Add(time.Minute)) { - s.tokenMu.Lock() - if s.appTokens == nil || len(s.appTokens) >= 1000 { - s.appTokens = map[string]installationToken{} - } - s.appTokens[cacheKey] = installationToken{token, expires} - s.tokenMu.Unlock() - } - return token, nil - }) - if err != nil { - return "", err - } - s.registerGitHubQuota(value.(string), "installation:"+s.Config.AppID+":"+str(installationID)) - return value.(string), nil -} -func (s *Server) userToken(ctx context.Context, owner any) (string, error) { - row, err := s.Store.one(ctx, "credentials", M{"ownerId": owner, "provider": "github"}) - if err != nil { - return "", err - } - if row != nil { - return s.credential(ctx, owner, "github") - } - return s.credential(ctx, owner, "github-app-user") -} -func (s *Server) installations(ctx context.Context, owner any) ([]M, error) { - token, err := s.credential(ctx, owner, "github-app-user") - if err != nil { - return nil, err - } - out := []M{} - err = s.githubPages(ctx, "/user/installations", token, "installations", func(item M) bool { - if str(item["app_id"]) == s.Config.AppID { - out = append(out, item) - } - return false - }) - if err != nil { - return nil, err - } - return out, nil -} -func (s *Server) selectAccess(ctx context.Context, owner any, name, choice string) (string, M, error) { - token, binding, _, err := s.selectAccessIdentity(ctx, owner, name, choice, "") - return token, binding, err -} -func (s *Server) selectAccessIdentity(ctx context.Context, owner any, name, choice, repositoryID string) (string, M, string, error) { - if !safeRepositoryName(name) { - return "", nil, "", fail("repo_not_found", 400) - } - if choice != "" && choice != "oauth" && choice != "github-app" { - return "", nil, "", fail("invalid_connection", 400) - } - if choice == "" && s.Config.AppEnabled { - row, err := s.Store.one(ctx, "credentials", M{"ownerId": owner, "provider": "github-app-user"}) - if err != nil { - return "", nil, "", err - } - if row != nil { - choice = "github-app" - } - } - revision, err := security.RandomToken() - if err != nil { - return "", nil, "", err - } - if choice != "github-app" { - token, err := s.storedGrantToken(ctx, owner, "github") - if err == nil && token == "" { - err = fail("github_oauth_required", 403) - } - return token, M{"kind": "oauth", "revision": revision}, "", err - } - token, err := s.credential(ctx, owner, "github-app-user") - if err != nil { - return "", nil, "", err - } - installations, err := s.installations(ctx, owner) - if err != nil { - return "", nil, "", err - } - for _, installation := range installations { - if inputTruthy(installation["suspended_at"]) { - continue - } - var selected M - err := s.githubPages(ctx, fmt.Sprintf("/user/installations/%d/repositories", number(installation["id"])), token, "repositories", func(repo M) bool { - if (repositoryID == "" && strings.EqualFold(str(repo["full_name"]), name)) || (repositoryID != "" && str(repo["id"]) == repositoryID) { - selected = repo - return true - } - return false - }) - if err != nil { - return "", nil, "", err - } - if selected != nil { - binding := M{"kind": "github-app", "repositoryId": selected["id"], "installationId": installation["id"], "revision": revision} - token, err := s.boundToken(ctx, owner, binding, str(selected["full_name"])) - return token, binding, str(selected["full_name"]), err - } - } - endpoint := "/repos/" + name - if repositoryID != "" { - endpoint = "/repositories/" + segment(repositoryID) - } - repo, err := s.githubObject(ctx, "GET", endpoint, token, nil) - if err != nil { - return "", nil, "", err - } - if repo["private"] != false || str(repo["visibility"]) != "public" || !jsonSafeInteger(repo["id"]) { - return "", nil, "", fail("github_app_access_required", 403) - } - binding := M{"kind": "github-app", "publicRead": true, "repositoryId": repo["id"], "revision": revision} - token, err = s.boundToken(ctx, owner, binding, str(repo["full_name"])) - return token, binding, str(repo["full_name"]), err -} -func segment(s string) string { return url.PathEscape(s) } - -// Raw GitHub responses are restricted to GitHub's API and gist-content host. -// Redirects are revalidated and credentials never follow a cross-host redirect. -func (s *Server) githubText(ctx context.Context, target, token, accept string, limit int64) (string, error) { - u, e := url.Parse(target) - if e != nil || u.Scheme != "https" || u.User != nil || u.Port() != "" || (u.Host != "api.github.com" && u.Host != "gist.githubusercontent.com") { - return "", fail("invalid_github_url", 400) - } - req, e := http.NewRequestWithContext(ctx, "GET", target, nil) - if e != nil { - return "", e - } - req.Header.Set("Accept", accept) - req.Header.Set("User-Agent", "Anonymous-GitHub") - if u.Host == "api.github.com" && token != "" { - req.Header.Set("Authorization", "Bearer "+token) - } - client := *s.HTTP - client.CheckRedirect = func(r *http.Request, via []*http.Request) error { - if len(via) >= 5 || r.URL.Scheme != "https" || r.URL.User != nil || r.URL.Port() != "" || (r.URL.Host != "api.github.com" && r.URL.Host != "gist.githubusercontent.com") { - return errors.New("unsafe_redirect") - } - if r.URL.Host != u.Host { - r.Header.Del("Authorization") - } - return nil - } - resp, e := client.Do(req) - if e != nil { - return "", fail("github_unavailable", 502) - } - defer resp.Body.Close() - if resp.StatusCode != 200 { - return "", fail("github_content_unavailable", 502) - } - b, e := io.ReadAll(io.LimitReader(resp.Body, limit+1)) - if e != nil || int64(len(b)) > limit { - return "", fail("github_response_too_large", 502) - } - return string(b), nil -} - -type installationToken struct { - token string - expires time.Time -} diff --git a/backend/internal/server/github_links_test.go b/backend/internal/server/github_links_test.go deleted file mode 100644 index 91846ec..0000000 --- a/backend/internal/server/github_links_test.go +++ /dev/null @@ -1,83 +0,0 @@ -package server - -import ( - "context" - "io" - "net/http" - "strconv" - "strings" - "testing" -) - -func TestGitHubLinkPagination(t *testing.T) { - for _, firstBody := range []string{`[{"id":1}]`, `[]`, "[" + strings.Repeat(`{"id":1},`, 99) + `{"id":1}]`} { - t.Run("first-page-bytes-"+strconv.Itoa(len(firstBody)), func(t *testing.T) { - calls, visited := 0, 0 - s := &Server{HTTP: &http.Client{Transport: roundTrip(func(r *http.Request) (*http.Response, error) { - calls++ - body := firstBody - headers := http.Header{} - if r.URL.Host != "api.github.com" || r.Header.Get("Authorization") != "Bearer synthetic" { - t.Fatal("credential destination changed", r.URL) - } - if calls == 1 { - headers["Link"] = []string{`; rel="prev"`, `; rel="next"`} - } else { - if calls != 2 || r.URL.RawQuery != "after=opaque%2Bcursor&per_page=7" { - t.Fatal("cursor modified", r.URL) - } - body = `[{"id":2}]` - headers.Set("Link", `; rel="prev"`) - } - return &http.Response{StatusCode: 200, Header: headers, Body: io.NopCloser(strings.NewReader(body))}, nil - })}} - err := s.githubPages(context.Background(), "/user/repos", "synthetic", "", func(M) bool { visited++; return false }) - want := 2 - if firstBody == "[]" { - want = 1 - } else if len(firstBody) > 100 { - want = 101 - } - if err != nil || calls != 2 || visited != want { - t.Fatal(calls, visited, err) - } - }) - } - t.Run("full final page does not request another", func(t *testing.T) { - calls := 0 - s := &Server{HTTP: &http.Client{Transport: roundTrip(func(*http.Request) (*http.Response, error) { - calls++ - return &http.Response{StatusCode: 200, Header: http.Header{}, Body: io.NopCloser(strings.NewReader("[" + strings.Repeat(`{"id":1},`, 99) + `{"id":1}]`))}, nil - })}} - if err := s.githubPages(context.Background(), "/user/repos", "synthetic", "", func(M) bool { return false }); err != nil || calls != 1 { - t.Fatal(calls, err) - } - }) - for _, target := range []string{"https://evil.test/repos", "http://api.github.com/repos", "https://api.github.com:443/repos", "https://user@api.github.com/repos", "https://api.github.com/repos#fragment", "//evil.test/repos", "https://api.github.com//evil.test/repos", "https://api.github.com/\\evil.test/repos"} { - t.Run(target, func(t *testing.T) { - calls := 0 - s := &Server{HTTP: &http.Client{Transport: roundTrip(func(r *http.Request) (*http.Response, error) { - calls++ - if calls > 1 { - t.Fatal("untrusted next link was requested", r.URL) - } - return &http.Response{StatusCode: 200, Header: http.Header{"Link": []string{"<" + target + `>; rel="next"`}}, Body: io.NopCloser(strings.NewReader("[]"))}, nil - })}} - if err := s.githubPages(context.Background(), "/user/repos", "synthetic", "", func(M) bool { return false }); err == nil || calls != 1 { - t.Fatal(calls, err) - } - }) - } - for _, field := range []string{"", "repositories"} { - t.Run("conflict/"+field, func(t *testing.T) { - s := &Server{HTTP: &http.Client{Transport: roundTrip(func(*http.Request) (*http.Response, error) { - return &http.Response{StatusCode: 409, Header: http.Header{}, Body: io.NopCloser(strings.NewReader(`{"message":"empty repository"}`))}, nil - })}} - visited := 0 - err := s.githubPages(context.Background(), "/repos/team/project/branches", "synthetic", field, func(M) bool { visited++; return false }) - if visited != 0 || (field == "" && err != nil) || (field != "" && err == nil) { - t.Fatal(field, visited, err) - } - }) - } -} diff --git a/backend/internal/server/github_pagination.go b/backend/internal/server/github_pagination.go deleted file mode 100644 index 9faf9a0..0000000 --- a/backend/internal/server/github_pagination.go +++ /dev/null @@ -1,70 +0,0 @@ -package server - -import ( - "context" - "net/url" - "regexp" - "strconv" - "strings" -) - -var githubNextLink = regexp.MustCompile(`<([^<>]+)>;[\t\n\v\f\r \x{00a0}\x{1680}\x{2000}-\x{200a}\x{2028}\x{2029}\x{202f}\x{205f}\x{3000}\x{feff}]*rel="next"`) - -// githubPages keeps pagination inside the GitHub adapter. The visitor can stop -// after an identity match; callers collecting a list publish it only on success. -// Cancellation and the per-response byte bound still apply on every page. -func (s *Server) githubPages(ctx context.Context, endpoint, token, field string, visit func(M) bool) error { - u, err := url.Parse(endpoint) - if err != nil { - return err - } - query := u.Query() - query.Set("per_page", "100") - query.Set("page", "1") - u.RawQuery = query.Encode() - for page := 1; ; page++ { - if err := ctx.Err(); err != nil { - return err - } - if field != "" { - query.Set("page", strconv.Itoa(page)) - u.RawQuery = query.Encode() - } - raw, headers, err := s.githubResponse(ctx, "GET", u.String(), token, nil, field == "") - if err != nil { - return err - } - if field != "" { - raw = obj(raw)[field] - } - rows := arr(raw) - for _, row := range rows { - if err := ctx.Err(); err != nil { - return err - } - if visit(obj(row)) { - return nil - } - } - if field != "" { - if len(rows) < 100 { - return nil - } - continue - } - next := githubNextLink.FindStringSubmatch(strings.Join(headers.Values("Link"), ", ")) - if len(next) == 0 { - return nil - } - // Follow GitHub's cursor verbatim, but never its authority. This - // preserves cursor pagination without exposing bearer credentials. - target, err := url.Parse(next[1]) - if err != nil || target.Scheme != "https" || target.Host != "api.github.com" || target.User != nil || target.Fragment != "" || strings.HasPrefix(target.Path, "//") || strings.ContainsAny(target.Path, "\\\r\n") { - return fail("invalid_github_url", 502) - } - u, err = url.Parse(target.RequestURI()) - if err != nil { - return fail("invalid_github_url", 502) - } - } -} diff --git a/backend/internal/server/github_pagination_contract_test.go b/backend/internal/server/github_pagination_contract_test.go deleted file mode 100644 index 98ece07..0000000 --- a/backend/internal/server/github_pagination_contract_test.go +++ /dev/null @@ -1,66 +0,0 @@ -package server - -import ( - "context" - "encoding/json" - "io" - "net/http" - "os" - "reflect" - "strings" - "testing" -) - -func TestOctokitPaginationContracts(t *testing.T) { - raw, err := os.ReadFile("testdata/github-pagination.json") - if err != nil { - t.Fatal(err) - } - var cases []struct { - Name string - Count int - Link string - Conflict int - Expected struct { - URLs []string - IDs []int64 - } - } - if err := json.Unmarshal(raw, &cases); err != nil { - t.Fatal(err) - } - for _, c := range cases { - t.Run(c.Name, func(t *testing.T) { - urls, ids := []string{}, []int64{} - s := &Server{HTTP: &http.Client{Transport: roundTrip(func(r *http.Request) (*http.Response, error) { - urls = append(urls, r.URL.String()) - if len(urls) > 2 { - t.Fatal("unexpected pagination request") - } - headers := http.Header{} - count := 1 - if len(urls) == 1 { - count = c.Count - headers.Set("Link", c.Link) - } - rows := []M{} - for i := 0; i < count; i++ { - rows = append(rows, M{"id": len(urls)}) - } - body, err := json.Marshal(rows) - if err != nil { - t.Fatal(err) - } - status := 200 - if len(urls) == c.Conflict { - status = 409 - } - return &http.Response{StatusCode: status, Header: headers, Body: io.NopCloser(strings.NewReader(string(body)))}, nil - })}} - err := s.githubPages(context.Background(), "/user/repos", "synthetic", "", func(row M) bool { ids = append(ids, number(row["id"])); return false }) - if err != nil || !reflect.DeepEqual(urls, c.Expected.URLs) || !reflect.DeepEqual(ids, c.Expected.IDs) { - t.Fatalf("requests=%v ids=%v error=%v; want %+v", urls, ids, err, c.Expected) - } - }) - } -} diff --git a/backend/internal/server/github_pagination_test.go b/backend/internal/server/github_pagination_test.go deleted file mode 100644 index 4a0431d..0000000 --- a/backend/internal/server/github_pagination_test.go +++ /dev/null @@ -1,100 +0,0 @@ -package server - -import ( - "context" - "errors" - "fmt" - "io" - "net/http" - "strconv" - "strings" - "testing" -) - -func TestGitHubPagination(t *testing.T) { - for _, field := range []string{"", "repositories", "installations"} { - t.Run("past-old-boundary/"+field, func(t *testing.T) { - calls, visited := 0, 0 - s := &Server{HTTP: &http.Client{Transport: roundTrip(func(r *http.Request) (*http.Response, error) { - calls++ - if r.URL.Query().Get("page") != strconv.Itoa(calls) || r.URL.Query().Get("per_page") != "100" || r.URL.Query().Get("sort") != "pushed" || r.Header.Get("Authorization") != "Bearer synthetic" { - t.Fatal("pagination changed request", r.URL) - } - body := "[" + strings.Repeat(`{"id":1},`, 99) + `{"id":1}]` - if calls == 1001 { - body = `[{"id":2}]` - } - if field != "" { - body = fmt.Sprintf(`{"%s":%s}`, field, body) - } - headers := http.Header{} - if calls < 1001 { - headers.Set("Link", fmt.Sprintf(`; rel="next"`, calls+1)) - } - return &http.Response{StatusCode: 200, Header: headers, Body: io.NopCloser(strings.NewReader(body))}, nil - })}} - err := s.githubPages(context.Background(), "/user/repos?sort=pushed", "synthetic", field, func(row M) bool { - visited++ - if visited == 100001 && number(row["id"]) != 2 { - t.Fatal("last page lost") - } - return false - }) - if err != nil || calls != 1001 || visited != 100001 { - t.Fatal(calls, visited, err) - } - }) - } - for _, mode := range []string{"empty", "exact-page", "early-match", "cancel", "upstream-error"} { - t.Run(mode, func(t *testing.T) { - ctx, cancel := context.WithCancel(context.Background()) - defer cancel() - calls, visited := 0, 0 - s := &Server{HTTP: &http.Client{Transport: roundTrip(func(r *http.Request) (*http.Response, error) { - calls++ - status := 200 - body := "[" + strings.Repeat(`{"id":1},`, 99) + `{"id":1}]` - if mode == "empty" || (mode == "exact-page" && calls == 2) { - body = "[]" - } - if mode == "upstream-error" && calls == 2 { - status = 503 - } - headers := http.Header{} - if mode != "empty" && !(mode == "exact-page" && calls == 2) { - headers.Set("Link", fmt.Sprintf(`; rel="next"`, calls+1)) - } - return &http.Response{StatusCode: status, Header: headers, Body: io.NopCloser(strings.NewReader(body))}, nil - })}} - err := s.githubPages(ctx, "/user/repos", "synthetic", "", func(M) bool { - visited++ - if mode == "cancel" { - cancel() - } - return mode == "early-match" && visited == 101 - }) - switch mode { - case "empty": - if err != nil || calls != 1 || visited != 0 { - t.Fatal(calls, visited, err) - } - case "exact-page": - if err != nil || calls != 2 || visited != 100 { - t.Fatal(calls, visited, err) - } - case "early-match": - if err != nil || calls != 2 || visited != 101 { - t.Fatal(calls, visited, err) - } - case "cancel": - if !errors.Is(err, context.Canceled) || calls != 1 || visited != 1 { - t.Fatal(calls, visited, err) - } - case "upstream-error": - if err == nil || err.Error() != "github_unavailable" || calls != 2 || visited != 100 { - t.Fatal(calls, visited, err) - } - } - }) - } -} diff --git a/backend/internal/server/github_quota.go b/backend/internal/server/github_quota.go deleted file mode 100644 index e735fef..0000000 --- a/backend/internal/server/github_quota.go +++ /dev/null @@ -1,132 +0,0 @@ -package server - -import ( - "context" - "crypto/sha256" - "encoding/hex" - "net/http" - "strconv" - "strings" - "time" - - "github.com/tdurieux/anonymous_github/backend/internal/quotagate" -) - -func tokenDigest(token string) string { - sum := sha256.Sum256([]byte(token)) - return hex.EncodeToString(sum[:]) -} -func (s *Server) registerGitHubQuota(token, scope string) { - if token == "" { - return - } - s.quotaMu.Lock() - defer s.quotaMu.Unlock() - if s.quotaScopes == nil { - s.quotaScopes = map[string]string{} - } - if len(s.quotaScopes) >= 2048 { - for k := range s.quotaScopes { - delete(s.quotaScopes, k) - break - } - } - s.quotaScopes[tokenDigest(token)] = scope -} -func (s *Server) githubQuotaScope(token string) string { - digest := tokenDigest(token) - s.quotaMu.Lock() - scope := s.quotaScopes[digest] - s.quotaMu.Unlock() - if scope != "" { - return scope - } - return "token:" + digest -} -func (s *Server) quotaGate() *quotagate.Gate { - s.quotaOnce.Do(func() { - if s.Store != nil && s.Store.Redis != nil { - s.providerQuota = quotagate.New(s.Store.Redis.WithTimeout(250 * time.Millisecond)) - } else { - s.providerQuota = quotagate.New(nil) - } - }) - return s.providerQuota -} -func (s *Server) checkGitHubQuota(ctx context.Context, token string) error { - scope := s.githubQuotaScope(token) - reset, err := s.quotaGate().Current(ctx, "github", scope) - if err != nil { - return err - } - // Import on use rather than scanning Redis or decrypting every stored - // credential at cutover. Legacy records remain untouched for rollback. - if s.Store != nil && s.Store.Redis != nil { - values, _ := s.Store.Redis.WithTimeout(250*time.Millisecond).MGet(ctx, legacyGitHubQuotaKeys(token, scope)...).Result() - latest := reset - for _, value := range values { - text, ok := value.(string) - if !ok { - continue - } - millis, err := strconv.ParseInt(text, 10, 64) - if err != nil || millis <= 0 || millis > 253402300799000 { - continue - } - candidate := time.UnixMilli(millis) - if candidate.After(time.Now()) && candidate.After(latest) { - latest = candidate - } - } - if err := ctx.Err(); err != nil { - return err - } - if latest.After(reset) { - if err := s.quotaGate().Extend(ctx, "github", scope, latest); err != nil { - return err - } - // Another Go instance may have extended the same scope meanwhile. - reset, err = s.quotaGate().Current(ctx, "github", scope) - if err != nil { - return err - } - if reset.Before(latest) { - reset = latest - } - } - } - if reset.After(time.Now()) { - return &APIError{Code: "github_rate_limit_exceeded", Status: 429, ResetAt: reset.UnixMilli()} - } - return nil -} - -// TypeScript's process-local token contexts use stable installation/App-user -// keys; unregistered tokens use the first 24 hex characters of SHA-256. Read -// both because the old process may have used a token before registering it. -func legacyGitHubQuotaKeys(token, scope string) []string { - keys := []string{"gh_rate_gate:" + tokenDigest(token)[:24]} - if strings.HasPrefix(scope, "app-user:") { - if _, err := oid(strings.TrimPrefix(scope, "app-user:")); err == nil { - keys = append(keys, "gh_rate_gate:"+scope) - } - } else if strings.HasPrefix(scope, "installation:") { - parts := strings.Split(scope, ":") - if len(parts) == 3 { - id, err := strconv.ParseInt(parts[2], 10, 64) - if err == nil && id > 0 && strconv.FormatInt(id, 10) == parts[2] { - keys = append(keys, "gh_rate_gate:installation:"+parts[2]) - } - } - } - return keys -} -func (s *Server) recordGitHubQuota(ctx context.Context, token string, h http.Header) error { - limited := githubRateLimit(h, time.Now()).(*APIError) - _ = s.quotaGate().Extend(ctx, "github", s.githubQuotaScope(token), time.UnixMilli(limited.ResetAt)) - return limited -} -func githubLimited(response *http.Response) bool { - _, retry := response.Header[http.CanonicalHeaderKey("Retry-After")] - return response.StatusCode == 429 || (response.StatusCode == 403 && (response.Header.Get("X-RateLimit-Remaining") == "0" || retry)) -} diff --git a/backend/internal/server/github_quota_integration_test.go b/backend/internal/server/github_quota_integration_test.go deleted file mode 100644 index 3de03d3..0000000 --- a/backend/internal/server/github_quota_integration_test.go +++ /dev/null @@ -1,46 +0,0 @@ -package server - -import ( - "context" - "errors" - "io" - "net/http" - "strings" - "sync/atomic" - "testing" - - "go.mongodb.org/mongo-driver/v2/bson" -) - -func runGitHubQuotaIntegration(t *testing.T, base *Server) { - t.Run("GitHub quotas shared across instances and token renewal", func(t *testing.T) { - ctx := context.Background() - scope := "installation:test:" + bson.NewObjectID().Hex() - var calls atomic.Int64 - client := &http.Client{Transport: roundTrip(func(r *http.Request) (*http.Response, error) { - calls.Add(1) - h := http.Header{} - h.Set("Retry-After", "120") - return &http.Response{StatusCode: 429, Header: h, Body: io.NopCloser(strings.NewReader("private details"))}, nil - })} - first := &Server{Store: base.Store, HTTP: client} - second := &Server{Store: base.Store, HTTP: client} - first.registerGitHubQuota("synthetic-original", scope) - second.registerGitHubQuota("synthetic-renewed", scope) - _, err := first.github(ctx, "GET", "/repos/team/project", "synthetic-original", nil) - var firstAPI *APIError - if !errors.As(err, &firstAPI) || firstAPI.Status != 429 { - t.Fatal(err) - } - _, err = second.github(ctx, "GET", "/repos/team/other", "synthetic-renewed", nil) - var secondAPI *APIError - if !errors.As(err, &secondAPI) || secondAPI.ResetAt != firstAPI.ResetAt || calls.Load() != 1 { - t.Fatal("shared quota bypassed", err, calls.Load()) - } - second.registerGitHubQuota("synthetic-independent", scope+":other") - _, _ = second.github(ctx, "GET", "/repos/team/other", "synthetic-independent", nil) - if calls.Load() != 2 { - t.Fatal("unrelated installation blocked") - } - }) -} diff --git a/backend/internal/server/github_quota_legacy_integration_test.go b/backend/internal/server/github_quota_legacy_integration_test.go deleted file mode 100644 index e05b3d8..0000000 --- a/backend/internal/server/github_quota_legacy_integration_test.go +++ /dev/null @@ -1,144 +0,0 @@ -package server - -import ( - "context" - "encoding/json" - "errors" - "io" - "net/http" - "os" - "strconv" - "strings" - "sync/atomic" - "testing" - "time" - - "go.mongodb.org/mongo-driver/v2/bson" -) - -func runLegacyGitHubQuotaIntegration(t *testing.T, base *Server) { - t.Run("TypeScript quota records survive Go cutover", func(t *testing.T) { - ctx := context.Background() - raw, err := os.ReadFile("testdata/github-quota.json") - if err != nil { - t.Fatal(err) - } - var cases []struct { - Name, Token, Scope string - Expected []string - } - if err := json.Unmarshal(raw, &cases); err != nil { - t.Fatal(err) - } - for _, c := range cases { - t.Run(c.Name, func(t *testing.T) { - var calls atomic.Int64 - client := &http.Client{Transport: roundTrip(func(*http.Request) (*http.Response, error) { - calls.Add(1) - return &http.Response{StatusCode: 200, Header: http.Header{}, Body: io.NopCloser(strings.NewReader(`{}`))}, nil - })} - s := &Server{Store: base.Store, HTTP: client} - if c.Scope != "" { - s.registerGitHubQuota(c.Token, c.Scope) - } - now := time.Now().Truncate(time.Millisecond) - reset := now.Add(time.Hour) - defer base.Store.Redis.Del(ctx, c.Expected...) - for i, key := range c.Expected { - until := reset.Add(-time.Duration(len(c.Expected)-1-i) * time.Minute) - if err := base.Store.Redis.Set(ctx, key, strconv.FormatInt(until.UnixMilli(), 10), 2*time.Hour).Err(); err != nil { - t.Fatal(err) - } - } - _, err := s.github(ctx, "GET", "/user", c.Token, nil) - var api *APIError - if !errors.As(err, &api) || api.ResetAt != reset.UnixMilli() || calls.Load() != 0 { - t.Fatal("legacy gate bypassed", err, calls.Load()) - } - for i, key := range c.Expected { - want := strconv.FormatInt(reset.Add(-time.Duration(len(c.Expected)-1-i)*time.Minute).UnixMilli(), 10) - got, err := base.Store.Redis.Get(ctx, key).Result() - if err != nil || got != want { - t.Fatal("legacy value changed", got, err) - } - ttl, err := base.Store.Redis.PTTL(ctx, key).Result() - if err != nil || ttl <= 0 || ttl > 2*time.Hour { - t.Fatal("legacy expiry changed", ttl, err) - } - } - // Deleting the old runtime's records cannot discard the imported gate. - if err := base.Store.Redis.Del(ctx, c.Expected...).Err(); err != nil { - t.Fatal(err) - } - next := &Server{Store: base.Store, HTTP: client} - token := c.Token - if c.Scope != "" { - token += "-renewed" - next.registerGitHubQuota(token, c.Scope) - } - _, err = next.github(ctx, "GET", "/user", token, nil) - if !errors.As(err, &api) || api.ResetAt != reset.UnixMilli() || calls.Load() != 0 { - t.Fatal("import lost across instances/renewal", err) - } - // A stale legacy delay cannot shorten a newer Go gate. - longer := reset.Add(time.Hour) - if err := next.quotaGate().Extend(ctx, "github", next.githubQuotaScope(token), longer); err != nil { - t.Fatal(err) - } - legacyKey := legacyGitHubQuotaKeys(token, next.githubQuotaScope(token))[0] - defer base.Store.Redis.Del(ctx, legacyKey) - if err := base.Store.Redis.Set(ctx, legacyKey, strconv.FormatInt(reset.UnixMilli(), 10), time.Hour).Err(); err != nil { - t.Fatal(err) - } - err = next.checkGitHubQuota(ctx, token) - if !errors.As(err, &api) || api.ResetAt != longer.UnixMilli() { - t.Fatal("legacy record shortened Go gate", err) - } - // Later Node activity extends the imported Go gate without resetting it. - latest := longer.Add(time.Hour) - if err := base.Store.Redis.Set(ctx, legacyKey, strconv.FormatInt(latest.UnixMilli(), 10), time.Hour).Err(); err != nil { - t.Fatal(err) - } - err = next.checkGitHubQuota(ctx, token) - if !errors.As(err, &api) || api.ResetAt != latest.UnixMilli() { - t.Fatal("new legacy extension ignored", err) - } - }) - } - }) - t.Run("expired and malformed legacy quotas do not block requests", func(t *testing.T) { - ctx := context.Background() - for _, value := range []string{"0", "-1", "1", "NaN", "9223372036854775807", "1800000000123junk", "1800000000123.5"} { - token := "synthetic-invalid-" + bson.NewObjectID().Hex() - s := &Server{Store: base.Store} - key := legacyGitHubQuotaKeys(token, s.githubQuotaScope(token))[0] - defer base.Store.Redis.Del(ctx, key) - if err := base.Store.Redis.Set(ctx, key, value, time.Minute).Err(); err != nil { - t.Fatal(err) - } - if err := s.checkGitHubQuota(ctx, token); err != nil { - t.Fatal("invalid legacy gate blocked credential", value, err) - } - } - token := "synthetic-expiring-" + bson.NewObjectID().Hex() - s := &Server{Store: base.Store} - key := legacyGitHubQuotaKeys(token, s.githubQuotaScope(token))[0] - defer base.Store.Redis.Del(ctx, key) - until := time.Now().Add(100 * time.Millisecond) - if err := base.Store.Redis.Set(ctx, key, strconv.FormatInt(until.UnixMilli(), 10), time.Minute).Err(); err != nil { - t.Fatal(err) - } - if err := s.checkGitHubQuota(ctx, token); err == nil { - t.Fatal("active legacy record ignored") - } - time.Sleep(150 * time.Millisecond) - if err := s.checkGitHubQuota(ctx, token); err != nil { - t.Fatal("expired legacy record revived", err) - } - canceled, cancel := context.WithCancel(ctx) - cancel() - if err := s.checkGitHubQuota(canceled, token); !errors.Is(err, context.Canceled) { - t.Fatal("cancellation ignored", err) - } - }) -} diff --git a/backend/internal/server/github_quota_legacy_test.go b/backend/internal/server/github_quota_legacy_test.go deleted file mode 100644 index 3a7ab84..0000000 --- a/backend/internal/server/github_quota_legacy_test.go +++ /dev/null @@ -1,38 +0,0 @@ -package server - -import ( - "encoding/json" - "os" - "reflect" - "testing" -) - -func TestTypeScriptQuotaKeys(t *testing.T) { - raw, err := os.ReadFile("testdata/github-quota.json") - if err != nil { - t.Fatal(err) - } - var cases []struct { - Name, Token, Scope string - Expected []string - } - if err := json.Unmarshal(raw, &cases); err != nil { - t.Fatal(err) - } - for _, c := range cases { - t.Run(c.Name, func(t *testing.T) { - got := legacyGitHubQuotaKeys(c.Token, c.Scope) - if !reflect.DeepEqual(got, c.Expected) { - t.Fatalf("got %v, want %v", got, c.Expected) - } - }) - } -} - -func TestLegacyQuotaRejectsMalformedScopes(t *testing.T) { - for _, scope := range []string{"app-user:not-an-object-id", "installation:123:../token", "installation:123:0", "installation:123:-1", "installation:123:042", "installation:123:42:other", "app:123:456"} { - if keys := legacyGitHubQuotaKeys("synthetic", scope); len(keys) != 1 { - t.Fatal("unexpected scope alias", scope, keys) - } - } -} diff --git a/backend/internal/server/github_quota_test.go b/backend/internal/server/github_quota_test.go deleted file mode 100644 index d7d5dd4..0000000 --- a/backend/internal/server/github_quota_test.go +++ /dev/null @@ -1,91 +0,0 @@ -package server - -import ( - "context" - "errors" - "io" - "net/http" - "strconv" - "strings" - "sync/atomic" - "testing" - "time" -) - -func TestGitHubQuotaSuppressesRequests(t *testing.T) { - var calls atomic.Int64 - reset := time.Now().Add(time.Hour).Truncate(time.Second) - s := &Server{HTTP: &http.Client{Transport: roundTrip(func(r *http.Request) (*http.Response, error) { - calls.Add(1) - h := http.Header{} - h.Set("X-RateLimit-Reset", strconv.FormatInt(reset.Unix(), 10)) - return &http.Response{StatusCode: 429, Header: h, Body: io.NopCloser(strings.NewReader("private upstream text"))}, nil - })}} - ctx := context.Background() - for i := 0; i < 3; i++ { - _, err := s.github(ctx, "GET", "/repos/team/project", "synthetic-secret", nil) - var api *APIError - if !errors.As(err, &api) || api.Code != "github_rate_limit_exceeded" || api.ResetAt != reset.UnixMilli() { - t.Fatalf("unexpected error: %+v", err) - } - } - if calls.Load() != 1 { - t.Fatalf("gate allowed %d requests", calls.Load()) - } - _, _ = s.github(ctx, "GET", "/repos/team/other", "different-secret", nil) - if calls.Load() != 2 { - t.Fatal("independent credential blocked") - } - canceled, cancel := context.WithCancel(ctx) - cancel() - _, err := s.github(canceled, "GET", "/repos/team/project", "unused-secret", nil) - if !errors.Is(err, context.Canceled) || calls.Load() != 2 { - t.Fatal("canceled request dispatched", err) - } -} - -func TestGitHubQuotaSurvivesTokenRotation(t *testing.T) { - s := &Server{} - s.registerGitHubQuota("old-secret", "installation:app:42") - s.registerGitHubQuota("new-secret", "installation:app:42") - h := http.Header{} - h.Set("Retry-After", "60") - limited := s.recordGitHubQuota(context.Background(), "old-secret", h).(*APIError) - var api *APIError - if !errors.As(s.checkGitHubQuota(context.Background(), "new-secret"), &api) || api.ResetAt != limited.ResetAt { - t.Fatal("renewal bypassed quota") - } - s.registerGitHubQuota("other-secret", "installation:app:43") - if err := s.checkGitHubQuota(context.Background(), "other-secret"); err != nil { - t.Fatal("different installation blocked", err) - } - for digest := range s.quotaScopes { - if strings.Contains(digest, "secret") { - t.Fatal("plaintext token retained") - } - } -} - -func TestRawBlobQuotaClosesBodyAndSuppressesRetry(t *testing.T) { - var calls atomic.Int64 - closed := false - s := &Server{HTTP: &http.Client{Transport: roundTrip(func(r *http.Request) (*http.Response, error) { - calls.Add(1) - h := http.Header{} - h.Set("X-RateLimit-Remaining", "0") - h.Set("Retry-After", "60") - return &http.Response{StatusCode: 403, Header: h, Body: &revocationBody{Reader: strings.NewReader("private upstream body"), closed: &closed}}, nil - })}} - record := M{"source": M{"repositoryName": "team/project", "commit": strings.Repeat("a", 40)}} - row := M{"name": "file.txt"} - for i := 0; i < 2; i++ { - body, err := s.rawBlob(context.Background(), record, row, "synthetic-raw-token") - var api *APIError - if body != nil || !errors.As(err, &api) || api.Status != 429 { - t.Fatal("raw quota not normalized", err) - } - } - if !closed || calls.Load() != 1 { - t.Fatal("raw response leaked or retry dispatched", closed, calls.Load()) - } -} diff --git a/backend/internal/server/github_rate_limit.go b/backend/internal/server/github_rate_limit.go deleted file mode 100644 index dbcf0ab..0000000 --- a/backend/internal/server/github_rate_limit.go +++ /dev/null @@ -1,29 +0,0 @@ -package server - -import ( - "net/http" - "strconv" - "strings" - "time" -) - -// Keep GitHub header interpretation in its adapter; jobs consume only the -// normalized reset instant used by other providers' RateLimitError values. -func githubRateLimit(header http.Header, now time.Time) error { - var reset time.Time - if seconds, err := strconv.ParseInt(header.Get("X-RateLimit-Reset"), 10, 64); err == nil && seconds > 0 && seconds <= 253402300799 { - reset = time.Unix(seconds, 0) - } - retry := strings.TrimSpace(header.Get("Retry-After")) - if seconds, err := strconv.ParseInt(retry, 10, 64); err == nil && seconds > 0 && seconds <= int64((1<<63-1)/time.Second) { - if candidate := now.Add(time.Duration(seconds) * time.Second); candidate.After(reset) { - reset = candidate - } - } else if candidate, err := http.ParseTime(retry); err == nil && candidate.After(reset) { - reset = candidate - } - if !reset.After(now) { - reset = now.Add(time.Minute) - } - return &APIError{Code: "github_rate_limit_exceeded", Status: 429, ResetAt: reset.UnixMilli()} -} diff --git a/backend/internal/server/github_responses_test.go b/backend/internal/server/github_responses_test.go deleted file mode 100644 index 91beddc..0000000 --- a/backend/internal/server/github_responses_test.go +++ /dev/null @@ -1,99 +0,0 @@ -package server - -import ( - "context" - "encoding/json" - "errors" - "io" - "net/http" - "os" - "strings" - "testing" - "time" -) - -func TestTypeScriptGitHubResponses(t *testing.T) { - raw, err := os.ReadFile("testdata/github-responses.json") - if err != nil { - t.Fatal(err) - } - var cases []struct { - Name string - Status int - Headers map[string]string - Expected *struct { - Code string - Status int - } - } - if err := json.Unmarshal(raw, &cases); err != nil { - t.Fatal(err) - } - for _, c := range cases { - t.Run(c.Name, func(t *testing.T) { - s := &Server{HTTP: &http.Client{Transport: roundTrip(func(req *http.Request) (*http.Response, error) { - if deadline, ok := req.Context().Deadline(); !ok || time.Until(deadline) > 20*time.Second { - t.Fatal("missing API deadline") - } - header := http.Header{} - for key, value := range c.Headers { - header.Set(key, value) - } - return &http.Response{StatusCode: c.Status, Header: header, Body: io.NopCloser(strings.NewReader(`{"ok":true}`))}, nil - })}} - value, err := s.github(context.Background(), "GET", "/user", "synthetic", nil) - if c.Expected == nil { - if err != nil { - t.Fatal(err) - } - if c.Status == 204 && value != nil { - t.Fatal(value) - } - return - } - var api *APIError - if !errors.As(err, &api) || api.Code != c.Expected.Code || api.Status != c.Expected.Status { - t.Fatalf("got %v; expected %+v", err, c.Expected) - } - }) - } -} - -// Upstream JSON failures deliberately have stable errors in Go, rather than -// leaking the JSON parser exception thrown by the TypeScript client. -func TestGitHubResponseFraming(t *testing.T) { - for _, c := range []struct { - name, body, code string - }{ - {"empty", "", "github_invalid_response"}, - {"truncated", `{"token":"synthetic-secret"`, "github_invalid_response"}, - {"trailing text", `{"ok":true} synthetic-secret`, "github_invalid_response"}, - {"multiple values", `{} {}`, "github_invalid_response"}, - {"oversized", strings.Repeat(" ", 32*1024*1024+1), "github_response_too_large"}, - } { - t.Run(c.name, func(t *testing.T) { - body := &trackedGitHubBody{Reader: strings.NewReader(c.body)} - s := &Server{HTTP: &http.Client{Transport: roundTrip(func(*http.Request) (*http.Response, error) { - return &http.Response{StatusCode: 200, Header: http.Header{}, Body: body}, nil - })}} - _, err := s.github(context.Background(), "GET", "/user", "synthetic", nil) - var api *APIError - if !errors.As(err, &api) || api.Code != c.code || api.Status != 502 { - t.Fatalf("unexpected error: %v", err) - } - if !body.closed { - t.Fatal("response body not closed") - } - }) - } -} - -type trackedGitHubBody struct { - *strings.Reader - closed bool -} - -func (b *trackedGitHubBody) Close() error { - b.closed = true - return nil -} diff --git a/backend/internal/server/grant_integration_test.go b/backend/internal/server/grant_integration_test.go deleted file mode 100644 index ca5e556..0000000 --- a/backend/internal/server/grant_integration_test.go +++ /dev/null @@ -1,70 +0,0 @@ -package server - -import ( - "context" - "net/http/httptest" - "testing" - "time" - - "go.mongodb.org/mongo-driver/v2/bson" -) - -func runGrantIntegration(t *testing.T, s *Server) { - t.Run("grant replacement metadata", func(t *testing.T) { - ctx := context.Background() - owner := bson.NewObjectID() - if _, err := s.Store.DB.Collection("users").InsertOne(ctx, M{"_id": owner, "username": "grant-replacement", "status": "active", "repositories": []any{"stale"}}); err != nil { - t.Fatal(err) - } - q := &request{Server: s, R: httptest.NewRequest("GET", "/github/app/callback", nil)} - for _, provider := range []string{"github-app-user", "github"} { - if _, err := s.Store.DB.Collection("credentials").InsertOne(ctx, M{"ownerId": owner, "provider": provider, "revision": "old", "refreshLock": "old-lock", "refreshLockUntil": time.Now().Add(time.Hour), "encryptedRefreshToken": M{}, "expiresAt": time.Now().Add(-time.Hour), "refreshExpiresAt": time.Now().Add(-time.Hour)}); err != nil { - t.Fatal(err) - } - tokens := M{"access_token": "synthetic-new-access"} - if provider == "github-app-user" { - tokens["refresh_token"] = "synthetic-new-refresh" - tokens["expires_in"] = float64(3600) - tokens["refresh_token_expires_in"] = float64(7200) - } - if err := s.saveGrant(q, owner, provider, tokens); err != nil { - t.Fatal(err) - } - row, err := s.Store.one(ctx, "credentials", M{"ownerId": owner, "provider": provider}) - if err != nil { - t.Fatal(err) - } - if row["refreshLock"] != nil || row["refreshLockUntil"] != nil || row["revision"] == "old" { - t.Fatal("stale grant metadata retained") - } - envelope, err := envelope(row["encryptedToken"]) - if err != nil { - t.Fatal(err) - } - plain, err := s.Config.Cipher.Decrypt(envelope, owner.Hex(), provider, "") - if err != nil || plain != "synthetic-new-access" { - t.Fatal("new credential not encrypted correctly", err) - } - if provider == "github" { - if row["encryptedRefreshToken"] != nil || row["expiresAt"] != nil || row["refreshExpiresAt"] != nil { - t.Fatal("OAuth replacement retained stale refresh fields") - } - } else { - if !date(row["expiresAt"]).After(time.Now().Add(59*time.Minute)) || !date(row["refreshExpiresAt"]).After(time.Now().Add(119*time.Minute)) { - t.Fatal("App expirations missing") - } - if err := s.saveGrant(q, owner, provider, M{"access_token": "synthetic-incomplete"}); err == nil { - t.Fatal("partial App grant accepted") - } - unchanged, err := s.Store.one(ctx, "credentials", M{"ownerId": owner, "provider": provider}) - if err != nil || unchanged["revision"] != row["revision"] { - t.Fatal("invalid grant replaced valid credential", err) - } - } - } - user, err := s.Store.one(ctx, "users", M{"_id": owner}) - if err != nil || len(arr(user["repositories"])) != 0 { - t.Fatal("repository discovery cache not invalidated", err) - } - }) -} diff --git a/backend/internal/server/grant_reconciliation_integration_test.go b/backend/internal/server/grant_reconciliation_integration_test.go deleted file mode 100644 index ed38678..0000000 --- a/backend/internal/server/grant_reconciliation_integration_test.go +++ /dev/null @@ -1,153 +0,0 @@ -package server - -import ( - "context" - "encoding/json" - "io" - "net/http" - "net/http/httptest" - "strings" - "testing" - "time" - - "go.mongodb.org/mongo-driver/v2/bson" -) - -func runGrantReconciliationIntegration(t *testing.T, base *Server) { - t.Run("grant reconciliation preserves concurrent identity changes", func(t *testing.T) { - ctx := context.Background() - db := base.Store.DB.Client().Database("grant_reconciliation_" + bson.NewObjectID().Hex()) - defer db.Drop(ctx) - for _, scenario := range []string{"working", "revoked", "upstream-failure", "refresh", "refresh-failure", "new-login", "concurrent-revocation", "same-revision-revocation"} { - t.Run(scenario, func(t *testing.T) { - s := &Server{Config: base.Config, Store: &Store{DB: db, Redis: base.Store.Redis}} - s.Config.AppEnabled = true - owner := bson.NewObjectID() - if _, err := db.Collection("users").InsertOne(ctx, M{"_id": owner, "username": owner.Hex(), "status": "active"}); err != nil { - t.Fatal(err) - } - q := &request{Server: s, R: httptest.NewRequest("GET", "/", nil)} - tokens := func(access string) M { - return M{"access_token": access, "refresh_token": "synthetic-refresh", "expires_in": float64(3600), "refresh_token_expires_in": float64(7200)} - } - save := func(access string) { - t.Helper() - if err := s.saveGrant(q, owner, "github-app-user", tokens(access)); err != nil { - t.Fatal(err) - } - } - save("synthetic-original") - filter := M{"ownerId": owner, "provider": "github-app-user"} - update := func(fields M) { - t.Helper() - if _, err := s.Store.update(ctx, "credentials", filter, M{"$set": fields}); err != nil { - t.Fatal(err) - } - } - load := func() M { - t.Helper() - row, err := s.Store.one(ctx, "credentials", filter) - if err != nil { - t.Fatal(err) - } - return row - } - update(M{"reconciliationPending": true}) - if scenario == "refresh" || scenario == "refresh-failure" { - update(M{"expiresAt": time.Now().Add(-time.Hour)}) - } - original := load() - requests, refreshes := 0, 0 - newerRevision := "" - s.HTTP = &http.Client{Transport: roundTrip(func(r *http.Request) (*http.Response, error) { - status := 200 - response := M{"id": 789} - switch r.URL.Path { - case "/login/oauth/access_token": - refreshes++ - response = tokens("synthetic-refreshed") - if scenario == "refresh-failure" { - status = 503 - response = M{"error": "temporary"} - } - case "/user": - requests++ - expected := "synthetic-original" - if scenario == "refresh" { - expected = "synthetic-refreshed" - } - if !strings.HasSuffix(r.Header.Get("Authorization"), expected) { - t.Fatal("checked wrong token") - } - switch scenario { - case "revoked": - status = 401 - case "upstream-failure": - status = 503 - case "new-login": - save("synthetic-new-login") - update(M{"reconciliationPending": true}) - newerRevision = str(load()["revision"]) - case "concurrent-revocation": - update(M{"revoked": true, "revision": "newer-revocation", "reconciliationPending": false}) - case "same-revision-revocation": - update(M{"revoked": true, "reconciliationPending": false}) - } - default: - t.Fatal("unexpected grant endpoint", r.URL) - } - body, err := json.Marshal(response) - if err != nil { - t.Fatal(err) - } - return &http.Response{StatusCode: status, Header: http.Header{}, Body: io.NopCloser(strings.NewReader(string(body)))}, nil - })} - err := s.reconcileGrant(ctx, original) - failure := scenario == "upstream-failure" || scenario == "refresh-failure" - if (err != nil) != failure { - t.Fatal("unexpected reconciliation result", err) - } - row := load() - switch scenario { - case "working": - if boolean(row["reconciliationPending"]) || boolean(row["revoked"]) || row["revision"] != original["revision"] { - t.Fatal("working grant changed", row) - } - case "revoked": - if !boolean(row["revoked"]) || boolean(row["reconciliationPending"]) || row["revision"] == original["revision"] { - t.Fatal("revocation did not consume revision", row) - } - case "upstream-failure", "refresh-failure": - if boolean(row["revoked"]) || !boolean(row["reconciliationPending"]) || row["revision"] != original["revision"] { - t.Fatal("failure changed grant state", row) - } - case "refresh": - if boolean(row["reconciliationPending"]) || boolean(row["revoked"]) || row["revision"] == original["revision"] { - t.Fatal("refreshed grant left pending", row) - } - if token, err := s.credential(ctx, owner, "github-app-user"); err != nil || token != "synthetic-refreshed" { - t.Fatal("refreshed grant unavailable", err) - } - case "new-login": - if !boolean(row["reconciliationPending"]) || boolean(row["revoked"]) || row["revision"] != newerRevision { - t.Fatal("old check changed newer login", row) - } - case "concurrent-revocation", "same-revision-revocation": - if !boolean(row["revoked"]) || boolean(row["reconciliationPending"]) { - t.Fatal("old check restored revoked grant", row) - } - } - expectedRequests, expectedRefreshes := 1, 0 - if scenario == "refresh" || scenario == "refresh-failure" { - expectedRefreshes = 1 - } - if scenario == "refresh-failure" { - expectedRequests = 0 - } - if requests != expectedRequests || refreshes != expectedRefreshes { - t.Fatal("unexpected upstream calls", requests, refreshes) - } - }) - } - }) -} diff --git a/backend/internal/server/grant_revocation_integration_test.go b/backend/internal/server/grant_revocation_integration_test.go deleted file mode 100644 index 45f6d17..0000000 --- a/backend/internal/server/grant_revocation_integration_test.go +++ /dev/null @@ -1,127 +0,0 @@ -package server - -import ( - "context" - "encoding/json" - "errors" - "io" - "net/http" - "net/http/httptest" - "strings" - "testing" - "time" - - "go.mongodb.org/mongo-driver/v2/bson" -) - -func runGrantRevocationIntegration(t *testing.T, base *Server) { - t.Run("grant revocation uses stored tokens without refresh", func(t *testing.T) { - ctx := context.Background() - for _, provider := range []string{"github", "github-app-user"} { - for _, status := range []int{199, 200, 204, 299, 302, 400, 401, 404, 422, 429, 500, 503, 0, -1} { - owner := bson.NewObjectID() - s := &Server{Config: base.Config, Store: base.Store} - s.Config.AppEnabled = false - user := M{"_id": owner, "username": "revocation-" + owner.Hex(), "status": "active", "repositories": []any{"stale"}, "accessTokens": M{"github": "legacy"}, "accessTokenDates": M{"github": time.Now()}} - if _, err := s.Store.DB.Collection("users").InsertOne(ctx, user); err != nil { - t.Fatal(err) - } - token := "synthetic-revocation-token" - if status != -1 { - q := &request{Server: s, R: httptest.NewRequest("GET", "/", nil)} - tokens := M{"access_token": token} - if provider == "github-app-user" { - tokens["refresh_token"] = "must-not-refresh" - tokens["expires_in"] = float64(3600) - tokens["refresh_token_expires_in"] = float64(7200) - } - if err := s.saveGrant(q, owner, provider, tokens); err != nil { - t.Fatal(err) - } - if _, err := s.Store.update(ctx, "credentials", M{"ownerId": owner, "provider": provider}, M{"$set": M{"expiresAt": time.Now().Add(-time.Hour), "refreshExpiresAt": time.Now().Add(-time.Hour), "revoked": true}}); err != nil { - t.Fatal(err) - } - if _, err := s.Store.update(ctx, "users", M{"_id": owner}, M{"$set": M{"repositories": []any{"stale"}}}); err != nil { - t.Fatal(err) - } - } - calls := 0 - closed := false - s.HTTP = &http.Client{Transport: roundTrip(func(req *http.Request) (*http.Response, error) { - calls++ - if deadline, ok := req.Context().Deadline(); !ok || time.Until(deadline) > 20*time.Second { - t.Fatal("missing revocation deadline") - } - client, secret := s.Config.ClientID, s.Config.ClientSecret - if provider == "github-app-user" { - client, secret = s.Config.AppClientID, s.Config.AppClientSecret - } - actualClient, actualSecret, ok := req.BasicAuth() - if !ok || actualClient != client || actualSecret != secret { - t.Fatal("wrong revocation client") - } - if req.Method != "DELETE" || !strings.HasSuffix(req.URL.Path, "/grant") { - t.Fatal("attempted token refresh or wrong endpoint") - } - var body M - if err := json.NewDecoder(req.Body).Decode(&body); err != nil || body["access_token"] != token { - t.Fatal("wrong revocation body", err) - } - if status == 0 { - return nil, errors.New("synthetic upstream failure") - } - return &http.Response{StatusCode: status, Header: http.Header{}, Body: &revocationBody{Reader: strings.NewReader("synthetic upstream body"), closed: &closed}}, nil - })} - err := s.revokeGrant(ctx, owner, provider) - success := status == -1 || status >= 200 && status < 300 || status == 404 || status == 422 - if (err == nil) != success { - t.Fatal(provider, status, err) - } - if !success { - var api *APIError - if !errors.As(err, &api) || api.Code != "github_grant_revocation_failed" || api.Status != 502 { - t.Fatal("unstable failure", err) - } - } - if status == -1 { - if calls != 0 { - t.Fatal("missing grant contacted upstream") - } - } else if calls != 1 { - t.Fatal("unexpected upstream calls", calls) - } - if status > 0 && !closed { - t.Fatal("response body leaked") - } - saved, err := s.Store.one(ctx, "users", M{"_id": owner}) - if err != nil { - t.Fatal(err) - } - credential, err := s.Store.one(ctx, "credentials", M{"ownerId": owner, "provider": provider}) - if err != nil { - t.Fatal(err) - } - if success { - if credential != nil || len(arr(saved["repositories"])) != 0 { - t.Fatal("local disconnect incomplete") - } - if provider == "github" && (obj(saved["accessTokens"])["github"] != nil || obj(saved["accessTokenDates"])["github"] != nil) { - t.Fatal("legacy OAuth grant retained") - } - if provider == "github-app-user" && obj(saved["accessTokens"])["github"] != "legacy" { - t.Fatal("App disconnect changed OAuth grant") - } - } else if credential == nil || len(arr(saved["repositories"])) != 1 { - t.Fatal("failed revocation discarded local grant") - } - } - } - }) -} - -type revocationBody struct { - io.Reader - closed *bool -} - -func (b *revocationBody) Close() error { *b.closed = true; return nil } diff --git a/backend/internal/server/http.go b/backend/internal/server/http.go deleted file mode 100644 index 2c72d41..0000000 --- a/backend/internal/server/http.go +++ /dev/null @@ -1,544 +0,0 @@ -package server - -import ( - "context" - "encoding/json" - "errors" - "golang.org/x/sync/singleflight" - "io" - "log/slog" - "net" - "net/http" - "net/netip" - "net/url" - "os" - "regexp" - "strconv" - "strings" - "sync" - "sync/atomic" - "time" - - "github.com/tdurieux/anonymous_github/backend/internal/anonymize" - "github.com/tdurieux/anonymous_github/backend/internal/blobcache" - "github.com/tdurieux/anonymous_github/backend/internal/provider" - "github.com/tdurieux/anonymous_github/backend/internal/quotagate" - "github.com/tdurieux/anonymous_github/backend/internal/security" - "github.com/tdurieux/anonymous_github/backend/internal/storage" -) - -type APIError struct { - Code string - Status int - ResetAt int64 -} - -func (e *APIError) Error() string { return e.Code } -func fail(code string, status int) error { return &APIError{Code: code, Status: status} } - -type handler func(*request) (any, error) -type route struct { - method string - template string - pattern *regexp.Regexp - names []string - auth string - handler handler -} -type Server struct { - webFiles webFileCache - permissions permissionCache - publicStats publicStatsState - jobWorkerCounts [3]atomic.Int64 - queueHistory queueMetricHistory - errorLog errorLogBufferState - resultCache *blobcache.Cache - sourceCache *blobcache.Cache - sharedCacheCancel context.CancelFunc - sharedCacheDone chan struct{} - providers *provider.Registry - quotaOnce sync.Once - quotaMu sync.Mutex - providerQuota *quotagate.Gate - quotaScopes map[string]string - Config Config - Store *Store - HTTP *http.Client - routes []route - public *os.Root - requests atomic.Uint64 - failures atomic.Uint64 - removalRecoveryPending atomic.Bool - started time.Time - pool *anonymize.Pool - content *storage.Store - transfers chan struct{} - pathBuilds chan struct{} - tokenMu sync.Mutex - appTokens map[string]installationToken - tokenFlights singleflight.Group - cacheFills atomic.Int64 - cacheMetrics *cacheMetrics - requestMetrics *requestMetrics - dashboardNames dashboardCache -} -type request struct { - W http.ResponseWriter - R *http.Request - Params map[string]string - Body M - User M - Identity security.Identity - Session M - SessionID string - Maintenance bool - Server *Server -} - -func (q *request) ctx() context.Context { return q.R.Context() } -func (q *request) text(s string) any { - q.W.Header().Set("Content-Type", "text/plain; charset=utf-8") - q.W.Header().Set("Content-Length", strconv.Itoa(len(s))) - q.W.Write([]byte(s)) - return written{} -} -func (q *request) redirect(s string) any { - redirectKnownLength(q.W, q.R, s, http.StatusFound) - return written{} -} - -type written struct{} - -func New(c Config, store *Store, extensions ...provider.Provider) (*Server, error) { - root, err := os.OpenRoot(c.PublicDir) - if err != nil { - return nil, errors.New("public_directory_unavailable") - } - s := &Server{Config: c, Store: store, public: root, started: time.Now(), HTTP: &http.Client{Timeout: 30 * time.Second, CheckRedirect: func(req *http.Request, via []*http.Request) error { - if len(via) >= 5 { - return errors.New("too_many_redirects") - } - if req.URL.Scheme != "https" { - return errors.New("unsafe_redirect") - } - if len(via) > 0 && req.URL.Host != via[0].URL.Host { - req.Header.Del("Authorization") - } - return nil - }}} - binary, err := os.Executable() - if err != nil { - root.Close() - return nil, err - } - s.pool = anonymize.NewPool(binary, c.Workers) - s.content, err = storage.New(storage.Config{Kind: c.Storage, Root: c.Root, Bucket: c.S3Bucket, Region: c.S3Region, Endpoint: c.S3Endpoint, ID: c.S3ID, Secret: c.S3Secret}) - if err != nil { - root.Close() - return nil, err - } - s.transfers = make(chan struct{}, 8) - s.pathBuilds = make(chan struct{}, 2) - s.providers, err = provider.New(append([]provider.Provider{&githubProvider{s}, &archiveProvider{s}}, extensions...)...) - if err != nil { - s.Close() - return nil, err - } - s.register() - s.startCacheMetrics() - s.startRequestMetrics() - if err = s.startSharedCache(); err != nil { - s.Close() - return nil, err - } - return s, nil -} -func (s *Server) Close() { - s.closeStatsCache() - if s.requestMetrics != nil { - close(s.requestMetrics.stop) - <-s.requestMetrics.done - ctx, cancel := context.WithTimeout(context.Background(), 3*time.Second) - s.flushRequestMetrics(ctx) - s.removeProcessSample(ctx) - cancel() - } - if s.sharedCacheCancel != nil { - s.sharedCacheCancel() - <-s.sharedCacheDone - } - if s.sourceCache != nil { - s.sourceCache.Close() - } - if s.resultCache != nil { - s.resultCache.Close() - } - if s.cacheMetrics != nil { - close(s.cacheMetrics.stop) - <-s.cacheMetrics.done - ctx, cancel := context.WithTimeout(context.Background(), 3*time.Second) - s.flushCacheMetrics(ctx) - cancel() - } - if s.pool != nil { - s.pool.Close() - } - s.public.Close() - s.content.Close() -} -func (s *Server) add(method, pattern, auth string, h handler) { - parts := strings.Split(strings.Trim(pattern, "/"), "/") - names := []string{} - out := []string{} - for _, p := range parts { - if strings.HasPrefix(p, ":") { - names = append(names, p[1:]) - out = append(out, "([^/]+)") - } else if strings.HasPrefix(p, "*") { - names = append(names, p[1:]) - out = append(out, "(.+)") - } else { - out = append(out, regexp.QuoteMeta(p)) - } - } - s.routes = append(s.routes, route{method, pattern, regexp.MustCompile("^/" + strings.Join(out, "/") + "/?$"), names, auth, h}) -} -func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) { - state := &responseState{ResponseWriter: w} - w = state - ctx, cancel := context.WithTimeout(r.Context(), requestTimeout(r)) - defer cancel() - trace := newRequestTrace() - w.Header().Set("X-Request-ID", trace.id) - ctx = context.WithValue(ctx, performanceContextKey{}, trace) - r = r.WithContext(context.WithValue(ctx, cacheTrafficKey{}, cacheTraffic(r))) - done := s.monitorRequest(state, r) - defer func() { - value := recover() - if value != nil { - state.writeFailed = true - } - done() - if value != nil { - panic(value) - } - }() - // Express mounts the webhook before response compression. - if r.URL.Path != "/github/app/webhook" { - compressed := &compressionWriter{ResponseWriter: w, request: r} - w = compressed - defer func() { - if value := recover(); value != nil { - panic(value) - } - if err := compressed.finish(); err != nil { - panic(http.ErrAbortHandler) - } - }() - } - - s.requests.Add(1) - rawPath := strings.ToLower(r.URL.EscapedPath()) - if (strings.Contains(r.URL.Path, "/file/") || strings.HasPrefix(r.URL.Path, "/w/")) && (strings.Contains(rawPath, "%2f") || strings.Contains(rawPath, "%5c")) { - writeError(w, fail("invalid_path", 400)) - return - } - w.Header().Set("X-Content-Type-Options", "nosniff") - defer func() { - if value := recover(); value != nil { - if value == http.ErrAbortHandler { - panic(value) - } - s.failures.Add(1) - slog.Error("request panicked", "requestId", trace.id, "route", s.performanceRoute(r)) - writeError(w, fail("server_error", 500)) - } - }() - if r.URL.Path == "/github/app/webhook" { - s.webhook(w, r) - return - } - if r.URL.Path == "/healthcheck" || r.URL.Path == "/api/healthcheck" { - writeJSON(w, M{"status": "ok"}) - return - } - q := &request{W: w, R: r, Params: map[string]string{}, Body: M{}, Session: M{}, Server: s} - if r.Header.Get("Authorization") != "" { - n, e := s.incrementLimit(q.ctx(), "go:token-attempt:"+s.clientIP(r).String(), 60000) - if e != nil { - writeError(w, fail("rate_limit_unavailable", 503)) - return - } - if n > 120 { - writeError(w, fail("token_attempts_rate_limited", 429)) - return - } - } - if err := s.authenticate(q); err != nil { - writeError(w, err) - return - } - if strings.HasPrefix(r.URL.Path, "/api/") || strings.HasPrefix(r.URL.Path, "/github/") || strings.HasPrefix(r.URL.Path, "/w/") { - if err := s.rateLimit(q); err != nil { - writeError(w, err) - return - } - } - for _, route := range s.routes { - if route.method != r.Method && !(r.Method == "HEAD" && route.method == "GET") { - continue - } - m := route.pattern.FindStringSubmatch(r.URL.Path) - if m == nil { - continue - } - if route.auth != "" && !q.Identity.Active() { - writeError(w, fail("not_connected", 401)) - return - } - if route.auth == "admin" && !q.Identity.Admin { - writeError(w, fail("not_authorized", 401)) - return - } - for i, name := range route.names { - q.Params[name] = m[i+1] - } - if r.Body != nil && r.ContentLength != 0 && (r.Method == "POST" || r.Method == "PUT" || r.Method == "PATCH" || r.Method == "DELETE") { - if strings.HasPrefix(r.Header.Get("Content-Type"), "application/json") { - d := json.NewDecoder(http.MaxBytesReader(w, r.Body, 100*1024)) - if err := d.Decode(&q.Body); err != nil { - writeError(w, fail("invalid_request", 400)) - return - } - var extra any - if d.Decode(&extra) != io.EOF { - writeError(w, fail("invalid_request", 400)) - return - } - if q.Body == nil { - q.Body = M{} - } - } - } - var release func() - if strings.Contains(r.URL.Path, "/file/") || strings.HasSuffix(r.URL.Path, "/zip") || strings.HasPrefix(r.URL.Path, "/w/") { - select { - case s.transfers <- struct{}{}: - release = func() { <-s.transfers } - default: - writeError(w, fail("server_busy", 503)) - return - } - defer release() - } - result, err := route.handler(q) - if err != nil { - s.failures.Add(1) - s.recordError(q.ctx(), err) - writeError(w, err) - return - } - if _, ok := result.(written); ok { - return - } - writeJSON(w, result) - return - } - if strings.HasPrefix(r.URL.Path, "/api") || strings.HasPrefix(r.URL.Path, "/github") { - writeError(w, fail("not_found", 404)) - return - } - s.static(w, r) -} -func writeJSON(w http.ResponseWriter, value any) { writeJSONStatus(w, value, 200) } -func writeJSONStatus(w http.ResponseWriter, value any, status int) { - w.Header().Set("Content-Type", "application/json; charset=utf-8") - output := &jsonEntityWriter{writer: w, status: status} - encoder := json.NewEncoder(output) - encoder.SetEscapeHTML(false) - if err := encoder.Encode(responseJSON(value)); err != nil { - if output.started { - panic(http.ErrAbortHandler) - } - writeError(w, fail("internal_error", 500)) - } -} -func writeError(w http.ResponseWriter, err error) { - // Once headers are sent, a second response would corrupt the stream and - // conceal a truncated download. Match Express's connection-abort behavior. - if responseCommitted(w) { - panic(http.ErrAbortHandler) - } - for _, name := range []string{"Content-Length", "Content-Encoding", "Content-Disposition", "Content-Range", "ETag", "Last-Modified", "Transfer-Encoding", "Trailer"} { - w.Header().Del(name) - } - var api *APIError - if !errors.As(providerFailure(err), &api) { - api = &APIError{Code: "internal_error", Status: 500} - } - w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Cache-Control", "no-store") - body := M{"error": api.Code} - if api.Code == "rate_limited" && api.ResetAt > 0 { - body["resetAt"] = api.ResetAt - } - output := &jsonEntityWriter{writer: w, status: api.Status} - if err := json.NewEncoder(output).Encode(body); err != nil { - panic(http.ErrAbortHandler) - } -} -func (s *Server) clientIP(r *http.Request) netip.Addr { - host, _, _ := net.SplitHostPort(r.RemoteAddr) - ip, _ := netip.ParseAddr(host) - trusted := func(ip netip.Addr) bool { - for _, n := range s.Config.TrustedProxies { - if n.Contains(net.IP(ip.AsSlice())) { - return true - } - } - return false - } - if trusted(ip) || s.Config.TrustedHops > 0 { - parts := strings.Split(r.Header.Get("X-Forwarded-For"), ",") - for i := len(parts) - 1; i >= 0; i-- { - if s.Config.TrustedHops > 0 && len(parts)-i > s.Config.TrustedHops { - break - } - next, err := netip.ParseAddr(strings.TrimSpace(parts[i])) - if err != nil { - break - } - ip = next - if s.Config.TrustedHops == 0 && !trusted(ip) { - break - } - } - } - if cloudflareIP(ip) { - if visitor, e := netip.ParseAddr(strings.TrimSpace(r.Header.Get("CF-Connecting-IP"))); e == nil { - ip = visitor - } - } - return ip.Unmap() -} -func (s *Server) rateLimit(q *request) error { - if q.Identity.Active() && q.Identity.Admin && !q.Maintenance { - return nil - } - ip := s.clientIP(q.R) - key := ip.String() - if ip.Is6() { - key = netip.PrefixFrom(ip, 56).Masked().String() - } - if q.Maintenance { - key = "maintenance:" + q.Identity.ID - if q.R.Method == "POST" && strings.HasSuffix(strings.TrimSuffix(q.R.URL.Path, "/"), "/refresh") { - parts := strings.Split(q.R.URL.Path, "/") - if len(parts) > 3 { - n, e := s.incrementLimit(q.ctx(), "go:maintenance-refresh:"+q.Identity.ID+":"+strings.ToLower(parts[3]), 60000) - if e != nil { - return fail("rate_limit_unavailable", 503) - } - if n > 1 { - return fail("refresh_rate_limited", 429) - } - } - } - } - limit := s.Config.RateLimit - if !q.Identity.Active() { - limit /= 2 - } - if limit < 1 { - limit = 1 - } - n, err := s.Store.Redis.Eval(q.ctx(), `local n=redis.call('INCR',KEYS[1]); if n==1 then redis.call('PEXPIRE',KEYS[1],ARGV[1]) end;return n`, []string{"go:rate:" + key}, 900000).Int64() - if err != nil { - return fail("rate_limit_unavailable", 503) - } - q.W.Header().Set("RateLimit-Limit", strconv.Itoa(limit)) - q.W.Header().Set("RateLimit-Remaining", strconv.FormatInt(max(0, int64(limit)-n), 10)) - if n > int64(limit) { - q.W.Header().Set("Retry-After", "900") - return fail("rate_limit_exceeded", 429) - } - return nil -} - -var hashedAsset = regexp.MustCompile(`^(script|css)/([^/]+)\.[a-f0-9]{10}\.(min\.\w+|\w+)$`) - -func (s *Server) static(w http.ResponseWriter, r *http.Request) { - if r.Method != "GET" && r.Method != "HEAD" { - writeError(w, fail("not_found", 404)) - return - } - p := strings.TrimPrefix(r.URL.Path, "/") - if p != "" { - if clean, err := security.RelativePath(p); err == nil { - safe := true - for _, part := range strings.Split(clean, "/") { - if strings.HasPrefix(part, ".") { - safe = false - } - } - if safe { - name := clean - if m := hashedAsset.FindStringSubmatch(clean); m != nil { - name = m[1] + "/" + m[2] + "." + m[3] - w.Header().Set("Cache-Control", "public, max-age=31536000, immutable") - } - if name != "index.html" { - if file, err := s.public.Open(name); err == nil { - defer file.Close() - if info, e := file.Stat(); e == nil && !info.IsDir() { - if w.Header().Get("Cache-Control") == "" { - w.Header().Set("Cache-Control", "public, max-age=86400") - } - http.ServeContent(w, r, info.Name(), info.ModTime(), file) - return - } - } - } - } - } - } - for _, prefix := range []string{"script", "css", "favicon", "api"} { - if strings.HasPrefix(p, prefix) { - writeError(w, fail("not_found", 404)) - return - } - } - if strings.HasPrefix(p, "r/") && r.Header.Get("Accept") != "" && !strings.Contains(r.Header.Get("Accept"), "text/html") { - parts := strings.SplitN(p, "/", 3) - if len(parts) == 3 { - redirectKnownLength(w, r, "/api/repo/"+url.PathEscape(parts[1])+"/file/"+parts[2], 302) - return - } - } - data, err := s.public.ReadFile("index.html") - if err != nil { - writeError(w, fail("not_found", 404)) - return - } - manifest := map[string]string{} - if b, e := s.public.ReadFile("asset-manifest.json"); e == nil { - json.Unmarshal(b, &manifest) - } - html := string(data) - for token, name := range map[string]string{"__CORE_JS__": "core.min.js", "__VENDOR_JS__": "vendor.min.js", "__MERMAID_JS__": "mermaid.min.js", "__ALL_CSS__": "all.min.css"} { - value := manifest[name] - if value == "" { - value = name - } - html = strings.Replace(html, token, value, 1) - } - w.Header().Set("Content-Type", "text/html; charset=utf-8") - w.Header().Set("Content-Length", strconv.Itoa(len(html))) - if r.Method != http.MethodHead { - w.Write([]byte(html)) - } -} - -func (s *Server) incrementLimit(ctx context.Context, key string, ms int64) (int64, error) { - return s.Store.Redis.Eval(ctx, `local n=redis.call('INCR',KEYS[1]); if n==1 then redis.call('PEXPIRE',KEYS[1],ARGV[1]) end;return n`, []string{key}, ms).Int64() -} diff --git a/backend/internal/server/imported_removal.go b/backend/internal/server/imported_removal.go deleted file mode 100644 index d9a4e8c..0000000 --- a/backend/internal/server/imported_removal.go +++ /dev/null @@ -1,87 +0,0 @@ -package server - -import ( - "context" - "go.mongodb.org/mongo-driver/v2/bson" - "time" -) - -// Resume legacy failed removals at startup, or once for newly imported jobs. -// A paused startup pass remains pending until the queue resumes. Eligibility -// is checked by runJob immediately before cleanup, not at enqueue time. -func (s *Server) recoverImportedRemovalJobs(ctx context.Context) error { - paused, err := s.Store.Redis.Exists(ctx, "go:pause:remove").Result() - if err != nil || paused != 0 { - return err - } - filter := M{ - "kind": "repo", "action": "remove", "state": "failed", - "migration.version": 1, "migration.sourceQueue": "repository removal", - } - if !s.removalRecoveryPending.Load() { - filter["migration.removalRecovered"] = M{"$ne": true} - } - _, err = s.Store.DB.Collection("gojobs").UpdateMany(ctx, filter, M{ - "$set": M{"state": "waiting", "attempts": 0, "availableAt": time.Now(), "migration.removalRecovered": true}, - "$unset": M{"error": "", "finishedAt": "", "lease": "", "leaseUntil": ""}, - }) - if err == nil { - s.removalRecoveryPending.Store(false) - } - return err -} - -// BullMQ marks exhausted removals as ERROR, unlike Go's persistent REMOVING -// state. Recover only imported removal requests that are still current. These -// eligibility rules match TypeScript recoverStuckRemoving. -func (s *Server) recoverImportedRemoval(ctx context.Context, job, resource M) (M, error) { - imported := obj(job["migration"]) - if str(job["kind"]) != "repo" || str(job["action"]) != "remove" || number(imported["version"]) != 1 || str(imported["sourceQueue"]) != "repository removal" || str(resource["status"]) == "removed" { - return nil, nil - } - conditions := []M{} - var created time.Time - switch value := job["createdAt"].(type) { - case time.Time: - created = value - case bson.DateTime: - created = value.Time() - } - if !created.IsZero() && created.UnixMilli() > 0 { - conditions = append(conditions, M{"status": "error", "$or": []M{{"anonymizeDate": M{"$lte": created}}, {"anonymizeDate": M{"$exists": false}}}}) - } - if resource["owner"] != nil { - owner, err := s.Store.one(ctx, "users", M{"_id": resource["owner"], "status": "banned"}) - if err != nil { - return nil, err - } - if owner != nil { - conditions = append(conditions, M{"owner": resource["owner"], "status": M{"$ne": "removed"}}) - } - } - if len(conditions) == 0 { - return nil, nil - } - filter := revisionFilter(resource) - filter["$or"] = conditions - for _, field := range []string{"owner", "anonymizeDate"} { - if value, exists := resource[field]; exists { - filter[field] = value - } else { - filter[field] = M{"$exists": false} - } - } - now := time.Now().UTC().Truncate(time.Millisecond) - changed, err := s.Store.update(ctx, collection("repo"), filter, M{"$set": M{"status": "removing", "statusDate": now}, "$unset": M{"statusMessage": ""}}) - if err != nil || !changed { - return nil, err - } - // Preserve the exact claimed revision for the worker's final publication. - claimed := M{} - for key, value := range resource { - claimed[key] = value - } - claimed["status"], claimed["statusDate"] = "removing", now - delete(claimed, "statusMessage") - return claimed, nil -} diff --git a/backend/internal/server/imported_removal_integration_test.go b/backend/internal/server/imported_removal_integration_test.go deleted file mode 100644 index ea7b813..0000000 --- a/backend/internal/server/imported_removal_integration_test.go +++ /dev/null @@ -1,236 +0,0 @@ -package server - -import ( - "context" - "fmt" - "net/http/httptest" - "os" - "strings" - "testing" - "time" - - "go.mongodb.org/mongo-driver/v2/bson" -) - -func runImportedRemovalIntegration(t *testing.T, base *Server) { - for _, mode := range []string{"single", "bulk", "automatic"} { - t.Run("imported removal retries "+mode, func(t *testing.T) { - ctx := context.Background() - db := base.Store.DB.Client().Database("imported_remove_" + bson.NewObjectID().Hex()) - defer db.Drop(ctx) - s := &Server{Store: &Store{DB: db, Redis: base.Store.Redis}, content: base.content} - created := time.Now().UTC().Truncate(time.Millisecond) - type fixture struct { - name, status string - anonymized any - missing, banned, ordinary, wrongQueue, noTimestamp, restore, removed bool - } - cases := []fixture{ - {name: "older error", status: "error", anonymized: created.Add(-time.Hour), removed: true}, - {name: "equal date", status: "error", anonymized: created, removed: true}, - {name: "missing date", status: "error", missing: true, removed: true}, - {name: "newer error", status: "error", anonymized: created.Add(time.Hour)}, - {name: "restored ready", status: "ready", anonymized: created.Add(-time.Hour)}, - {name: "banned ready", status: "ready", anonymized: created, banned: true, removed: true}, - {name: "banned newer error", status: "error", anonymized: created.Add(time.Hour), banned: true, removed: true}, - {name: "already removed", status: "removed", missing: true, banned: true, removed: true}, - {name: "expired", status: "expired", missing: true}, - {name: "null date", status: "error", anonymized: nil}, - {name: "string date", status: "error", anonymized: created.Add(-time.Hour).Format(time.RFC3339Nano)}, - {name: "ordinary Go failure", status: "error", missing: true, ordinary: true}, - {name: "wrong source queue", status: "error", missing: true, wrongQueue: true}, - {name: "missing timestamp", status: "error", missing: true, noTimestamp: true}, - {name: "restored after retry", status: "error", missing: true, restore: true}, - } - ids := make([]string, len(cases)) - for i, c := range cases { - id := "imported-remove-" + bson.NewObjectID().Hex() - ids[i] = id - owner := bson.NewObjectID() - status := "active" - if c.banned { - status = "banned" - } - if _, err := db.Collection("users").InsertOne(ctx, M{"_id": owner, "status": status}); err != nil { - t.Fatal(err) - } - resource := M{"repoId": id, "status": c.status, "statusDate": created, "owner": owner, "source": M{"provider": "fixture"}, "providerAccess": M{"revision": "binding:1"}} - if !c.missing { - resource["anonymizeDate"] = c.anonymized - } - if _, err := db.Collection(collection("repo")).InsertOne(ctx, resource); err != nil { - t.Fatal(err) - } - if _, err := db.Collection("files").InsertOne(ctx, M{"repoId": id, "name": "kept-unless-removed.txt"}); err != nil { - t.Fatal(err) - } - const content = "retained fixture bytes" - if err := s.content.Put(ctx, id, "cached.bin", strings.NewReader(content), int64(len(content)), 1024); err != nil { - t.Fatal(err) - } - defer s.content.Remove(ctx, id, "") - - job := M{"_id": id, "kind": "repo", "resourceId": id, "action": "remove", "state": "failed", "attempts": 3, "createdAt": created, "migration": M{"version": 1, "sourceQueue": "repository removal"}} - if c.ordinary { - delete(job, "migration") - } - if c.wrongQueue { - obj(job["migration"])["sourceQueue"] = "repository download" - } - if c.noTimestamp { - delete(job, "createdAt") - } - if _, err := db.Collection("gojobs").InsertOne(ctx, job); err != nil { - t.Fatal(err) - } - } - if mode == "automatic" { - defer base.Store.Redis.Del(ctx, "go:pause:remove") - s.removalRecoveryPending.Store(true) - if _, err := db.Collection("gojobs").InsertOne(ctx, M{"_id": "active-import", "kind": "repo", "action": "remove", "state": "active", "lease": "live-worker", "migration": M{"version": 1, "sourceQueue": "repository removal"}}); err != nil { - t.Fatal(err) - } - if err := base.Store.Redis.Set(ctx, "go:pause:remove", "1", 0).Err(); err != nil { - t.Fatal(err) - } - if err := s.recoverImportedRemovalJobs(ctx); err != nil { - t.Fatal(err) - } - if n, err := db.Collection("gojobs").CountDocuments(ctx, M{"state": "waiting"}); err != nil || n != 0 { - t.Fatal("paused queue recovered jobs", n, err) - } - if !s.removalRecoveryPending.Load() { - t.Fatal("paused startup recovery was discarded") - } - if err := base.Store.Redis.Del(ctx, "go:pause:remove").Err(); err != nil { - t.Fatal(err) - } - if err := s.recoverImportedRemovalJobs(ctx); err != nil { - t.Fatal(err) - } - active, err := s.Store.one(ctx, "gojobs", M{"_id": "active-import"}) - if err != nil || active["state"] != "active" || active["lease"] != "live-worker" { - t.Fatal("active imported job overwritten", active, err) - } - } - if mode == "bulk" { - result, err := s.retryFailedJobs(ctx, "remove") - if err != nil || number(result["retried"]) != int64(len(cases)) { - t.Fatal(result, err) - } - } - for i, c := range cases { - t.Run(c.name, func(t *testing.T) { - id := ids[i] - if mode == "single" { - if _, err := s.adminJob(&request{Server: s, R: httptest.NewRequest("POST", "/", nil)}, id, []string{"remove"}); err != nil { - t.Fatal(err) - } - } - before, err := s.Store.one(ctx, collection("repo"), M{"repoId": id}) - if err != nil || before["status"] != c.status { - t.Fatal("retry changed resource before execution", before, err) - } - want := c.status - if c.restore { - if _, err := s.Store.update(ctx, collection("repo"), M{"repoId": id}, M{"$set": M{"status": "ready", "anonymizeDate": created.Add(time.Second)}}); err != nil { - t.Fatal(err) - } - want = "ready" - } - if mode == "automatic" && (c.ordinary || c.wrongQueue) { - job, err := s.Store.one(ctx, "gojobs", M{"_id": id}) - if err != nil || job["state"] != "failed" { - t.Fatal("unrelated job recovered", job, err) - } - return - } - job, err := s.Store.one(ctx, "gojobs", M{"_id": id}) - if err != nil || job["state"] != "waiting" { - t.Fatal(job, err) - } - if err := s.runJob(ctx, job); err != nil { - t.Fatal(err) - } - current, err := s.Store.one(ctx, collection("repo"), M{"repoId": id}) - if err != nil { - t.Fatal(err) - } - if c.removed { - want = "removed" - } - if current["status"] != want { - t.Fatalf("want %s, got %v", want, current) - } - count, err := db.Collection("files").CountDocuments(ctx, M{"repoId": id}) - if err != nil { - t.Fatal(err) - } - wantFiles := int64(1) - if c.removed && c.status != "removed" { - wantFiles = 0 - } - if count != wantFiles { - t.Fatalf("file cleanup crossed lifecycle guard: %d, want %d", count, wantFiles) - } - size, err := s.content.Size(ctx, id, "cached.bin") - if wantFiles == 0 { - if !os.IsNotExist(err) { - t.Fatal("eligible removal retained cached bytes", size, err) - } - } else if err != nil || size != int64(len("retained fixture bytes")) { - t.Fatal("stale removal deleted cached bytes", size, err) - } - - }) - } - if mode == "automatic" { - id := ids[0] - if _, err := s.Store.update(ctx, "gojobs", M{"_id": id}, M{"$set": M{"state": "failed", "attempts": 7}}); err != nil { - t.Fatal(err) - } - if err := s.recoverImportedRemovalJobs(ctx); err != nil { - t.Fatal(err) - } - job, err := s.Store.one(ctx, "gojobs", M{"_id": id}) - if err != nil || job["state"] != "failed" || number(job["attempts"]) != 7 { - t.Fatal("automatic recovery repeated", job, err) - } - // A later process startup retries again, as TypeScript does; - // periodic maintenance within one startup must not do so. - s.removalRecoveryPending.Store(true) - if err := s.recoverImportedRemovalJobs(ctx); err != nil { - t.Fatal(err) - } - job, err = s.Store.one(ctx, "gojobs", M{"_id": id}) - if err != nil || job["state"] != "waiting" || number(job["attempts"]) != 0 || s.removalRecoveryPending.Load() { - t.Fatal("startup recovery did not resume", job, err) - } - - } - // Revision changes during recovery must win even if statusDate is unchanged. - for _, field := range []string{"owner", "anonymizeDate", "providerAccess.revision"} { - id := "claim-race-" + bson.NewObjectID().Hex() - resource := M{"_id": bson.NewObjectID(), "repoId": id, "status": "error", "owner": bson.NewObjectID(), "statusDate": created, "anonymizeDate": created.Add(-time.Hour), "source": M{"provider": "fixture"}, "providerAccess": M{"revision": "original"}} - if _, err := db.Collection(collection("repo")).InsertOne(ctx, resource); err != nil { - t.Fatal(err) - } - value := any(bson.NewObjectID()) - if field == "anonymizeDate" { - value = created.Add(time.Hour) - } - if field == "providerAccess.revision" { - value = "replacement" - } - if _, err := s.Store.update(ctx, collection("repo"), M{"_id": resource["_id"]}, M{"$set": M{field: value}}); err != nil { - t.Fatal(err) - } - job := M{"kind": "repo", "action": "remove", "createdAt": created, "migration": M{"version": 1, "sourceQueue": "repository removal"}} - claimed, err := s.recoverImportedRemoval(ctx, job, resource) - if err != nil || claimed != nil { - t.Fatal(fmt.Sprintf("stale %s claim succeeded", field), claimed, err) - } - } - }) - } -} diff --git a/backend/internal/server/indexes.go b/backend/internal/server/indexes.go deleted file mode 100644 index 3a5ab7d..0000000 --- a/backend/internal/server/indexes.go +++ /dev/null @@ -1,38 +0,0 @@ -package server - -import ( - "context" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/mongo" - "go.mongodb.org/mongo-driver/v2/mongo/options" -) - -func (s *Store) ensureIndexes(ctx context.Context) error { - for _, kind := range []string{"repo", "pr", "gist"} { - index := mongo.IndexModel{Keys: bson.D{{Key: idKey(kind), Value: 1}}, Options: options.Index().SetUnique(true)} - if kind == "repo" { - index.Options.SetCollation(&options.Collation{Locale: "en", Strength: 2}) - } - if _, e := s.DB.Collection(collection(kind)).Indexes().CreateOne(ctx, index); e != nil { - return e - } - } - indexes := map[string][]mongo.IndexModel{ - "gocachemetrics": {{Keys: bson.D{{Key: "period", Value: 1}, {Key: "bucket", Value: 1}}}, {Keys: bson.D{{Key: "expires", Value: 1}}, Options: options.Index().SetExpireAfterSeconds(0)}}, - "anonymizedrepositories": {{Keys: bson.D{{Key: "conferenceMembership.id", Value: 1}}, Options: options.Index().SetSparse(true)}}, - "users": {{Keys: bson.D{{Key: "username", Value: 1}}, Options: options.Index().SetUnique(true)}, {Keys: bson.D{{Key: "externalIDs.github", Value: 1}}}, {Keys: bson.D{{Key: "apiTokens.tokenHash", Value: 1}}}}, - "repositories": {{Keys: bson.D{{Key: "externalId", Value: 1}}, Options: options.Index().SetUnique(true)}}, - "githubinstallations": {{Keys: bson.D{{Key: "appId", Value: 1}, {Key: "installationId", Value: 1}}, Options: options.Index().SetUnique(true)}}, - "files": {{Keys: bson.D{{Key: "repoId", Value: 1}, {Key: "treeGeneration", Value: 1}, {Key: "path", Value: 1}, {Key: "name", Value: 1}}}, {Keys: bson.D{{Key: "metadataPending", Value: 1}, {Key: "repoId", Value: 1}, {Key: "treeGeneration", Value: 1}}, Options: options.Index().SetPartialFilterExpression(M{"metadataPending": true})}}, - "gojobs": {{Keys: bson.D{{Key: "state", Value: 1}, {Key: "priority", Value: 1}, {Key: "availableAt", Value: 1}, {Key: "queueOrder", Value: 1}, {Key: "createdAt", Value: 1}, {Key: "_id", Value: 1}}}, {Keys: bson.D{{Key: "kind", Value: 1}, {Key: "resourceId", Value: 1}, {Key: "action", Value: 1}, {Key: "state", Value: 1}}}, {Keys: bson.D{{Key: "state", Value: 1}, {Key: "availableAt", Value: 1}}}, {Keys: bson.D{{Key: "state", Value: 1}, {Key: "leaseUntil", Value: 1}}}, {Keys: bson.D{{Key: "action", Value: 1}, {Key: "state", Value: 1}, {Key: "createdAt", Value: -1}}}}, - "dashboardnames": {{Keys: bson.D{{Key: "owner", Value: 1}, {Key: "type", Value: 1}, {Key: "artifactId", Value: 1}}, Options: options.Index().SetUnique(true)}}, - "dailystats": {{Keys: bson.D{{Key: "date", Value: 1}}, Options: options.Index().SetUnique(true)}}, - "conferences": {{Keys: bson.D{{Key: "conferenceID", Value: 1}}, Options: options.Index().SetUnique(true)}}, - } - for coll, models := range indexes { - if _, e := s.DB.Collection(coll).Indexes().CreateMany(ctx, models); e != nil { - return e - } - } - return nil -} diff --git a/backend/internal/server/installation_flow_integration_test.go b/backend/internal/server/installation_flow_integration_test.go deleted file mode 100644 index ab13f4e..0000000 --- a/backend/internal/server/installation_flow_integration_test.go +++ /dev/null @@ -1,203 +0,0 @@ -package server - -import ( - "context" - "encoding/json" - "io" - "net/http" - "net/http/httptest" - "net/url" - "strings" - "testing" - "time" - - "go.mongodb.org/mongo-driver/v2/bson" -) - -func runInstallationFlowIntegration(t *testing.T, base *Server) { - t.Run("installation suggestions and one-time setup state", func(t *testing.T) { - ctx := context.Background() - owner := bson.NewObjectID() - db := base.Store.DB.Client().Database("installation_flow_" + owner.Hex()) - defer db.Drop(ctx) - s := &Server{Config: base.Config, Store: &Store{DB: db, Redis: base.Store.Redis}} - s.Config.AppEnabled = true - s.Config.AppNewConnections = true - s.Config.AppID = "123" - s.Config.AppSlug = "synthetic-app" - user := M{"_id": owner, "username": owner.Hex(), "status": "active"} - if _, err := db.Collection("users").InsertOne(ctx, user); err != nil { - t.Fatal(err) - } - q := &request{Server: s, User: user, Identity: identity(user), Session: M{}, SessionID: "installation-flow-" + owner.Hex()} - q.R = httptest.NewRequest("GET", "/", nil) - q.W = httptest.NewRecorder() - defer s.Store.Redis.Del(ctx, "anoGH_session:"+q.SessionID) - for _, provider := range []string{"github", "github-app-user"} { - if err := s.saveGrant(q, owner, provider, M{"access_token": "synthetic-" + provider, "refresh_token": "synthetic-refresh", "expires_in": float64(3600), "refresh_token_expires_in": float64(7200)}); err != nil { - t.Fatal(err) - } - } - installed, privateUnavailable := false, false - accountType := "Organization" - calls, repoCalls := 0, 0 - expectedToken := "synthetic-github" - s.HTTP = &http.Client{Transport: roundTrip(func(r *http.Request) (*http.Response, error) { - calls++ - status := 200 - data := M{} - switch r.URL.Path { - case "/user/installations": - items := []M{} - if installed { - items = append(items, M{"id": 42, "app_id": 123, "account": M{"id": 90, "login": "team", "type": accountType}, "suspended_at": nil}) - } - data["installations"] = items - case "/repos/team/private": - repoCalls++ - if !strings.HasSuffix(r.Header.Get("Authorization"), expectedToken) { - t.Fatal("wrong repository suggestion credential") - } - if privateUnavailable { - status = 404 - } - data = M{"id": 17, "owner": M{"id": 90}} - default: - t.Fatal("unexpected installation flow request", r.URL) - } - body, err := json.Marshal(data) - if err != nil { - t.Fatal(err) - } - return &http.Response{StatusCode: status, Header: http.Header{}, Body: io.NopCloser(strings.NewReader(string(body)))}, nil - })} - run := func(path string) (*httptest.ResponseRecorder, error) { - t.Helper() - q.R = httptest.NewRequest("GET", path, nil) - w := httptest.NewRecorder() - q.W = w - _, err := s.appInstall(q) - return w, err - } - for _, tc := range []struct { - name, query, path string - installed, unavailable bool - account string - errorCode string - }{ - {name: "new-private", query: "repository=team/private", path: "/apps/synthetic-app/installations/new/permissions"}, - {name: "existing-org", query: "repository=team/private", path: "/organizations/team/settings/installations/42", installed: true, account: "Organization"}, - {name: "existing-user", query: "repository=team/private", path: "/settings/installations/42", installed: true, account: "User"}, - {name: "explicit", query: "installationId=42", path: "/organizations/team/settings/installations/42", installed: true, account: "Organization"}, - {name: "empty-id", query: "installationId=", errorCode: "github_app_access_required"}, - {name: "repeated-id", query: "installationId=42&installationId=43", path: "/apps/synthetic-app/installations/new", installed: true}, - {name: "mixed-id", query: "installationId=42&installationId[]=43", path: "/apps/synthetic-app/installations/new", installed: true}, - {name: "mixed-repository", query: "repository=team/private&repository[]=team/other", path: "/apps/synthetic-app/installations/new"}, - {name: "invisible", query: "repository=team/private", path: "/apps/synthetic-app/installations/new", unavailable: true}, - {name: "invalid-name", query: "repository=team/private/extra", path: "/apps/synthetic-app/installations/new"}, - } { - t.Run(tc.name, func(t *testing.T) { - installed, privateUnavailable = tc.installed, tc.unavailable - accountType = tc.account - before := repoCalls - w, err := run("/github/app/install?" + tc.query + "&returnTo=/dashboard") - if tc.errorCode != "" { - if err == nil || err.Error() != tc.errorCode { - t.Fatal(err) - } - return - } - if err != nil { - t.Fatal(err) - } - target, err := url.Parse(w.Header().Get("Location")) - if err != nil { - t.Fatal(err) - } - if target.Host != "github.com" || target.Path != tc.path || target.Query().Get("state") == "" { - t.Fatal("wrong install target", target) - } - flow := obj(q.Session["githubInstallFlow"]) - if flow["state"] != target.Query().Get("state") || flow["ownerId"] != owner.Hex() || flow["returnTo"] != "/dashboard" { - t.Fatal("flow not bound to owner/redirect") - } - if tc.name == "new-private" && (target.Query().Get("suggested_target_id") != "90" || target.Query().Get("repository_ids[]") != "17") { - t.Fatal("private repository not suggested", target) - } - if (tc.name == "invalid-name" || tc.name == "explicit" || tc.name == "repeated-id") && repoCalls != before { - t.Fatal("unexpected repository lookup") - } - }) - } - if _, err := db.Collection("credentials").DeleteOne(ctx, M{"ownerId": owner, "provider": "github"}); err != nil { - t.Fatal(err) - } - installed = false - privateUnavailable = false - expectedToken = "synthetic-github-app-user" - if _, err := run("/github/app/install?repository=team/private"); err != nil { - t.Fatal("App fallback failed", err) - } - installed = true - accountType = "Organization" - for _, tc := range []struct { - name, query, code string - expired, otherOwner bool - clear bool - }{ - {name: "success", query: "state=state&installation_id=42", clear: true}, - {name: "request", query: "state=state&setup_action=request", clear: true}, - {name: "no-state", query: "installation_id=999"}, - {name: "duplicate-state", query: "state=state&state=state&installation_id=42", code: "invalid_auth_state"}, - {name: "mixed-state", query: "state=state&state[]=state&installation_id=42", code: "invalid_auth_state"}, - {name: "array-state", query: "state[]=", code: "invalid_auth_state"}, - {name: "mixed-id", query: "state=state&installation_id=42&installation_id[]=42", code: "github_app_access_required"}, - {name: "mixed-action", query: "state=state&setup_action=request&setup_action[]=request", code: "github_app_access_required"}, - {name: "wrong-owner", query: "state=state&installation_id=42", code: "invalid_auth_state", otherOwner: true}, - {name: "expired", query: "state=state&installation_id=42", code: "invalid_auth_state", expired: true}, - {name: "duplicate-id", query: "state=state&installation_id=42&installation_id=42", code: "github_app_access_required"}, - {name: "duplicate-action", query: "state=state&setup_action=request&setup_action=request", code: "github_app_access_required"}, - } { - t.Run("setup-"+tc.name, func(t *testing.T) { - flow := M{"state": "state", "ownerId": owner.Hex(), "expires": time.Now().Add(time.Minute).UnixMilli(), "returnTo": "/dashboard"} - if tc.expired { - flow["expires"] = time.Now().Add(-time.Minute).UnixMilli() - } - if tc.otherOwner { - flow["ownerId"] = bson.NewObjectID().Hex() - } - q.Session["githubInstallFlow"] = flow - if _, err := s.Store.update(ctx, "users", M{"_id": owner}, M{"$set": M{"repositories": []any{"cached"}}}); err != nil { - t.Fatal(err) - } - before := calls - w, err := run("/github/app/setup?" + tc.query) - if tc.code == "" && err != nil || tc.code != "" && (err == nil || err.Error() != tc.code) { - t.Fatal("wrong setup result", err) - } - if q.Session["githubInstallFlow"] != nil { - t.Fatal("setup state not consumed") - } - persisted, err := s.Store.Redis.Get(ctx, "anoGH_session:"+q.SessionID).Result() - if err != nil || strings.Contains(persisted, "githubInstallFlow") { - t.Fatal("consumed state remained in session", err) - } - saved, err := s.Store.one(ctx, "users", M{"_id": owner}) - if err != nil { - t.Fatal(err) - } - if (len(arr(saved["repositories"])) == 0) != tc.clear { - t.Fatal("incorrect discovery cache invalidation") - } - if tc.name == "no-state" && (calls != before || w.Header().Get("Location") != "/dashboard") { - t.Fatal("stateless callback attached installation") - } - if tc.clear { - if _, err := run("/github/app/setup?" + tc.query); err == nil || err.Error() != "invalid_auth_state" { - t.Fatal("replayed setup accepted", err) - } - } - }) - } - }) -} diff --git a/backend/internal/server/installation_reconciliation_integration_test.go b/backend/internal/server/installation_reconciliation_integration_test.go deleted file mode 100644 index 3927190..0000000 --- a/backend/internal/server/installation_reconciliation_integration_test.go +++ /dev/null @@ -1,118 +0,0 @@ -package server - -import ( - "context" - "encoding/json" - "io" - "net/http" - "strings" - "testing" - "time" - - "go.mongodb.org/mongo-driver/v2/bson" -) - -func runInstallationReconciliationIntegration(t *testing.T, base *Server) { - t.Run("installation reconciliation metadata and revision guards", func(t *testing.T) { - ctx := context.Background() - db := base.Store.DB.Client().Database("installation_reconciliation_" + bson.NewObjectID().Hex()) - defer db.Drop(ctx) - s := &Server{Config: base.Config, Store: &Store{DB: db, Redis: base.Store.Redis}} - s.Config.AppID = "123" - filter := M{"appId": "123", "installationId": int64(42)} - seed := func() { - t.Helper() - if _, err := db.Collection("githubinstallations").DeleteMany(ctx, M{}); err != nil { - t.Fatal(err) - } - if _, err := db.Collection("githubinstallations").InsertOne(ctx, M{"appId": "123", "installationId": int64(42), "revision": "pending", "blocked": true, "reconciliationPending": true, "accountId": int64(1), "accountLogin": "old", "accountType": "User"}); err != nil { - t.Fatal(err) - } - } - load := func() M { - t.Helper() - row, err := s.Store.one(ctx, "githubinstallations", filter) - if err != nil { - t.Fatal(err) - } - return row - } - status := 200 - current := M{} - var duringRequest func() - s.HTTP = &http.Client{Transport: roundTrip(func(r *http.Request) (*http.Response, error) { - if r.Method != "GET" || r.URL.Path != "/app/installations/42" { - t.Fatal("unexpected reconciliation request", r.Method, r.URL) - } - if duringRequest != nil { - duringRequest() - } - body, err := json.Marshal(current) - if err != nil { - t.Fatal(err) - } - return &http.Response{StatusCode: status, Header: http.Header{}, Body: io.NopCloser(strings.NewReader(string(body)))}, nil - })} - for _, suspended := range []any{nil, false, "", float64(0), "2026-01-01T00:00:00Z", true} { - seed() - current = M{"app_id": 123, "suspended_at": suspended, "account": M{"id": 9001, "login": "renamed-org", "type": "Organization"}} - before := time.Now().Add(-time.Second) - if err := s.reconcileInstallation(ctx, 42, "pending", "synthetic-jwt"); err != nil { - t.Fatal(err) - } - row := load() - revision := str(row["revision"]) - if revision == "" || revision == "pending" || boolean(row["reconciliationPending"]) || boolean(row["blocked"]) != inputTruthy(suspended) { - t.Fatal("wrong reconciliation state", row) - } - if number(row["accountId"]) != 9001 || row["accountLogin"] != "renamed-org" || row["accountType"] != "Organization" || date(row["checkedAt"]).Before(before) { - t.Fatal("account metadata not refreshed", row) - } - // The same pending revision is consumed once, even if retried with a different response. - current["account"] = M{"id": 2, "login": "stale", "type": "User"} - current["suspended_at"] = "stale-suspension" - if err := s.reconcileInstallation(ctx, 42, "pending", "synthetic-jwt"); err != nil { - t.Fatal(err) - } - after := load() - if after["revision"] != revision || after["accountLogin"] != "renamed-org" || after["blocked"] != row["blocked"] { - t.Fatal("replayed reconciliation overwrote completed result", after) - } - } - for _, failure := range []string{"upstream", "foreign-app", "missing-account"} { - seed() - status = 200 - current = M{"app_id": 123, "account": M{"id": 9001, "login": "renamed-org", "type": "Organization"}} - switch failure { - case "upstream": - status = 503 - case "foreign-app": - current["app_id"] = 456 - case "missing-account": - delete(current, "account") - } - if err := s.reconcileInstallation(ctx, 42, "pending", "synthetic-jwt"); err == nil { - t.Fatal("failed reconciliation accepted", failure) - } - row := load() - if row["revision"] != "pending" || !boolean(row["blocked"]) || !boolean(row["reconciliationPending"]) || row["accountLogin"] != "old" { - t.Fatal("failed reconciliation changed durable state", failure, row) - } - } - seed() - status = 200 - current = M{"app_id": 123, "account": M{"id": 9001, "login": "renamed-org", "type": "Organization"}} - duringRequest = func() { - if _, err := s.Store.update(ctx, "githubinstallations", filter, M{"$set": M{"revision": "newer-deletion", "blocked": true, "reconciliationPending": false}}); err != nil { - t.Fatal(err) - } - } - if err := s.reconcileInstallation(ctx, 42, "pending", "synthetic-jwt"); err != nil { - t.Fatal(err) - } - row := load() - if row["revision"] != "newer-deletion" || !boolean(row["blocked"]) || boolean(row["reconciliationPending"]) || row["accountLogin"] != "old" { - t.Fatal("in-flight response undid newer webhook", row) - } - }) -} diff --git a/backend/internal/server/installation_target.go b/backend/internal/server/installation_target.go deleted file mode 100644 index b9a751f..0000000 --- a/backend/internal/server/installation_target.go +++ /dev/null @@ -1,64 +0,0 @@ -package server - -import ( - "context" - "net/url" -) - -func singleQueryValue(query url.Values, key string) (string, bool) { - values := query[key] - if len(values) != 1 { - return "", false - } - return values[0], true -} - -func installationSettingsURL(installation M) string { - id := segment(str(installation["id"])) - account := obj(installation["account"]) - if str(account["type"]) == "Organization" { - return "https://github.com/organizations/" + segment(str(account["login"])) + "/settings/installations/" + id - } - return "https://github.com/settings/installations/" + id -} - -func (s *Server) installationTarget(ctx context.Context, owner any, query map[string]*queryValue, installations []M) (string, error) { - target := "https://github.com/apps/" + segment(s.Config.AppSlug) + "/installations/new" - if id, ok := query["installationId"].scalarValue(); ok { - for _, installation := range installations { - if str(installation["id"]) == id { - return installationSettingsURL(installation), nil - } - } - return "", fail("github_app_access_required", 403) - } - repository, ok := query["repository"].scalarValue() - if !ok || !safeRepositoryName(repository) { - return target, nil - } - token, err := s.storedGrantToken(ctx, owner, "github") - if err != nil { - return "", err - } - if token == "" { - token, err = s.credential(ctx, owner, "github-app-user") - if err != nil { - return "", err - } - } - repo, err := s.githubObject(ctx, "GET", "/repos/"+repository, token, nil) - if err != nil { - return target, nil - } // Private repositories may be invisible until installation. - accountID := obj(repo["owner"])["id"] - for _, installation := range installations { - if accountID != nil && str(obj(installation["account"])["id"]) == str(accountID) { - return installationSettingsURL(installation), nil - } - } - if inputTruthy(accountID) { - values := url.Values{"suggested_target_id": []string{str(accountID)}, "repository_ids[]": []string{str(repo["id"])}} - target += "/permissions?" + values.Encode() - } - return target, nil -} diff --git a/backend/internal/server/installation_token_integration_test.go b/backend/internal/server/installation_token_integration_test.go deleted file mode 100644 index 86f52a1..0000000 --- a/backend/internal/server/installation_token_integration_test.go +++ /dev/null @@ -1,216 +0,0 @@ -package server - -import ( - "context" - "crypto/rand" - "crypto/rsa" - "crypto/x509" - "encoding/json" - "encoding/pem" - "fmt" - "io" - "net/http" - "net/http/httptest" - "strings" - "testing" - "time" - - "go.mongodb.org/mongo-driver/v2/bson" -) - -func runInstallationTokenIntegration(t *testing.T, base *Server) { - t.Run("installation token expiry caching and access reconciliation", func(t *testing.T) { - ctx := context.Background() - owner := bson.NewObjectID() - db := base.Store.DB.Client().Database("installation_token_" + owner.Hex()) - defer db.Drop(ctx) - key, err := rsa.GenerateKey(rand.Reader, 2048) - if err != nil { - t.Fatal(err) - } - config := base.Config - config.AppEnabled = true - config.AppID = "123" - config.AppClientID = "synthetic-client" - config.AppPrivateKey = string(pem.EncodeToMemory(&pem.Block{Type: "RSA PRIVATE KEY", Bytes: x509.MarshalPKCS1PrivateKey(key)})) - s := &Server{Config: config, Store: &Store{DB: db, Redis: base.Store.Redis}} - if _, err := db.Collection("users").InsertOne(ctx, M{"_id": owner, "username": owner.Hex(), "status": "active"}); err != nil { - t.Fatal(err) - } - q := &request{Server: s, R: httptest.NewRequest("GET", "/", nil)} - if err := s.saveGrant(q, owner, "github-app-user", M{"access_token": "synthetic-app", "refresh_token": "synthetic-refresh", "expires_in": float64(3600), "refresh_token_expires_in": float64(7200)}); err != nil { - t.Fatal(err) - } - binding := M{"kind": "github-app", "repositoryId": int64(10), "installationId": int64(42)} - filter := M{"appId": "123", "installationId": int64(42)} - seed := func(pending bool) { - t.Helper() - s.appTokens = nil - if _, err := db.Collection("githubinstallations").DeleteMany(ctx, M{}); err != nil { - t.Fatal(err) - } - if _, err := db.Collection("githubinstallations").InsertOne(ctx, M{"appId": "123", "installationId": int64(42), "revision": "original", "blocked": pending, "reconciliationPending": pending}); err != nil { - t.Fatal(err) - } - } - issued := M{} - checks, mints, installationReads := 0, 0, 0 - failReconcile, denyUser := false, false - suspended := any(false) - s.HTTP = &http.Client{Transport: roundTrip(func(r *http.Request) (*http.Response, error) { - status := 200 - response := M{} - switch r.URL.Path { - case "/repositories/10": - checks++ - response = M{"id": 10} - if denyUser { - status = 403 - } - case "/app/installations/42": - installationReads++ - if failReconcile { - status = 503 - } - response = M{"id": 42, "app_id": 123, "suspended_at": suspended, "account": M{"id": 90, "login": "team", "type": "Organization"}, "permissions": M{"contents": "read", "pull_requests": "read", "pages": "read"}} - case "/app/installations/42/access_tokens": - mints++ - response = issued - var body M - if err := json.NewDecoder(r.Body).Decode(&body); err != nil { - t.Fatal(err) - } - if len(arr(body["repository_ids"])) != 1 || number(arr(body["repository_ids"])[0]) != 10 || len(obj(body["permissions"])) != 4 { - t.Fatal("token scope differs", body) - } - default: - t.Fatal("unexpected installation token endpoint", r.URL) - } - data, err := json.Marshal(response) - if err != nil { - t.Fatal(err) - } - return &http.Response{StatusCode: status, Header: http.Header{}, Body: io.NopCloser(strings.NewReader(string(data)))}, nil - })} - t.Run("permission freshness and local revocation", func(t *testing.T) { - seed(false) - s.Config.GitHubPermissionTTL = time.Hour - defer func() { s.Config.GitHubPermissionTTL = 0; s.permissions.entries = nil }() - issued = M{"token": "synthetic-installation", "expires_at": time.Now().Add(time.Hour).Format(time.RFC3339)} - before := checks - for range 3 { - if _, err := s.boundToken(ctx, owner, binding, "team/project"); err != nil { - t.Fatal(err) - } - } - if checks != before+1 { - t.Fatal("warm reads rechecked GitHub", checks-before) - } - update := func(collection string, filter, fields M) { - t.Helper() - if _, err := s.Store.update(ctx, collection, filter, M{"$set": fields}); err != nil { - t.Fatal(err) - } - } - reject := func() { - t.Helper() - if _, err := s.boundToken(ctx, owner, binding, "team/project"); err == nil { - t.Fatal("local revocation bypassed") - } - } - update("users", M{"_id": owner}, M{"status": "banned"}) - reject() - update("users", M{"_id": owner}, M{"status": "active"}) - update("credentials", M{"ownerId": owner, "provider": "github-app-user"}, M{"revoked": true}) - reject() - update("credentials", M{"ownerId": owner, "provider": "github-app-user"}, M{"revoked": false}) - update("githubinstallations", filter, M{"blocked": true}) - reject() - update("githubinstallations", filter, M{"blocked": false, "revision": "webhook-change"}) - denyUser = true - reject() - reject() - if checks != before+3 { - t.Fatal("webhook revision or failed check cached", checks-before) - } - denyUser = false - if _, err := s.boundToken(ctx, owner, binding, "team/project"); err != nil { - t.Fatal(err) - } - for key := range s.permissions.entries { - s.permissions.entries[key] = time.Now().Add(-time.Second) - } - denyUser = true - reject() - denyUser = false - }) - - for _, bad := range []M{{"token": "synthetic"}, {"token": "synthetic", "expires_at": "invalid"}, {"token": "synthetic", "expires_at": nil}, {"token": "", "expires_at": "2030-01-01T00:00:00Z"}, {"token": 42, "expires_at": "2030-01-01T00:00:00Z"}} { - seed(false) - issued = bad - if _, err := s.boundToken(ctx, owner, binding, "team/project"); err == nil || err.Error() != "github_app_reconnect_required" || len(s.appTokens) != 0 { - t.Fatal("invalid issuance accepted or cached", bad, err) - } - } - seed(true) - issued = M{"token": "synthetic-installation", "expires_at": time.Now().Add(time.Hour).Format(time.RFC3339)} - beforeMints, beforeReads := mints, installationReads - if token, err := s.boundToken(ctx, owner, binding, "team/project"); err != nil || token != "synthetic-installation" { - t.Fatal("pending installation did not recover on access", err) - } - local, err := s.Store.one(ctx, "githubinstallations", filter) - if err != nil { - t.Fatal(err) - } - if boolean(local["blocked"]) || boolean(local["reconciliationPending"]) || local["revision"] == "original" || local["accountLogin"] != "team" || mints != beforeMints+1 || installationReads != beforeReads+2 { - t.Fatal("incomplete access reconciliation", local) - } - beforeChecks := checks - if _, err := s.boundToken(ctx, owner, binding, "team/project"); err != nil || checks != beforeChecks+1 || mints != beforeMints+1 { - t.Fatal("cache skipped authorization or minted twice", err) - } - denyUser = true - if _, err := s.boundToken(ctx, owner, binding, "team/project"); err == nil || mints != beforeMints+1 { - t.Fatal("cached token bypassed revoked user rights", err) - } - denyUser = false - if _, err := s.Store.update(ctx, "githubinstallations", filter, M{"$set": M{"blocked": true, "revision": "blocked"}}); err != nil { - t.Fatal(err) - } - if _, err := s.boundToken(ctx, owner, binding, "team/project"); err == nil { - t.Fatal("cached token bypassed installation block") - } - seed(true) - failReconcile = true - beforeMints = mints - if _, err := s.boundToken(ctx, owner, binding, "team/project"); err == nil || mints != beforeMints { - t.Fatal("failed reconciliation minted a token", err) - } - local, err = s.Store.one(ctx, "githubinstallations", filter) - if err != nil || !boolean(local["blocked"]) || !boolean(local["reconciliationPending"]) || local["revision"] != "original" { - t.Fatal("failed reconciliation lost retry state", local, err) - } - failReconcile = false - seed(false) - s.appTokens = map[string]installationToken{} - for i := 0; i < 1000; i++ { - s.appTokens[fmt.Sprint(i)] = installationToken{"old", time.Now().Add(time.Hour)} - } - if _, err := s.boundToken(ctx, owner, binding, "team/project"); err != nil || len(s.appTokens) != 1 { - t.Fatal("token cache did not reset at capacity", len(s.appTokens), err) - } - for _, expiry := range []time.Time{time.Now().Add(30 * time.Second), time.Now().Add(-time.Hour)} { - seed(false) - issued = M{"token": "near-expiry", "expires_at": expiry.Format(time.RFC3339)} - beforeMints = mints - for attempt := 0; attempt < 2; attempt++ { - if _, err := s.boundToken(ctx, owner, binding, "team/project"); err != nil { - t.Fatal("finite expiry rejected", err) - } - } - if mints != beforeMints+2 { - t.Fatal("near-expiry token reused") - } - } - }) -} diff --git a/backend/internal/server/integration_test.go b/backend/internal/server/integration_test.go deleted file mode 100644 index 20ad5dd..0000000 --- a/backend/internal/server/integration_test.go +++ /dev/null @@ -1,470 +0,0 @@ -package server - -import ( - "archive/zip" - "bytes" - "context" - "crypto/rand" - "crypto/rsa" - "crypto/x509" - "encoding/base64" - "encoding/json" - "encoding/pem" - "io" - "net/http" - "net/http/httptest" - "os" - "path/filepath" - "strings" - "testing" - "time" - - "github.com/tdurieux/anonymous_github/backend/internal/anonymize" - "github.com/tdurieux/anonymous_github/backend/internal/security" - "go.mongodb.org/mongo-driver/v2/bson" -) - -type roundTrip func(*http.Request) (*http.Response, error) - -func (f roundTrip) RoundTrip(r *http.Request) (*http.Response, error) { return f(r) } -func TestBackendIntegration(t *testing.T) { - uri, redisAddress := os.Getenv("GO_TEST_MONGODB_URI"), os.Getenv("GO_TEST_REDIS_ADDR") - if uri == "" || redisAddress == "" { - t.Skip("requires disposable MongoDB and Redis") - } - if !strings.HasPrefix(uri, "mongodb://127.0.0.1:") || !strings.HasPrefix(redisAddress, "127.0.0.1:") { - t.Fatal("integration tests require local disposable services") - } - // This context spans all sequential subtests, including large-list fixtures. - // Follow the runner deadline instead of spending later tests' budget in - // earlier subtests. Application request and operation limits are unchanged. - ctx := t.Context() - if deadline, ok := t.Deadline(); ok { - var cancel context.CancelFunc - ctx, cancel = context.WithDeadline(ctx, deadline.Add(-5*time.Second)) - defer cancel() - } - key := base64.StdEncoding.EncodeToString(make([]byte, 32)) - cipher, err := security.NewCipher(`{"test":"`+key+`"}`, "test") - if err != nil { - t.Fatal(err) - } - public := t.TempDir() - os.WriteFile(filepath.Join(public, "index.html"), []byte("test"), 0600) - config := Config{MongoURI: uri, Database: "go_migration_test_" + bson.NewObjectID().Hex(), RedisAddress: redisAddress, SessionSecret: "synthetic-session-key", Root: t.TempDir(), PublicDir: public, Mask: "XXXX", Hostname: "anonymous.test", Cipher: cipher, RateLimit: 10000, Download: true, Workers: 1} - store, err := Connect(ctx, config) - if err != nil { - t.Fatal(err) - } - defer store.Close(context.Background()) - defer store.DB.Drop(context.Background()) - fakeProvider := &fixtureProvider{name: "team/subgroup/project", commit: "revision:one"} - server, err := New(config, store, fakeProvider) - if err != nil { - t.Fatal(err) - } - defer server.Close() - if binary := os.Getenv("GO_TEST_SERVER_BINARY"); binary != "" { - server.pool = anonymize.NewPool(binary, 1) - } - owner, other := bson.NewObjectID(), bson.NewObjectID() - token := "synthetic-api-token" - otherToken := "other-api-token" - for _, u := range []M{{"_id": owner, "username": "alice", "status": "active", "externalIDs": M{"github": "1"}, "apiTokens": []M{{"tokenHash": security.HashToken(token)}}}, {"_id": other, "username": "bob", "status": "active", "externalIDs": M{"github": "2"}, "apiTokens": []M{{"tokenHash": security.HashToken(otherToken)}}}} { - if _, err = store.DB.Collection("users").InsertOne(ctx, u); err != nil { - t.Fatal(err) - } - } - envelope, err := cipher.Encrypt("synthetic-github-token", owner.Hex(), "github", "") - if err != nil { - t.Fatal(err) - } - if _, err = store.DB.Collection("credentials").InsertOne(ctx, M{"ownerId": owner, "provider": "github", "encryptedToken": envelope, "updatedAt": time.Now()}); err != nil { - t.Fatal(err) - } - sha := strings.Repeat("a", 40) - server.HTTP = &http.Client{Transport: roundTrip(func(r *http.Request) (*http.Response, error) { - if r.URL.Scheme != "https" || r.URL.Host != "api.github.com" { - t.Errorf("unexpected upstream %s", r.URL.Host) - } - if r.Header.Get("Authorization") != "Bearer synthetic-github-token" { - t.Error("wrong credential") - } - var value any - body := "" - switch { - case r.URL.Path == "/repos/owner/repo", r.URL.Path == "/repositories/10": - value = M{"id": 10, "full_name": "owner/repo", "default_branch": "main"} - case strings.Contains(r.URL.Path, "/commits/"): - value = M{"sha": sha, "commit": M{"committer": M{"date": "2026-01-01T00:00:00Z"}}} - case strings.Contains(r.URL.Path, "/git/trees/"): - value = M{"tree": []M{{"path": "Alice.txt", "sha": sha, "type": "blob", "size": 11}, {"path": "Alice.html", "sha": sha, "type": "blob", "size": 11}, {"path": "photo.png", "sha": sha, "type": "blob", "size": 11}}, "truncated": false} - case strings.Contains(r.URL.Path, "/tarball/"): - body = string(tarTestBytes(t, tarTestEntry{name: "snapshot/Alice.txt", body: "hello Alice"}, tarTestEntry{name: "snapshot/Alice.html", body: "hello Alice"}, tarTestEntry{name: "snapshot/photo.png", body: "hello Alice"})) - case strings.Contains(r.URL.Path, "/git/blobs/"): - body = "hello Alice" - default: - t.Errorf("unexpected upstream path %s", r.URL.Path) - value = M{} - } - if value != nil { - b, _ := json.Marshal(value) - body = string(b) - } - return &http.Response{StatusCode: 200, Header: http.Header{}, Body: io.NopCloser(strings.NewReader(body)), ContentLength: int64(len(body))}, nil - })} - call := func(method, path, credential string, body any) *httptest.ResponseRecorder { - t.Helper() - var raw []byte - if body != nil { - raw, _ = json.Marshal(body) - } - req := httptest.NewRequest(method, path, bytes.NewReader(raw)) - req.RemoteAddr = "192.0.2.1:1234" - if credential != "" { - req.Header.Set("Authorization", "Bearer "+credential) - } - req.Header.Set("Content-Type", "application/json") - w := httptest.NewRecorder() - server.ServeHTTP(w, req) - return w - } - t.Run("second provider lifecycle", func(t *testing.T) { runProviderIntegration(t, server, fakeProvider, call, token, otherToken) }) - t.Run("public statistics cache", func(t *testing.T) { runPublicStatsIntegration(t, server) }) - t.Run("overview rolling activity counts", func(t *testing.T) { runOverviewIntegration(t, server) }) - t.Run("request performance history", func(t *testing.T) { runRequestMetricsIntegration(t, server) }) - t.Run("queue overview", func(t *testing.T) { runQueueOverviewIntegration(t, server) }) - t.Run("queue metric history", func(t *testing.T) { runQueueMetricIntegration(t, server) }) - t.Run("error monitoring history", func(t *testing.T) { runErrorLogIntegration(t, server) }) - t.Run("process performance history", func(t *testing.T) { runProcessMetricsIntegration(t, server) }) - t.Run("access control precedes private output", func(t *testing.T) { - for _, p := range []string{"/api/user", "/api/user/dashboard", "/api/admin/tokens"} { - w := call("GET", p, "", nil) - if w.Code != 401 { - t.Errorf("%s: %d %s", p, w.Code, w.Body) - } - } - w := call("GET", "/api/admin/tokens", token, nil) - if w.Code != 401 { - t.Fatal("non-admin accessed tokens", w.Code) - } - }) - t.Run("create prepare and public output", func(t *testing.T) { - body := M{"repoId": "fixture", "fullName": "owner/repo", "source": M{"branch": "main", "commit": sha}, "terms": []string{"Alice"}, "options": M{"expirationMode": "never", "image": false, "pdf": false, "link": true}} - w := call("POST", "/api/repo", token, body) - if w.Code != 200 { - t.Fatal(w.Code, w.Body.String()) - } - r, err := store.one(ctx, "anonymizedrepositories", M{"repoId": "fixture"}) - if err != nil { - t.Fatal(err) - } - if err = server.prepareTree(ctx, r); err != nil { - t.Fatal(err) - } - w = call("GET", "/api/repo/fixture", otherToken, nil) - if w.Code != 403 { - t.Fatal("non-owner received private options", w.Code, w.Body.String()) - } - w = call("GET", "/api/repo/fixture/files", "", nil) - if w.Code != 200 || strings.Contains(w.Body.String(), "Alice") { - t.Fatal("file names leaked", w.Code, w.Body.String()) - } - w = call("GET", "/api/repo/fixture/file/photo.png", "", nil) - if w.Code != 403 { - t.Fatal("image exclusion bypassed", w.Code) - } - if os.Getenv("GO_TEST_SERVER_BINARY") == "" { - t.Log("file worker test skipped: GO_TEST_SERVER_BINARY missing") - return - } - w = call("GET", "/api/repo/fixture/file/XXXX-1.txt", "", nil) - if w.Code != 200 || w.Body.String() != "hello XXXX-1" { - t.Fatal("wrong anonymized content", w.Code, w.Body.String()) - } - w = call("GET", "/api/repo/fixture/file/XXXX-1.html", "", nil) - if w.Code != 200 || !strings.HasPrefix(w.Header().Get("Content-Security-Policy"), "sandbox ") || strings.Contains(w.Header().Get("Content-Security-Policy"), "allow-same-origin") { - t.Fatal("scriptable content not sandboxed", w.Code, w.Header()) - } - }) - - t.Run("streaming archive ZIP", func(t *testing.T) { runArchiveZIPIntegration(t, server) }) - t.Run("ZIP entries preserve transformed content and exclusions", func(t *testing.T) { - if os.Getenv("GO_TEST_SERVER_BINARY") == "" { - t.Skip("worker binary required") - } - w := call("GET", "/api/repo/fixture/zip", "", nil) - if w.Code != 200 { - t.Fatal(w.Code, w.Body.String()) - } - archive, e := zip.NewReader(bytes.NewReader(w.Body.Bytes()), int64(w.Body.Len())) - if e != nil { - t.Fatal(e) - } - if len(archive.File) != 2 { - t.Fatalf("wrong ZIP entries: %d", len(archive.File)) - } - for _, entry := range archive.File { - if strings.Contains(entry.Name, "Alice") || strings.HasSuffix(entry.Name, ".png") { - t.Fatal("excluded or original name in ZIP") - } - r, e := entry.Open() - if e != nil { - t.Fatal(e) - } - b, e := io.ReadAll(r) - r.Close() - if e != nil || string(b) != "hello XXXX-1" { - t.Fatalf("wrong ZIP body %q %v", b, e) - } - } - }) - t.Run("ZIP entries cross metadata cursor batches", func(t *testing.T) { - if os.Getenv("GO_TEST_SERVER_BINARY") == "" { - t.Skip("worker binary required") - } - repo, err := store.one(ctx, "anonymizedrepositories", M{"repoId": "fixture"}) - if err != nil { - t.Fatal(err) - } - // More than two batches; every entry must survive getMore and projection. - const count = 260 - docs := make([]any, 0, count) - for i := 0; i < count; i++ { - docs = append(docs, M{"repoId": "fixture", "treeGeneration": activeGeneration(repo), "path": "zip-batches", "name": str(i) + ".txt", "size": 11, "sha": sha}) - } - if _, err := store.DB.Collection("files").InsertMany(ctx, docs); err != nil { - t.Fatal(err) - } - defer store.DB.Collection("files").DeleteMany(ctx, M{"repoId": "fixture", "path": "zip-batches"}) - w := call("GET", "/api/repo/fixture/zip", "", nil) - if w.Code != 200 { - t.Fatal(w.Code, w.Body.String()) - } - archive, err := zip.NewReader(bytes.NewReader(w.Body.Bytes()), int64(w.Body.Len())) - if err != nil { - t.Fatal(err) - } - if len(archive.File) != count+2 { - t.Fatalf("incomplete ZIP: %d entries", len(archive.File)) - } - seen := map[string]bool{} - for _, entry := range archive.File { - if seen[entry.Name] { - t.Fatal("duplicate ZIP entry", entry.Name) - } - seen[entry.Name] = true - reader, err := entry.Open() - if err != nil { - t.Fatal(err) - } - body, err := io.ReadAll(reader) - reader.Close() - if err != nil || string(body) != "hello XXXX-1" { - t.Fatalf("invalid transformed entry %s: %q %v", entry.Name, body, err) - } - } - for i := 0; i < count; i++ { - if !seen["zip-batches/"+str(i)+".txt"] { - t.Fatal("missing ZIP entry", i) - } - } - }) - t.Run("legacy Zip sources can rebuild their tree", func(t *testing.T) { - id := "zip-fixture" - if e := server.content.Put(ctx, id, "Alice.txt", strings.NewReader("hello Alice"), 11, 100); e != nil { - t.Fatal(e) - } - r := M{"_id": bson.NewObjectID(), "repoId": id, "owner": owner, "status": "preparing", "statusDate": time.Now(), "source": M{"type": "Zip"}, "options": M{"terms": []string{"Alice"}, "link": true, "expirationMode": "never"}} - if _, e := store.DB.Collection(collection("repo")).InsertOne(ctx, r); e != nil { - t.Fatal(e) - } - if e := server.prepareTree(ctx, r); e != nil { - t.Fatal(e) - } - rows, e := store.list(ctx, "files", M{"repoId": id}, 100, nil) - if e != nil || len(rows) != 1 || number(rows[0]["size"]) != 11 { - t.Fatalf("wrong uploaded tree: %v %v", rows, e) - } - }) - - t.Run("dashboard and scoped token enforcement", func(t *testing.T) { - w := call("GET", "/api/user/dashboard", token, nil) - if w.Code != 200 { - t.Fatal("dashboard failed", w.Code, w.Body.String()) - } - scoped := "scoped-synthetic" - expired := "expired-synthetic" - _, e := store.update(ctx, "users", M{"_id": owner}, M{"$push": M{"apiTokens": M{"$each": []M{{"tokenHash": security.HashToken(scoped), "scope": "repository-maintenance", "repoIds": []string{"fixture"}, "expiresAt": time.Now().Add(time.Hour)}, {"tokenHash": security.HashToken(expired), "expiresAt": time.Now().Add(-time.Hour)}}}}}) - if e != nil { - t.Fatal(e) - } - for _, expiry := range []time.Time{time.Time{}, time.UnixMilli(0)} { - for _, scope := range []string{"", "repository-maintenance"} { - candidate := "expired-boundary-" + expiry.Format("2006") + scope - _, err := store.update(ctx, "users", M{"_id": owner}, M{"$push": M{"apiTokens": M{"tokenHash": security.HashToken(candidate), "scope": scope, "repoIds": []string{"fixture"}, "expiresAt": expiry}}}) - if err != nil { - t.Fatal(err) - } - w := call("GET", "/api/maintenance/repositories/fixture", candidate, nil) - if w.Code != 401 { - t.Fatalf("expired boundary token accepted: %d", w.Code) - } - } - } - for _, tc := range []struct { - method, path, token string - body any - status int - }{ - {"GET", "/api/maintenance/repositories/fixture", scoped, nil, 200}, - {"GET", "/api/user", scoped, nil, 403}, - {"GET", "/api/maintenance/repositories/other", scoped, nil, 403}, - {"GET", "/api/user", expired, nil, 401}, - {"POST", "/github/login-token", "", M{"token": scoped}, 401}, - {"PATCH", "/api/maintenance/repositories/fixture", scoped, M{"terms": []string{"Alice", "Bob"}}, 200}, - {"PATCH", "/api/maintenance/repositories/fixture", scoped, M{"owner": other.Hex()}, 400}, - } { - w := call(tc.method, tc.path, tc.token, tc.body) - if w.Code != tc.status { - t.Errorf("%s %s: got %d want %d: %s", tc.method, tc.path, w.Code, tc.status, w.Body.String()) - } - } - }) - - t.Run("GitHub App access remains bound and revocation wins token issuance", func(t *testing.T) { - oldHTTP, oldConfig := server.HTTP, server.Config - defer func() { server.HTTP = oldHTTP; server.Config = oldConfig }() - key, e := rsa.GenerateKey(rand.Reader, 2048) - if e != nil { - t.Fatal(e) - } - server.Config.AppEnabled = true - server.Config.AppID = "99" - server.Config.AppClientID = "test-client" - server.Config.AppPrivateKey = string(pem.EncodeToMemory(&pem.Block{Type: "RSA PRIVATE KEY", Bytes: x509.MarshalPKCS1PrivateKey(key)})) - encrypted, e := cipher.Encrypt("app-user", owner.Hex(), "github-app-user", "") - if e != nil { - t.Fatal(e) - } - _, e = store.DB.Collection("credentials").InsertOne(ctx, M{"ownerId": owner, "provider": "github-app-user", "encryptedToken": encrypted, "expiresAt": time.Now().Add(time.Hour), "revision": "grant-v1"}) - if e != nil { - t.Fatal(e) - } - _, e = store.DB.Collection("githubinstallations").InsertOne(ctx, M{"appId": "99", "installationId": int64(42), "revision": "installation-v1", "blocked": false}) - if e != nil { - t.Fatal(e) - } - writePermission, revokeDuringIssue := false, false - calls := 0 - server.HTTP = &http.Client{Transport: roundTrip(func(req *http.Request) (*http.Response, error) { - calls++ - if req.Header.Get("Authorization") == "Bearer synthetic-github-token" { - t.Fatal("App access fell back to OAuth") - } - var data M - switch req.URL.Path { - case "/user": - data = M{"id": 1} - case "/repositories/10": - data = M{"id": 10, "full_name": "owner/repo"} - case "/app/installations/42": - permission := "read" - if writePermission { - permission = "write" - } - data = M{"id": 42, "app_id": 99, "permissions": M{"contents": permission, "metadata": "read"}} - case "/app/installations/42/access_tokens": - var payload M - if json.NewDecoder(req.Body).Decode(&payload) != nil { - t.Fatal("invalid token request") - } - if len(arr(payload["repository_ids"])) != 1 || number(arr(payload["repository_ids"])[0]) != 10 || obj(payload["permissions"])["contents"] != "read" { - t.Fatal("token was not scoped", payload) - } - if revokeDuringIssue { - _, e := store.update(ctx, "githubinstallations", M{"installationId": 42}, M{"$set": M{"blocked": true, "revision": "installation-v2"}}) - if e != nil { - t.Fatal(e) - } - } - data = M{"token": "installation-token", "expires_at": time.Now().Add(30 * time.Second).Format(time.RFC3339)} - default: - t.Fatalf("unexpected App endpoint %s", req.URL.Path) - } - b, _ := json.Marshal(data) - return &http.Response{StatusCode: 200, Header: http.Header{}, Body: io.NopCloser(bytes.NewReader(b))}, nil - })} - binding := M{"kind": "github-app", "repositoryId": int64(10), "installationId": int64(42)} - got, e := server.boundToken(ctx, owner, binding, "owner/repo") - if e != nil || got != "installation-token" { - t.Fatal("valid binding failed", e) - } - if _, e = store.update(ctx, "credentials", M{"ownerId": owner, "provider": "github-app-user"}, M{"$set": M{"reconciliationPending": true}}); e != nil { - t.Fatal(e) - } - beforePending := calls - if _, e = server.boundToken(ctx, owner, binding, "owner/repo"); e == nil || calls != beforePending { - t.Fatal("pending grant was used") - } - row, e := store.one(ctx, "credentials", M{"ownerId": owner, "provider": "github-app-user"}) - if e != nil { - t.Fatal(e) - } - if e = server.reconcileGrant(ctx, row); e != nil { - t.Fatal(e) - } - if _, e = server.boundToken(ctx, owner, binding, "owner/repo"); e != nil { - t.Fatal("valid reconciled grant blocked", e) - } - writePermission = true - if _, e = server.boundToken(ctx, owner, binding, "owner/repo"); e == nil { - t.Fatal("write-capable installation accepted") - } - writePermission = false - revokeDuringIssue = true - if _, e = server.boundToken(ctx, owner, binding, "owner/repo"); e == nil { - t.Fatal("revocation lost to token issuance") - } - _, e = store.update(ctx, "credentials", M{"ownerId": owner, "provider": "github-app-user"}, M{"$set": M{"revoked": true}}) - if e != nil { - t.Fatal(e) - } - before := calls - if _, e = server.boundToken(ctx, owner, binding, "owner/repo"); e == nil || calls != before { - t.Fatal("revoked grant was used") - } - }) - t.Run("removed account and forged session fail closed", func(t *testing.T) { - w := call("POST", "/github/login-token", "", M{"token": token}) - if w.Code != 200 { - t.Fatal(w.Code, w.Body.String()) - } - cookies := w.Result().Cookies() - if len(cookies) != 1 { - t.Fatal("missing session") - } - if _, err = store.update(ctx, "users", M{"_id": owner}, M{"$set": M{"status": "banned"}}); err != nil { - t.Fatal(err) - } - w = call("GET", "/api/user", token, nil) - if w.Code != 401 { - t.Fatal("banned bearer accepted", w.Code) - } - req := httptest.NewRequest("GET", "/api/user", nil) - req.RemoteAddr = "192.0.2.1:1234" - req.AddCookie(cookies[0]) - w = httptest.NewRecorder() - server.ServeHTTP(w, req) - if w.Code != 401 { - t.Fatal("banned session accepted", w.Code) - } - store.Redis.Del(ctx, "go:rate:192.0.2.1") - }) - t.Run("unsigned webhooks rejected", func(t *testing.T) { - w := call("POST", "/github/app/webhook", "", M{"action": "deleted"}) - if w.Code != 401 { - t.Fatal(w.Code) - } - }) -} diff --git a/backend/internal/server/javascript_date.go b/backend/internal/server/javascript_date.go deleted file mode 100644 index ab4f298..0000000 --- a/backend/internal/server/javascript_date.go +++ /dev/null @@ -1,60 +0,0 @@ -package server - -import ( - "math" - "regexp" - "strconv" - "strings" - "time" -) - -var jsISODate = regexp.MustCompile(`^([+-][0-9]{6}|[0-9]{4})(?:-([0-9]{2})(?:-([0-9]{2}))?)?(?:[Tt]([0-9]{2}):([0-9]{2})(?::([0-9]{2})(?:\.([0-9]+))?)?([Zz]|[+-][0-9]{2}:?[0-9]{2})?)?$`) - -// Parse the ECMAScript ISO date forms in UTC, as used by the deployment. -// Days up to 31 normalize across month boundaries; invalid time fields do not. -func javascriptISODate(value string) (time.Time, bool) { - parts := jsISODate.FindStringSubmatch(value) - if parts == nil || parts[1] == "-000000" { - return time.Time{}, false - } - integer := func(s string, fallback int) int { - if s == "" { - return fallback - } - n, _ := strconv.Atoi(s) - return n - } - year, month, day := integer(parts[1], 0), integer(parts[2], 1), integer(parts[3], 1) - hour, minute, second := integer(parts[4], 0), integer(parts[5], 0), integer(parts[6], 0) - fraction := parts[7] + "000" - ms := integer(fraction[:3], 0) - if month < 1 || month > 12 || day < 1 || day > 31 || hour > 24 || minute > 59 || second > 59 || hour == 24 && (minute != 0 || second != 0 || strings.Trim(parts[7], "0") != "") { - return time.Time{}, false - } - offset := 0 - if zone := parts[8]; zone != "" && zone != "Z" && zone != "z" { - digits := strings.ReplaceAll(zone[1:], ":", "") - hours, minutes := integer(digits[:2], 0), integer(digits[2:], 0) - if hours > 23 || minutes > 59 { - return time.Time{}, false - } - offset = (hours*60 + minutes) * 60 - if zone[0] == '-' { - offset = -offset - } - } - parsed := time.Date(year, time.Month(month), day, hour, minute, second, ms*int(time.Millisecond), time.UTC).Add(-time.Duration(offset) * time.Second) - if math.Abs(float64(parsed.UnixMilli())) > 8.64e15 { - return time.Time{}, false - } - return parsed, true -} - -// javascriptDateString implements the date-string forms used by the UTC deployment. -func javascriptDateString(text string) (time.Time, bool) { - text, _, _ = strings.Cut(text, "\x00") - if parsed, ok := javascriptISODate(text); ok { - return parsed, true - } - return javascriptLegacyDate(text) -} diff --git a/backend/internal/server/javascript_date_value.go b/backend/internal/server/javascript_date_value.go deleted file mode 100644 index 792ef6a..0000000 --- a/backend/internal/server/javascript_date_value.go +++ /dev/null @@ -1,57 +0,0 @@ -package server - -import ( - "math" - "time" - - "go.mongodb.org/mongo-driver/v2/bson" -) - -// JSON primitives follow Date construction, not Mongoose's Date-field casting. -// Invalid dates are distinct from coercions that throw before validation. -func javascriptDateValue(value any) (time.Time, bool, error) { - switch v := value.(type) { - case nil: - return time.UnixMilli(0).UTC(), true, nil - case bool: - if v { - return time.UnixMilli(1).UTC(), true, nil - } - return time.UnixMilli(0).UTC(), true, nil - case int: - return javascriptDateValue(float64(v)) - case int64: - return javascriptDateValue(float64(v)) - case float64: - if math.IsNaN(v) || math.IsInf(v, 0) || math.Abs(v) > 8.64e15 { - return time.Time{}, false, nil - } - return time.UnixMilli(int64(v)).UTC(), true, nil - case time.Time: - return javascriptDateValue(float64(v.UnixMilli())) - case bson.DateTime: - return javascriptDateValue(float64(v)) - default: - text, err := tokenNameString(value) - if err != nil { - return time.Time{}, false, err - } - parsed, ok := javascriptDateString(text) - return parsed, ok, nil - } -} - -func conferenceFormDates(body M) (time.Time, time.Time, error) { - start, startOK, err := javascriptDateValue(body["startDate"]) - if err != nil { - return time.Time{}, time.Time{}, err - } - end, endOK, err := javascriptDateValue(body["endDate"]) - if err != nil { - return time.Time{}, time.Time{}, err - } - if !startOK || !endOK { - return time.Time{}, time.Time{}, fail("internal_error", 500) - } - return start, end, nil -} diff --git a/backend/internal/server/javascript_legacy_date.go b/backend/internal/server/javascript_legacy_date.go deleted file mode 100644 index 924f5c2..0000000 --- a/backend/internal/server/javascript_legacy_date.go +++ /dev/null @@ -1,317 +0,0 @@ -// Copyright 2011 the V8 project authors. All rights reserved. -// Adapted date parsing rules; BSD-3-Clause terms in ../../licenses/V8-LICENSE. - -package server - -// The parsing rules follow V8's dateparser (BSD-3-Clause); see -// https://github.com/v8/v8/tree/main/src/date. Runtime parsing remains in Go. -import ( - "math" - "strconv" - "strings" - "time" - "unicode" -) - -type dateToken struct { - kind byte - text string - n int -} - -func dateSpace(r rune) bool { return unicode.IsSpace(r) && r != '\u0085' || r == '\ufeff' } -func dateTokens(value string) []dateToken { - runes := []rune(value) - out := []dateToken{} - for i := 0; i < len(runes) && runes[i] != 0; { - start := i - r := runes[i] - i++ - switch { - case r >= '0' && r <= '9': - for i < len(runes) && runes[i] >= '0' && runes[i] <= '9' { - i++ - } - text := string(runes[start:i]) - significant := strings.TrimLeft(text, "0") - if len(significant) > 9 { - significant = significant[:9] - } - n, _ := strconv.Atoi(significant) - out = append(out, dateToken{'n', text, n}) - case strings.ContainsRune(":-+.)", r): - out = append(out, dateToken{byte(r), string(r), 0}) - case dateSpace(r): - out = append(out, dateToken{'s', "", 0}) - case r >= 'A': - for i < len(runes) && runes[i] >= 'A' && !dateSpace(runes[i]) { - i++ - } - out = append(out, dateToken{'w', strings.ToLower(string(runes[start:i])), 0}) - case r == '(': - depth := 1 - for i < len(runes) && runes[i] != 0 && depth > 0 { - if runes[i] == '(' { - depth++ - } - if runes[i] == ')' { - depth-- - } - i++ - } - out = append(out, dateToken{'?', "", 0}) - default: - out = append(out, dateToken{'?', "", 0}) - } - } - return append(out, dateToken{}) -} - -func javascriptLegacyDate(value string) (time.Time, bool) { - tokens := dateTokens(value) - pos := 0 - peek := func() dateToken { return tokens[pos] } - next := func() dateToken { - t := tokens[pos] - if t.kind != 0 { - pos++ - } - return t - } - skip := func(kind byte) bool { - if tokens[pos].kind == kind { - pos++ - return true - } - return false - } - dates := []int{} - // Retain the consumed ISO prefix when legacy parsing takes over. Once an - // ISO time separator is reached, invalid time syntax cannot fall back. - token := dateToken{} - if peek().kind == '+' || peek().kind == '-' { - sign := next() - token = sign - if peek().kind == 'n' && len(peek().text) == 6 { - year := next().n - if sign.kind != '-' || year != 0 { - if sign.kind == '-' { - year = -year - } - dates = append(dates, year) - token = dateToken{kind: 'i'} - } - } - } else if peek().kind == 'n' && len(peek().text) == 4 { - dates = append(dates, next().n) - token.kind = 'i' - } else { - token = next() - } - if token.kind == 'i' { - validPrefix := true - if skip('-') { - t := next() - if t.kind != 'n' || len(t.text) != 2 || t.n < 1 || t.n > 12 { - token = t - validPrefix = false - } else { - dates = append(dates, t.n) - if skip('-') { - t = next() - if t.kind != 'n' || len(t.text) != 2 || t.n < 1 || t.n > 31 { - token = t - validPrefix = false - } else { - dates = append(dates, t.n) - } - } - } - } - if validPrefix { - if peek().kind == 'w' && peek().text == "t" { - return time.Time{}, false - } - token = next() - } - } - clock := []int{} - month := 0 - ampm := -1 - tzHour, tzMinute, tzSign := -1, -1, 1 - readNumber := len(dates) > 0 - timeExpect := func(n int) bool { return (len(clock) == 1 || len(clock) == 2) && n < 60 || len(clock) == 3 && n < 1000 } - addTime := func(n int) bool { - if len(clock) >= 4 { - return false - } - clock = append(clock, n) - return true - } - finishTime := func(n int) bool { - if !addTime(n) { - return false - } - for len(clock) < 4 { - clock = append(clock, 0) - } - return true - } - months := []string{"jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec"} - zones := map[string]int{"ut": 0, "utc": 0, "z": 0, "gmt": 0, "cdt": -5, "cst": -6, "edt": -4, "est": -5, "mdt": -6, "mst": -7, "pdt": -7, "pst": -8} - for ; token.kind != 0; token = next() { - switch token.kind { - case 'n': - readNumber = true - n := token.n - if skip(':') { - if skip(':') { - if len(clock) != 0 { - return time.Time{}, false - } - clock = append(clock, n, 0) - } else { - if !addTime(n) { - return time.Time{}, false - } - skip('.') - } - } else if skip('.') && timeExpect(n) { - if !addTime(n) || peek().kind != 'n' { - return time.Time{}, false - } - fraction := next().text + "000" - ms, _ := strconv.Atoi(fraction[:3]) - if !finishTime(ms) { - return time.Time{}, false - } - } else if tzHour >= 0 && tzMinute < 0 && n < 60 { - tzMinute = n - } else if timeExpect(n) { - if !finishTime(n) { - return time.Time{}, false - } - t := peek() - if t.kind != 0 && t.kind != 's' && t.kind != '+' && t.kind != '-' && !(t.kind == 'w' && t.text == "z") { - return time.Time{}, false - } - } else { - if len(dates) >= 3 { - return time.Time{}, false - } - dates = append(dates, n) - skip('-') - } - case 'w': - named := 0 - if len(token.text) >= 3 { - for i, name := range months { - if token.text[:3] == name { - named = i + 1 - break - } - } - } - if (token.text == "am" || token.text == "pm") && len(clock) > 0 { - ampm = 0 - if token.text == "pm" { - ampm = 12 - } - } else if named > 0 { - month = named - skip('-') - } else if zone, ok := zones[token.text]; ok && readNumber { - tzHour = zone - tzSign = 1 - if zone < 0 { - tzSign = -1 - tzHour = -zone - } - tzMinute = 0 - } else if readNumber || peek().kind == 'n' { - return time.Time{}, false - } - case '+', '-': - if tzHour == 0 && tzMinute == 0 || len(clock) > 0 { - tzSign = 1 - if token.kind == '-' { - tzSign = -1 - } - n, width := 0, 0 - if peek().kind == 'n' { - t := next() - n, width = t.n, len(t.text) - } - readNumber = true - if peek().kind == ':' { - tzHour, tzMinute = n, -1 - } else if width == 1 || width == 2 { - tzHour, tzMinute = n, 0 - } else if width == 3 || width == 4 { - tzHour, tzMinute = n/100, n%100 - } else { - return time.Time{}, false - } - } else if readNumber { - return time.Time{}, false - } - case ')': - if readNumber { - return time.Time{}, false - } - } - } - if len(dates) == 0 { - return time.Time{}, false - } - for len(dates) < 3 { - dates = append(dates, 1) - } - year, day := 0, 0 - if month == 0 { - if dates[0] < 1 || dates[0] > 31 { - year, month, day = dates[0], dates[1], dates[2] - } else { - month, day, year = dates[0], dates[1], dates[2] - } - } else if dates[0] < 1 || dates[0] > 31 { - year, day = dates[0], dates[1] - } else { - day, year = dates[0], dates[1] - } - if year >= 0 && year <= 49 { - year += 2000 - } else if year >= 50 && year <= 99 { - year += 1900 - } - if year < -300000 || year > 300000 || month < 1 || month > 12 || day < 1 || day > 31 { - return time.Time{}, false - } - for len(clock) < 4 { - clock = append(clock, 0) - } - if ampm >= 0 { - if clock[0] > 12 { - return time.Time{}, false - } - clock[0] = clock[0]%12 + ampm - } - if clock[0] > 24 || clock[1] > 59 || clock[2] > 59 || clock[3] > 999 || clock[0] == 24 && (clock[1] != 0 || clock[2] != 0 || clock[3] != 0) { - return time.Time{}, false - } - offset := 0 - if tzHour >= 0 { - if tzMinute < 0 { - tzMinute = 0 - } - offset = (tzHour*60 + tzMinute) * 60 * tzSign - } - if math.Abs(float64(offset)) > math.MaxInt32 { - return time.Time{}, false - } - parsed := time.Date(year, time.Month(month), day, clock[0], clock[1], clock[2], clock[3]*int(time.Millisecond), time.UTC).Add(-time.Duration(offset) * time.Second) - if math.Abs(float64(parsed.UnixMilli())) > 8.64e15 { - return time.Time{}, false - } - return parsed, true -} diff --git a/backend/internal/server/job_rate_limit_integration_test.go b/backend/internal/server/job_rate_limit_integration_test.go deleted file mode 100644 index ac451bc..0000000 --- a/backend/internal/server/job_rate_limit_integration_test.go +++ /dev/null @@ -1,176 +0,0 @@ -package server - -import ( - "context" - "errors" - "fmt" - "testing" - "time" - - "github.com/tdurieux/anonymous_github/backend/internal/provider" - "go.mongodb.org/mongo-driver/v2/bson" -) - -type delayedJobProvider struct { - fixtureProvider - treeError error - onTree func() -} - -func (p *delayedJobProvider) Tree(ctx context.Context, a provider.Access) ([]provider.Entry, error) { - if p.onTree != nil { - p.onTree() - } - if p.treeError != nil { - return nil, p.treeError - } - return p.fixtureProvider.Tree(ctx, a) -} - -func runJobRateLimitIntegration(t *testing.T, base *Server) { - t.Run("provider quota delays preserve attempts and lifecycle", func(t *testing.T) { - ctx := context.Background() - db := base.Store.DB.Client().Database("job_delay_" + bson.NewObjectID().Hex()) - defer db.Drop(ctx) - p := &delayedJobProvider{} - registry, err := provider.New(p) - if err != nil { - t.Fatal(err) - } - s := &Server{Store: &Store{DB: db, Redis: base.Store.Redis}, providers: registry} - now := time.Now().Truncate(time.Millisecond) - reset := now.Add(time.Hour) - resource := M{"_id": bson.NewObjectID(), "repoId": "delayed", "status": "preparing", "statusDate": now, "source": M{"provider": "fixture", "repositoryName": "team/subgroup/project", "repositoryId": "project:123", "commit": "opaque:1"}, "providerAccess": M{"provider": "fixture", "kind": "fixture-grant", "revision": "grant:1"}} - if _, err := db.Collection(collection("repo")).InsertOne(ctx, resource); err != nil { - t.Fatal(err) - } - job := M{"_id": "repo:delayed:prepare", "kind": "repo", "resourceId": "delayed", "action": "prepare", "state": "active", "attempts": 3, "lease": "lease-1", "leaseUntil": now.Add(2 * time.Minute), "error": "old_error", "finishedAt": now} - if _, err := db.Collection("gojobs").InsertOne(ctx, job); err != nil { - t.Fatal(err) - } - p.treeError = fmt.Errorf("private provider endpoint: %w", &provider.RateLimitError{ResetAt: reset}) - for i := 0; i < 5; i++ { - // Claiming a delayed retry increments attempts as jobLoop does. - if _, err := s.Store.update(ctx, "gojobs", M{"_id": job["_id"]}, M{"$set": M{"state": "active", "attempts": 3, "lease": "lease-1"}}); err != nil { - t.Fatal(err) - } - err := s.runJob(ctx, job) - if !errors.Is(err, provider.ErrRateLimited) { - t.Fatalf("unexpected job error: %v", err) - } - if err := s.finishJob(ctx, job, err, now); err != nil { - t.Fatal(err) - } - // Maintenance enqueue must not erase the provider's future reset. - if err := s.enqueue(ctx, "repo", "delayed", "prepare"); err != nil { - t.Fatal(err) - } - stored, err := s.Store.one(ctx, "gojobs", M{"_id": job["_id"]}) - if err != nil { - t.Fatal(err) - } - if stored["state"] != "delayed" || number(stored["attempts"]) != 2 || !date(stored["availableAt"]).Equal(reset) || stored["lease"] != nil || stored["error"] != nil || stored["finishedAt"] != nil { - t.Fatalf("invalid delayed job: %v", stored) - } - ready, err := db.Collection("gojobs").CountDocuments(ctx, M{"state": M{"$in": []string{"waiting", "delayed"}}, "availableAt": M{"$lte": now}}) - if err != nil || ready != 0 { - t.Fatalf("delay claimable early: %d %v", ready, err) - } - r, err := s.Store.one(ctx, collection("repo"), M{"repoId": "delayed"}) - if err != nil { - t.Fatal(err) - } - if r["status"] != "queue" || r["statusMessage"] != fmt.Sprintf("rate_limited:%d", reset.UnixMilli()) { - t.Fatalf("invalid queued resource: %v", r) - } - } - // An obsolete lease cannot rewrite a replacement job's delay or attempts. - if _, err := s.Store.update(ctx, "gojobs", M{"_id": job["_id"]}, M{"$set": M{"state": "active", "lease": "replacement", "attempts": 7}}); err != nil { - t.Fatal(err) - } - if err := s.finishJob(ctx, job, p.treeError, now); err != nil { - t.Fatal(err) - } - current, err := s.Store.one(ctx, "gojobs", M{"_id": job["_id"]}) - if err != nil { - t.Fatal(err) - } - if current["lease"] != "replacement" || number(current["attempts"]) != 7 { - t.Fatalf("replacement overwritten: %v", current) - } - // A lifecycle change during the provider call must survive delayed recovery. - p.onTree = func() { - if _, err := s.Store.update(ctx, collection("repo"), M{"repoId": "delayed"}, M{"$set": M{"status": "removing", "statusDate": now.Add(time.Second)}}); err != nil { - t.Fatal(err) - } - } - _ = s.runJob(ctx, job) - r, err := s.Store.one(ctx, collection("repo"), M{"repoId": "delayed"}) - if err != nil { - t.Fatal(err) - } - if r["status"] != "removing" { - t.Fatalf("removal overwritten: %v", r) - } - p.onTree = nil - p.treeError = nil - if _, err := s.Store.update(ctx, collection("repo"), M{"repoId": "delayed"}, M{"$set": M{"status": "queue"}}); err != nil { - t.Fatal(err) - } - job["lease"] = "replacement" - if err := s.runJob(ctx, job); err != nil { - t.Fatal(err) - } - if err := s.finishJob(ctx, job, nil, reset); err != nil { - t.Fatal(err) - } - r, err = s.Store.one(ctx, collection("repo"), M{"repoId": "delayed"}) - if err != nil { - t.Fatal(err) - } - if r["status"] != "ready" || r["statusMessage"] != nil { - t.Fatalf("retry did not publish: %v", r) - } - current, err = s.Store.one(ctx, "gojobs", M{"_id": job["_id"]}) - if err != nil { - t.Fatal(err) - } - if current["state"] != "completed" || current["lease"] != nil || current["error"] != nil { - t.Fatalf("retry did not complete: %v", current) - } - - // Exercise the actual claimant/worker loop: it must release the slot - // and leave the future job unclaimed with no failed attempt consumed. - if _, err := s.Store.update(ctx, collection("repo"), M{"repoId": "delayed"}, M{"$set": M{"status": "preparing"}}); err != nil { - t.Fatal(err) - } - p.treeError = &provider.RateLimitError{ResetAt: reset} - if err := s.enqueue(ctx, "repo", "delayed", "prepare"); err != nil { - t.Fatal(err) - } - if _, err := s.Store.update(ctx, "gojobs", M{"_id": job["_id"]}, M{"$set": M{"state": "delayed", "availableAt": now.Add(-time.Minute)}}); err != nil { - t.Fatal(err) - } - work, cancel := context.WithTimeout(ctx, 5*time.Second) - done := make(chan struct{}) - go func() { defer close(done); s.jobLoop(work, "download") }() - defer func() { cancel(); <-done }() - for { - current, err = s.Store.one(ctx, "gojobs", M{"_id": job["_id"]}) - if err != nil { - t.Fatal(err) - } - if current["state"] == "delayed" && date(current["availableAt"]).Equal(reset) { - break - } - select { - case <-work.Done(): - t.Fatal("worker did not persist quota delay") - case <-time.After(10 * time.Millisecond): - } - } - if number(current["attempts"]) != 0 || current["lease"] != nil || current["error"] != nil { - t.Fatalf("worker consumed a quota retry: %v", current) - } - }) -} diff --git a/backend/internal/server/job_result.go b/backend/internal/server/job_result.go deleted file mode 100644 index f118cdd..0000000 --- a/backend/internal/server/job_result.go +++ /dev/null @@ -1,79 +0,0 @@ -package server - -import ( - "context" - "errors" - "time" -) - -// A provider quota delay is not a failed attempt. Unknown or expired reset -// times use the TypeScript worker's one-minute fallback to avoid a busy loop. -func jobRateLimit(job M, err error, now time.Time) (time.Time, bool) { - var api *APIError - if str(job["action"]) != "prepare" || !errors.As(providerFailure(err), &api) || api.Status != 429 { - return time.Time{}, false - } - reset := time.UnixMilli(api.ResetAt) - if api.ResetAt <= 0 || !reset.After(now) { - reset = now.Add(time.Minute) - } - return reset, true -} - -func (s *Server) finishJob(ctx context.Context, job M, jobErr error, now time.Time) error { - set := M{"state": "completed", "finishedAt": now} - unset := M{"lease": "", "leaseUntil": "", "error": ""} - if reset, limited := jobRateLimit(job, jobErr, now); limited { - attempts := number(job["attempts"]) - 1 - if attempts < 0 { - attempts = 0 - } - set = M{"state": "delayed", "availableAt": reset, "attempts": attempts} - unset["finishedAt"] = "" - } else if jobErr != nil { - delete(unset, "error") - set = M{"state": "failed", "finishedAt": now, "error": "job_failed"} - var api *APIError - if errors.As(providerFailure(jobErr), &api) { - set["error"] = api.Code - } - if number(job["attempts"]) < jobMaxAttempts(job) { - set["state"] = "waiting" - set["availableAt"] = now.Add(jobBackoff(job)) - } - } - _, err := s.Store.update(ctx, "gojobs", M{"_id": job["_id"], "state": "active", "lease": job["lease"]}, M{"$set": set, "$unset": unset}) - return err -} - -// Imported jobs retain BullMQ retry policies; ordinary Go jobs keep the -// existing three-attempt policy. Migration validates the stored values. -func jobMaxAttempts(job M) int64 { - if n := number(job["maxAttempts"]); n > 0 { - return n - } - return 3 -} -func jobBackoff(job M) time.Duration { - if job["maxAttempts"] == nil { - return time.Duration(number(job["attempts"])) * time.Second - } - delay := number(job["backoffDelay"]) - if delay <= 0 { - return 0 - } - const maxMillis = int64((1<<63 - 1) / time.Millisecond) - if delay > maxMillis { - delay = maxMillis - } - if str(job["backoffType"]) == "exponential" { - for i := int64(1); i < number(job["attempts"]) && delay < maxMillis; i++ { - if delay > maxMillis/2 { - delay = maxMillis - break - } - delay *= 2 - } - } - return time.Duration(delay) * time.Millisecond -} diff --git a/backend/internal/server/job_result_test.go b/backend/internal/server/job_result_test.go deleted file mode 100644 index ef6b4bc..0000000 --- a/backend/internal/server/job_result_test.go +++ /dev/null @@ -1,93 +0,0 @@ -package server - -import ( - "errors" - "fmt" - "net/http" - "strconv" - "testing" - "time" - - "github.com/tdurieux/anonymous_github/backend/internal/provider" -) - -func TestJobRateLimit(t *testing.T) { - now := time.Date(2026, 11, 2, 0, 0, 0, 0, time.UTC) - future := now.Add(2 * time.Hour) - for _, c := range []struct { - name string - err error - reset time.Time - limited bool - }{ - {"provider", &provider.RateLimitError{ResetAt: future}, future, true}, - {"wrapped", fmt.Errorf("private details: %w", &provider.RateLimitError{ResetAt: future}), future, true}, - {"unknown reset", provider.ErrRateLimited, now.Add(time.Minute), true}, - {"past reset", &provider.RateLimitError{ResetAt: now.Add(-time.Minute)}, now.Add(time.Minute), true}, - {"github", &APIError{Code: "github_rate_limit_exceeded", Status: 429, ResetAt: future.UnixMilli()}, future, true}, - {"upstream", provider.ErrUpstream, time.Time{}, false}, - {"access", provider.ErrAccessDenied, time.Time{}, false}, - {"untyped", errors.New("rate limit private details"), time.Time{}, false}, - {"success", nil, time.Time{}, false}, - } { - t.Run(c.name, func(t *testing.T) { - reset, limited := jobRateLimit(M{"action": "prepare"}, c.err, now) - if limited != c.limited || !reset.Equal(c.reset) { - t.Fatalf("reset=%v limited=%v", reset, limited) - } - if _, limited := jobRateLimit(M{"action": "remove"}, c.err, now); limited { - t.Fatal("delayed removal") - } - }) - } -} - -func TestGitHubRateLimitReset(t *testing.T) { - now := time.Date(2026, 11, 2, 0, 0, 0, 0, time.UTC) - for _, c := range []struct { - name, reset, retry string - delay time.Duration - }{ - {"primary", strconv.FormatInt(now.Add(time.Hour).Unix(), 10), "", time.Hour}, - {"secondary", "", "120", 2 * time.Minute}, - {"http date", "", now.Add(3 * time.Minute).Format(http.TimeFormat), 3 * time.Minute}, - {"later limit", strconv.FormatInt(now.Add(time.Hour).Unix(), 10), "120", time.Hour}, - {"later retry", strconv.FormatInt(now.Add(time.Minute).Unix(), 10), "120", 2 * time.Minute}, - {"missing", "", "", time.Minute}, - {"past", "1", "-2", time.Minute}, - {"overflow", "9223372036854775807", "9223372036854775807", time.Minute}, - {"invalid", "private-token", "NaN", time.Minute}, - } { - t.Run(c.name, func(t *testing.T) { - h := http.Header{} - h.Set("X-RateLimit-Reset", c.reset) - h.Set("Retry-After", c.retry) - var api *APIError - err := githubRateLimit(h, now) - if !errors.As(err, &api) || api.ResetAt != now.Add(c.delay).UnixMilli() || api.Status != 429 || api.Code != "github_rate_limit_exceeded" { - t.Fatalf("unexpected error: %+v", api) - } - }) - } -} - -func TestImportedJobRetryPolicies(t *testing.T) { - for _, c := range []struct { - name string - job M - attempts int64 - delay time.Duration - }{ - {"Go default", M{"attempts": 2}, 3, 2 * time.Second}, - {"Bull default", M{"attempts": 1, "maxAttempts": 1}, 1, 0}, - {"fixed", M{"attempts": 3, "maxAttempts": 5, "backoffType": "fixed", "backoffDelay": 250}, 5, 250 * time.Millisecond}, - {"exponential", M{"attempts": 4, "maxAttempts": 5, "backoffType": "exponential", "backoffDelay": 250}, 5, 2 * time.Second}, - {"bounded overflow", M{"attempts": 1000000, "maxAttempts": 1000001, "backoffType": "exponential", "backoffDelay": 250}, 1000001, time.Duration(int64((1<<63-1)/time.Millisecond)) * time.Millisecond}, - } { - t.Run(c.name, func(t *testing.T) { - if jobMaxAttempts(c.job) != c.attempts || jobBackoff(c.job) != c.delay { - t.Fatal(jobMaxAttempts(c.job), jobBackoff(c.job)) - } - }) - } -} diff --git a/backend/internal/server/job_retry.go b/backend/internal/server/job_retry.go deleted file mode 100644 index 2e7b7c1..0000000 --- a/backend/internal/server/job_retry.go +++ /dev/null @@ -1,48 +0,0 @@ -package server - -import ( - "context" - "time" - - "go.mongodb.org/mongo-driver/v2/mongo/options" -) - -func (s *Server) retryFailedJobs(ctx context.Context, actions ...string) (M, error) { - cursor, err := s.Store.DB.Collection("gojobs").Find(ctx, M{"action": M{"$in": actions}, "state": "failed"}, options.Find().SetProjection(M{"_id": 1, "kind": 1, "resourceId": 1, "action": 1})) - if err != nil { - return nil, err - } - defer cursor.Close(ctx) - // Capture the selected jobs before making writes. A job failing later must - // not be swept into a bulk state change without preparing its resource. - jobs := []M{} - if err := cursor.All(ctx, &jobs); err != nil { - return nil, err - } - retried := int64(0) - for _, job := range jobs { - if err := ctx.Err(); err != nil { - return nil, err - } - action := str(job["action"]) - if action == "prepare" { - kind := str(job["kind"]) - if collection(kind) == "" { - continue - } - filter := resourceFilter(kind, str(job["resourceId"])) - filter["status"] = "error" - if _, err := s.Store.update(ctx, collection(kind), filter, M{"$set": M{"status": "preparing", "statusDate": time.Now()}}); err != nil { - continue - } - } - changed, err := s.Store.update(ctx, "gojobs", M{"_id": job["_id"], "action": action, "state": "failed"}, M{"$set": M{"state": "waiting", "attempts": 0, "availableAt": time.Now()}}) - if err == nil && changed { - retried++ - } - } - if err := ctx.Err(); err != nil { - return nil, err - } - return M{"retried": retried, "total": int64(len(jobs))}, nil -} diff --git a/backend/internal/server/job_retry_integration_test.go b/backend/internal/server/job_retry_integration_test.go deleted file mode 100644 index 754d1e7..0000000 --- a/backend/internal/server/job_retry_integration_test.go +++ /dev/null @@ -1,106 +0,0 @@ -package server - -import ( - "context" - "fmt" - "os" - "sync" - "testing" - - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/event" - "go.mongodb.org/mongo-driver/v2/mongo" - "go.mongodb.org/mongo-driver/v2/mongo/options" -) - -func runJobRetryIntegration(t *testing.T, base *Server) { - t.Run("failed job retries isolate failures and cover the full snapshot", func(t *testing.T) { - ctx := context.Background() - db := base.Store.DB.Client().Database("job_retry_" + bson.NewObjectID().Hex()) - defer db.Drop(ctx) - s := &Server{Store: &Store{DB: db, Redis: base.Store.Redis}} - const invalid = 100000 - jobs := make([]any, 0, invalid+5) - for i := 0; i < invalid; i++ { - jobs = append(jobs, M{"_id": fmt.Sprintf("invalid-%06d", i), "kind": "unsupported", "action": "prepare", "state": "failed", "resourceId": "unused"}) - } - for _, id := range []string{"tail", "bad", "became-active"} { - jobs = append(jobs, M{"_id": id, "kind": "repo", "action": "prepare", "state": "failed", "resourceId": id, "attempts": 3}) - } - jobs = append(jobs, M{"_id": "already-active", "kind": "repo", "action": "prepare", "state": "active", "resourceId": "already-active"}, M{"_id": "remove-good", "kind": "repo", "action": "remove", "state": "failed", "resourceId": "untouched"}) - if _, err := db.Collection("gojobs").InsertMany(ctx, jobs); err != nil { - t.Fatal(err) - } - for _, id := range []string{"tail", "bad", "became-active", "untouched"} { - status := "error" - if id == "became-active" { - status = "ready" - } - if _, err := db.Collection(collection("repo")).InsertOne(ctx, M{"repoId": id, "status": status, "source": M{"provider": "fixture"}}); err != nil { - t.Fatal(err) - } - } - if err := db.RunCommand(ctx, bson.D{{Key: "collMod", Value: collection("repo")}, {Key: "validator", Value: M{"$or": []M{{"repoId": M{"$ne": "bad"}}, {"status": "error"}}}}, {Key: "validationLevel", Value: "strict"}, {Key: "validationAction", Value: "error"}}).Err(); err != nil { - t.Fatal(err) - } - var once sync.Once - monitor := &event.CommandMonitor{Started: func(_ context.Context, e *event.CommandStartedEvent) { - if e.CommandName != "update" || e.Command.Lookup("update").StringValue() != collection("repo") { - return - } - once.Do(func() { - // These writes occur after the failed-job snapshot was read. - if _, err := db.Collection("gojobs").InsertOne(ctx, M{"_id": "late", "kind": "repo", "resourceId": "late", "action": "prepare", "state": "failed"}); err != nil { - t.Error(err) - } - if _, err := db.Collection(collection("repo")).InsertOne(ctx, M{"repoId": "late", "status": "error"}); err != nil { - t.Error(err) - } - if _, err := db.Collection("gojobs").UpdateOne(ctx, M{"_id": "became-active"}, M{"$set": M{"state": "active"}}); err != nil { - t.Error(err) - } - }) - }} - observed, err := mongo.Connect(options.Client().ApplyURI(os.Getenv("GO_TEST_MONGODB_URI")).SetBSONOptions(&options.BSONOptions{DefaultDocumentM: true}).SetMonitor(monitor)) - if err != nil { - t.Fatal(err) - } - defer observed.Disconnect(ctx) - s.Store.DB = observed.Database(db.Name()) - result, err := s.retryFailedJobs(ctx, "prepare") - s.Store.DB = db - if err != nil || number(result["total"]) != invalid+3 || number(result["retried"]) != 1 { - t.Fatal("wrong snapshot/partial retry counts", result, err) - } - for id, want := range map[string]string{"tail": "waiting", "bad": "failed", "late": "failed", "became-active": "active", "already-active": "active", "remove-good": "failed", "invalid-099999": "failed"} { - row, err := s.Store.one(ctx, "gojobs", M{"_id": id}) - if err != nil || row["state"] != want { - t.Fatal("job state changed incorrectly", id, row["state"], want, err) - } - if id == "tail" && number(row["attempts"]) != 0 { - t.Fatal("attempts not reset") - } - } - for id, want := range map[string]string{"tail": "preparing", "bad": "error", "late": "error", "became-active": "ready", "untouched": "error"} { - row, err := s.Store.one(ctx, collection("repo"), M{"repoId": id}) - if err != nil || row["status"] != want { - t.Fatal("resource state changed incorrectly", id, row["status"], want, err) - } - } - // A job-state write failure must not prevent other retries in the same queue. - if _, err := db.Collection("gojobs").InsertOne(ctx, M{"_id": "remove-bad", "action": "remove", "state": "failed"}); err != nil { - t.Fatal(err) - } - if err := db.RunCommand(ctx, bson.D{{Key: "collMod", Value: "gojobs"}, {Key: "validator", Value: M{"$or": []M{{"_id": M{"$ne": "remove-bad"}}, {"state": "failed"}}}}, {Key: "validationLevel", Value: "strict"}, {Key: "validationAction", Value: "error"}}).Err(); err != nil { - t.Fatal(err) - } - result, err = s.retryFailedJobs(ctx, "remove") - if err != nil || number(result["total"]) != 2 || number(result["retried"]) != 1 { - t.Fatal("job write failure stopped retries", result, err) - } - bad, err := s.Store.one(ctx, "gojobs", M{"_id": "remove-bad"}) - if err != nil || bad["state"] != "failed" { - t.Fatal("failed retry lost job", err) - } - }) -} diff --git a/backend/internal/server/jobs.go b/backend/internal/server/jobs.go deleted file mode 100644 index e5e88af..0000000 --- a/backend/internal/server/jobs.go +++ /dev/null @@ -1,462 +0,0 @@ -package server - -import ( - "context" - "errors" - "github.com/tdurieux/anonymous_github/backend/internal/provider" - "github.com/tdurieux/anonymous_github/backend/internal/security" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/mongo" - "go.mongodb.org/mongo-driver/v2/mongo/options" - "path" - "strconv" - "strings" - "sync" - "time" -) - -// Jobs use a separate collection. The offline handoff tool reads BullMQ via -// its public API; runtime workers never interpret its private Redis format. -func (s *Server) enqueue(ctx context.Context, kind, id, action string) error { - // Imported BullMQ jobs retain their individual identities. Maintenance - // must not create a second canonical job while one of them is live. - var pending M - err := s.Store.DB.Collection("gojobs").FindOne(ctx, M{"kind": kind, "resourceId": id, "action": action, "state": M{"$in": []string{"active", "waiting", "delayed"}}}, options.FindOne().SetProjection(M{"_id": 1})).Decode(&pending) - if err == nil { - return nil - } - if !errors.Is(err, mongo.ErrNoDocuments) { - return err - } - key := kind + ":" + id + ":" + action - _, err = s.Store.DB.Collection("gojobs").UpdateOne(ctx, M{"_id": key, "state": M{"$nin": []string{"active", "waiting", "delayed"}}}, M{"$set": M{"kind": kind, "resourceId": id, "action": action, "state": "waiting", "attempts": 0, "priority": 0, "availableAt": time.Now(), "createdAt": time.Now()}}, options.UpdateOne().SetUpsert(true)) - if mongo.IsDuplicateKeyError(err) { - return nil - } - return err -} - -var workerQueues = [...]struct { - name string - concurrency int -}{ - {"download", 3}, - {"remove", 5}, - {"cache", 5}, -} - -func (s *Server) RunJobs(ctx context.Context) { - s.removalRecoveryPending.Store(true) - s.recoverImportedRemovalJobs(ctx) - var workers sync.WaitGroup - for _, queue := range workerQueues { - for i := 0; i < queue.concurrency; i++ { - workers.Go(func() { s.jobLoop(ctx, queue.name) }) - } - } - defer workers.Wait() - ticker := time.NewTicker(time.Minute) - defer ticker.Stop() - for { - select { - case <-ctx.Done(): - return - case <-ticker.C: - s.maintenance(ctx) - } - } -} -func (s *Server) jobLoop(ctx context.Context, queue string) { - if ctx.Err() != nil { - return - } - for i, definition := range workerQueues { - if definition.name == queue { - s.jobWorkerCounts[i].Add(1) - defer s.jobWorkerCounts[i].Add(-1) - break - } - } - - allowed := queueActions(queue) - if len(allowed) == 0 { - return - } - for ctx.Err() == nil { - token, err := security.RandomToken() - if err != nil { - return - } - now := time.Now() - paused, pauseErr := s.Store.Redis.Exists(ctx, "go:pause:"+queue).Result() - if pauseErr != nil || paused != 0 { - select { - case <-ctx.Done(): - return - case <-time.After(time.Second): - continue - } - } - var job M - err = s.Store.DB.Collection("gojobs").FindOneAndUpdate(ctx, M{"action": M{"$in": allowed}, "$or": []M{{"state": M{"$in": []string{"waiting", "delayed"}}, "availableAt": M{"$lte": now}}, {"state": "active", "leaseUntil": M{"$lt": now}}}}, M{"$set": M{"state": "active", "lease": token, "leaseUntil": now.Add(2 * time.Minute), "startedAt": now}, "$inc": M{"attempts": 1}}, options.FindOneAndUpdate().SetSort(bson.D{{Key: "priority", Value: 1}, {Key: "availableAt", Value: 1}, {Key: "queueOrder", Value: 1}, {Key: "createdAt", Value: 1}, {Key: "_id", Value: 1}}).SetReturnDocument(options.After)).Decode(&job) - if err != nil { - select { - case <-ctx.Done(): - return - case <-time.After(time.Second): - continue - } - } - work, cancel := context.WithTimeout(ctx, 90*time.Second) - jobStarted := time.Now() - err = s.runJob(work, job) - if _, delayed := jobRateLimit(job, err, time.Now()); !delayed { - s.queueMetric(ctx, job, err != nil, time.Since(jobStarted)) - } - cancel() - s.finishJob(ctx, job, err, time.Now()) - } -} -func (s *Server) runJob(ctx context.Context, job M) (jobErr error) { - kind, id, action := str(job["kind"]), str(job["resourceId"]), str(job["action"]) - if collection(kind) == "" { - return errors.New("invalid_job") - } - r, err := s.Store.one(ctx, collection(kind), resourceFilter(kind, id)) - if err != nil || r == nil { - return err - } - if action == "cache" { - if kind == "repo" { - return s.resetContentCache(ctx, r) - } - return s.content.Remove(ctx, id, "") - } - if action == "prepare" { - defer func() { - if jobErr == nil { - return - } - if reset, limited := jobRateLimit(job, jobErr, time.Now()); limited { - // A stale worker cannot put a removed, reconnected, or replaced - // resource back in the queue. - _, err := s.Store.update(ctx, collection(kind), revisionFilter(r), M{"$set": M{"status": "queue", "statusDate": time.Now(), "statusMessage": "rate_limited:" + strconv.FormatInt(reset.UnixMilli(), 10)}}) - if err != nil { - jobErr = err - } - return - } - if number(job["attempts"]) >= jobMaxAttempts(job) { - code := "preparation_failed" - var api *APIError - if errors.As(providerFailure(jobErr), &api) { - code = api.Code - } - s.Store.update(ctx, collection(kind), revisionFilter(r), M{"$set": M{"status": "error", "statusDate": time.Now(), "statusMessage": code}}) - } - }() - } - if action == "remove" || action == "expire" { - expected, target := "removing", "removed" - if action == "expire" { - expected, target = "expiring", "expired" - } - if str(r["status"]) != expected { - if action != "remove" { - return nil - } - r, err = s.recoverImportedRemoval(ctx, job, r) - if err != nil || r == nil { - return err - } - } - if kind == "repo" { - snapshot, snapshotErr := s.snapshotRemoval(ctx, r) - if snapshotErr != nil || snapshot == nil { - return snapshotErr - } - if s.pool != nil { - s.pool.RemoveResults(id) - } - if err = s.deleteRemovalSnapshot(ctx, id, snapshot); err != nil { - return err - } - } - set := M{"status": target, "statusDate": time.Now(), "size": M{"storage": 0, "file": 0}, "isReseted": true} - if kind == "gist" { - set["gist"] = clearedDocumentPayload(kind, r["gist"]) - } - if kind == "pr" { - set["pullRequest"] = clearedDocumentPayload(kind, r["pullRequest"]) - } - _, err = s.Store.update(ctx, collection(kind), revisionFilter(r), M{"$set": set}) - return err - } - if str(r["status"]) != "preparing" && str(r["status"]) != "queue" && str(r["status"]) != "download" { - return nil - } - if kind == "repo" { - return s.prepareTree(ctx, r) - } - return s.prepareEmbedded(ctx, kind, r) -} -func (s *Server) prepareTree(ctx context.Context, r M) error { - p, a, err := s.repositoryProvider(r) - if err != nil { - return err - } - if err = p.Authorize(ctx, a); err != nil { - return err - } - var files []provider.Entry - truncated := []string{} - if partial, ok := p.(provider.PartialTrees); ok { - files, truncated, err = partial.TreeWithTruncation(ctx, a) - } else { - files, err = p.Tree(ctx, a) - } - if err != nil { - return err - } - for _, folder := range truncated { - if folder == "" { - continue - } - normalized, err := security.RelativePath(folder) - if err != nil || normalized != folder { - return fail("invalid_file_path", 422) - } - } - entries := make([]any, 0, len(files)) - for _, f := range files { - kind := "blob" - if f.Directory { - kind = "tree" - } - if f.Size < 0 { - return fail("invalid_file_size", 422) - } - entries = append(entries, M{"path": f.Path, "sha": f.Revision, "size": f.Size, "type": kind}) - } - generation, err := security.RandomToken() - if err != nil { - return err - } - registered, err := s.Store.update(ctx, "anonymizedrepositories", revisionFilter(r), M{"$push": M{"stagedFileTrees": M{"generation": generation, "until": time.Now().Add(5 * time.Minute)}}}) - if err != nil { - return err - } - if !registered { - return fail("repository_changed", 409) - } - rows := []any{} - var total int64 - for _, value := range entries { - item := obj(value) - p, err := security.RelativePath(str(item["path"])) - if err != nil { - return fail("invalid_file_path", 422) - } - kind := str(item["type"]) - if kind != "blob" && kind != "tree" { - continue - } - dir, name := path.Split(p) - row := M{"repoId": r["repoId"], "treeGeneration": generation, "treeStaged": true, "name": name, "path": strings.TrimSuffix(dir, "/"), "sha": item["sha"]} - if kind == "blob" { - row["size"] = number(item["size"]) - total += number(item["size"]) - } - rows = append(rows, row) - } - if len(rows) > 0 { - if _, err = s.Store.DB.Collection("files").InsertMany(ctx, rows); err != nil { - return err - } - } - set := M{"treeGeneration": generation, "status": "ready", "statusDate": time.Now(), "publishedAt": time.Now(), "size": M{"storage": total, "file": len(rows)}, "sizeComputedAt": time.Now(), "truncatedFolders": truncated} - change := M{"$set": set, "$unset": M{"statusMessage": "", "pathIndexKey": "", "pathIndexBuiltAt": ""}} - change["$addToSet"] = M{"retiredTreeGenerations": str(r["treeGeneration"])} - if str(obj(r["source"])["type"]) != "Zip" { - obj(change["$addToSet"])["retiredContentPrefixes"] = contentPrefix(r) - if r["contentCacheVersion"] == nil { - set["contentCacheVersion"] = 1 - set["legacyContentCleanupPending"] = true - } - } - publication := treePublicationFilter(r, generation, time.Now()) - saved, err := s.Store.update(ctx, "anonymizedrepositories", publication, change) - if err != nil || !saved { - s.Store.DB.Collection("files").DeleteMany(ctx, M{"repoId": r["repoId"], "treeGeneration": generation}) - if err != nil { - return err - } - return fail("repository_changed", 409) - } - _, err = s.Store.DB.Collection("files").UpdateMany(ctx, M{"repoId": r["repoId"], "treeGeneration": generation}, M{"$unset": M{"treeStaged": ""}}) - if err != nil { - return err - } - _, err = s.Store.update(ctx, "anonymizedrepositories", M{"_id": r["_id"], "treeGeneration": generation}, M{"$pull": M{"stagedFileTrees": M{"generation": generation}}}) - return err -} -func (s *Server) prepareEmbedded(ctx context.Context, kind string, r M) error { - payload, err := s.downloadEmbedded(ctx, kind, r) - if err != nil { - return err - } - - field := "gist" - if kind == "pr" { - field = "pullRequest" - } - saved, err := s.Store.update(ctx, collection(kind), revisionFilter(r), M{"$set": M{field: payload, "status": "ready", "statusDate": time.Now(), "anonymizeDate": time.Now()}, "$unset": M{"statusMessage": ""}}) - if err != nil { - return err - } - if !saved { - return fail("repository_changed", 409) - } - return nil -} -func (s *Server) maintenance(ctx context.Context) { - s.recoverImportedRemovalJobs(ctx) - if s.pool != nil { - s.pool.PruneResults() - } - s.snapshotStats(ctx) - s.cleanupTrees(ctx) - if err := s.repairPendingMetadata(ctx); err != nil { - s.recordError(ctx, err) - } - s.reconcileInstallations(ctx) - s.reconcileGrants(ctx) - s.replayConferenceMemberships(ctx, "") - conferences, e := s.Store.list(ctx, "conferences", M{"status": "ready", "endDate": M{"$lte": time.Now()}}, 1000, nil) - if e == nil { - for _, c := range conferences { - current, err := s.reconcileConference(ctx, c) - if err == nil && current != nil { - s.expireConference(ctx, current) - } - } - } - for _, kind := range []string{"repo", "pr", "gist"} { - rows, err := s.Store.list(ctx, collection(kind), M{"$or": []M{{"status": M{"$in": []string{"preparing", "queue", "download", "removing", "expiring"}}}, {"status": "ready", "options.expirationMode": M{"$ne": "never"}, "options.expirationDate": M{"$lte": time.Now()}}}}, 1000, nil) - if err != nil { - continue - } - for _, r := range rows { - action := "prepare" - switch str(r["status"]) { - case "ready": - if s.checkResource(ctx, kind, r) == nil { - continue - } - action = "expire" - case "expiring": - action = "expire" - case "removing": - action = "remove" - } - s.enqueue(ctx, kind, str(r[idKey(kind)]), action) - } - } -} - -func treePublicationFilter(r M, generation string, now time.Time) M { - f := revisionFilter(r) - f["stagedFileTrees"] = M{"$elemMatch": M{"generation": generation, "until": M{"$gt": now}}} - return f -} -func (s *Server) cleanupTrees(ctx context.Context) { - rows, e := s.Store.list(ctx, collection("repo"), M{"$or": []M{{"stagedFileTrees.until": M{"$lte": time.Now()}}, {"retiredTreeGenerations": M{"$exists": true}}, {"retiredContentPrefixes": M{"$exists": true}}, {"legacyContentCleanupPending": true}}}, 1000, nil) - if e != nil { - return - } - for _, r := range rows { - s.cleanupRepositoryTrees(ctx, r) - s.cleanupContent(ctx, r) - } - s.cleanupStagedRows(ctx) -} -func (s *Server) cleanupRepositoryTrees(ctx context.Context, r M) error { - now := time.Now() - for _, v := range arr(r["stagedFileTrees"]) { - stage := obj(v) - generation := str(stage["generation"]) - if generation == "" || date(stage["until"]).After(now) { - continue - } - _, e := s.Store.update(ctx, collection("repo"), M{"_id": r["_id"], "treeGeneration": M{"$ne": generation}, "stagedFileTrees": M{"$elemMatch": M{"generation": generation, "until": M{"$lte": now}}}}, M{"$pull": M{"stagedFileTrees": M{"generation": generation}}, "$addToSet": M{"retiredTreeGenerations": generation}}) - if e != nil { - return e - } - } - current, e := s.Store.one(ctx, collection("repo"), M{"_id": r["_id"]}) - if e != nil || current == nil { - return e - } - for _, generation := range stringsOf(current["retiredTreeGenerations"]) { - if generation == str(current["treeGeneration"]) { - continue - } - query := M{"repoId": current["repoId"], "treeGeneration": generation} - if generation == "" { - query["treeGeneration"] = M{"$exists": false} - } - if _, e = s.Store.DB.Collection("files").DeleteMany(ctx, query); e != nil { - return e - } - if _, e = s.Store.update(ctx, collection("repo"), M{"_id": current["_id"]}, M{"$pull": M{"retiredTreeGenerations": generation}}); e != nil { - return e - } - } - for _, field := range []string{"retiredTreeGenerations", "stagedFileTrees"} { - if _, e = s.Store.update(ctx, collection("repo"), M{"_id": r["_id"], field + ".0": M{"$exists": false}}, M{"$unset": M{field: ""}}); e != nil { - return e - } - } - return nil -} - -// Inserts may finish after their lease was retired. Row markers let maintenance -// discover and remove that late output even after the staging record is gone. -func (s *Server) cleanupStagedRows(ctx context.Context) { - cursor, e := s.Store.DB.Collection("files").Aggregate(ctx, []M{{"$match": M{"treeStaged": true}}, {"$group": M{"_id": M{"repoId": "$repoId", "generation": "$treeGeneration"}}}, {"$limit": 1000}}) - if e != nil { - return - } - defer cursor.Close(ctx) - var rows []M - if cursor.All(ctx, &rows) != nil { - return - } - for _, row := range rows { - key := obj(row["_id"]) - id, generation := str(key["repoId"]), str(key["generation"]) - if id == "" || generation == "" { - continue - } - r, e := s.Store.one(ctx, collection("repo"), M{"repoId": id}) - if e != nil { - continue - } - q := M{"repoId": id, "treeGeneration": generation, "treeStaged": true} - if r != nil && str(r["treeGeneration"]) == generation { - s.Store.DB.Collection("files").UpdateMany(ctx, q, M{"$unset": M{"treeStaged": ""}}) - continue - } - live := false - for _, v := range arr(r["stagedFileTrees"]) { - stage := obj(v) - if str(stage["generation"]) == generation && date(stage["until"]).After(time.Now()) { - live = true - break - } - } - if !live { - s.Store.DB.Collection("files").DeleteMany(ctx, q) - } - } -} diff --git a/backend/internal/server/json_http.go b/backend/internal/server/json_http.go deleted file mode 100644 index 5eb4585..0000000 --- a/backend/internal/server/json_http.go +++ /dev/null @@ -1,150 +0,0 @@ -package server - -import ( - "bytes" - "crypto/sha1" - "encoding/base64" - "fmt" - "net/http" - "regexp" - "strings" - "time" -) - -// ETag and freshness rules follow the MIT-licensed etag and fresh packages. -// See LICENSE.etag and LICENSE.fresh. -func entityTag(body []byte) string { - digest := sha1.Sum(body) - return fmt.Sprintf(`"%x-%s"`, len(body), base64.RawStdEncoding.EncodeToString(digest[:])) -} - -var requestNoCache = regexp.MustCompile(`(?:^|,)\s*no-cache\s*(?:,|$)`) - -func responseFresh(r *http.Request, status int, header http.Header) bool { - if r.Method != "GET" && r.Method != "HEAD" && r.Method != "QUERY" { - return false - } - if !(status >= 200 && status < 300 || status == 304) { - return false - } - if requestNoCache.MatchString(strings.Join(r.Header.Values("Cache-Control"), ", ")) { - return false - } - match := strings.Join(r.Header.Values("If-None-Match"), ", ") - if match != "" { - if match == "*" { - return true - } - tag := header.Get("ETag") - if tag == "" { - return false - } - for _, token := range strings.Split(match, ",") { - token = strings.Trim(token, " ") - if token == tag || token == "W/"+tag || "W/"+token == tag { - return true - } - } - return false - } - if since := r.Header.Get("If-Modified-Since"); since != "" { - modified, ok := responseHTTPDate(header.Get("Last-Modified")) - limit, valid := responseHTTPDate(since) - return ok && valid && !modified.After(limit) - } - return false -} -func responseHTTPDate(value string) (time.Time, bool) { - if parsed, err := http.ParseTime(value); err == nil { - return parsed, true - } - parsed := date(value) - return parsed, !parsed.IsZero() -} -func responseRequest(w http.ResponseWriter) *http.Request { - for i := 0; i < 16; i++ { - if compressed, ok := w.(*compressionWriter); ok { - return compressed.request - } - if wrapped, ok := w.(interface{ Unwrap() http.ResponseWriter }); ok { - w = wrapped.Unwrap() - } else { - break - } - } - return nil -} - -type jsonEntityWriter struct { - writer http.ResponseWriter - status int - started bool -} - -func (w *jsonEntityWriter) Write(encoded []byte) (int, error) { - w.started = true - body := bytes.TrimSuffix(encoded, []byte("\n")) - body = jsonSeparators(body) - header := w.writer.Header() - if header.Get("ETag") == "" { - header.Set("ETag", entityTag(body)) - } - status := w.status - if status == 0 { - status = 200 - } - request := responseRequest(w.writer) - if request != nil && responseFresh(request, status, header) { - status = 304 - } - header.Set("Content-Length", fmt.Sprint(len(body))) - if status == 204 || status == 304 { - header.Del("Content-Type") - header.Del("Content-Length") - header.Del("Transfer-Encoding") - w.writer.WriteHeader(status) - return len(encoded), nil - } - if status == 205 { - header.Set("Content-Length", "0") - header.Del("Transfer-Encoding") - w.writer.WriteHeader(status) - return len(encoded), nil - } - w.writer.WriteHeader(status) - if request != nil && request.Method == "HEAD" { - return len(encoded), nil - } - n, err := w.writer.Write(body) - if err == nil && n == len(body) { - return len(encoded), nil - } - return n, err -} - -// JSON.stringify leaves U+2028/U+2029 literal. Skip complete escape pairs so a -// literal backslash followed by "u2028" remains a literal string, not a rune. -func jsonSeparators(data []byte) []byte { - if !bytes.Contains(data, []byte(`\u202`)) { - return data - } - out := make([]byte, 0, len(data)) - for i := 0; i < len(data); i++ { - if data[i] == '\\' && i+1 < len(data) { - if i+5 < len(data) && (string(data[i:i+6]) == `\u2028` || string(data[i:i+6]) == `\u2029`) { - if data[i+5] == '8' { - out = append(out, []byte("\u2028")...) - } else { - out = append(out, []byte("\u2029")...) - } - i += 5 - continue - } - out = append(out, data[i], data[i+1]) - i++ - continue - } - out = append(out, data[i]) - } - return out -} diff --git a/backend/internal/server/json_http_integration_test.go b/backend/internal/server/json_http_integration_test.go deleted file mode 100644 index 9c5e527..0000000 --- a/backend/internal/server/json_http_integration_test.go +++ /dev/null @@ -1,70 +0,0 @@ -package server - -import ( - "net/http/httptest" - "testing" -) - -func runConditionalResponseIntegration(t *testing.T, s *Server, p *fixtureProvider, ownerToken, otherToken string) { - t.Run("conditional responses preserve access checks", func(t *testing.T) { - call := func(path, token, tag, control string) *httptest.ResponseRecorder { - request := httptest.NewRequest("GET", path, nil) - request.RemoteAddr = "192.0.2.120:1234" - if token != "" { - request.Header.Set("Authorization", "Bearer "+token) - } - if tag != "" { - request.Header.Set("If-None-Match", tag) - } - if control != "" { - request.Header.Set("Cache-Control", control) - } - recorder := httptest.NewRecorder() - s.ServeHTTP(recorder, request) - return recorder - } - path := "/api/repo/second-provider" - first := call(path, ownerToken, "", "") - tag := first.Header().Get("ETag") - if first.Code != 200 || tag == "" { - t.Fatal("private response", first.Code, first.Body.String()) - } - hit := call(path, ownerToken, "W/"+tag, "") - if hit.Code != 304 || hit.Body.Len() != 0 || hit.Header().Get("Content-Type") != "" || hit.Header().Get("Content-Length") != "" { - t.Fatal("private revalidation", hit.Code, hit.Header(), hit.Body.String()) - } - for _, token := range []string{"", otherToken} { - denied := call(path, token, "*", "") - if denied.Code < 400 { - t.Fatal("conditional private response bypassed access", denied.Code) - } - } - reload := call(path, ownerToken, tag, "no-cache") - if reload.Code != 200 || reload.Body.String() != first.Body.String() { - t.Fatal("reload returned stale response", reload.Code, reload.Body.String()) - } - path = "/api/repo/second-provider/file/XXXX-1.txt" - first = call(path, "", "", "") - tag = first.Header().Get("ETag") - if first.Code != 200 || tag == "" { - t.Fatal("file response", first.Code, first.Body.String()) - } - opened := p.openCount.Load() - for _, match := range []string{"W/" + tag, `"other", ` + tag, "*"} { - hit = call(path, "", match, "") - if hit.Code != 304 || hit.Body.Len() != 0 || p.openCount.Load() != opened { - t.Fatal("file revalidation", hit.Code, hit.Body.String()) - } - } - p.revoked = true - denied := call(path, "", "*", "") - p.revoked = false - if denied.Code < 400 { - t.Fatal("conditional file bypassed revoked provider", denied.Code) - } - reload = call(path, "", tag, "no-cache") - if reload.Code != 200 || reload.Body.String() != first.Body.String() { - t.Fatal("file reload", reload.Code, reload.Body.String()) - } - }) -} diff --git a/backend/internal/server/json_http_test.go b/backend/internal/server/json_http_test.go deleted file mode 100644 index ab34c60..0000000 --- a/backend/internal/server/json_http_test.go +++ /dev/null @@ -1,100 +0,0 @@ -package server - -import ( - "encoding/json" - "errors" - "io" - "math" - "net/http" - "net/http/httptest" - "os" - "strconv" - "strings" - "testing" -) - -func TestJSONHTTPContracts(t *testing.T) { - raw, err := os.ReadFile("testdata/json-http.json") - if err != nil { - t.Fatal(err) - } - var cases []struct { - Name, Method, Match, Control, Since, Modified, Preset string - Status int - Value any - Expected struct { - Status int - ETag, Type, Length, Body string - } - } - if err = json.Unmarshal(raw, &cases); err != nil { - t.Fatal(err) - } - server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - index, _ := strconv.Atoi(r.Header.Get("X-Fixture")) - c := cases[index] - response := &compressionWriter{ResponseWriter: w, request: r} - if c.Modified != "" { - response.Header().Set("Last-Modified", c.Modified) - } - if c.Preset != "" { - response.Header().Set("ETag", c.Preset) - } - writeJSONStatus(response, c.Value, c.Status) - if err := response.finish(); err != nil { - t.Error(err) - } - })) - defer server.Close() - transport := &http.Transport{DisableCompression: true} - defer transport.CloseIdleConnections() - client := &http.Client{Transport: transport} - for i, c := range cases { - t.Run(c.Name, func(t *testing.T) { - request, _ := http.NewRequest(c.Method, server.URL, nil) - request.Header.Set("X-Fixture", strconv.Itoa(i)) - if c.Match != "" { - request.Header.Set("If-None-Match", c.Match) - } - if c.Control != "" { - request.Header.Set("Cache-Control", c.Control) - } - if c.Since != "" { - request.Header.Set("If-Modified-Since", c.Since) - } - response, err := client.Do(request) - if err != nil { - t.Fatal(err) - } - defer response.Body.Close() - body, err := io.ReadAll(response.Body) - if err != nil { - t.Fatal(err) - } - if response.StatusCode != c.Expected.Status || response.Header.Get("ETag") != c.Expected.ETag || response.Header.Get("Content-Type") != c.Expected.Type || response.Header.Get("Content-Length") != c.Expected.Length || string(body) != c.Expected.Body { - t.Fatalf("got status=%d headers=%v body=%q; want %+v", response.StatusCode, response.Header, body, c.Expected) - } - }) - } -} - -type failedJSON struct{} - -func (failedJSON) MarshalJSON() ([]byte, error) { return nil, errors.New("synthetic-private-value") } -func TestJSONSerializationFailures(t *testing.T) { - cyclic := M{} - cyclic["self"] = cyclic - for _, value := range []any{failedJSON{}, M{"channel": make(chan int)}, cyclic} { - recorder := httptest.NewRecorder() - recorder.Header().Set("ETag", `"stale"`) - writeJSONStatus(recorder, value, 201) - if recorder.Code != 500 || recorder.Body.String() != `{"error":"internal_error"}` || strings.Contains(recorder.Body.String(), "private") || recorder.Header().Get("ETag") == `"stale"` { - t.Fatal(recorder.Code, recorder.Header(), recorder.Body.String()) - } - } - recorder := httptest.NewRecorder() - writeJSON(recorder, M{"values": []any{math.NaN(), math.Inf(1), math.Inf(-1), float32(math.Inf(1))}}) - if recorder.Code != 200 || recorder.Body.String() != `{"values":[null,null,null,null]}` { - t.Fatal(recorder.Code, recorder.Body.String()) - } -} diff --git a/backend/internal/server/json_response.go b/backend/internal/server/json_response.go deleted file mode 100644 index 258bdc7..0000000 --- a/backend/internal/server/json_response.go +++ /dev/null @@ -1,163 +0,0 @@ -package server - -import ( - "encoding/json" - "errors" - "fmt" - "math" - "reflect" - "time" - - "go.mongodb.org/mongo-driver/v2/bson" -) - -// responseJSON normalizes native dates at the HTTP boundary only. Persistence, -// signatures, cache fingerprints and upstream requests keep their own encodings. -// Provider payloads use string-keyed maps and arrays, as do MongoDB documents. -// Strings are deliberately untouched: date-looking file contents are not dates. -func responseJSON(value any) any { return responseJSONAt(value, 0) } - -func responseJSONAt(value any, depth int) any { - if depth > 100 { - return invalidResponseDepth{} - } - switch v := value.(type) { - case float64: - if math.IsNaN(v) || math.IsInf(v, 0) { - return nil - } - return v - case float32: - if math.IsNaN(float64(v)) || math.IsInf(float64(v), 0) { - return nil - } - return v - case time.Time: - return responseDate(v) - case *time.Time: - if v == nil { - return nil - } - return responseDate(*v) - case bson.DateTime: - return responseDate(v.Time()) - case *bson.DateTime: - if v == nil { - return nil - } - return responseDate(v.Time()) - case M: - if v == nil { - return v - } - out := make(M, len(v)) - for k, item := range v { - out[k] = responseJSONAt(item, depth+1) - } - return out - case map[string]any: - if v == nil { - return v - } - out := make(map[string]any, len(v)) - for k, item := range v { - out[k] = responseJSONAt(item, depth+1) - } - return out - case []M: - if v == nil { - return v - } - out := make([]any, len(v)) - for i, item := range v { - out[i] = responseJSONAt(item, depth+1) - } - return out - case []any: - if v == nil { - return v - } - out := make([]any, len(v)) - for i, item := range v { - out[i] = responseJSONAt(item, depth+1) - } - return out - case bson.A: - if v == nil { - return v - } - out := make([]any, len(v)) - for i, item := range v { - out[i] = responseJSONAt(item, depth+1) - } - return out - case bson.D: - if v == nil { - return v - } - out := make(bson.D, len(v)) - for i, entry := range v { - out[i] = bson.E{Key: entry.Key, Value: responseJSONAt(entry.Value, depth+1)} - } - return out - default: - // Adapters may use typed maps/slices rather than []any. Preserve custom - // JSON encoders and byte slices, whose wire representations differ. - if value == nil { - return nil - } - if _, custom := value.(json.Marshaler); custom { - return value - } - rv := reflect.ValueOf(value) - switch rv.Kind() { - case reflect.Float32, reflect.Float64: - if math.IsNaN(rv.Float()) || math.IsInf(rv.Float(), 0) { - return nil - } - return value - case reflect.Map: - if rv.IsNil() || rv.Type().Key().Kind() != reflect.String { - return value - } - out := make(map[string]any, rv.Len()) - for _, key := range rv.MapKeys() { - out[key.String()] = responseJSONAt(rv.MapIndex(key).Interface(), depth+1) - } - return out - case reflect.Slice, reflect.Array: - if rv.Kind() == reflect.Slice && (rv.IsNil() || rv.Type().Elem().Kind() == reflect.Uint8) { - return value - } - out := make([]any, rv.Len()) - for i := range out { - out[i] = responseJSONAt(rv.Index(i).Interface(), depth+1) - } - return out - case reflect.Pointer: - if rv.IsNil() { - return nil - } - return responseJSONAt(rv.Elem().Interface(), depth+1) - } - return value - } -} - -func responseDate(value time.Time) any { - // JavaScript Date's supported range is inclusive and bounded in milliseconds. - utc := value.UTC() - if utc.Before(time.UnixMilli(-8640000000000000)) || utc.After(time.UnixMilli(8640000000000000)) { - return nil - } - if year := utc.Year(); year < 0 || year > 9999 { - return fmt.Sprintf("%+07d-%s", year, utc.Format("01-02T15:04:05.000Z")) - } - return utc.Format("2006-01-02T15:04:05.000Z") -} - -type invalidResponseDepth struct{} - -func (invalidResponseDepth) MarshalJSON() ([]byte, error) { - return nil, errors.New("response_nesting_limit") -} diff --git a/backend/internal/server/json_response_test.go b/backend/internal/server/json_response_test.go deleted file mode 100644 index 05c6b9e..0000000 --- a/backend/internal/server/json_response_test.go +++ /dev/null @@ -1,134 +0,0 @@ -package server - -import ( - "encoding/json" - "net/http/httptest" - "os" - "reflect" - "strings" - "testing" - "time" - - "go.mongodb.org/mongo-driver/v2/bson" -) - -func TestJavaScriptDateOutput(t *testing.T) { - raw, err := os.ReadFile("testdata/dates.json") - if err != nil { - t.Fatal(err) - } - var cases []struct { - Milliseconds int64 - Expected any - } - if err := json.Unmarshal(raw, &cases); err != nil { - t.Fatal(err) - } - for _, c := range cases { - date := time.UnixMilli(c.Milliseconds) - bsonDate := bson.DateTime(c.Milliseconds) - for _, input := range []any{date, date.In(time.FixedZone("offset", 19800)), &date, bsonDate, &bsonDate} { - w := httptest.NewRecorder() - writeJSON(w, M{"date": input}) - var actual M - if err := json.Unmarshal(w.Body.Bytes(), &actual); err != nil { - t.Fatal(err) - } - if !reflect.DeepEqual(actual["date"], c.Expected) { - t.Fatalf("%d (%T): got %s; expected %#v", c.Milliseconds, input, w.Body, c.Expected) - } - } - } -} - -func TestResponseJSONNestedDates(t *testing.T) { - date := time.Date(2026, 1, 2, 3, 4, 5, 123456789, time.UTC) - id := bson.NewObjectID() - var nilDate *time.Time - input := M{ - "rows": []M{{"date": date}}, - "provider": map[string]any{"comments": []any{M{"date": &date}}}, - "bson": bson.A{bson.NewDateTimeFromTime(date)}, - "dateString": "2026-01-02T03:04:05Z", - "id": id, "bytes": []byte{1, 2, 3}, "raw": json.RawMessage(`{"date":"unchanged"}`), - "nulls": []any{nilDate, M(nil), []M(nil), []any(nil), bson.A(nil), map[string]any(nil)}, - "empty": []any{}, "integer": int64(9007199254740993), - } - w := httptest.NewRecorder() - writeJSON(w, input) - var actual M - if err := json.Unmarshal(w.Body.Bytes(), &actual); err != nil { - t.Fatal(err) - } - expected := M{ - "rows": []any{map[string]any{"date": "2026-01-02T03:04:05.123Z"}}, - "provider": map[string]any{"comments": []any{map[string]any{"date": "2026-01-02T03:04:05.123Z"}}}, - "bson": []any{"2026-01-02T03:04:05.123Z"}, - "dateString": "2026-01-02T03:04:05Z", "id": id.Hex(), "bytes": "AQID", - "raw": map[string]any{"date": "unchanged"}, "nulls": []any{nil, nil, nil, nil, nil, nil}, - "empty": []any{}, "integer": float64(9007199254740993), - } - if !reflect.DeepEqual(actual, expected) { - t.Fatalf("got %s; expected %#v", w.Body, expected) - } - if !reflect.DeepEqual(input["rows"].([]M)[0]["date"], date) { - t.Fatal("response mutated stored data") - } - // Preserve integer bytes without a lossy JSON round trip in the implementation. - var exact map[string]json.RawMessage - if err := json.Unmarshal(w.Body.Bytes(), &exact); err != nil { - t.Fatal(err) - } - if string(exact["integer"]) != "9007199254740993" { - t.Fatal(string(exact["integer"])) - } - if w.Header().Get("Content-Type") != "application/json; charset=utf-8" { - t.Fatal(w.Header()) - } -} - -func TestTypedProviderPayloadDates(t *testing.T) { - type dates map[string]time.Time - type rows []map[string]any - type binary []byte - stamp := time.Date(2026, 1, 2, 3, 4, 5, 0, time.UTC) - typedMap := dates{"created": stamp} - cases := []struct { - value any - expected string - }{ - {rows{{"date": stamp}}, `[{"date":"2026-01-02T03:04:05.000Z"}]`}, - {typedMap, `{"created":"2026-01-02T03:04:05.000Z"}`}, - {&typedMap, `{"created":"2026-01-02T03:04:05.000Z"}`}, - {[]time.Time{stamp}, `["2026-01-02T03:04:05.000Z"]`}, - {[1]time.Time{stamp}, `["2026-01-02T03:04:05.000Z"]`}, - {[]*time.Time{nil, &stamp}, `[null,"2026-01-02T03:04:05.000Z"]`}, - {[]bson.DateTime{bson.NewDateTimeFromTime(stamp)}, `["2026-01-02T03:04:05.000Z"]`}, - {dates(nil), `null`}, {rows(nil), `null`}, {rows{}, `[]`}, - {binary{1, 2, 3}, `"AQID"`}, - {json.RawMessage(`{"date":"untouched"}`), `{"date":"untouched"}`}, - } - for _, c := range cases { - w := httptest.NewRecorder() - writeJSON(w, c.value) - if strings.TrimSpace(w.Body.String()) != c.expected { - t.Fatalf("%T: %s; expected %s", c.value, w.Body, c.expected) - } - } - if !typedMap["created"].Equal(stamp) { - t.Fatal("provider payload mutated") - } - // Ordered BSON documents retain their normal JSON shape, with only dates changed. - original := bson.D{{Key: "date", Value: stamp}} - expected, err := json.Marshal(bson.D{{Key: "date", Value: "2026-01-02T03:04:05.000Z"}}) - if err != nil { - t.Fatal(err) - } - actual, err := json.Marshal(responseJSON(original)) - if err != nil || string(actual) != string(expected) { - t.Fatal(string(actual), string(expected), err) - } - if _, ok := original[0].Value.(time.Time); !ok { - t.Fatal("BSON document mutated") - } -} diff --git a/backend/internal/server/legacy_source.go b/backend/internal/server/legacy_source.go deleted file mode 100644 index d8d46d2..0000000 --- a/backend/internal/server/legacy_source.go +++ /dev/null @@ -1,23 +0,0 @@ -package server - -import ( - "bytes" - "crypto/sha256" - "encoding/hex" - "encoding/json" - - "github.com/tdurieux/anonymous_github/backend/internal/provider" -) - -// Only providers with a content verifier may promote these files. Their -// location or size alone does not establish that they contain the right bytes. -func legacySourcePaths(r M, a provider.Access, entry provider.Entry) []string { - var serialized bytes.Buffer - encoder := json.NewEncoder(&serialized) - encoder.SetEscapeHTML(false) - // JSON.stringify serializes absent array members as null. - _ = encoder.Encode([]any{a.Ref.Commit, entry.Revision, contentGeneration(r), r["contentCacheRevision"]}) - digest := sha256.Sum256(jsonSeparators(bytes.TrimSuffix(serialized.Bytes(), []byte("\n")))) - node := contentPrefix(r) + "/" + hex.EncodeToString(digest[:]) + "/" + entry.Path - return []string{rawCachePath(r, a, entry), node, entry.Path} -} diff --git a/backend/internal/server/legacy_source_integration_test.go b/backend/internal/server/legacy_source_integration_test.go deleted file mode 100644 index d17166f..0000000 --- a/backend/internal/server/legacy_source_integration_test.go +++ /dev/null @@ -1,134 +0,0 @@ -package server - -import ( - "io" - "strings" - "testing" - "time" - - "github.com/tdurieux/anonymous_github/backend/internal/blobcache" - "github.com/tdurieux/anonymous_github/backend/internal/provider" - "go.mongodb.org/mongo-driver/v2/bson" -) - -func runLegacySourceIntegration(t *testing.T, s *Server) { - t.Run("legacy source promotion", func(t *testing.T) { - ctx := t.Context() - original, err := s.Store.one(ctx, collection("repo"), M{"repoId": "second-provider"}) - if err != nil || original == nil { - t.Fatal(original, err) - } - for _, layout := range []int{0, 1, 2} { - for _, mode := range []string{"valid", "corrupt", "short", "unverified", "admission", "revoked", "revoke-during-verification", "remove-during-verification"} { - t.Run(string(rune('0'+layout))+"/"+mode, func(t *testing.T) { - r := selectFields(original, "owner", "source", "providerAccess", "options") - r["_id"] = bson.NewObjectID() - r["repoId"] = "legacy-source-" + r["_id"].(bson.ObjectID).Hex() - r["status"] = "ready" - r["treeGeneration"], r["anonymizeDate"] = "legacy-test", time.Now().Truncate(time.Millisecond) - if _, err := s.Store.DB.Collection(collection("repo")).InsertOne(ctx, r); err != nil { - t.Fatal(err) - } - access, err := s.providerAccess(r) - if err != nil { - t.Fatal(err) - } - entry := provider.Entry{Path: "Alice.txt", Revision: "opaque:legacy", Size: int64(len(fixtureContent))} - name := legacySourcePaths(r, access, entry)[layout] - data := fixtureContent - if mode == "corrupt" || mode == "admission" || mode == "unverified" { - data = strings.Repeat("x", len(fixtureContent)) - } - if mode == "short" { - data = "short" - } - if err := s.content.Put(ctx, str(r["repoId"]), name, strings.NewReader(data), int64(len(data)), 4096); err != nil { - t.Fatal(err) - } - budget := int64(65536) - if mode == "admission" { - budget = 1 - } - cache, err := blobcache.New(ctx, blobcache.Options{Root: t.TempDir(), Budget: budget, MaxObject: 4096}) - if err != nil { - t.Fatal(err) - } - defer cache.Close() - base := &fixtureProvider{} - verified := &verifyingFixture{fixtureProvider: base} - var adapter provider.Repositories = verified - if mode == "unverified" { - adapter = base - } - if mode == "revoked" { - base.revoked = true - } - if mode == "revoke-during-verification" { - verified.afterVerify = func() { base.revoked = true } - } - if mode == "remove-during-verification" { - verified.afterVerify = func() { - if _, err := s.Store.update(ctx, collection("repo"), M{"_id": r["_id"]}, M{"$set": M{"status": "removed"}}); err != nil { - t.Error(err) - } - } - } - serving := &Server{Store: s.Store, content: s.content, sourceCache: cache, cacheMetrics: testCacheMetrics()} - read := func() (string, error) { - body, err := serving.cachedBlob(ctx, r, adapter, access, entry) - if err != nil { - return "", err - } - defer body.Close() - out, err := io.ReadAll(body) - return string(out), err - } - out, err := read() - if mode == "revoked" || mode == "revoke-during-verification" || mode == "remove-during-verification" { - expected := "fixture_access_revoked" - if mode == "remove-during-verification" { - expected = "repository_changed" - } - if err == nil || err.Error() != expected || out != "" || base.openCount.Load() != 0 { - t.Fatal(out, err, base.openCount.Load()) - } - } else { - if err != nil || out != fixtureContent { - t.Fatal(out, err) - } - downloads := int64(1) - if mode == "valid" { - downloads = 0 - } - if base.openCount.Load() != downloads { - t.Fatal("wrong upstream count", base.openCount.Load(), downloads) - } - if mode == "valid" && verified.calls != 1 || mode == "corrupt" && verified.calls != 2 || mode == "admission" && verified.calls != 0 { - t.Fatal("wrong verification count", verified.calls) - } - if mode != "admission" { - if _, err = read(); err != nil || base.openCount.Load() != downloads { - t.Fatal("warm promotion downloaded", err, base.openCount.Load()) - } - } - } - stats, err := cache.Stats(ctx) - if err != nil || stats.ReservedBytes != 0 || stats.ActiveReaders != 0 { - t.Fatal(stats, err) - } - // Promotion leaves legacy bytes in place for rollback; corrupt bytes are - // never trusted merely because a prior attempt encountered the same path. - stored, err := s.content.Read(ctx, str(r["repoId"]), name) - if err != nil { - t.Fatal(err) - } - preserved, err := io.ReadAll(stored) - stored.Close() - if err != nil || string(preserved) != data { - t.Fatal("legacy content changed", err) - } - }) - } - } - }) -} diff --git a/backend/internal/server/legacy_source_test.go b/backend/internal/server/legacy_source_test.go deleted file mode 100644 index 75c5878..0000000 --- a/backend/internal/server/legacy_source_test.go +++ /dev/null @@ -1,28 +0,0 @@ -package server - -import ( - "encoding/json" - "github.com/tdurieux/anonymous_github/backend/internal/provider" - "os" - "testing" -) - -func TestLegacySourcePathContracts(t *testing.T) { - raw, err := os.ReadFile("testdata/legacy-source-paths.json") - if err != nil { - t.Fatal(err) - } - var fixtures []struct { - Record M - Commit, Revision, Path, Expected string - } - if err = json.Unmarshal(raw, &fixtures); err != nil { - t.Fatal(err) - } - for _, f := range fixtures { - paths := legacySourcePaths(f.Record, provider.Access{Ref: provider.Ref{Commit: f.Commit}}, provider.Entry{Path: f.Path, Revision: f.Revision}) - if len(paths) != 3 || paths[1] != f.Expected || paths[2] != f.Path { - t.Fatal(paths, f.Expected) - } - } -} diff --git a/backend/internal/server/maintenance.go b/backend/internal/server/maintenance.go deleted file mode 100644 index b3ffa03..0000000 --- a/backend/internal/server/maintenance.go +++ /dev/null @@ -1,134 +0,0 @@ -package server - -import ( - "github.com/tdurieux/anonymous_github/backend/internal/security" - "go.mongodb.org/mongo-driver/v2/bson" - "strings" - "time" -) - -func (s *Server) maintenanceResource(q *request) (any, error) { - q.W.Header().Set("Cache-Control", "no-store") - r, e := q.resource("repo", true) - if e != nil { - return nil, e - } - if q.R.Method == "GET" { - out := selectFields(r, "repoId", "status", "statusMessage", "statusDate", "settingsSavedAt", "options") - out["source"] = selectFields(obj(r["source"]), "branch", "commit") - return out, nil - } - if str(r["status"]) != "ready" && str(r["status"]) != "error" { - return nil, fail("invalid_status", 409) - } - if len(q.Body) == 0 { - return nil, fail("invalid_settings", 400) - } - set := M{} - for k, v := range q.Body { - switch k { - case "terms": - terms, ok := v.([]any) - if !ok || len(terms) > 1000 { - return nil, fail("invalid_settings", 400) - } - for _, t := range terms { - text, ok := t.(string) - if !ok || text == "" || len([]rune(text)) > 1000 { - return nil, fail("invalid_settings", 400) - } - } - case "update", "image", "pdf", "notebook", "link": - if _, ok := v.(bool); !ok { - return nil, fail("invalid_settings", 400) - } - default: - return nil, fail("invalid_settings", 400) - } - set["options."+k] = v - } - now := time.Now() - set["settingsSavedAt"] = now - ok, e := s.Store.update(q.ctx(), collection("repo"), revisionFilter(r), M{"$set": set}) - if e != nil { - return nil, e - } - if !ok { - return nil, fail("invalid_status", 409) - } - return M{"repoId": r["repoId"], "status": r["status"], "settingsSavedAt": now}, nil -} -func (s *Server) maintenanceTokens(q *request) (any, error) { - q.W.Header().Set("Cache-Control", "no-store") - if q.R.Header.Get("Authorization") != "" || q.SessionID == "" { - return nil, fail("session_required", 401) - } - if q.R.Method == "GET" { - out := []M{} - for _, v := range arr(q.User["apiTokens"]) { - t := obj(v) - if str(t["scope"]) == "repository-maintenance" { - m := selectFields(t, "name", "repoIds", "expiresAt", "createdAt", "lastUsedAt") - m["id"] = t["_id"] - out = append(out, m) - } - } - return out, nil - } - if q.R.Method == "DELETE" { - id, e := oid(q.Params["id"]) - if e != nil { - return nil, fail("invalid_token_id", 400) - } - result, e := s.Store.DB.Collection("users").UpdateOne(q.ctx(), M{"_id": q.User["_id"]}, M{"$pull": M{"apiTokens": M{"_id": id, "scope": "repository-maintenance"}}}) - if e != nil { - return nil, e - } - return M{"removed": result.ModifiedCount}, nil - } - name := str(q.Body["name"]) - ids := stringsOf(q.Body["repoIds"]) - days := number(q.Body["expiresInDays"]) - if q.Body["expiresInDays"] == nil { - days = 30 - } - if strings.TrimSpace(name) == "" || len([]rune(name)) > 80 || len(ids) == 0 || len(ids) > 20 || days < 1 || days > 90 { - return nil, fail("invalid_token_options", 400) - } - seen := map[string]bool{} - unique := []string{} - for _, id := range ids { - if !resourceID.MatchString(id) { - return nil, fail("invalid_token_options", 400) - } - r, e := s.Store.one(q.ctx(), collection("repo"), resourceFilter("repo", id)) - if e != nil { - return nil, e - } - if r == nil { - return nil, fail("repo_not_found", 404) - } - if !canEdit(q.Identity, r) { - return nil, fail("not_authorized", 403) - } - if !seen[id] { - seen[id] = true - unique = append(unique, id) - } - } - token, e := security.RandomToken() - if e != nil { - return nil, e - } - entry := M{"_id": bson.NewObjectID(), "name": strings.TrimSpace(name), "scope": "repository-maintenance", "repoIds": unique, "tokenHash": security.HashToken(token), "createdAt": time.Now(), "expiresAt": time.Now().Add(time.Duration(days) * 24 * time.Hour)} - ok, e := s.Store.update(q.ctx(), "users", M{"_id": q.User["_id"], "apiTokens.50": M{"$exists": false}}, M{"$push": M{"apiTokens": entry}}) - if e != nil { - return nil, e - } - if !ok { - return nil, fail("token_limit_reached", 409) - } - q.W.Header().Set("Content-Type", "application/json; charset=utf-8") - writeJSONStatus(q.W, M{"id": entry["_id"], "name": entry["name"], "repoIds": unique, "expiresAt": entry["expiresAt"], "token": token}, 201) - return written{}, nil -} diff --git a/backend/internal/server/manual_refresh_integration_test.go b/backend/internal/server/manual_refresh_integration_test.go deleted file mode 100644 index 28d1fbc..0000000 --- a/backend/internal/server/manual_refresh_integration_test.go +++ /dev/null @@ -1,155 +0,0 @@ -package server - -import ( - "context" - "go.mongodb.org/mongo-driver/v2/bson" - "net/http/httptest" - "strings" - "testing" - "time" -) - -func runManualRefreshIntegration(t *testing.T, s *Server, p *fixtureProvider, call func(string, string, string, any) *httptest.ResponseRecorder, token string, source M) { - ctx := context.Background() - for _, state := range []string{"waiting", "active", "completed", "failed", "absent"} { - t.Run("manual refresh job/"+state, func(t *testing.T) { - r := M{} - for k, v := range source { - r[k] = v - } - r["_id"] = bson.NewObjectID() - id := "manual-" + state - r["repoId"] = id - r["status"] = "ready" - r["statusDate"] = time.Now() - r["anonymizeDate"] = time.Now().Add(-time.Hour) - if _, e := s.Store.DB.Collection(collection("repo")).InsertOne(ctx, r); e != nil { - t.Fatal(e) - } - key := "repo:" + id + ":prepare" - if state != "absent" { - if _, e := s.Store.DB.Collection("gojobs").InsertOne(ctx, M{"_id": key, "kind": "repo", "resourceId": id, "action": "prepare", "state": state, "finishedAt": time.Now()}); e != nil { - t.Fatal(e) - } - } - calls := 0 - p.onRepository = func() { calls++ } - defer func() { p.onRepository = nil }() - w := call("POST", "/api/repo/"+id+"/refresh", token, nil) - expected := 200 - if state == "waiting" || state == "active" { - expected = 409 - } - if w.Code != expected { - t.Fatal(w.Code, w.Body) - } - current, e := s.Store.one(ctx, collection("repo"), M{"_id": r["_id"]}) - if e != nil { - t.Fatal(e) - } - if str(current["status"]) != "ready" || current["refreshToken"] != nil || !date(current["anonymizeDate"]).Equal(date(r["anonymizeDate"]).Truncate(time.Millisecond)) { - t.Fatal("unchanged repository modified or lease leaked", current) - } - if expected == 409 && calls != 0 { - t.Fatal("busy refresh contacted provider") - } - if expected == 200 { - job, e := s.Store.one(ctx, "gojobs", M{"_id": key}) - if e != nil || job != nil { - t.Fatal("unchanged commit queued", job, e) - } - } - }) - } - t.Run("manual refresh contention and interrupted preparation", func(t *testing.T) { - r := M{} - for k, v := range source { - r[k] = v - } - r["_id"] = bson.NewObjectID() - r["repoId"] = "manual-failures" - r["status"] = "error" - r["statusDate"] = time.Now() - if _, e := s.Store.DB.Collection(collection("repo")).InsertOne(ctx, r); e != nil { - t.Fatal(e) - } - load := func() M { - t.Helper() - v, e := s.Store.one(ctx, collection("repo"), M{"_id": r["_id"]}) - if e != nil { - t.Fatal(e) - } - return v - } - if _, e := s.Store.DB.Collection("files").InsertOne(ctx, M{"repoId": r["repoId"], "name": "old.txt", "path": "", "size": 4}); e != nil { - t.Fatal(e) - } - oldCache := contentPrefix(r) + "/old.txt" - if e := s.content.Put(ctx, str(r["repoId"]), oldCache, strings.NewReader("data"), 4, 4); e != nil { - t.Fatal(e) - } - url := "/api/repo/manual-failures/refresh" - set := func(v M) { - t.Helper() - if _, e := s.Store.update(ctx, collection("repo"), M{"_id": r["_id"]}, M{"$set": v}); e != nil { - t.Fatal(e) - } - } - set(M{"refreshToken": "another", "refreshUntil": time.Now().Add(time.Minute)}) - w := call("POST", url, token, nil) - if w.Code != 409 || str(load()["refreshToken"]) != "another" { - t.Fatal("competing lease altered", w.Code, w.Body) - } - set(M{"refreshUntil": time.Now().Add(-time.Minute)}) - p.onRepository = func() { - nested := call("POST", url, token, nil) - if nested.Code != 409 { - t.Fatal("overlapping refresh accepted", nested.Code, nested.Body) - } - } - defer func() { p.onRepository = nil; p.missingBranch = false }() - // Reject this specific enqueue at MongoDB so the real error path is exercised. - validator := M{"_id": M{"$ne": "repo:manual-failures:prepare"}} - if e := s.Store.DB.RunCommand(ctx, bson.D{{Key: "collMod", Value: "gojobs"}, {Key: "validator", Value: validator}, {Key: "validationLevel", Value: "strict"}, {Key: "validationAction", Value: "error"}}).Err(); e != nil { - t.Fatal(e) - } - defer s.Store.DB.RunCommand(ctx, bson.D{{Key: "collMod", Value: "gojobs"}, {Key: "validator", Value: M{}}}) - w = call("POST", url, token, nil) - if w.Code != 500 { - t.Fatal("enqueue failure hidden", w.Code, w.Body) - } - current := load() - if str(current["status"]) != "error" || str(current["statusMessage"]) != "preparation_interrupted" || current["refreshToken"] != nil { - t.Fatal("interrupted refresh not retryable", current) - } - rows, e := s.Store.list(ctx, "files", M{"repoId": r["repoId"]}, 100, nil) - if e != nil || len(rows) != 0 { - t.Fatal("interrupted refresh retained old tree", rows, e) - } - cached, cacheErr := s.content.Read(ctx, str(r["repoId"]), oldCache) - if cached != nil { - cached.Close() - } - if cacheErr == nil { - t.Fatal("interrupted refresh retained old cache") - } - if e := s.Store.DB.RunCommand(ctx, bson.D{{Key: "collMod", Value: "gojobs"}, {Key: "validator", Value: M{}}}).Err(); e != nil { - t.Fatal(e) - } - p.onRepository = nil - w = call("POST", url, token, nil) - if w.Code != 200 || str(load()["status"]) != "preparing" { - t.Fatal("retry failed", w.Code, w.Body) - } - set(M{"status": "ready", "statusDate": time.Now()}) - if _, e := s.Store.update(ctx, "gojobs", M{"_id": "repo:manual-failures:prepare"}, M{"$set": M{"state": "completed", "finishedAt": time.Now()}}); e != nil { - t.Fatal(e) - } - p.onRepository = func() { set(M{"refreshToken": "replacement", "refreshUntil": time.Now().Add(time.Minute)}) } - w = call("POST", url, token, nil) - if w.Code != 409 || str(load()["refreshToken"]) != "replacement" || str(load()["status"]) != "ready" { - t.Fatal("replacement lease overwritten", w.Code, w.Body, load()) - } - - }) -} diff --git a/backend/internal/server/monitoring_query_test.go b/backend/internal/server/monitoring_query_test.go deleted file mode 100644 index 2012a39..0000000 --- a/backend/internal/server/monitoring_query_test.go +++ /dev/null @@ -1,44 +0,0 @@ -package server - -import ( - "encoding/json" - "net/http/httptest" - "os" - "testing" -) - -func TestMonitoringQueryContracts(t *testing.T) { - data, err := os.ReadFile("testdata/monitoring-query.json") - if err != nil { - t.Fatal(err) - } - var rows []struct { - Query string - Performance, Cache int - Error bool - } - if err = json.Unmarshal(data, &rows); err != nil { - t.Fatal(err) - } - for _, row := range rows { - s := &Server{} - q := &request{R: httptest.NewRequest("GET", "/api/admin/performance?"+row.Query, nil)} - result, err := s.requestPerformance(q) - if (err != nil) != row.Error { - t.Fatalf("query %q: error %v", row.Query, err) - } - if row.Error { - if _, err := s.cacheTelemetry(q); err == nil { - t.Fatal("cache report swallowed conversion error", row.Query) - } - continue - } - if number(result.(M)["windowMinutes"]) != int64(row.Performance) { - t.Fatal(row, result) - } - raw, err := extendedQueryString(row.Query, "minutes") - if err != nil || cacheWindow([]string{raw}) != row.Cache { - t.Fatal(row, raw, err) - } - } -} diff --git a/backend/internal/server/numeric_identity_test.go b/backend/internal/server/numeric_identity_test.go deleted file mode 100644 index a2f0df9..0000000 --- a/backend/internal/server/numeric_identity_test.go +++ /dev/null @@ -1,16 +0,0 @@ -package server - -import "testing" - -func TestNumericIdentityFormatting(t *testing.T) { - for _, c := range []struct { - value float64 - want string - }{ - {7000123, "7000123"}, {1234567890123, "1234567890123"}, {1e20, "100000000000000000000"}, {1e21, "1e+21"}, {0.000001, "0.000001"}, {0.0000001, "1e-7"}, - } { - if got := str(c.value); got != c.want { - t.Fatalf("got %s; expected %s", got, c.want) - } - } -} diff --git a/backend/internal/server/oauth_callback_integration_test.go b/backend/internal/server/oauth_callback_integration_test.go deleted file mode 100644 index 5764d9a..0000000 --- a/backend/internal/server/oauth_callback_integration_test.go +++ /dev/null @@ -1,323 +0,0 @@ -package server - -import ( - "context" - "encoding/json" - "io" - "net/http" - "net/http/httptest" - "net/url" - "strings" - "testing" - "time" - - "github.com/tdurieux/anonymous_github/backend/internal/security" -) - -func runOAuthCallbackIntegration(t *testing.T, s *Server, token string) { - t.Run("OAuth callback session and identity", func(t *testing.T) { - ctx := context.Background() - oldHTTP, oldConfig := s.HTTP, s.Config - defer func() { s.HTTP, s.Config = oldHTTP, oldConfig }() - s.Config.OAuthEnabled = true - s.Config.AppEnabled = true - s.Config.AppNewConnections = true - s.Config.ClientID = "synthetic-client" - s.Config.ClientSecret = "synthetic-secret" - s.Config.Callback = "https://anonymous.test/github/auth" - s.Config.AppClientID = "synthetic-app" - s.Config.AppClientSecret = "synthetic-app-secret" - s.Config.AppCallback = "https://anonymous.test/github/app/callback" - exchanges, profiles := 0, 0 - profileID := float64(7000123) - s.HTTP = &http.Client{Transport: roundTrip(func(r *http.Request) (*http.Response, error) { - var value M - switch r.URL.Host + r.URL.Path { - case "github.com/login/oauth/access_token": - exchanges++ - value = M{"access_token": "synthetic-callback-access", "refresh_token": "synthetic-callback-refresh", "expires_in": 3600, "refresh_token_expires_in": 7200} - case "api.github.com/user": - profiles++ - value = M{"id": profileID, "login": "oauth-callback-fixture", "avatar_url": "https://avatar.test/image"} - default: - t.Errorf("unexpected OAuth request: %s", r.URL.Host+r.URL.Path) - return nil, io.ErrUnexpectedEOF - } - raw, _ := json.Marshal(value) - return &http.Response{StatusCode: 200, Header: http.Header{}, Body: io.NopCloser(strings.NewReader(string(raw)))}, nil - })} - call := func(path string, cookie *http.Cookie, bearer string) *httptest.ResponseRecorder { - req := httptest.NewRequest("GET", path, nil) - req.RemoteAddr = "198.51.100.9:1234" - if cookie != nil { - req.AddCookie(cookie) - } - if bearer != "" { - req.Header.Set("Authorization", "Bearer "+bearer) - } - w := httptest.NewRecorder() - s.ServeHTTP(w, req) - return w - } - start := func(path string, cookie *http.Cookie) (string, *http.Cookie) { - t.Helper() - w := call(path, cookie, "") - if w.Code != 302 { - t.Fatal("login start", w.Code, w.Body) - } - redirect, err := url.Parse(w.Header().Get("Location")) - if err != nil { - t.Fatal(err) - } - state := redirect.Query().Get("state") - if len(state) != 64 { - t.Fatal("missing state") - } - cookies := w.Result().Cookies() - if len(cookies) != 1 { - t.Fatal("missing session cookie") - } - return state, cookies[0] - } - expect := func(w *httptest.ResponseRecorder, status int, code string) { - t.Helper() - var result M - json.Unmarshal(w.Body.Bytes(), &result) - if w.Code != status || result["error"] != code { - t.Fatal(w.Code, w.Body) - } - } - state, cookie := start("/github/login?returnTo=%2Fdashboard%3Ftab%3Downed", nil) - signed, err := url.QueryUnescape(cookie.Value) - if err != nil { - t.Fatal(err) - } - oldSID, ok := security.VerifySession(signed, s.Config.SessionSecret) - if !ok { - t.Fatal("unsigned session") - } - callback := "/github/auth?state=" + state + "&code=synthetic-code" - success := call(callback, cookie, "") - if success.Code != 302 || success.Header().Get("Location") != "/dashboard?tab=owned" { - t.Fatal(success.Code, success.Header()) - } - cookies := success.Result().Cookies() - if len(cookies) != 1 || cookies[0].Value == cookie.Value { - t.Fatal("session was not rotated") - } - authenticated := cookies[0] - if count, err := s.Store.Redis.Exists(ctx, "anoGH_session:"+oldSID, "go:oauth:"+state).Result(); err != nil || count != 0 { - t.Fatal("old state/session survived", count, err) - } - if w := call("/api/user", authenticated, ""); w.Code != 200 { - t.Fatal("new session not authenticated", w.Code, w.Body) - } - - t.Run("persistent rolling session", func(t *testing.T) { - if authenticated.MaxAge != int(authenticatedSessionTTL.Seconds()) || authenticated.Expires.Before(time.Now().Add(29*24*time.Hour)) || !authenticated.HttpOnly || authenticated.SameSite != http.SameSiteLaxMode { - t.Fatal("login cookie is not persistent and protected") - } - signed, _ := url.QueryUnescape(authenticated.Value) - sid, _ := security.VerifySession(signed, s.Config.SessionSecret) - key := "anoGH_session:" + sid - raw, err := s.Store.Redis.Get(ctx, key).Bytes() - if err != nil { - t.Fatal(err) - } - var session M - if err := json.Unmarshal(raw, &session); err != nil { - t.Fatal(err) - } - // Simulate an old session, including sessions issued before this fix. - session["cookie"] = M{"expires": nil} - aged, _ := json.Marshal(session) - if err := s.Store.Redis.Set(ctx, key, aged, time.Hour).Err(); err != nil { - t.Fatal(err) - } - w := call("/api/user", authenticated, "") - if w.Code != 200 || len(w.Result().Cookies()) != 1 || w.Result().Cookies()[0].MaxAge != authenticated.MaxAge { - t.Fatal("old session was not upgraded", w.Code) - } - if ttl := s.Store.Redis.TTL(ctx, key).Val(); ttl < authenticatedSessionTTL-time.Minute { - t.Fatal("session TTL not renewed", ttl) - } - w = call("/api/user", authenticated, "") - if w.Code != 200 || len(w.Result().Cookies()) != 0 { - t.Fatal("session renewed more than once a day") - } - - session["cookie"] = M{"expires": time.Now().Add(28 * 24 * time.Hour).UTC().Format(time.RFC3339Nano)} - aged, _ = json.Marshal(session) - if err := s.Store.Redis.Set(ctx, key, aged, 28*24*time.Hour).Err(); err != nil { - t.Fatal(err) - } - w = call("/api/user", authenticated, "") - if w.Code != 200 || len(w.Result().Cookies()) != 1 || s.Store.Redis.TTL(ctx, key).Val() < authenticatedSessionTTL-time.Minute { - t.Fatal("daily renewal failed") - } - // A stale renewal must not overwrite a newer session or recreate a revoked one. - updated := s.Store.Redis.Get(ctx, key).Val() - if n, err := s.Store.Redis.Eval(ctx, renewSession, []string{key}, aged, aged, authenticatedSessionTTL.Milliseconds()).Int(); err != nil || n != 0 { - t.Fatal("stale renewal accepted", n, err) - } - if s.Store.Redis.Get(ctx, key).Val() != updated { - t.Fatal("session overwritten") - } - revokedKey := key + ":revoked-test" - if n, err := s.Store.Redis.Eval(ctx, renewSession, []string{revokedKey}, aged, aged, authenticatedSessionTTL.Milliseconds()).Int(); err != nil || n != 0 { - t.Fatal("revoked session recreated", n, err) - } - if s.Store.Redis.Exists(ctx, revokedKey).Val() != 0 { - t.Fatal("revoked session exists") - } - }) - expect(call(callback, cookie, ""), 400, "invalid_auth_state") - if exchanges != 1 || profiles != 1 { - t.Fatal("replay reached upstream", exchanges, profiles) - } - // A second anonymous browser must find the existing immutable identity, - // including GitHub IDs large enough for fmt's scientific notation. - repeatState, repeatCookie := start("/github/login", nil) - if w := call("/github/auth?state="+repeatState+"&code=synthetic-code", repeatCookie, ""); w.Code != 302 { - t.Fatal("existing identity login", w.Code, w.Body) - } - baselineExchanges, baselineProfiles := exchanges, profiles - for _, mode := range []string{"app", "new-connections", "legacy"} { - loginPath, callbackPath, expected := "/github/app/login", "/github/app/callback", "github_app_disabled" - if mode == "legacy" { - loginPath, callbackPath, expected = "/github/login", "/github/auth", "github_oauth_disabled" - } - pending, pendingCookie := start(loginPath, nil) - switch mode { - case "app": - s.Config.AppEnabled = false - case "new-connections": - s.Config.AppNewConnections = false - case "legacy": - s.Config.OAuthEnabled = false - } - expect(call(callbackPath+"?state="+pending+"&code=synthetic-code", pendingCookie, ""), 503, expected) - expect(call(callbackPath, nil, ""), 503, expected) - if n := s.Store.Redis.Exists(ctx, "go:oauth:"+pending).Val(); n != 1 { - t.Fatal("disabled callback consumed pending flow", mode) - } - s.Config.AppEnabled, s.Config.AppNewConnections, s.Config.OAuthEnabled = true, true, true - expect(call(callbackPath+"?state="+pending+"&error=cancelled", pendingCookie, ""), 400, "github_app_authorization_cancelled") - expect(call(callbackPath+"?state="+pending+"&code=synthetic-code", pendingCookie, ""), 400, "invalid_auth_state") - } - - // An unrelated browser consumes only its own flow; it cannot destroy - // the rightful browser's pending authorization. - state, cookie = start("/github/login", nil) - _, otherCookie := start("/github/login", nil) - callback = "/github/auth?state=" + state + "&code=synthetic-code" - expect(call(callback, otherCookie, ""), 400, "invalid_auth_state") - if n := s.Store.Redis.Exists(ctx, "go:oauth:"+state).Val(); n != 1 { - t.Fatal("foreign session consumed owner flow") - } - expect(call(callback+"&error=cancelled", cookie, ""), 400, "github_app_authorization_cancelled") - - expect(call(callback, cookie, ""), 400, "invalid_auth_state") - // A later start supersedes the previous attempt in the same browser. - first, flowCookie := start("/github/app/login", nil) - second, flowCookie := start("/github/app/login", flowCookie) - if n := s.Store.Redis.Exists(ctx, "go:oauth:"+first).Val(); n != 0 { - t.Fatal("superseded flow retained") - } - expect(call("/github/app/callback?state="+first+"&code=synthetic-code", flowCookie, ""), 400, "invalid_auth_state") - expect(call("/github/app/callback?state="+second+"&code=synthetic-code", flowCookie, ""), 400, "invalid_auth_state") - for _, malformed := range []string{"", "state=", "state=wrong", "state[]=", "state[x]=wrong"} { - pending, pendingCookie := start("/github/app/login", nil) - expect(call("/github/app/callback?"+malformed+"&code=synthetic-code", pendingCookie, ""), 400, "invalid_auth_state") - if n := s.Store.Redis.Exists(ctx, "go:oauth:"+pending).Val(); n != 0 { - t.Fatal("malformed callback retained pending flow", malformed) - } - expect(call("/github/app/callback?state="+pending+"&code=synthetic-code", pendingCookie, ""), 400, "invalid_auth_state") - } - // Concurrent callbacks can consume the pending attempt only once. - concurrentState, concurrentCookie := start("/github/app/login", nil) - signedConcurrent, err := url.QueryUnescape(concurrentCookie.Value) - if err != nil { - t.Fatal(err) - } - concurrentSID, ok := security.VerifySession(signedConcurrent, s.Config.SessionSecret) - if !ok { - t.Fatal("unsigned concurrent session") - } - results := make(chan error, 16) - for i := 0; i < 16; i++ { - go func() { - q := &request{Server: s, SessionID: concurrentSID, R: httptest.NewRequest("GET", "/github/app/callback?state="+concurrentState+"&error=cancelled", nil)} - _, err := s.oauthCallback(q) - results <- err - }() - } - consumed := 0 - for i := 0; i < 16; i++ { - err := <-results - if err == nil { - t.Fatal("concurrent callback succeeded") - } - switch err.Error() { - case "github_app_authorization_cancelled": - consumed++ - case "invalid_auth_state": - default: - t.Fatal(err) - } - } - if consumed != 1 { - t.Fatal("pending flow not atomically consumed", consumed) - } - // App and legacy OAuth have separate pending flows in the same browser. - legacyState, sharedCookie := start("/github/login", nil) - appState, sharedCookie := start("/github/app/login", sharedCookie) - expect(call("/github/auth?state="+legacyState+"&error=cancelled", sharedCookie, ""), 400, "github_app_authorization_cancelled") - expect(call("/github/app/callback?state="+appState+"&error=cancelled", sharedCookie, ""), 400, "github_app_authorization_cancelled") - // A changed authenticated identity must not turn an anonymous login into - // an account switch, even if its original browser session still exists. - state, cookie = start("/github/login", nil) - expect(call("/github/auth?state="+state+"&code=synthetic-code", cookie, token), 409, "github_identity_mismatch") - state, cookie = start("/github/login", nil) - raw, err := s.Store.Redis.Get(ctx, "go:oauth:"+state).Bytes() - if err != nil { - t.Fatal(err) - } - var flow authFlow - if err := json.Unmarshal(raw, &flow); err != nil { - t.Fatal(err) - } - flow.Expires = time.Now().Add(-time.Minute) - raw, _ = json.Marshal(flow) - if err := s.Store.Redis.Set(ctx, "go:oauth:"+state, raw, time.Minute).Err(); err != nil { - t.Fatal(err) - } - expect(call("/github/auth?state="+state+"&code=synthetic-code", cookie, ""), 400, "invalid_auth_state") - state, cookie = start("/github/login", nil) - expect(call("/github/auth?state="+state+"&error=access_denied", cookie, ""), 400, "github_app_authorization_cancelled") - state, cookie = start("/github/login", nil) - expect(call("/github/app/callback?state="+state+"&code=synthetic-code", cookie, ""), 400, "invalid_auth_state") - if exchanges != baselineExchanges || profiles != baselineProfiles { - t.Fatal("invalid flow reached upstream", exchanges, profiles) - } - // A signed-in owner must reconnect the same upstream identity. - state, cookie = start("/github/app/login", authenticated) - profileID = 7000999 - expect(call("/github/app/callback?state="+state+"&code=synthetic-code", cookie, ""), 409, "github_identity_mismatch") - user, err := s.Store.one(ctx, "users", M{"externalIDs.github": "7000123"}) - if err != nil || user == nil { - t.Fatal(err) - } - grant, err := s.Store.one(ctx, "credentials", M{"ownerId": user["_id"], "provider": "github-app-user"}) - if err != nil || grant != nil { - t.Fatal("mismatched identity stored a grant", err) - } - state, cookie = start("/github/login", nil) - expect(call("/github/auth?state="+state+"&code=synthetic-code", cookie, ""), 409, "github_identity_mismatch") - count, err := s.Store.DB.Collection("users").CountDocuments(ctx, M{"username": "oauth-callback-fixture"}) - if err != nil || count != 1 { - t.Fatal("username-only identity linked or duplicated", count, err) - } - - }) -} diff --git a/backend/internal/server/oauth_install_integration_test.go b/backend/internal/server/oauth_install_integration_test.go deleted file mode 100644 index 850160f..0000000 --- a/backend/internal/server/oauth_install_integration_test.go +++ /dev/null @@ -1,146 +0,0 @@ -package server - -import ( - "context" - "encoding/json" - "io" - "net/http" - "net/http/httptest" - "net/url" - "strings" - "testing" - - "go.mongodb.org/mongo-driver/v2/bson" -) - -func runOAuthInstallIntegration(t *testing.T, base *Server) { - t.Run("App login preserves installation intent", func(t *testing.T) { - ctx := context.Background() - owner := bson.NewObjectID() - db := base.Store.DB.Client().Database("oauth_install_" + owner.Hex()) - defer db.Drop(ctx) - s := &Server{Config: base.Config, Store: &Store{DB: db, Redis: base.Store.Redis}} - s.Config.AppEnabled = true - s.Config.AppNewConnections = true - user := M{"_id": owner, "username": owner.Hex(), "status": "active", "externalIDs": M{"github": "98765001"}} - if _, err := db.Collection("users").InsertOne(ctx, user); err != nil { - t.Fatal(err) - } - calls := 0 - s.HTTP = &http.Client{Transport: roundTrip(func(r *http.Request) (*http.Response, error) { - calls++ - data := M{} - switch r.URL.Path { - case "/login/oauth/access_token": - data = M{"access_token": "synthetic-token", "refresh_token": "synthetic-refresh", "expires_in": 3600, "refresh_token_expires_in": 7200} - case "/user": - data = M{"id": 98765001, "login": owner.Hex()} - default: - t.Fatal("unexpected OAuth request", r.URL) - } - body, err := json.Marshal(data) - if err != nil { - t.Fatal(err) - } - return &http.Response{StatusCode: 200, Header: http.Header{}, Body: io.NopCloser(strings.NewReader(string(body)))}, nil - })} - for _, tc := range []struct { - name, query, returnTo, repository, callbackExtra, errorCode string - authenticated, install, disable bool - }{ - {name: "anonymous-default", returnTo: "/dashboard"}, - {name: "authenticated-default", authenticated: true, returnTo: "/connections"}, - {name: "install", query: "install=1&repository=team/private&returnTo=%2Fdashboard%3Ftab%3Downed", returnTo: "/dashboard?tab=owned", repository: "team/private", install: true, callbackExtra: "&install=0&repository=other/project&returnTo=/wrong"}, - {name: "repeated-install", query: "install=1&install=1", returnTo: "/dashboard"}, - {name: "repeated-repository", query: "install=1&repository=team/a&repository=team/b", returnTo: "/dashboard", install: true}, - {name: "unsafe-return", query: "returnTo=https://outside.test", returnTo: "/connections"}, - {name: "repeated-return", query: "returnTo=/one&returnTo=/two", returnTo: "/connections"}, - {name: "repeated-state", returnTo: "/dashboard", callbackExtra: "&state=duplicate", errorCode: "invalid_auth_state"}, - {name: "repeated-code", returnTo: "/dashboard", callbackExtra: "&code=duplicate", errorCode: "github_app_authorization_cancelled"}, - {name: "repeated-error", returnTo: "/dashboard", callbackExtra: "&error=&error=", errorCode: "github_app_authorization_cancelled"}, - {name: "mixed-state", returnTo: "/dashboard", callbackExtra: "&state[]=duplicate", errorCode: "invalid_auth_state"}, - {name: "mixed-code", returnTo: "/dashboard", callbackExtra: "&code[]=duplicate", errorCode: "github_app_authorization_cancelled"}, - {name: "object-error", returnTo: "/dashboard", callbackExtra: "&error[x]=", errorCode: "github_app_authorization_cancelled"}, - {name: "empty-array-error", returnTo: "/dashboard", callbackExtra: "&error[]=", errorCode: "github_app_authorization_cancelled"}, - {name: "mixed-install", query: "install=1&install[]=1", returnTo: "/dashboard"}, - {name: "mixed-repository", query: "install=1&repository=team/a&repository[]=team/b", returnTo: "/dashboard", install: true}, - {name: "mixed-return", query: "returnTo=/one&returnTo[]=", returnTo: "/connections"}, - {name: "empty-array-return", query: "returnTo[]=", returnTo: "/connections"}, - {name: "connections-disabled", returnTo: "/dashboard", disable: true, errorCode: "github_app_disabled"}, - } { - t.Run(tc.name, func(t *testing.T) { - s.Config.AppNewConnections = true - q := &request{Server: s, Session: M{}, R: httptest.NewRequest("GET", "/github/app/login?"+tc.query, nil), W: httptest.NewRecorder()} - if tc.authenticated { - q.User = user - q.Identity = identity(user) - } - defer func() { s.Store.Redis.Del(ctx, "anoGH_session:"+q.SessionID) }() - if _, err := s.oauthStart(q); err != nil { - t.Fatal(err) - } - start := q.W.(*httptest.ResponseRecorder) - target, err := url.Parse(start.Header().Get("Location")) - if err != nil { - t.Fatal(err) - } - state := target.Query().Get("state") - stored, err := s.Store.Redis.Get(ctx, "go:oauth:"+state).Bytes() - if err != nil { - t.Fatal(err) - } - var flow authFlow - if err = json.Unmarshal(stored, &flow); err != nil { - t.Fatal(err) - } - if flow.ReturnTo != tc.returnTo || flow.Repository != tc.repository || flow.Install != tc.install || flow.SessionID != q.SessionID { - t.Fatal("login intent not stored correctly", flow) - } - before := calls - q.R = httptest.NewRequest("GET", "/github/app/callback?state="+state+"&code=synthetic-code"+tc.callbackExtra, nil) - callback := httptest.NewRecorder() - q.W = callback - if tc.disable { - s.Config.AppNewConnections = false - } - _, err = s.oauthCallback(q) - if tc.errorCode != "" { - if err == nil || err.Error() != tc.errorCode || calls != before { - t.Fatal("invalid callback reached upstream or wrong error", err, calls-before) - } - } else { - if err != nil { - t.Fatal(err) - } - location, err := url.Parse(callback.Header().Get("Location")) - if err != nil { - t.Fatal(err) - } - if tc.install { - if location.Path != "/github/app/install" || location.Query().Get("returnTo") != tc.returnTo || location.Query().Get("repository") != tc.repository { - t.Fatal("installation intent lost or callback overrode it", location) - } - } else if location.String() != tc.returnTo { - t.Fatal("wrong post-login destination", location) - } - if calls != before+2 { - t.Fatal("unexpected upstream requests", calls-before) - } - } - if tc.disable { - if n := s.Store.Redis.Exists(ctx, "go:oauth:"+state, oauthPendingKey(q.SessionID, true)).Val(); n != 2 { - t.Fatal("disabled callback consumed flow", n) - } - s.Config.AppNewConnections = true - q.R = httptest.NewRequest("GET", "/github/app/callback?state="+state+"&error=cancelled", nil) - if _, err := s.oauthCallback(q); err == nil || err.Error() != "github_app_authorization_cancelled" || calls != before { - t.Fatal("preserved flow unusable after re-enable", err) - } - } - if n, err := s.Store.Redis.Exists(ctx, "go:oauth:"+state).Result(); err != nil || n != 0 { - t.Fatal("OAuth state survived callback", n, err) - } - }) - } - }) -} diff --git a/backend/internal/server/oauth_profile.go b/backend/internal/server/oauth_profile.go deleted file mode 100644 index 7ec0704..0000000 --- a/backend/internal/server/oauth_profile.go +++ /dev/null @@ -1,8 +0,0 @@ -package server - -func validateAppProfile(profile M) error { - if !jsonSafeInteger(profile["id"]) || !inputTruthy(profile["login"]) { - return fail("github_app_reconnect_required", 403) - } - return nil -} diff --git a/backend/internal/server/oauth_profile_integration_test.go b/backend/internal/server/oauth_profile_integration_test.go deleted file mode 100644 index fbf2c44..0000000 --- a/backend/internal/server/oauth_profile_integration_test.go +++ /dev/null @@ -1,85 +0,0 @@ -package server - -import ( - "context" - "encoding/json" - "io" - "net/http" - "net/http/httptest" - "net/url" - "strings" - "testing" - - "go.mongodb.org/mongo-driver/v2/bson" -) - -func runAppProfileIntegration(t *testing.T, base *Server) { - t.Run("invalid App profiles cannot create or bind identities", func(t *testing.T) { - ctx := context.Background() - owner := bson.NewObjectID() - db := base.Store.DB.Client().Database("app_profile_" + owner.Hex()) - defer db.Drop(ctx) - s := &Server{Config: base.Config, Store: &Store{DB: db, Redis: base.Store.Redis}} - s.Config.AppEnabled = true - s.Config.AppNewConnections = true - if _, err := db.Collection("users").InsertOne(ctx, M{"_id": owner, "username": "synthetic-login", "status": "active", "externalIDs": M{"github": "42"}}); err != nil { - t.Fatal(err) - } - var profile M - s.HTTP = &http.Client{Transport: roundTrip(func(r *http.Request) (*http.Response, error) { - var data M - switch r.URL.Path { - case "/login/oauth/access_token": - data = M{"access_token": "synthetic-token", "refresh_token": "synthetic-refresh", "expires_in": 3600, "refresh_token_expires_in": 7200} - case "/user": - data = profile - default: - t.Fatal("unexpected profile callback endpoint", r.URL) - } - body, err := json.Marshal(data) - if err != nil { - t.Fatal(err) - } - return &http.Response{StatusCode: 200, Header: http.Header{}, Body: io.NopCloser(strings.NewReader(string(body)))}, nil - })} - for _, tc := range appProfileContracts(t) { - if !tc.Rejected { - continue - } - t.Run(tc.Name, func(t *testing.T) { - profile = tc.Profile - q := &request{Server: s, Session: M{}, R: httptest.NewRequest("GET", "/github/app/login", nil), W: httptest.NewRecorder()} - defer func() { s.Store.Redis.Del(ctx, "anoGH_session:"+q.SessionID) }() - if _, err := s.oauthStart(q); err != nil { - t.Fatal(err) - } - target, err := url.Parse(q.W.(*httptest.ResponseRecorder).Header().Get("Location")) - if err != nil { - t.Fatal(err) - } - state := target.Query().Get("state") - sid := q.SessionID - q.R = httptest.NewRequest("GET", "/github/app/callback?state="+state+"&code=synthetic", nil) - q.W = httptest.NewRecorder() - _, err = s.oauthCallback(q) - if err == nil || err.Error() != "github_app_reconnect_required" { - t.Fatal("malformed profile accepted", err) - } - if q.SessionID != sid || q.Identity.Active() || q.Session["passport"] != nil { - t.Fatal("malformed profile authenticated") - } - users, err := db.Collection("users").CountDocuments(ctx, M{}) - if err != nil || users != 1 { - t.Fatal("malformed profile created user", users, err) - } - grants, err := db.Collection("credentials").CountDocuments(ctx, M{}) - if err != nil || grants != 0 { - t.Fatal("malformed profile bound grant", grants, err) - } - if count, err := s.Store.Redis.Exists(ctx, "go:oauth:"+state).Result(); err != nil || count != 0 { - t.Fatal("rejected callback state retained", count, err) - } - }) - } - }) -} diff --git a/backend/internal/server/oauth_profile_test.go b/backend/internal/server/oauth_profile_test.go deleted file mode 100644 index b3e13e7..0000000 --- a/backend/internal/server/oauth_profile_test.go +++ /dev/null @@ -1,43 +0,0 @@ -package server - -import ( - "encoding/json" - "errors" - "os" - "testing" -) - -type appProfileContract struct { - Name string - Profile M - Rejected bool -} - -func appProfileContracts(t *testing.T) []appProfileContract { - t.Helper() - data, err := os.ReadFile("testdata/oauth-profile.json") - if err != nil { - t.Fatal(err) - } - var cases []appProfileContract - if err = json.Unmarshal(data, &cases); err != nil { - t.Fatal(err) - } - return cases -} -func TestAppProfileContracts(t *testing.T) { - for _, tc := range appProfileContracts(t) { - t.Run(tc.Name, func(t *testing.T) { - err := validateAppProfile(tc.Profile) - if (err != nil) != tc.Rejected { - t.Fatal("profile predicate differs", err) - } - if err != nil { - var api *APIError - if !errors.As(err, &api) || api.Code != "github_app_reconnect_required" || api.Status != 403 { - t.Fatal("wrong profile error", err) - } - } - }) - } -} diff --git a/backend/internal/server/oauth_tokens.go b/backend/internal/server/oauth_tokens.go deleted file mode 100644 index 01ec468..0000000 --- a/backend/internal/server/oauth_tokens.go +++ /dev/null @@ -1,26 +0,0 @@ -package server - -import ( - "math" - "time" -) - -func tokenLifetime(value any) (time.Duration, bool) { - seconds, ok := value.(float64) - // Responses come from JSON. Strings and booleans are not numeric lifetimes. - // Bound before converting to Duration so a malformed upstream cannot overflow. - if !ok || math.IsNaN(seconds) || math.IsInf(seconds, 0) || seconds <= 0 || seconds > float64(math.MaxInt64/int64(time.Second)) { - return 0, false - } - return time.Duration(seconds * float64(time.Second)), true -} -func appTokenLifetimes(tokens M) (time.Duration, time.Duration, error) { - access, accessOK := tokens["access_token"].(string) - refresh, refreshOK := tokens["refresh_token"].(string) - accessTTL, accessValid := tokenLifetime(tokens["expires_in"]) - refreshTTL, refreshValid := tokenLifetime(tokens["refresh_token_expires_in"]) - if !accessOK || access == "" || !refreshOK || refresh == "" || !accessValid || !refreshValid { - return 0, 0, fail("github_app_reconnect_required", 401) - } - return accessTTL, refreshTTL, nil -} diff --git a/backend/internal/server/oauth_tokens_test.go b/backend/internal/server/oauth_tokens_test.go deleted file mode 100644 index 21cff5e..0000000 --- a/backend/internal/server/oauth_tokens_test.go +++ /dev/null @@ -1,86 +0,0 @@ -package server - -import ( - "context" - "encoding/json" - "errors" - "io" - "math" - "net/http" - "os" - "strings" - "testing" - "time" -) - -func TestTypeScriptAppTokenResponse(t *testing.T) { - raw, err := os.ReadFile("testdata/oauth-tokens.json") - if err != nil { - t.Fatal(err) - } - var cases []struct { - Name string - Tokens M - Status int - Expected *struct { - Code string - Status int - } - } - if err := json.Unmarshal(raw, &cases); err != nil { - t.Fatal(err) - } - for _, c := range cases { - t.Run(c.Name, func(t *testing.T) { - s := &Server{HTTP: &http.Client{Transport: roundTrip(func(req *http.Request) (*http.Response, error) { - data, _ := json.Marshal(c.Tokens) - return &http.Response{StatusCode: c.Status, Header: http.Header{}, Body: io.NopCloser(strings.NewReader(string(data)))}, nil - })}} - tokens, err := s.exchange(context.Background(), M{}) - if err == nil { - _, _, err = appTokenLifetimes(tokens) - } - if c.Expected == nil { - if err != nil { - t.Fatal(err) - } - return - } - var api *APIError - if !errors.As(err, &api) || api.Code != c.Expected.Code || api.Status != c.Expected.Status { - t.Fatalf("got %v; expected %+v", err, c.Expected) - } - }) - } -} -func TestTokenLifetimeBounds(t *testing.T) { - for _, v := range []any{math.Inf(1), math.NaN(), 1e20, "3600", true} { - if _, ok := tokenLifetime(v); ok { - t.Fatalf("accepted %T", v) - } - } - if duration, ok := tokenLifetime(0.25); !ok || duration != 250*time.Millisecond { - t.Fatal(duration, ok) - } -} - -func TestOAuthResponseFraming(t *testing.T) { - for _, c := range []struct { - body string - valid bool - }{ - {`{"access_token":"synthetic"}`, true}, - {`{"access_token":"synthetic"} trailing`, false}, - {`{"access_token":"synthetic"}{}`, false}, - {`{"access_token":123}`, false}, - {`{"access_token":"synthetic"}` + strings.Repeat(" ", 65536), false}, - } { - s := &Server{HTTP: &http.Client{Transport: roundTrip(func(*http.Request) (*http.Response, error) { - return &http.Response{StatusCode: 200, Body: io.NopCloser(strings.NewReader(c.body))}, nil - })}} - _, err := s.exchange(context.Background(), M{}) - if (err == nil) != c.valid { - t.Fatalf("valid=%v error=%v", c.valid, err) - } - } -} diff --git a/backend/internal/server/observability.go b/backend/internal/server/observability.go deleted file mode 100644 index abafda5..0000000 --- a/backend/internal/server/observability.go +++ /dev/null @@ -1,147 +0,0 @@ -package server - -import ( - "github.com/redis/go-redis/v9" - "strconv" - "strings" - "time" -) - -func (s *Server) errorStats(q *request) (any, error) { - if s.Store == nil || s.Store.Redis == nil { - return M{"available": false, "last24h": 0, "prev24h": 0, "severity": M{"error": 0, "warn": 0, "info": 0}, "unique": M{"error": 0, "warn": 0, "info": 0}, "buckets": []M{}, "dropped": s.errorLog.dropped.Load()}, nil - } - if err := s.flushErrorLog(q.ctx()); err != nil { - return nil, err - } - - now := time.Now().UTC().Truncate(time.Hour) - p := s.Store.Redis.Pipeline() - cmds := []*redis.MapStringStringCmd{} - for i := 47; i >= 0; i-- { - cmds = append(cmds, p.HGetAll(q.ctx(), "admin:errors:hourly:"+now.Add(-time.Duration(i)*time.Hour).Format("2006010215"))) - } - if _, e := p.Exec(q.ctx()); e != nil { - return nil, e - } - var current, previous int64 - severity := M{"error": int64(0), "warn": int64(0), "info": int64(0)} - codes := map[string]map[string]bool{"error": {}, "warn": {}, "info": {}} - buckets := []M{} - for i, c := range cmds { - row := c.Val() - total, _ := strconv.ParseInt(row["total"], 10, 64) - if i < 24 { - previous += total - continue - } - current += total - bucket := M{"hour": now.Add(time.Duration(i-46) * time.Hour).UnixMilli()} - for _, level := range []string{"error", "warn", "info"} { - n, _ := strconv.ParseInt(row["bucket:"+level], 10, 64) - severity[level] = number(severity[level]) + n - bucket[level] = n - } - for k := range row { - if strings.HasPrefix(k, "cb:") { - parts := strings.SplitN(k, ":", 3) - if len(parts) == 3 && codes[parts[1]] != nil { - codes[parts[1]][parts[2]] = true - } - } - } - buckets = append(buckets, bucket) - } - dropped, _ := s.Store.Redis.Get(q.ctx(), "admin:errors:dropped").Int64() - return M{"available": true, "last24h": current, "prev24h": previous, "severity": severity, "unique": M{"error": len(codes["error"]), "warn": len(codes["warn"]), "info": len(codes["info"])}, "buckets": buckets, "dropped": dropped + s.errorLog.dropped.Load()}, nil -} -func (s *Server) overview(q *request) (any, error) { - raw, e := s.adminStats(q) - if e != nil { - return nil, e - } - stats := obj(raw) - total, e := s.Store.DB.Collection(collection("repo")).CountDocuments(q.ctx(), M{}) - if e != nil { - return nil, e - } - since := time.Now().Add(-24 * time.Hour) - active, e := s.Store.DB.Collection(collection("repo")).CountDocuments(q.ctx(), M{"lastView": M{"$gte": since}}) - if e != nil { - return nil, e - } - newRepos, e := s.Store.DB.Collection(collection("repo")).CountDocuments(q.ctx(), M{"anonymizeDate": M{"$gte": since}}) - if e != nil { - return nil, e - } - newUsers, e := s.Store.DB.Collection("users").CountDocuments(q.ctx(), M{"dateOfEntry": M{"$gte": since}}) - if e != nil { - return nil, e - } - queuesRaw, e := s.adminQueues(q) - if e != nil { - return nil, e - } - queues := M{} - for _, r := range arr(obj(queuesRaw)["queues"]) { - v := obj(r) - queues[str(v["key"])] = v["counts"] - } - // Admin history is always the last 30 UTC days and uses fresh totals. - // Public /stat history has separate caching and caller-selected windows. - history := []M{} - if current, err := s.computeStats(q.ctx()); err == nil { - if rows, err := s.statsHistory(q.ctx(), 30, current, time.Now()); err == nil { - history = rows - } - } - errorSummary := M{"last24h": int64(0), "severity": M{"error": int64(0), "warn": int64(0), "info": int64(0)}} - if values, err := s.errorStats(q); err == nil { - errorSummary = selectFields(obj(values), "last24h", "severity") - } - return M{"system": systemOverview(s.started), "repos": M{"total": total, "statusBreakdown": stats["statusBreakdown"], "totalStorage": stats["totalStorage"], "recentErrors24h": stats["recentErrors24h"], "activeRepos24h": active, "newRepos24h": newRepos}, "users": M{"total": stats["totalUsers"], "newUsers24h": newUsers}, "conferences": M{"total": stats["totalConferences"]}, "queues": queues, "errors": errorSummary, "history": history}, nil -} -func (s *Server) adminGitHub(q *request) (any, error) { - r, e := q.resource("repo", false) - if e != nil { - return nil, e - } - source := obj(r["source"]) - id, e := sourceProvider(source) - if e != nil { - return nil, e - } - if id != "github" { - return nil, fail("provider_capability_not_supported", 400) - } - name := str(source["repositoryName"]) - if !safeRepositoryName(name) { - return nil, fail("invalid_source_repository", 400) - } - parts := strings.Split(name, "/") - out := M{"source": M{"owner": parts[0], "repo": parts[1], "branch": source["branch"], "commit": source["commit"]}} - token, e := s.boundToken(q.ctx(), r["owner"], obj(r["githubAccess"]), name) - if e != nil { - out["repositoryError"] = "github_access_unavailable" - return out, nil - } - repo, e := s.githubObject(q.ctx(), "GET", "/repos/"+name, token, nil) - if e != nil { - out["repositoryError"] = "github_repository_unavailable" - } else { - out["repository"] = M{"fullName": repo["full_name"], "private": repo["private"], "archived": repo["archived"], "disabled": repo["disabled"], "defaultBranch": repo["default_branch"], "description": repo["description"], "stargazers": repo["stargazers_count"], "watchers": repo["watchers_count"], "forks": repo["forks_count"], "openIssues": repo["open_issues_count"], "size": repo["size"], "language": repo["language"], "license": obj(repo["license"])["spdx_id"], "createdAt": repo["created_at"], "updatedAt": repo["updated_at"], "pushedAt": repo["pushed_at"], "htmlUrl": repo["html_url"], "topics": repo["topics"]} - } - branch, e := s.githubObject(q.ctx(), "GET", "/repos/"+name+"/branches/"+segment(str(source["branch"])), token, nil) - if e == nil { - out["branch"] = M{"name": branch["name"], "protected": branch["protected"], "commitSha": obj(branch["commit"])["sha"]} - } else { - out["branchError"] = "github_branch_unavailable" - } - commit, e := s.githubObject(q.ctx(), "GET", "/repos/"+name+"/commits/"+segment(str(source["commit"])), token, nil) - if e == nil { - out["commit"] = M{"sha": commit["sha"], "message": obj(commit["commit"])["message"], "author": obj(commit["commit"])["author"], "committer": obj(commit["commit"])["committer"], "htmlUrl": commit["html_url"], "stats": commit["stats"], "filesChanged": len(arr(commit["files"]))} - } else { - out["commitError"] = "github_commit_unavailable" - } - return out, nil -} diff --git a/backend/internal/server/options_contract_test.go b/backend/internal/server/options_contract_test.go deleted file mode 100644 index 6815f9b..0000000 --- a/backend/internal/server/options_contract_test.go +++ /dev/null @@ -1,71 +0,0 @@ -package server - -import ( - "context" - "encoding/json" - "github.com/tdurieux/anonymous_github/backend/internal/anonymize" - "os" - "reflect" - "testing" - "time" -) - -func TestTypeScriptOptions(t *testing.T) { - raw, err := os.ReadFile("testdata/options.json") - if err != nil { - t.Fatal(err) - } - var cases []struct { - Input, Output string - Rejected bool - Name, Kind string - Body, Expected M - } - if err := json.Unmarshal(raw, &cases); err != nil { - t.Fatal(err) - } - for _, c := range cases { - t.Run(c.Name, func(t *testing.T) { - got, err := validatedOptions(c.Kind, c.Body) - if c.Rejected { - api, ok := err.(*APIError) - if !ok || api.Code != "invalid_options" || api.Status != 400 { - t.Fatalf("got %v; expected invalid_options", err) - } - return - } - if err != nil { - t.Fatal(err) - } - // Compare persistence values. BSON dates have millisecond precision; - // This contract checks stored values, not HTTP timestamp formatting. - if value, ok := got["expirationDate"].(time.Time); ok { - got["expirationDate"] = value.UTC().Format("2006-01-02T15:04:05.000Z") - } - data, err := json.Marshal(got) - if err != nil { - t.Fatal(err) - } - var options anonymize.Options - if err := json.Unmarshal(data, &options); err != nil { - t.Fatal(err) - } - options.Image, options.Link = nil, nil - engine, err := anonymize.New(options, anonymize.Context{Mask: "XXXX"}) - if err != nil { - t.Fatal(err) - } - result, err := engine.Transform(context.Background(), c.Input, anonymize.MaxOutput) - if err != nil || result.Content != c.Output { - t.Fatalf("transformed %q; expected %q; error %v", result.Content, c.Output, err) - } - var actual M - if err := json.Unmarshal(data, &actual); err != nil { - t.Fatal(err) - } - if !reflect.DeepEqual(actual, c.Expected) { - t.Fatalf("got %s; expected %#v", data, c.Expected) - } - }) - } -} diff --git a/backend/internal/server/overview_integration_test.go b/backend/internal/server/overview_integration_test.go deleted file mode 100644 index 17755f8..0000000 --- a/backend/internal/server/overview_integration_test.go +++ /dev/null @@ -1,87 +0,0 @@ -package server - -import ( - "context" - "net/http/httptest" - "testing" - "time" - - "github.com/redis/go-redis/v9" - "go.mongodb.org/mongo-driver/v2/bson" -) - -func runOverviewIntegration(t *testing.T, base *Server) { - ctx := context.Background() - db := base.Store.DB.Client().Database("overview_" + bson.NewObjectID().Hex()) - defer db.Drop(ctx) - options := *base.Store.Redis.Options() - options.DB = 15 - redisClient := redis.NewClient(&options) - defer redisClient.Close() - if err := redisClient.FlushDB(ctx).Err(); err != nil { - t.Fatal(err) - } - defer redisClient.FlushDB(ctx) - s := &Server{Store: &Store{DB: db, Redis: redisClient}, started: time.Now()} - now := time.Now() - // Recent activity is independent of status and of the creation timestamp. - for i, row := range []M{ - {"status": "ready", "anonymizeDate": now.Add(-48 * time.Hour), "lastView": now}, - {"status": "removed", "anonymizeDate": now, "lastView": now.Add(-48 * time.Hour)}, - {"status": "error", "anonymizeDate": now.Add(-23 * time.Hour), "lastView": now.Add(-23 * time.Hour), "statusDate": now}, - {"status": "ready", "anonymizeDate": now.Add(-25 * time.Hour), "lastView": now.Add(-25 * time.Hour)}, - {"status": "ready"}, - } { - row["repoId"] = "overview-" + string(rune('a'+i)) - if _, err := db.Collection(collection("repo")).InsertOne(ctx, row); err != nil { - t.Fatal(err) - } - } - for _, row := range []M{{"dateOfEntry": now}, {"dateOfEntry": now.Add(-23 * time.Hour)}, {"dateOfEntry": now.Add(-25 * time.Hour)}, {}} { - if _, err := db.Collection("users").InsertOne(ctx, row); err != nil { - t.Fatal(err) - } - } - - today := now.UTC().Truncate(24 * time.Hour) - for _, at := range []time.Time{today.AddDate(0, 0, -30), today.AddDate(0, 0, -29), today.AddDate(0, 0, -1), today.Add(12 * time.Hour)} { - if _, err := db.Collection("dailystats").InsertOne(ctx, M{"date": at, "nbRepositories": 999, "nbUsers": 999, "nbPageViews": 999, "nbPullRequests": 999}); err != nil { - t.Fatal(err) - } - } - if err := redisClient.Set(ctx, publicStatsKey, `{"nbRepositories":999,"nbUsers":999,"nbPageViews":999,"nbPullRequests":999}`, time.Hour).Err(); err != nil { - t.Fatal(err) - } - result, err := s.overview(&request{Server: s, R: httptest.NewRequest("GET", "/api/admin/overview?days=1", nil)}) - if err != nil { - t.Fatal(err) - } - repos, users := obj(obj(result)["repos"]), obj(obj(result)["users"]) - for key, want := range map[string]int64{"total": 5, "activeRepos24h": 2, "newRepos24h": 2, "recentErrors24h": 1} { - if number(repos[key]) != want { - t.Fatalf("repos.%s = %v, want %d", key, repos[key], want) - } - } - if number(users["total"]) != 4 || number(users["newUsers24h"]) != 2 { - t.Fatalf("user counts: %v", users) - } - history := obj(result)["history"].([]M) - if len(history) != 3 || !date(history[0]["date"]).Equal(today.AddDate(0, 0, -29)) || !date(history[2]["date"]).Equal(today) || number(history[2]["nbRepositories"]) != 5 { - t.Fatal("admin history used stale cache, caller window or duplicate today", history) - } - if len(obj(obj(result)["errors"])) != 2 { - t.Fatal("overview error-summary shape", obj(result)["errors"]) - } - - // Optional error counters must not take down the overview on malformed or - // unavailable telemetry, matching TypeScript's independent best-effort block. - key := "admin:errors:hourly:" + time.Now().UTC().Format("2006010215") - if err := redisClient.Set(ctx, key, "invalid-history-type", time.Minute).Err(); err != nil { - t.Fatal(err) - } - degraded, err := s.overview(&request{Server: s, R: httptest.NewRequest("GET", "/api/admin/overview", nil)}) - if err != nil || number(obj(obj(degraded)["errors"])["last24h"]) != 0 { - t.Fatal("optional errors broke overview", degraded, err) - } - -} diff --git a/backend/internal/server/partial_tree_test.go b/backend/internal/server/partial_tree_test.go deleted file mode 100644 index 6c30770..0000000 --- a/backend/internal/server/partial_tree_test.go +++ /dev/null @@ -1,119 +0,0 @@ -package server - -import ( - "context" - "encoding/json" - "fmt" - "io" - "net/http" - "net/http/httptest" - "reflect" - "strings" - "testing" - - "github.com/tdurieux/anonymous_github/backend/internal/provider" - "go.mongodb.org/mongo-driver/v2/bson" -) - -// Keep this optional capability off fixtureProvider: wrappers that override -// Tree must continue exercising their own retry, rate-limit and blocking paths. -type partialTreeFixture struct { - *fixtureProvider - onPartialTree func(context.Context, provider.Access) ([]provider.Entry, []string, error) -} - -func (p *partialTreeFixture) TreeWithTruncation(ctx context.Context, a provider.Access) ([]provider.Entry, []string, error) { - return p.onPartialTree(ctx, a) -} - -func runPartialTreeIntegration(t *testing.T, s *Server, p *fixtureProvider) { - t.Run("partial provider tree import beyond old limit", func(t *testing.T) { - ctx := t.Context() - original, err := s.Store.one(ctx, collection("repo"), M{"repoId": "second-provider"}) - if err != nil || original == nil { - t.Fatal(err) - } - repo := selectFields(original, "owner", "source", "providerAccess") - id := "partial-" + bson.NewObjectID().Hex() - repo["_id"], repo["repoId"], repo["status"] = bson.NewObjectID(), id, "preparing" - repo["options"] = M{"terms": []string{"docs => redacted"}} - if _, err = s.Store.DB.Collection(collection("repo")).InsertOne(ctx, repo); err != nil { - t.Fatal(err) - } - defer s.Store.DB.Collection(collection("repo")).DeleteOne(ctx, M{"repoId": id}) - defer s.Store.DB.Collection("files").DeleteMany(ctx, M{"repoId": id}) - originalRegistry := s.providers - defer func() { s.providers = originalRegistry }() - partial := &partialTreeFixture{fixtureProvider: p} - s.providers, err = provider.New(partial) - if err != nil { - t.Fatal(err) - } - partial.onPartialTree = func(context.Context, provider.Access) ([]provider.Entry, []string, error) { - return nil, []string{"../escape"}, nil - } - if err = s.prepareTree(ctx, repo); err == nil || err.Error() != "invalid_file_path" { - t.Fatal(err) - } - partial.onPartialTree = func(context.Context, provider.Access) ([]provider.Entry, []string, error) { - rows := make([]provider.Entry, 100001) - for i := range rows { - rows[i] = provider.Entry{Path: fmt.Sprintf("docs/file-%06d", i), Revision: "opaque:entry", Size: 1} - } - return rows, []string{"docs"}, nil - } - if err = s.prepareTree(ctx, repo); err != nil { - t.Fatal(err) - } - current, err := s.Store.one(ctx, collection("repo"), M{"repoId": id}) - if err != nil || str(current["status"]) != "ready" || !reflect.DeepEqual(stringsOf(current["truncatedFolders"]), []string{"docs"}) { - t.Fatal(current, err) - } - if count, err := s.Store.DB.Collection("files").CountDocuments(ctx, M{"repoId": id, "treeGeneration": current["treeGeneration"]}); err != nil || count != 100001 { - t.Fatal(count, err) - } - request := httptest.NewRequest("GET", "/api/repo/"+id+"/options", nil) - request.RemoteAddr = "198.51.100.66:1234" - response := httptest.NewRecorder() - s.ServeHTTP(response, request) - var body M - if err := json.Unmarshal(response.Body.Bytes(), &body); err != nil { - t.Fatal(err) - } - if response.Code != 200 || !reflect.DeepEqual(stringsOf(body["truncatedFolders"]), []string{"redacted"}) { - t.Fatal(response.Code, body) - } - - }) -} - -func runGitHubPartialTreeIntegration(t *testing.T, s *Server, owner any) { - t.Run("GitHub incomplete directory tree", func(t *testing.T) { - old := s.HTTP - defer func() { s.HTTP = old }() - commit, child := strings.Repeat("a", 40), strings.Repeat("b", 40) - s.HTTP = &http.Client{Transport: roundTrip(func(r *http.Request) (*http.Response, error) { - var payload M - switch r.URL.Path { - case "/repos/owner/repo/git/trees/" + commit: - if r.URL.Query().Get("recursive") == "1" { - payload = M{"truncated": true, "tree": []M{}} - } else { - payload = M{"truncated": true, "tree": []M{{"path": "docs", "sha": child, "type": "tree"}, {"path": "root.txt", "sha": commit, "type": "blob", "size": 1}, {"path": "submodule", "sha": commit, "type": "commit"}}} - } - case "/repos/owner/repo/git/trees/" + child: - payload = M{"truncated": true, "tree": []M{{"path": "visible.txt", "sha": commit, "type": "blob", "size": 2}}} - default: - t.Fatal("unexpected tree path", r.URL.Path) - } - raw, _ := json.Marshal(payload) - return &http.Response{StatusCode: 200, Header: http.Header{}, Body: io.NopCloser(strings.NewReader(string(raw)))}, nil - })} - g := &githubProvider{s} - a := provider.Access{OwnerID: str(owner), Ref: provider.Ref{Provider: "github", Name: "owner/repo", Commit: commit}, Binding: map[string]any{"kind": "oauth"}} - entries, folders, err := g.TreeWithTruncation(t.Context(), a) - if err != nil || !reflect.DeepEqual(folders, []string{"", "docs"}) || len(entries) != 4 || entries[3].Path != "docs/visible.txt" || entries[2].Path != "submodule" || !entries[2].Directory { - t.Fatal(entries, folders, err) - } - }) -} diff --git a/backend/internal/server/pathindex.go b/backend/internal/server/pathindex.go deleted file mode 100644 index 5c5069e..0000000 --- a/backend/internal/server/pathindex.go +++ /dev/null @@ -1,390 +0,0 @@ -package server - -import ( - "context" - "crypto/sha256" - "encoding/hex" - "encoding/json" - "errors" - "github.com/tdurieux/anonymous_github/backend/internal/anonymize" - "github.com/tdurieux/anonymous_github/backend/internal/security" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/mongo/options" - "path" - "regexp" - "strings" - "time" -) - -var errPathMetadataRepaired = errors.New("path metadata repaired") - -func (s *Server) pathIndexKey(r M) string { - fingerprint, _ := json.Marshal([]any{r["_id"], r["treeGeneration"], r["settingsSavedAt"], r["fileMetadataRevision"], r["contentCacheRevision"], obj(r["source"])["commit"], r["anonymizeDate"], obj(r["options"])["terms"], s.Config.Mask, "go-path-v5"}) - digest := sha256.Sum256(fingerprint) - return "go:paths:" + hex.EncodeToString(digest[:]) -} - -// Website paths must reject collisions, unlike the legacy file endpoint's -// first-match behavior. Read readiness, row and collision markers atomically. -func (s *Server) indexedWebFile(ctx context.Context, r M, requested string) (M, error) { - // Without custom replacements, every changed path contains the default mask. - // A mask-free path can therefore only name an unchanged original. Confirm - // that property, reject duplicate rows, and retain the full collision check - // for malformed trees where a file also has descendants. - plain := requested != "" && s.Config.Mask != "" && !strings.Contains(requested, s.Config.Mask) - for _, term := range arr(obj(r["options"])["terms"]) { - _, _, custom := anonymize.ParseTerm(str(term)) - plain = plain && !custom - } - if plain { - cacheKey := s.pathIndexKey(r) + ":" + requested - if row := s.cachedPlainWebFile(cacheKey); row != nil { - if err := s.checkPathSnapshot(ctx, r); err != nil { - return nil, err - } - return row, nil - } - engine, err := s.engine(r, "repo") - if err != nil { - return nil, err - } - transformed, err := engine.Path(ctx, requested) - if err != nil { - return nil, err - } - if transformed == requested { - directory := path.Dir(requested) - if directory == "." { - directory = "" - } - rows, err := s.Store.list(ctx, "files", M{"repoId": r["repoId"], "treeGeneration": activeGeneration(r), "path": directory, "name": path.Base(requested)}, 2, nil) - if err != nil { - return nil, err - } - if len(rows) > 1 { - return nil, fail("ambiguous_anonymized_path", 409) - } - if len(rows) == 1 && rows[0]["size"] != nil { - child, err := s.Store.one(ctx, "files", M{"repoId": r["repoId"], "treeGeneration": activeGeneration(r), "path": M{"$regex": "^" + regexp.QuoteMeta(requested) + "(?:/|$)"}}) - if err != nil { - return nil, err - } - if child == nil { - if err := s.completeRecoveredMetadata(ctx, r, rows[0]); err != nil { - return nil, err - } - if err := s.checkPathSnapshot(ctx, r); err != nil { - return nil, err - } - s.cachePlainWebFile(s.pathIndexKey(r)+":"+requested, rows[0]) - return rows[0], nil - } - } - } - } - - for attempt := 0; attempt < 3; attempt++ { - key := s.pathIndexKey(r) - values, err := s.Store.Redis.HMGet(ctx, key, "ready", "p:"+requested, "collision:"+requested, "childcollision:"+requested).Result() - if err != nil { - return nil, err - } - if values[0] != "1" { - if err := s.ensurePathIndex(ctx, r, key); err != nil && !errors.Is(err, errPathMetadataRepaired) { - return nil, err - } - continue - } - if err := s.checkPathSnapshot(ctx, r); err != nil { - return nil, err - } - if values[2] != nil || values[3] != nil { - return nil, fail("ambiguous_anonymized_path", 409) - } - if values[1] == nil { - return nil, nil - } - raw, ok := values[1].(string) - var row M - if !ok || json.Unmarshal([]byte(raw), &row) != nil { - return nil, fail("path_index_invalid", 503) - } - return row, nil - } - return nil, fail("path_index_busy", 503) -} - -func (s *Server) indexedFile(ctx context.Context, r M, requested string) (result M, resultErr error) { - defer func() { - if resultErr == nil { - if err := s.checkPathSnapshot(ctx, r); err != nil { - result, resultErr = nil, err - } - } - }() - directory := path.Dir(requested) - if directory == "." { - directory = "" - } - exact, err := s.Store.one(ctx, "files", M{"repoId": r["repoId"], "treeGeneration": activeGeneration(r), "path": directory, "name": path.Base(requested)}) - if err != nil { - return nil, err - } - if exact != nil { - if err := s.completeRecoveredMetadata(ctx, r, exact); err != nil { - return nil, err - } - return exact, nil - } - // Read readiness and the entry atomically. Retry once after eviction or - // metadata repair, which changes the revision used by the cache key. - for attempt := 0; attempt < 2; attempt++ { - key := s.pathIndexKey(r) - if err := s.ensurePathIndex(ctx, r, key); err != nil { - if errors.Is(err, errPathMetadataRepaired) { - continue - } - return nil, err - } - values, err := s.Store.Redis.HMGet(ctx, key, "ready", "p:"+requested).Result() - if err != nil { - return nil, err - } - if values[0] != "1" { - continue - } - if values[1] == nil { - if err := s.checkPathSnapshot(ctx, r); err != nil { - return nil, err - } - return s.recoverTruncatedFile(ctx, r, requested) - } - raw, ok := values[1].(string) - var row M - if !ok || json.Unmarshal([]byte(raw), &row) != nil { - return nil, fail("path_index_invalid", 503) - } - return row, nil - } - if err := s.checkPathSnapshot(ctx, r); err != nil { - return nil, err - } - return nil, fail("path_index_busy", 503) -} - -func (s *Server) ensurePathIndex(ctx context.Context, r M, key string) error { - ready, e := s.Store.Redis.HExists(ctx, key, "ready").Result() - if e != nil { - return e - } - if !ready { - token, e := security.RandomToken() - if e != nil { - return e - } - lock := key + ":lock" - acquired, e := s.Store.Redis.SetNX(ctx, lock, token, time.Minute).Result() - if e != nil { - return e - } - if acquired { - cleanup := func() { - release, cancel := context.WithTimeout(context.WithoutCancel(ctx), 5*time.Second) - defer cancel() - s.Store.Redis.Eval(release, `if redis.call('GET',KEYS[1])==ARGV[1] then return redis.call('DEL',KEYS[1]) end;return 0`, []string{lock}, token) - } - defer cleanup() - if e = s.buildPathIndex(ctx, r, key, token); e != nil { - return e - } - } else { - wait, cancel := context.WithTimeout(ctx, 10*time.Second) - defer cancel() - ticker := time.NewTicker(100 * time.Millisecond) - defer ticker.Stop() - for !ready { - select { - case <-wait.Done(): - return fail("path_index_busy", 503) - case <-ticker.C: - ready, e = s.Store.Redis.HExists(wait, key, "ready").Result() - if e != nil { - return e - } - } - } - } - } - return nil -} - -func (s *Server) buildPathIndex(ctx context.Context, r M, key, token string) error { - select { - case s.pathBuilds <- struct{}{}: - defer func() { <-s.pathBuilds }() - case <-ctx.Done(): - return ctx.Err() - } - work := ctx - if err := s.checkPathSnapshot(work, r); err != nil { - return err - } - cursor, e := s.Store.DB.Collection("files").Find(work, M{"repoId": r["repoId"], "treeGeneration": activeGeneration(r)}, options.Find().SetSort(bson.D{{Key: "path", Value: 1}, {Key: "name", Value: 1}}).SetBatchSize(256).SetProjection(M{"path": 1, "name": 1, "size": 1, "sha": 1, "metadataPending": 1, "recoverySnapshot": 1})) - if e != nil { - return e - } - defer cursor.Close(ctx) - engine, e := s.engine(r, "repo") - if e != nil { - return e - } - temp := key + ":" + token - defer func() { - cleanup, cancel := context.WithTimeout(context.WithoutCancel(ctx), 5*time.Second) - defer cancel() - _ = s.Store.Redis.Del(cleanup, temp).Err() - }() - // Bounded batches avoid retaining the repository's entire index in Go. - // HSETNX preserves the first original path/name across batch boundaries. - sequence := 0 - batchBytes := 0 - batch := []any{token, sequence} - flush := func() error { - if len(batch) == 2 { - return nil - } - written, err := s.Store.Redis.Eval(work, ` -if redis.call('GET',KEYS[1]) ~= ARGV[1] then return 0 end -if tonumber(ARGV[2]) > 0 and redis.call('HGET',KEYS[2],'batch') ~= ARGV[2] then return 0 end -for i=3,#ARGV,2 do - local added = redis.call('HSETNX',KEYS[2],ARGV[i],ARGV[i+1]) - if added == 0 and string.sub(ARGV[i],1,2) == 'p:' then - local path = string.sub(ARGV[i],3) - local parent = string.match(path,'^(.*)/[^/]*$') or '' - redis.call('HSET',KEYS[2],'collision:'..path,'1','childcollision:'..parent,'1') - end -end -redis.call('HSET',KEYS[2],'batch',tonumber(ARGV[2])+1) -redis.call('PEXPIRE',KEYS[1],60000) -redis.call('PEXPIRE',KEYS[2],60000) -return 1`, []string{key + ":lock", temp}, batch...).Int() - if err != nil { - return err - } - if written != 1 { - return fail("path_index_busy", 503) - } - sequence++ - batchBytes = 0 - batch = []any{token, sequence} - return nil - } - repaired := false - for cursor.Next(work) { - var row M - if e := cursor.Decode(&row); e != nil { - return e - } - if row["metadataPending"] == true { - if err := s.completeRecoveredMetadata(work, r, row); err != nil { - return err - } - repaired = true - } - p, e := engine.Path(work, path.Join(str(row["path"]), str(row["name"]))) - if e != nil { - return e - } - if _, e = security.RelativePath(p); e != nil { - return fail("invalid_anonymized_path", 422) - } - field := "p:" + p - data, err := json.Marshal(selectFields(row, "path", "name", "size", "sha")) - if err != nil { - return err - } - size := len(field) + len(data) - if batchBytes > 0 && batchBytes+size > 1024*1024 { - if err := flush(); err != nil { - return err - } - } - batch = append(batch, field, string(data)) - batchBytes += size - if len(batch) >= 1002 || batchBytes >= 1024*1024 { - if err := flush(); err != nil { - return err - } - } - } - if e := cursor.Err(); e != nil { - return e - } - if repaired { - // Never publish under the revision from before recovery. The caller - // rebuilds using the updated repository snapshot and cache key. - return errPathMetadataRepaired - } - batch = append(batch, "ready", "1") - if e = flush(); e != nil { - return e - } - if err := s.checkPathSnapshot(work, r); err != nil { - return err - } - // A builder whose lease expired must not replace a newer builder's result. - published, e := s.Store.Redis.Eval(work, `if redis.call('GET',KEYS[1]) ~= ARGV[1] then return 0 end; redis.call('RENAME',KEYS[2],KEYS[3]); redis.call('EXPIRE',KEYS[3],600); return 1`, []string{key + ":lock", temp, key}, token).Int() - if e != nil { - return e - } - if published != 1 { - return fail("path_index_busy", 503) - } - return s.checkPathSnapshot(work, r) -} - -// checkPathSnapshot rejects rows read under retired settings or metadata. -// Cache-presence bookkeeping may change statusDate without changing file paths. -func pathSnapshotFilter(r M) M { - filter := contentRevisionFilter(r) - for _, field := range []string{"fileMetadataRevision"} { - if value, ok := r[field]; ok { - filter[field] = value - } else { - filter[field] = M{"$exists": false} - } - } - if value, ok := obj(r["source"])["commit"]; ok { - filter["source.commit"] = value - } else { - filter["source.commit"] = M{"$exists": false} - } - if value, ok := obj(r["options"])["terms"]; ok { - filter["options.terms"] = value - } else { - filter["options.terms"] = M{"$exists": false} - } - return filter -} - -func (s *Server) checkPathSnapshot(ctx context.Context, r M) error { - return s.checkPathSnapshotStatus(ctx, r, false) -} -func (s *Server) checkPathSnapshotStatus(ctx context.Context, r M, allowArchived bool) error { - current, err := s.Store.one(ctx, collection("repo"), pathSnapshotFilter(r)) - if err != nil { - return err - } - if current == nil { - return fail("repository_changed", 409) - } - switch str(current["status"]) { - case "expired", "expiring", "removed", "removing": - return fail("repository_changed", 409) - case "archived": - if !allowArchived { - return fail("repository_changed", 409) - } - } - return nil -} diff --git a/backend/internal/server/pathindex_eviction_test.go b/backend/internal/server/pathindex_eviction_test.go deleted file mode 100644 index 94001b6..0000000 --- a/backend/internal/server/pathindex_eviction_test.go +++ /dev/null @@ -1,98 +0,0 @@ -package server - -import ( - "context" - "fmt" - "testing" - - "github.com/redis/go-redis/v9" - "go.mongodb.org/mongo-driver/v2/bson" -) - -type pathReadHook struct { - before func(context.Context, string) error -} - -func (h *pathReadHook) DialHook(next redis.DialHook) redis.DialHook { return next } -func (h *pathReadHook) ProcessPipelineHook(next redis.ProcessPipelineHook) redis.ProcessPipelineHook { - return next -} -func (h *pathReadHook) ProcessHook(next redis.ProcessHook) redis.ProcessHook { - return func(ctx context.Context, cmd redis.Cmder) error { - if cmd.Name() == "hmget" { - if err := h.before(ctx, fmt.Sprint(cmd.Args()[1])); err != nil { - return err - } - } - return next(ctx, cmd) - } -} - -func runPathIndexEvictionIntegration(t *testing.T, s *Server) { - t.Run("content path index cache eviction", func(t *testing.T) { - for _, mode := range []string{"once", "always", "missing", "retired"} { - t.Run(mode, func(t *testing.T) { - ctx := t.Context() - id := "path-eviction-" + bson.NewObjectID().Hex() - repo := M{"_id": bson.NewObjectID(), "repoId": id, "status": "ready", "treeGeneration": "fixture", "options": M{"terms": []string{"alice => shared"}}} - if _, err := s.Store.DB.Collection(collection("repo")).InsertOne(ctx, repo); err != nil { - t.Fatal(err) - } - defer s.Store.DB.Collection(collection("repo")).DeleteOne(ctx, M{"repoId": id}) - defer s.Store.DB.Collection("files").DeleteMany(ctx, M{"repoId": id}) - if _, err := s.Store.DB.Collection("files").InsertOne(ctx, M{"repoId": id, "treeGeneration": "fixture", "path": "", "name": "alice.txt", "sha": "original", "size": 1}); err != nil { - t.Fatal(err) - } - client := redis.NewClient(s.Store.Redis.Options()) - defer client.Close() - reads := 0 - key := "" - defer func() { - if key != "" { - s.Store.Redis.Del(ctx, key, key+":lock") - } - }() - client.AddHook(&pathReadHook{before: func(ctx context.Context, k string) error { - key = k - reads++ - if reads == 1 || mode == "always" { - if err := s.Store.Redis.Del(ctx, key).Err(); err != nil { - return err - } - } - if mode == "retired" { - _, err := s.Store.DB.Collection(collection("repo")).UpdateOne(ctx, M{"repoId": id}, M{"$set": M{"fileMetadataRevision": "retired"}}) - return err - } - return nil - }}) - isolated := &Server{Config: s.Config, Store: &Store{DB: s.Store.DB, Redis: client}, providers: s.providers, pathBuilds: s.pathBuilds} - requested := "shared.txt" - if mode == "missing" { - requested = "missing.txt" - } - row, err := isolated.indexedFile(ctx, repo, requested) - if mode == "once" { - if err != nil || row["sha"] != "original" || reads != 2 { - t.Fatal("eviction lost existing file", row, err, reads) - } - return - } - want, status := "path_index_busy", 503 - if mode == "missing" { - want, status = "file_not_found", 404 - } - if mode == "retired" { - want, status = "repository_changed", 409 - } - api, ok := err.(*APIError) - if !ok || api.Code != want || api.Status != status || row != nil { - t.Fatal(mode, row, err, want) - } - if reads > 2 { - t.Fatal("unbounded cache rebuild", reads) - } - }) - } - }) -} diff --git a/backend/internal/server/pathindex_parity_test.go b/backend/internal/server/pathindex_parity_test.go deleted file mode 100644 index e36c120..0000000 --- a/backend/internal/server/pathindex_parity_test.go +++ /dev/null @@ -1,272 +0,0 @@ -package server - -import ( - "context" - "encoding/json" - "errors" - "fmt" - "github.com/redis/go-redis/v9" - "net" - "strings" - "testing" - "time" - - "go.mongodb.org/mongo-driver/v2/bson" -) - -// Inject failure after a real staging write without changing the shared client. -type pathBatchHook struct { - after func(context.Context) error - fired bool -} - -func (h *pathBatchHook) DialHook(next redis.DialHook) redis.DialHook { - return func(ctx context.Context, network, address string) (net.Conn, error) { - return next(ctx, network, address) - } -} -func (h *pathBatchHook) ProcessPipelineHook(next redis.ProcessPipelineHook) redis.ProcessPipelineHook { - return next -} -func (h *pathBatchHook) ProcessHook(next redis.ProcessHook) redis.ProcessHook { - return func(ctx context.Context, cmd redis.Cmder) error { - err := next(ctx, cmd) - if err == nil && !h.fired && cmd.Name() == "eval" && len(cmd.Args()) > 1 && strings.Contains(fmt.Sprint(cmd.Args()[1]), "HSETNX") { - h.fired = true - return h.after(ctx) - } - return err - } -} - -func runPathIndexParityIntegration(t *testing.T, s *Server) { - t.Run("content path index streams beyond former size limit", func(t *testing.T) { - ctx := t.Context() - id := "path-index-large-" + bson.NewObjectID().Hex() - repo := M{"_id": bson.NewObjectID(), "repoId": id, "status": "ready", "treeGeneration": "fixture", "options": M{"terms": []string{"alice => shared", "bob => shared"}}} - if _, err := s.Store.DB.Collection(collection("repo")).InsertOne(ctx, repo); err != nil { - t.Fatal(err) - } - defer s.Store.DB.Collection(collection("repo")).DeleteOne(ctx, M{"repoId": id}) - defer s.Store.DB.Collection("files").DeleteMany(ctx, M{"repoId": id}) - directory := strings.Repeat("directory/", 180) + "leaf" - rows := []any{} - encodedBytes := 0 - for i := 0; i < 10000; i++ { - row := M{"repoId": id, "treeGeneration": "fixture", "path": directory, "name": fmt.Sprintf("alice-%05d.txt", i), "sha": fmt.Sprint(i), "size": 1} - raw, _ := json.Marshal(selectFields(row, "path", "name", "size", "sha")) - encodedBytes += len(raw) + len("p:"+directory+"/shared-00000.txt") - rows = append(rows, row) - if len(rows) == 500 { - if _, err := s.Store.DB.Collection("files").InsertMany(ctx, rows); err != nil { - t.Fatal(err) - } - rows = nil - } - } - if encodedBytes <= 32*1024*1024 { - t.Fatal("fixture does not exceed old limit", encodedBytes) - } - // This collision occurs after all alice rows, across twenty batches. - if _, err := s.Store.DB.Collection("files").InsertOne(ctx, M{"repoId": id, "treeGeneration": "fixture", "path": directory, "name": "bob-00000.txt", "sha": "later", "size": 1}); err != nil { - t.Fatal(err) - } - key := "test-large-path-" + bson.NewObjectID().Hex() - defer s.Store.Redis.Del(ctx, key, key+":lock", key+":owner") - if err := s.Store.Redis.Set(ctx, key+":lock", "owner", 20*time.Second).Err(); err != nil { - t.Fatal(err) - } - if err := s.buildPathIndex(ctx, repo, key, "owner"); err != nil { - t.Fatal(err) - } - for name, want := range map[string]string{"shared-00000.txt": "0", "shared-09999.txt": "9999"} { - raw, err := s.Store.Redis.HGet(ctx, key, "p:"+directory+"/"+name).Bytes() - if err != nil { - t.Fatal(err) - } - var row M - if err = json.Unmarshal(raw, &row); err != nil || row["sha"] != want { - t.Fatal(row, err, want) - } - } - if ttl := s.Store.Redis.TTL(ctx, key+":lock").Val(); ttl < 50*time.Second { - t.Fatal("build lease was not renewed", ttl) - } - if ready := s.Store.Redis.HGet(ctx, key, "ready").Val(); ready != "1" { - t.Fatal("index not published") - } - if count := s.Store.Redis.HLen(ctx, key).Val(); count != 10004 { - t.Fatal("unexpected indexed entries", count) - } - if s.Store.Redis.HGet(ctx, key, "collision:"+directory+"/shared-00000.txt").Val() != "1" || s.Store.Redis.HGet(ctx, key, "childcollision:"+directory).Val() != "1" { - t.Fatal("cross-batch collision markers missing") - } - if batches, err := s.Store.Redis.HGet(ctx, key, "batch").Int64(); err != nil || batches < int64((encodedBytes+1024*1024-1)/(1024*1024)) { - t.Fatal("byte target was not applied", batches, encodedBytes) - } - }) - - t.Run("content path index rejects lost staging and cancellation", func(t *testing.T) { - for _, cancelBuild := range []bool{false, true} { - ctx, cancel := context.WithCancel(t.Context()) - id := "path-index-interrupted-" + bson.NewObjectID().Hex() - repo := M{"_id": bson.NewObjectID(), "repoId": id, "status": "ready", "treeGeneration": "fixture", "options": M{"terms": []string{"alice => shared"}}} - if _, err := s.Store.DB.Collection(collection("repo")).InsertOne(ctx, repo); err != nil { - t.Fatal(err) - } - defer s.Store.DB.Collection(collection("repo")).DeleteOne(t.Context(), M{"repoId": id}) - defer s.Store.DB.Collection("files").DeleteMany(t.Context(), M{"repoId": id}) - rows := []any{} - for i := 0; i < 601; i++ { - rows = append(rows, M{"repoId": id, "treeGeneration": "fixture", "path": "", "name": fmt.Sprintf("alice-%04d.txt", i), "size": 1}) - } - if _, err := s.Store.DB.Collection("files").InsertMany(ctx, rows); err != nil { - t.Fatal(err) - } - key := "test-interrupted-path-" + bson.NewObjectID().Hex() - temp := key + ":owner" - defer s.Store.Redis.Del(t.Context(), key, key+":lock", temp) - if err := s.Store.Redis.Set(ctx, key+":lock", "owner", time.Minute).Err(); err != nil { - t.Fatal(err) - } - client := redis.NewClient(s.Store.Redis.Options()) - defer client.Close() - hook := &pathBatchHook{after: func(ctx context.Context) error { - if cancelBuild { - cancel() - return nil - } - return s.Store.Redis.Del(ctx, temp).Err() - }} - client.AddHook(hook) - isolated := &Server{Config: s.Config, providers: s.providers, Store: &Store{DB: s.Store.DB, Redis: client}, pathBuilds: s.pathBuilds} - err := isolated.buildPathIndex(ctx, repo, key, "owner") - cancel() - if !hook.fired || err == nil { - t.Fatal("interrupted build published", hook.fired, err) - } - if cancelBuild { - if !errors.Is(err, context.Canceled) { - t.Fatal(err) - } - } else if err.Error() != "path_index_busy" { - t.Fatal(err) - } - if count := s.Store.Redis.Exists(t.Context(), key, temp).Val(); count != 0 { - t.Fatal("partial index remained", count) - } - } - }) - - t.Run("content path index parity", func(t *testing.T) { - ctx := t.Context() - id := "path-index-" + bson.NewObjectID().Hex() - repo := M{"_id": bson.NewObjectID(), "repoId": id, "status": "ready", "treeGeneration": "fixture", "fileMetadataRevision": "first", "options": M{"terms": []string{"alice => shared", "bob => shared"}}} - if _, err := s.Store.DB.Collection(collection("repo")).InsertOne(ctx, repo); err != nil { - t.Fatal(err) - } - defer s.Store.DB.Collection(collection("repo")).DeleteOne(ctx, M{"repoId": id}) - defer s.Store.DB.Collection("files").DeleteMany(ctx, M{"repoId": id}) - insert := func(name, sha string) { - t.Helper() - if _, err := s.Store.DB.Collection("files").InsertOne(ctx, M{"repoId": id, "treeGeneration": "fixture", "path": "", "name": name, "size": 1, "sha": sha}); err != nil { - t.Fatal(err) - } - } - // Reverse insertion order to prove collision selection uses path/name order. - insert("bob.txt", "bob") - insert("alice.txt", "alice") - lookup := func(requested, want string) { - t.Helper() - row, err := s.indexedFile(ctx, repo, requested) - if err != nil || str(row["sha"]) != want { - t.Fatal(requested, row, err, want) - } - } - lookup("shared.txt", "alice") - lookup("bob.txt", "bob") - insert("shared.txt", "exact") - lookup("shared.txt", "exact") - if _, err := s.Store.DB.Collection("files").DeleteOne(ctx, M{"repoId": id, "name": "shared.txt"}); err != nil { - t.Fatal(err) - } - if _, err := s.Store.DB.Collection("files").UpdateOne(ctx, M{"repoId": id, "name": "alice.txt"}, M{"$set": M{"sha": "updated"}}); err != nil { - t.Fatal(err) - } - // The unchanged revision retains its snapshot; a revision change rebuilds it. - lookup("shared.txt", "alice") - repo["fileMetadataRevision"] = "second" - if _, err := s.Store.DB.Collection(collection("repo")).UpdateOne(ctx, M{"repoId": id}, M{"$set": M{"fileMetadataRevision": "second"}}); err != nil { - t.Fatal(err) - } - lookup("shared.txt", "updated") - repo["source"] = M{"provider": "fixture", "commit": "new"} - if _, err := s.Store.DB.Collection(collection("repo")).UpdateOne(ctx, M{"repoId": id}, M{"$set": M{"source.provider": "fixture", "source.commit": "new"}}); err != nil { - t.Fatal(err) - } - if _, err := s.Store.DB.Collection("files").UpdateOne(ctx, M{"repoId": id, "name": "alice.txt"}, M{"$set": M{"sha": "new-commit"}}); err != nil { - t.Fatal(err) - } - lookup("shared.txt", "new-commit") - key := "test-path-index-" + bson.NewObjectID().Hex() - defer s.Store.Redis.Del(ctx, key, key+":lock", key+":stale") - if err := s.Store.Redis.Set(ctx, key+":lock", "new-owner", time.Minute).Err(); err != nil { - t.Fatal(err) - } - if err := s.buildPathIndex(ctx, repo, key, "stale"); err == nil || err.Error() != "path_index_busy" { - t.Fatal("expired builder published", err) - } - if exists, err := s.Store.Redis.Exists(ctx, key).Result(); err != nil || exists != 0 { - t.Fatal(exists, err) - } - for _, change := range []M{ - {"fileMetadataRevision": "retired"}, - {"treeGeneration": "new-tree"}, - {"options.terms": []string{"changed"}}, - {"source.commit": "changed"}, - {"contentCacheRevision": "changed"}, - {"providerAccess.revision": "changed"}, - {"status": "archived"}, - } { - if _, err := s.Store.DB.Collection(collection("repo")).ReplaceOne(ctx, M{"repoId": id}, repo); err != nil { - t.Fatal(err) - } - if _, err := s.Store.DB.Collection(collection("repo")).UpdateOne(ctx, M{"repoId": id}, M{"$set": change}); err != nil { - t.Fatal(err) - } - for _, requested := range []string{"bob.txt", "shared.txt"} { - if row, err := s.indexedFile(ctx, repo, requested); err == nil || err.Error() != "repository_changed" || row != nil { - t.Fatal("stale lookup", change, requested, row, err) - } - } - } - if _, err := s.Store.DB.Collection(collection("repo")).ReplaceOne(ctx, M{"repoId": id}, repo); err != nil { - t.Fatal(err) - } - // Queue a builder behind the concurrency gate, then retire its metadata. - for i := 0; i < cap(s.pathBuilds); i++ { - s.pathBuilds <- struct{}{} - } - buildKey := "test-stale-build-" + bson.NewObjectID().Hex() - defer s.Store.Redis.Del(ctx, buildKey, buildKey+":lock", buildKey+":owner") - if err := s.Store.Redis.Set(ctx, buildKey+":lock", "owner", time.Minute).Err(); err != nil { - t.Fatal(err) - } - done := make(chan error, 1) - go func() { done <- s.buildPathIndex(ctx, repo, buildKey, "owner") }() - _, updateErr := s.Store.DB.Collection(collection("repo")).UpdateOne(ctx, M{"repoId": id}, M{"$set": M{"fileMetadataRevision": "retired-during-build"}}) - for i := 0; i < cap(s.pathBuilds); i++ { - <-s.pathBuilds - } - if updateErr != nil { - t.Fatal(updateErr) - } - if err := <-done; err == nil || err.Error() != "repository_changed" { - t.Fatal("retired builder succeeded", err) - } - if exists, err := s.Store.Redis.Exists(ctx, buildKey, buildKey+":owner").Result(); err != nil || exists != 0 { - t.Fatal("retired build remains visible", exists, err) - } - - }) -} diff --git a/backend/internal/server/pending_metadata.go b/backend/internal/server/pending_metadata.go deleted file mode 100644 index d1fc8cb..0000000 --- a/backend/internal/server/pending_metadata.go +++ /dev/null @@ -1,49 +0,0 @@ -package server - -import ( - "context" - "reflect" - - "go.mongodb.org/mongo-driver/v2/mongo/options" -) - -// repairPendingMetadata streams all pending rows, so idle repositories recover -// after interrupted invalidation without waiting for another file request. -func (s *Server) repairPendingMetadata(ctx context.Context) error { - cursor, err := s.Store.DB.Collection("files").Find(ctx, M{"metadataPending": true}, options.Find().SetBatchSize(128)) - if err != nil { - return err - } - defer cursor.Close(ctx) - var first error - for cursor.Next(ctx) { - var row M - if err := cursor.Decode(&row); err != nil { - return err - } - if err := s.repairPendingFile(ctx, row); err != nil && first == nil { - first = err - } - } - if err := cursor.Err(); err != nil { - return err - } - return first -} - -func (s *Server) repairPendingFile(ctx context.Context, row M) error { - repo, err := s.Store.one(ctx, collection("repo"), M{"repoId": row["repoId"]}) - if err != nil { - return err - } - retired := repo == nil || !reflect.DeepEqual(repo["treeGeneration"], row["treeGeneration"]) - switch str(repo["status"]) { - case "expiring", "expired", "removing", "removed": - retired = true - } - if retired { - _, err := s.Store.DB.Collection("files").DeleteOne(ctx, M{"_id": row["_id"], "metadataPending": true}) - return err - } - return s.completeRecoveredMetadataState(ctx, repo, row, true) -} diff --git a/backend/internal/server/pending_metadata_test.go b/backend/internal/server/pending_metadata_test.go deleted file mode 100644 index 6e5a3b3..0000000 --- a/backend/internal/server/pending_metadata_test.go +++ /dev/null @@ -1,141 +0,0 @@ -package server - -import ( - "testing" - - "go.mongodb.org/mongo-driver/v2/bson" -) - -func runPendingMetadataIntegration(t *testing.T, s *Server) { - t.Run("pending file metadata transformed lookup", func(t *testing.T) { - for _, stale := range []bool{false, true} { - t.Run(map[bool]string{false: "valid", true: "stale"}[stale], func(t *testing.T) { - ctx := t.Context() - id := "pending-index-" + bson.NewObjectID().Hex() - repo := M{"_id": bson.NewObjectID(), "repoId": id, "status": "ready", "treeGeneration": "current", "fileMetadataRevision": "before", "source": M{"provider": "fixture", "commit": "current"}, "options": M{"terms": []string{"alice => shared"}}} - if _, err := s.Store.DB.Collection(collection("repo")).InsertOne(ctx, repo); err != nil { - t.Fatal(err) - } - defer s.Store.DB.Collection(collection("repo")).DeleteOne(ctx, M{"repoId": id}) - defer s.Store.DB.Collection("files").DeleteMany(ctx, M{"repoId": id}) - snapshot := pathSnapshotFilter(repo) - delete(snapshot, "fileMetadataRevision") - if stale { - snapshot["source.commit"] = "retired" - } - for _, name := range []string{"alice-one.txt", "alice-two.txt"} { - if _, err := s.Store.DB.Collection("files").InsertOne(ctx, M{"repoId": id, "treeGeneration": "current", "path": "", "name": name, "sha": "blob", "size": 1, "metadataPending": true, "recoverySnapshot": snapshot}); err != nil { - t.Fatal(err) - } - } - row, err := s.indexedFile(ctx, repo, "shared-one.txt") - if stale { - if err == nil || err.Error() != "repository_changed" || row != nil { - t.Fatal("stale pending metadata served", row, err) - } - count, e := s.Store.DB.Collection("files").CountDocuments(ctx, M{"repoId": id, "name": "alice-one.txt"}) - if e != nil || count != 0 { - t.Fatal("stale row retained", count, e) - } - return - } - if err != nil || row["sha"] != "blob" { - t.Fatal(row, err) - } - current, err := s.Store.one(ctx, collection("repo"), M{"repoId": id}) - if err != nil || current["fileMetadataRevision"] == "before" { - t.Fatal("metadata revision not repaired", current, err) - } - if count, err := s.Store.DB.Collection("files").CountDocuments(ctx, M{"repoId": id, "metadataPending": true}); err != nil || count != 0 { - t.Fatal("pending metadata not repaired", count, err) - } - if row, err := s.indexedFile(ctx, current, "shared-two.txt"); err != nil || row["sha"] != "blob" { - t.Fatal("repaired index unavailable", row, err) - } - }) - } - }) - - t.Run("pending file metadata maintenance", func(t *testing.T) { - ctx := t.Context() - prefix := "pending-" + bson.NewObjectID().Hex() - ids := []string{} - defer func() { - s.Store.DB.Collection("files").DeleteMany(ctx, M{"repoId": M{"$in": ids}}) - s.Store.DB.Collection(collection("repo")).DeleteMany(ctx, M{"repoId": M{"$in": ids}}) - }() - for _, kind := range []string{"ready", "legacy", "missing", "generation", "expired", "removing", "archived", "stale-source"} { - id := prefix + "-" + kind - ids = append(ids, id) - repo := M{"_id": bson.NewObjectID(), "repoId": id, "status": "ready", "treeGeneration": "current", "fileMetadataRevision": "before", "options": M{"terms": []string{}}} - if kind == "legacy" { - delete(repo, "treeGeneration") - } - if kind == "expired" || kind == "removing" || kind == "archived" { - repo["status"] = kind - } - if kind != "missing" { - if _, err := s.Store.DB.Collection(collection("repo")).InsertOne(ctx, repo); err != nil { - t.Fatal(err) - } - } - row := M{"repoId": id, "path": "", "name": "file.txt", "size": 1, "sha": "opaque", "metadataPending": true} - if kind != "legacy" { - row["treeGeneration"] = "current" - } - if kind == "generation" { - row["treeGeneration"] = "old" - } - if kind == "stale-source" { - row["recoverySnapshot"] = M{"_id": repo["_id"], "source.commit": "retired"} - } - if _, err := s.Store.DB.Collection("files").InsertOne(ctx, row); err != nil { - t.Fatal(err) - } - } - // A stale provenance row reports a conflict, but must not stop other repairs. - if err := s.repairPendingMetadata(ctx); err == nil || err.Error() != "repository_changed" { - t.Fatal(err) - } - for _, kind := range []string{"ready", "legacy", "missing", "generation", "expired", "removing", "archived", "stale-source"} { - id := prefix + "-" + kind - row, err := s.Store.one(ctx, "files", M{"repoId": id}) - if err != nil { - t.Fatal(err) - } - switch kind { - case "ready", "legacy", "archived": - if row == nil || boolean(row["metadataPending"]) { - t.Fatal(kind, row) - } - repo, err := s.Store.one(ctx, collection("repo"), M{"repoId": id}) - if err != nil || repo["fileMetadataRevision"] == "before" { - t.Fatal(kind, repo, err) - } - if kind == "archived" { - if row, err := s.indexedFile(ctx, repo, "file.txt"); err == nil || row != nil { - t.Fatal("archived content lookup allowed", row, err) - } - } - default: - if row != nil { - t.Fatal(kind, "retired row retained", row) - } - } - } - // A completed row remains even if a stale maintenance cursor saw it pending. - row, err := s.Store.one(ctx, "files", M{"repoId": prefix + "-ready"}) - if err != nil { - t.Fatal(err) - } - if _, err = s.Store.DB.Collection(collection("repo")).DeleteOne(ctx, M{"repoId": prefix + "-ready"}); err != nil { - t.Fatal(err) - } - if err = s.repairPendingFile(ctx, row); err != nil { - t.Fatal(err) - } - if count, err := s.Store.DB.Collection("files").CountDocuments(ctx, M{"_id": row["_id"]}); err != nil || count != 1 { - t.Fatal(count, err) - } - }) -} diff --git a/backend/internal/server/permission_cache.go b/backend/internal/server/permission_cache.go deleted file mode 100644 index 07a9f40..0000000 --- a/backend/internal/server/permission_cache.go +++ /dev/null @@ -1,45 +0,0 @@ -package server - -import ( - "crypto/sha256" - "encoding/json" - "sync" - "time" -) - -// Cache only successful remote checks. Callers must still check local account, -// credential and installation state on every request. Revision and token changes -// select a different entry; reads never extend the original freshness deadline. -type permissionCache struct { - mu sync.Mutex - entries map[[32]byte]time.Time -} - -func (s *Server) cachedPermission(parts []string, check func() error) error { - ttl := s.Config.GitHubPermissionTTL - if ttl <= 0 { - return check() - } - if ttl > time.Hour { - ttl = time.Hour - } - encoded, _ := json.Marshal(parts) - key := sha256.Sum256(encoded) - started := time.Now() - s.permissions.mu.Lock() - expiry := s.permissions.entries[key] - s.permissions.mu.Unlock() - if started.Before(expiry) { - return nil - } - if err := check(); err != nil { - return err - } - s.permissions.mu.Lock() - defer s.permissions.mu.Unlock() - if s.permissions.entries == nil || len(s.permissions.entries) >= 10000 { - s.permissions.entries = make(map[[32]byte]time.Time) - } - s.permissions.entries[key] = started.Add(ttl) - return nil -} diff --git a/backend/internal/server/permission_cache_test.go b/backend/internal/server/permission_cache_test.go deleted file mode 100644 index 3de25ed..0000000 --- a/backend/internal/server/permission_cache_test.go +++ /dev/null @@ -1,50 +0,0 @@ -package server - -import ( - "errors" - "testing" - "time" -) - -func TestPermissionCache(t *testing.T) { - s := &Server{Config: Config{GitHubPermissionTTL: time.Hour}} - calls := 0 - check := func() error { calls++; return nil } - key := []string{"owner", "token", "repo", "revision"} - for range 3 { - if err := s.cachedPermission(key, check); err != nil { - t.Fatal(err) - } - } - if calls != 1 { - t.Fatal("successful check not reused", calls) - } - for _, changed := range [][]string{{"other", "token", "repo", "revision"}, {"owner", "new-token", "repo", "revision"}, {"owner", "token", "other-repo", "revision"}, {"owner", "token", "repo", "new-revision"}} { - s.cachedPermission(changed, check) - } - if calls != 5 { - t.Fatal("cache crossed security identities", calls) - } - for k := range s.permissions.entries { - s.permissions.entries[k] = time.Now().Add(-time.Second) - } - s.cachedPermission(key, check) - if calls != 6 { - t.Fatal("expired grant reused") - } - failures := 0 - for range 2 { - if err := s.cachedPermission([]string{"denied"}, func() error { failures++; return errors.New("denied") }); err == nil { - t.Fatal("denial lost") - } - } - if failures != 2 { - t.Fatal("failure cached") - } - s.Config.GitHubPermissionTTL = 0 - s.cachedPermission(key, check) - s.cachedPermission(key, check) - if calls != 8 { - t.Fatal("disabled cache used") - } -} diff --git a/backend/internal/server/preview_branch_query.go b/backend/internal/server/preview_branch_query.go deleted file mode 100644 index cf9bc28..0000000 --- a/backend/internal/server/preview_branch_query.go +++ /dev/null @@ -1,29 +0,0 @@ -package server - -import "github.com/tdurieux/anonymous_github/backend/internal/provider" - -// Providers receive a selected branch string, not Express query objects. -func previewBranchQuery(raw, fallback string) (string, error) { - value := parseExtendedQuery(raw).object["branch"] - if !value.truthy() { - return fallback, nil - } - branch, err := value.stringValue() - if err != nil { - return "", err - } - if branch == "" { - return "", fail("readme_not_available", 404) - } - return branch, nil -} - -func previewBranchMatch(raw, fallback string) provider.BranchMatch { - value := parseExtendedQuery(raw).object["branch"] - return func(name string) (bool, error) { - if !value.truthy() { - return name == fallback, nil - } - return value.looseStringEqual(name) - } -} diff --git a/backend/internal/server/preview_branch_query_test.go b/backend/internal/server/preview_branch_query_test.go deleted file mode 100644 index c36acb5..0000000 --- a/backend/internal/server/preview_branch_query_test.go +++ /dev/null @@ -1,68 +0,0 @@ -package server - -import ( - "encoding/json" - "os" - "testing" -) - -func TestPreviewBranchContracts(t *testing.T) { - raw, err := os.ReadFile("testdata/preview-branches.json") - if err != nil { - t.Fatal(err) - } - var fixture struct { - Branches []struct{ Name string } - Cases []struct { - Query string - Selected *string - Error bool - } - } - if err = json.Unmarshal(raw, &fixture); err != nil { - t.Fatal(err) - } - for _, row := range fixture.Cases { - match := previewBranchMatch(row.Query, "main") - var selected *string - var matchErr error - for _, candidate := range fixture.Branches { - ok, err := match(candidate.Name) - if err != nil { - matchErr = err - break - } - if ok && selected == nil { - name := candidate.Name - selected = &name - } - } - if (matchErr != nil) != row.Error || !row.Error && ((selected == nil) != (row.Selected == nil) || selected != nil && *selected != *row.Selected) { - t.Fatal("deferred match", row, selected, matchErr) - } - branch, err := previewBranchQuery(row.Query, "main") - if row.Error { - if err == nil { - t.Fatal(row) - } - continue - } - if err != nil { - if row.Selected != nil || err.Error() != "readme_not_available" { - t.Fatal(row, err) - } - continue - } - var matched *string - for _, candidate := range fixture.Branches { - if candidate.Name == branch { - v := candidate.Name - matched = &v - break - } - } - if (matched == nil) != (row.Selected == nil) || matched != nil && *matched != *row.Selected { - t.Fatal(row, branch) - } - } -} diff --git a/backend/internal/server/preview_discovery_integration_test.go b/backend/internal/server/preview_discovery_integration_test.go deleted file mode 100644 index 6f7b364..0000000 --- a/backend/internal/server/preview_discovery_integration_test.go +++ /dev/null @@ -1,270 +0,0 @@ -package server - -import ( - "context" - "encoding/base64" - "encoding/json" - "errors" - "io" - "net/http" - "net/http/httptest" - "os" - "strings" - "testing" - - "github.com/tdurieux/anonymous_github/backend/internal/provider" - "go.mongodb.org/mongo-driver/v2/bson" -) - -func runPreviewDiscoveryIntegration(t *testing.T, base *Server) { - t.Run("GitHub branch and README preview caches retain authorization and commits", func(t *testing.T) { - ctx := context.Background() - owner, key := bson.NewObjectID(), bson.NewObjectID() - db := base.Store.DB.Client().Database("preview_discovery_" + owner.Hex()) - defer db.Drop(ctx) - s := &Server{Config: base.Config, Store: &Store{DB: db, Redis: base.Store.Redis}} - s.Config.AppEnabled = false - registry, err := provider.New(&githubProvider{s}) - if err != nil { - t.Fatal(err) - } - s.providers = registry - user := M{"_id": owner, "username": "owner", "status": "active"} - if _, err := db.Collection("users").InsertOne(ctx, user); err != nil { - t.Fatal(err) - } - if _, err := db.Collection("repositories").InsertOne(ctx, M{"_id": key, "externalId": "gh_42", "source": "github", "name": "team/project", "defaultBranch": "main", "branches": []M{}}); err != nil { - t.Fatal(err) - } - q := &request{Server: s, R: httptest.NewRequest("GET", "/", nil), Params: map[string]string{"owner": "team", "repo": "project"}, User: user, Identity: identity(user)} - if err := s.saveGrant(q, owner, "github", M{"access_token": "synthetic-oauth"}); err != nil { - t.Fatal(err) - } - repoCalls, branchCalls, readmeCalls := 0, 0, 0 - repoStatus, branchStatus, readmeStatus := 200, 200, 200 - emptyBranches := false - defaultBranch, branchName, sha, content := "main", "main", strings.Repeat("a", 40), "first README" - requestedRef := "" - var duringReadme, duringBranches func() - var readmeOverride M - s.HTTP = &http.Client{Transport: roundTrip(func(r *http.Request) (*http.Response, error) { - if r.Header.Get("Authorization") != "Bearer synthetic-oauth" { - t.Fatal("wrong preview credential") - } - status := 200 - var data any - switch r.URL.Path { - case "/repos/team/project": - repoCalls++ - status = repoStatus - data = M{"id": 42, "full_name": "team/project", "default_branch": defaultBranch} - case "/repos/team/project/branches": - branchCalls++ - status = branchStatus - data = []M{{"name": branchName, "commit": M{"sha": sha}}} - if emptyBranches { - data = []M{} - } - if duringBranches != nil { - duringBranches() - } - case "/repos/team/project/readme": - readmeCalls++ - status = readmeStatus - requestedRef = r.URL.Query().Get("ref") - data = M{"encoding": "base64", "content": base64.StdEncoding.EncodeToString([]byte(content))} - if readmeOverride != nil { - data = readmeOverride - } - if duringReadme != nil { - duringReadme() - } - default: - t.Fatal("unexpected preview endpoint", r.URL) - } - b, _ := json.Marshal(data) - return &http.Response{StatusCode: status, Header: http.Header{}, Body: io.NopCloser(strings.NewReader(string(b)))}, nil - })} - call := func(mode, query string) (any, string, error) { - before := repoCalls - q.R = httptest.NewRequest("GET", "/"+query, nil) - w := httptest.NewRecorder() - q.W = w - result, err := s.sourceRepository(mode)(q) - if repoCalls != before+1 { - t.Fatal("cached discovery skipped upstream access check") - } - return result, w.Body.String(), err - } - branches, _, err := call("branches", "") - if err != nil || branchCalls != 1 || len(branches.([]M)) != 1 { - t.Fatal("cold branches failed", branches, err) - } - if _, _, err = call("branches", ""); err != nil || branchCalls != 1 { - t.Fatal("branches not cached", branchCalls, err) - } - _, body, err := call("readme", "") - if err != nil || body != content || readmeCalls != 1 || requestedRef != sha || branchCalls != 1 { - t.Fatal("README not resolved at cached commit", body, requestedRef, err) - } - if _, body, err = call("readme", ""); err != nil || body != content || readmeCalls != 1 { - t.Fatal("README cache missed", body, err) - } - - for _, query := range []string{"?branch[]=main", "?branch[0]=main", "?branch=main", "?branch="} { - if _, body, err = call("readme", query); err != nil || body != content || readmeCalls != 1 { - t.Fatal(query, body, err) - } - } - for _, query := range []string{"?branch[]=", "?branch=main&branch=missing"} { - if _, _, err = call("readme", query); err == nil || err.Error() != "readme_not_available" || readmeCalls != 1 { - t.Fatal(query, err) - } - } - branches, _, err = call("branches", "") - if err != nil || branches.([]M)[0]["readme"] != content { - t.Fatal("branch output omitted cached README", branches, err) - } - sha = strings.Repeat("b", 40) - content = "second README" - branches, _, err = call("branches", "?force[]=1") - if err != nil || branches.([]M)[0]["commit"] != sha || branches.([]M)[0]["readme"] != "first README" || branchCalls != 2 { - t.Fatal("forced branches lost README by name", branches, err) - } - if _, body, err = call("readme", "?force=1"); err != nil || body != content || requestedRef != sha || readmeCalls != 2 || branchCalls != 3 { - t.Fatal("forced README did not refresh branch and content", body, err) - } - content = "" - if _, _, err = call("readme", "?force=1"); err != nil { - t.Fatal(err) - } - before := readmeCalls - if _, body, err = call("readme", ""); err != nil || body != "" || readmeCalls != before+1 { - t.Fatal("empty README must be fetched again", body, err) - } - before = readmeCalls - if _, _, err = call("readme", "?branch=missing"); err == nil || err.Error() != "readme_not_available" || readmeCalls != before { - t.Fatal("missing branch fetched README", err) - } - defaultBranch, branchName = "", "master" - sha = strings.Repeat("c", 40) - content = "master README" - if _, body, err = call("readme", "?force=1"); err != nil || body != content || requestedRef != sha { - t.Fatal("master fallback failed", body, err) - } - branchStatus = 503 - _, _, err = call("branches", "?force=1") - var api *APIError - if !errors.As(err, &api) || api.Code != "repo_not_found" || api.Status != 503 { - t.Fatal("branch error differs", err) - } - branchStatus = 200 - readmeStatus = 503 - if _, _, err = call("readme", "?force=1"); err == nil || err.Error() != "readme_not_available" { - t.Fatal("README error differs", err) - } - readmeStatus = 200 - repoStatus = 403 - before = readmeCalls - for _, query := range []string{"", "?branch[]=main", "?branch[]="} { - if _, body, err = call("readme", query); err == nil || body != "" || readmeCalls != before { - t.Fatal("cached private README bypassed denial", query, body, err) - } - } - repoStatus = 200 - content = "late README" - newer := strings.Repeat("d", 40) - duringReadme = func() { - if _, err := s.Store.update(ctx, "repositories", M{"_id": key}, M{"$set": M{"branches": []M{{"name": "master", "commit": newer, "readme": "newer README"}}, "goDiscoveryRevision": "concurrent-readme"}}); err != nil { - t.Fatal(err) - } - } - if _, body, err = call("readme", "?force=1"); err != nil || body != "late README" { - t.Fatal("inflight README failed", body, err) - } - duringReadme = nil - cached, err := s.Store.one(ctx, "repositories", M{"_id": key}) - if err != nil || obj(arr(cached["branches"])[0])["readme"] != "newer README" || obj(arr(cached["branches"])[0])["commit"] != newer { - t.Fatal("late README replaced newer branch", cached, err) - } - newest := strings.Repeat("f", 40) - sha = strings.Repeat("e", 40) - duringBranches = func() { - if _, err := s.Store.update(ctx, "repositories", M{"_id": key}, M{"$set": M{"branches": []M{{"name": "master", "commit": newest, "readme": "newest README"}}, "goDiscoveryRevision": "concurrent-branches"}}); err != nil { - t.Fatal(err) - } - } - if _, _, err = call("branches", "?force=1"); err != nil { - t.Fatal(err) - } - duringBranches = nil - cached, err = s.Store.one(ctx, "repositories", M{"_id": key}) - if err != nil || obj(arr(cached["branches"])[0])["commit"] != newest || obj(arr(cached["branches"])[0])["readme"] != "newest README" { - t.Fatal("late branch refresh overwrote newer cache", cached, err) - } - for _, test := range []struct { - data M - want string - }{ - {M{"encoding": "base64", "content": "SG Vs!bG8"}, "Hello"}, - {M{"encoding": "base64", "content": "4oI="}, "\ufffd"}, - {M{"encoding": "hex", "content": "61ff62"}, "a\ufffdb"}, - {M{"encoding": "utf8", "content": "README é"}, "README é"}, - } { - readmeOverride = test.data - if _, body, err = call("readme", "?force=1"); err != nil || body != test.want { - t.Fatal("decoded README response", body, err) - } - before := readmeCalls - if _, body, err = call("readme", ""); err != nil || body != test.want || readmeCalls != before { - t.Fatal("decoded README cache", body, err) - } - branches, _, err = call("branches", "") - if err != nil || branches.([]M)[0]["readme"] != test.want { - t.Fatal("decoded README branch output", branches, err) - } - } - for _, invalid := range []M{{"encoding": "unknown", "content": "text"}, {"encoding": "base64", "content": nil}, {"content": M{"length": float64(maxReadmeBytes + 1)}}} { - readmeOverride = invalid - _, _, err = call("readme", "?force=1") - var api *APIError - if !errors.As(err, &api) || api.Code != "readme_not_available" || api.Status != 404 { - t.Fatal("README decode error contract", err) - } - if _, body, err = call("readme", ""); err != nil || body != "README é" { - t.Fatal("failed decode damaged cache", body, err) - } - } - - raw, err := os.ReadFile("testdata/preview-branch-order.json") - if err != nil { - t.Fatal(err) - } - var contracts []struct { - Mode, Query, Error string - Status int - Calls []string - } - if err = json.Unmarshal(raw, &contracts); err != nil { - t.Fatal(err) - } - for _, row := range contracts { - emptyBranches = row.Mode == "empty" - branchStatus = 200 - if row.Mode == "failure" { - branchStatus = 503 - } - beforeBranches, beforeReadmes := branchCalls, readmeCalls - _, body, err := call("readme", "?force=1&"+row.Query) - status := 500 - var api *APIError - if errors.As(err, &api) { - status = api.Status - } - if err == nil || err.Error() != row.Error || status != row.Status || body != "" || branchCalls != beforeBranches+1 || readmeCalls != beforeReadmes { - t.Fatal(row, body, err, status, branchCalls-beforeBranches, readmeCalls-beforeReadmes) - } - } - - }) -} diff --git a/backend/internal/server/preview_hint_query.go b/backend/internal/server/preview_hint_query.go deleted file mode 100644 index cd273e4..0000000 --- a/backend/internal/server/preview_hint_query.go +++ /dev/null @@ -1,76 +0,0 @@ -package server - -import ( - "errors" - "strings" - - "go.mongodb.org/mongo-driver/v2/bson" -) - -func previewHintFilter(raw string) (M, error) { - query := parseExtendedQuery(raw).object - if reconnect, _ := query["reconnect"].scalarValue(); reconnect == "1" { - return nil, nil - } - value := query["repositoryID"] - if !value.truthy() { - return nil, nil - } - if value.kind == 'a' { - ids := []bson.ObjectID{} - for _, item := range value.array { - if item == nil { - continue - } - id, err := previewHintID(item) - if err != nil { - return nil, err - } - ids = append(ids, id) - } - return M{"_id": M{"$in": ids}}, nil - } - id, err := previewHintID(value) - if err != nil { - return nil, err - } - return M{"_id": id}, nil -} - -func previewHintID(value *queryValue) (bson.ObjectID, error) { - invalid := errors.New("invalid_repository_id") - if value == nil { - return bson.NilObjectID, invalid - } - if value.kind == 'o' { - // Only wrapped explicit IDs are supported, never query operators. - for key := range value.object { - if strings.HasPrefix(key, "$") { - return bson.NilObjectID, invalid - } - } - value = value.object["_id"] - if value == nil { - return bson.NilObjectID, invalid - } - } - text, err := value.stringValue() - if err != nil { - return bson.NilObjectID, invalid - } - if id, err := bson.ObjectIDFromHex(text); err == nil { - return id, nil - } - // Mongoose's installed ObjectId caster accepts 12 ASCII code units. - if len(text) == 12 { - var id bson.ObjectID - for i := range text { - if text[i] >= 128 { - return bson.NilObjectID, invalid - } - id[i] = text[i] - } - return id, nil - } - return bson.NilObjectID, invalid -} diff --git a/backend/internal/server/preview_hint_query_test.go b/backend/internal/server/preview_hint_query_test.go deleted file mode 100644 index 6efad13..0000000 --- a/backend/internal/server/preview_hint_query_test.go +++ /dev/null @@ -1,48 +0,0 @@ -package server - -import ( - "encoding/json" - "os" - "reflect" - "testing" -) - -func TestPreviewHintContracts(t *testing.T) { - raw, err := os.ReadFile("testdata/preview-hints.json") - if err != nil { - t.Fatal(err) - } - var cases []struct { - Query string - Filter any - Error bool - } - if err = json.Unmarshal(raw, &cases); err != nil { - t.Fatal(err) - } - for _, c := range cases { - filter, err := previewHintFilter(c.Query) - if (err != nil) != c.Error { - t.Fatal(c, filter, err) - } - if err != nil { - continue - } - encoded, err := json.Marshal(filter) - if err != nil { - t.Fatal(err) - } - var actual any - if err = json.Unmarshal(encoded, &actual); err != nil { - t.Fatal(err) - } - if !reflect.DeepEqual(actual, c.Filter) { - t.Fatal(c.Query, actual, c.Filter) - } - } - for _, query := range []string{"repositoryID[$ne]=507f1f77bcf86cd799439011", "repositoryID[$exists]=true"} { - if _, err := previewHintFilter(query); err == nil { - t.Fatal("operator accepted", query) - } - } -} diff --git a/backend/internal/server/preview_metadata_integration_test.go b/backend/internal/server/preview_metadata_integration_test.go deleted file mode 100644 index a8328f8..0000000 --- a/backend/internal/server/preview_metadata_integration_test.go +++ /dev/null @@ -1,174 +0,0 @@ -package server - -import ( - "context" - "encoding/json" - "io" - "net/http" - "net/http/httptest" - "strings" - "testing" - - "github.com/tdurieux/anonymous_github/backend/internal/provider" - "go.mongodb.org/mongo-driver/v2/bson" -) - -func runPreviewMetadataIntegration(t *testing.T, base *Server) { - t.Run("GitHub preview metadata cache refresh and Pages output", func(t *testing.T) { - ctx := context.Background() - owner, key := bson.NewObjectID(), bson.NewObjectID() - db := base.Store.DB.Client().Database("preview_metadata_" + owner.Hex()) - defer db.Drop(ctx) - s := &Server{Config: base.Config, Store: &Store{DB: db, Redis: base.Store.Redis}} - s.Config.AppEnabled = false - registry, err := provider.New(&githubProvider{s}) - if err != nil { - t.Fatal(err) - } - s.providers = registry - if err := s.Store.ensureIndexes(ctx); err != nil { - t.Fatal(err) - } - user := M{"_id": owner, "username": "owner", "status": "active"} - if _, err := db.Collection("users").InsertOne(ctx, user); err != nil { - t.Fatal(err) - } - if _, err := db.Collection("repositories").InsertOne(ctx, M{"_id": key, "externalId": "gh_42", "source": "github", "name": "team/project", "defaultBranch": "old-main", "size": 10, "hasPage": false}); err != nil { - t.Fatal(err) - } - q := &request{Server: s, R: httptest.NewRequest("GET", "/", nil), W: httptest.NewRecorder(), Params: map[string]string{"owner": "team", "repo": "project"}, User: user, Identity: identity(user)} - if err := s.saveGrant(q, owner, "github", M{"access_token": "synthetic-oauth-" + owner.Hex()}); err != nil { - t.Fatal(err) - } - repoStatus, pageStatus, repoID, size := 200, 200, 42, 20 - hasPages := true - pageBranch, pagePath := "docs", "/docs" - repoCalls, pageCalls := 0, 0 - var duringRepository func() - s.HTTP = &http.Client{Transport: roundTrip(func(r *http.Request) (*http.Response, error) { - if r.Header.Get("Authorization") != "Bearer synthetic-oauth-"+owner.Hex() { - t.Fatal("wrong metadata credential") - } - var data M - status := 200 - switch r.URL.Path { - case "/repos/team/project": - repoCalls++ - status = repoStatus - data = M{"id": repoID, "full_name": "team/project", "size": size, "default_branch": "main", "has_pages": hasPages} - if duringRepository != nil { - duringRepository() - } - case "/repos/team/project/pages": - pageCalls++ - status = pageStatus - data = M{"source": M{"branch": pageBranch, "path": pagePath}} - default: - t.Fatal("unexpected metadata endpoint", r.URL) - } - b, _ := json.Marshal(data) - return &http.Response{StatusCode: status, Header: http.Header{}, Body: io.NopCloser(strings.NewReader(string(b)))}, nil - })} - call := func(query string) (M, error) { - before := repoCalls - q.R = httptest.NewRequest("GET", "/"+query, nil) - result, err := s.sourceRepository("metadata")(q) - if repoCalls != before+1 { - t.Fatal("cache skipped current upstream access check") - } - if result == nil { - return nil, err - } - return obj(result), err - } - for _, query := range []string{"", "?force=true", "?force=1&force=1", "?reconnect[]=1", "?reconnect=1&reconnect[]=1"} { - result, err := call(query) - if err != nil || number(result["size"]) != 10 || boolean(result["hasPage"]) || pageCalls != 0 { - t.Fatal("ordinary preview refreshed cached fields", query, result, err) - } - } - result, err := call("?force[]=1") - if err != nil || number(result["size"]) != 20 || !boolean(result["hasPage"]) || obj(result["pageSource"])["branch"] != "docs" || obj(result["pageSource"])["path"] != "/docs" || pageCalls != 1 { - t.Fatal("forced Pages metadata missing", result, err) - } - pageBranch, pagePath = "published", "/" - result, err = call("?reconnect=1&force=0") - if err != nil || obj(result["pageSource"])["branch"] != "published" || pageCalls != 2 { - t.Fatal("reconnect did not refresh metadata", result, err) - } - for _, status := range []int{403, 404} { - pageStatus = status - size++ - result, err = call("?force=1") - if err != nil || number(result["size"]) != int64(size) || obj(result["pageSource"])["branch"] != "published" { - t.Fatal("optional Pages failure erased prior source", status, result, err) - } - } - for _, status := range []int{401, 422, 503} { - pageStatus = status - _, err = call("?force=1") - if err == nil { - t.Fatal("Pages failure incorrectly ignored", status) - } - cached, err := s.Store.one(ctx, "repositories", M{"_id": key}) - if err != nil || number(cached["size"]) != 22 || obj(cached["pageSource"])["branch"] != "published" { - t.Fatal("failed refresh changed cache", cached, err) - } - } - pageStatus = 200 - beforePages := pageCalls - for _, status := range []int{401, 403, 503} { - repoStatus = status - if result, err := call(""); err == nil || result != nil { - t.Fatal("cached private metadata bypassed upstream denial", status, result, err) - } - } - if pageCalls != beforePages { - t.Fatal("Pages requested after upstream denial") - } - repoStatus = 200 - repoID = 43 - if _, err := call(""); err == nil || err.Error() != "connection_changed" { - t.Fatal("cache hid changed upstream identity", err) - } - repoID = 42 - duringRepository = func() { - if _, err := s.Store.update(ctx, "repositories", M{"_id": key}, M{"$set": M{"size": 77, "pageSource": M{"branch": "concurrent", "path": "/"}}}); err != nil { - t.Fatal(err) - } - } - result, err = call("") - duringRepository = nil - if err != nil || number(result["size"]) != 22 { - t.Fatal("cached snapshot changed during request", result, err) - } - cached, err := s.Store.one(ctx, "repositories", M{"_id": key}) - if err != nil || number(cached["size"]) != 77 || obj(cached["pageSource"])["branch"] != "concurrent" { - t.Fatal("cached preview overwrote newer metadata", cached, err) - } - hasPages = false - result, err = call("?force=1") - if err != nil || boolean(result["hasPage"]) || pageCalls != beforePages { - t.Fatal("disabled Pages queried upstream", result, err) - } - if _, err := db.Collection("repositories").DeleteMany(ctx, M{}); err != nil { - t.Fatal(err) - } - hasPages = true - result, err = call("") - if err != nil || obj(result["pageSource"])["branch"] != "published" || pageCalls != beforePages+1 { - t.Fatal("cold preview did not load Pages metadata", result, err) - } - // Quota failures persist across calls. Exercise this last so the gate - // does not suppress the independent upstream-error cases above. - pageStatus = 429 - if _, err := call("?force=1"); err == nil { - t.Fatal("Pages quota failure ignored") - } - before := repoCalls - q.R = httptest.NewRequest("GET", "/?force=1", nil) - if _, err := s.sourceRepository("metadata")(q); err == nil || repoCalls != before { - t.Fatal("known quota gate dispatched another request", err) - } - }) -} diff --git a/backend/internal/server/preview_query_test.go b/backend/internal/server/preview_query_test.go deleted file mode 100644 index 227a16b..0000000 --- a/backend/internal/server/preview_query_test.go +++ /dev/null @@ -1,39 +0,0 @@ -package server - -import ( - "encoding/json" - "net/http/httptest" - "os" - "testing" -) - -func TestPreviewQueryContracts(t *testing.T) { - data, err := os.ReadFile("testdata/preview-query.json") - if err != nil { - t.Fatal(err) - } - var rows []struct { - Query, Choice string - SavedResource, InvalidConnection bool - } - if err = json.Unmarshal(data, &rows); err != nil { - t.Fatal(err) - } - for _, row := range rows { - query := parseExtendedQuery(row.Query).object - _, saved := query["anonymizedRepoId"].scalarValue() - choice, err := previewConnectionChoice(query["connection"], "github") - if saved != row.SavedResource || (err != nil) != row.InvalidConnection || err == nil && choice != row.Choice { - t.Fatal(row, saved, choice, err) - } - } - query := parseExtendedQuery("connection=provider-specific-grant").object - if choice, err := previewConnectionChoice(query["connection"], "fixture"); err != nil || choice != "provider-specific-grant" { - t.Fatal(choice, err) - } - s := &Server{} - q := &request{R: httptest.NewRequest("GET", "/?connection[]=oauth", nil)} - if _, err := s.previewRepositoryAccess(q, nil, "github", "bad/name/extra"); err == nil || err.Error() != "repo_not_found" { - t.Fatal("repository validation must precede connection selection", err) - } -} diff --git a/backend/internal/server/process_metrics.go b/backend/internal/server/process_metrics.go deleted file mode 100644 index 880830e..0000000 --- a/backend/internal/server/process_metrics.go +++ /dev/null @@ -1,156 +0,0 @@ -package server - -import ( - "context" - "encoding/json" - "io" - "os" - "runtime" - "strconv" - "strings" - "time" - - "github.com/redis/go-redis/v9" -) - -func boundedMetricFile(path string, limit int64) ([]byte, error) { - f, err := os.Open(path) - if err != nil { - return nil, err - } - defer f.Close() - return io.ReadAll(io.LimitReader(f, limit)) -} - -func containerMemoryLimit() any { - for _, path := range []string{"/sys/fs/cgroup/memory.max", "/sys/fs/cgroup/memory/memory.limit_in_bytes"} { - data, err := boundedMetricFile(path, 128) - if err != nil { - continue - } - n, err := strconv.ParseUint(strings.TrimSpace(string(data)), 10, 64) - if err == nil && n > 0 && n < 9007199254740991 { - return n - } - } - return nil -} - -// Called only while holding requestMetrics.flushMu; sampling is at most once -// every 15 seconds even when an administrator refreshes the report repeatedly. -func (s *Server) processSample(now time.Time) M { - m := s.requestMetrics - if m.instance == "" || (!m.sampledAt.IsZero() && now.Sub(m.sampledAt) < 15*time.Second) { - return nil - } - var cpu any - if seconds, ok := processCPUSeconds(); ok { - if !m.cpuAt.IsZero() && now.After(m.cpuAt) && seconds >= m.cpuSeconds { - cpu = (seconds - m.cpuSeconds) / now.Sub(m.cpuAt).Seconds() * 100 - } - m.cpuAt, m.cpuSeconds = now, seconds - } - var memory runtime.MemStats - runtime.ReadMemStats(&memory) - system := systemOverview(s.started) - var workers any - if s.pool != nil { - workers = s.pool.Stats() - } - uptime := float64(0) - if !s.started.IsZero() { - uptime = now.Sub(s.started).Seconds() - } - sample := M{"instance": m.instance, "service": "api", "runtime": "go", "sampledAt": now.UnixMilli(), "uptime": uptime, "cpuPercent": cpu, "memoryLimitBytes": containerMemoryLimit(), "memory": M{"rss": system["processRss"], "heapUsed": memory.HeapAlloc, "heapTotal": memory.HeapSys, "external": nil}, "activeRequests": m.active.Load(), "sockets": processSockets(), "workers": workers, "goroutines": runtime.NumGoroutine(), "queueWorkers": s.queueWorkerSample(), "eventLoop": M{"available": false, "p95Ms": nil, "maxMs": nil, "utilization": nil}, "droppedMetrics": m.dropped.Load(), "droppedBatches": m.droppedBatches.Load(), "lastFlushAt": nil} - if !m.lastFlush.IsZero() { - sample["lastFlushAt"] = m.lastFlush.UnixMilli() - } - m.sampledAt = now - return sample -} - -func writeProcessSample(ctx context.Context, pipe redis.Pipeliner, sample M) { - data, err := json.Marshal(sample) - if err != nil { - return - } - id := str(sample["instance"]) - at := number(sample["sampledAt"]) - pipe.Set(ctx, "performance:v1:instance:"+id, data, 90*time.Second) - pipe.ZAdd(ctx, "performance:v1:instances", redis.Z{Score: float64(at), Member: id}) - pipe.ZRemRangeByScore(ctx, "performance:v1:instances", "0", strconv.FormatInt(at-90000, 10)) - pipe.Expire(ctx, "performance:v1:instances", 120*time.Second) - pipe.LPush(ctx, "performance:v1:runtime:api", string(data)) - pipe.LTrim(ctx, "performance:v1:runtime:api", 0, 239) - pipe.Expire(ctx, "performance:v1:runtime:api", 2*time.Hour) -} - -func (s *Server) readProcessSamples(ctx context.Context, now time.Time, minutes int64) ([]M, []M, error) { - instances, err := s.readProcessInstances(ctx, now) - if err != nil { - return nil, nil, err - } - series := []M{} - for _, service := range []string{"api", "streamer"} { - limit := int64(239) - if service == "streamer" { - limit = 959 - } - values, err := s.Store.Redis.LRange(ctx, "performance:v1:runtime:"+service, 0, limit).Result() - if err != nil { - return nil, nil, err - } - for _, raw := range values { - var sample M - if json.Unmarshal([]byte(raw), &sample) != nil || number(sample["sampledAt"]) < now.UnixMilli()-minutes*60000 { - continue - } - memory, loop, sockets, workers := obj(sample["memory"]), obj(sample["eventLoop"]), obj(sample["sockets"]), obj(sample["workers"]) - series = append(series, M{"instance": sample["instance"], "service": service, "sampledAt": sample["sampledAt"], "rss": memory["rss"], "heapUsed": memory["heapUsed"], "external": memory["external"], "cpuPercent": sample["cpuPercent"], "loopP95Ms": loop["p95Ms"], "sockets": sockets["descriptors"], "closeWait": sockets["closeWait"], "waiting": number(workers["waiting"]), "reservedBytes": number(workers["reservedBytes"])}) - } - } - return instances, series, nil -} - -func (s *Server) readProcessInstances(ctx context.Context, now time.Time) ([]M, error) { - ids, err := s.Store.Redis.ZRangeByScore(ctx, "performance:v1:instances", &redis.ZRangeBy{Min: strconv.FormatInt(now.UnixMilli()-90000, 10), Max: "+inf", Offset: 0, Count: 32}).Result() - if err != nil { - return nil, err - } - instances := []M{} - if len(ids) > 0 { - keys := make([]string, len(ids)) - for i, id := range ids { - keys[i] = "performance:v1:instance:" + id - } - values, err := s.Store.Redis.MGet(ctx, keys...).Result() - if err != nil { - return nil, err - } - for _, raw := range values { - var row M - if text, ok := raw.(string); ok && json.Unmarshal([]byte(text), &row) == nil && row["memory"] != nil && row["eventLoop"] != nil { - instances = append(instances, row) - } - } - } - - return instances, nil -} - -func (s *Server) removeProcessSample(ctx context.Context) { - if s.requestMetrics == nil || s.requestMetrics.instance == "" { - return - } - pipe := s.Store.Redis.TxPipeline() - pipe.Del(ctx, "performance:v1:instance:"+s.requestMetrics.instance) - pipe.ZRem(ctx, "performance:v1:instances", s.requestMetrics.instance) - pipe.Exec(ctx) -} -func (s *Server) queueWorkerSample() M { - out := M{} - for i, queue := range workerQueues { - out[queue.name] = s.jobWorkerCounts[i].Load() - } - return out -} diff --git a/backend/internal/server/process_metrics_linux.go b/backend/internal/server/process_metrics_linux.go deleted file mode 100644 index e3422ef..0000000 --- a/backend/internal/server/process_metrics_linux.go +++ /dev/null @@ -1,53 +0,0 @@ -//go:build linux - -package server - -import ( - "os" - "strings" - - "golang.org/x/sys/unix" -) - -func processCPUSeconds() (float64, bool) { - var usage unix.Rusage - if unix.Getrusage(unix.RUSAGE_SELF, &usage) != nil { - return 0, false - } - return float64(usage.Utime.Sec+usage.Stime.Sec) + float64(usage.Utime.Usec+usage.Stime.Usec)/1e6, true -} - -func processSockets() any { - dir, err := os.Open("/proc/self/fd") - if err != nil { - return nil - } - entries, err := dir.ReadDir(4096) - dir.Close() - if err != nil { - return nil - } - inodes := map[string]bool{} - for _, entry := range entries { - link, err := os.Readlink("/proc/self/fd/" + entry.Name()) - if err == nil && strings.HasPrefix(link, "socket:[") && strings.HasSuffix(link, "]") { - inodes[strings.TrimSuffix(strings.TrimPrefix(link, "socket:["), "]")] = true - } - } - counts := map[string]int{} - truncated := len(entries) == 4096 - for _, path := range []string{"/proc/self/net/tcp", "/proc/self/net/tcp6"} { - data, err := boundedMetricFile(path, 4*1024*1024) - if err != nil { - return nil - } - truncated = truncated || len(data) == 4*1024*1024 - for _, line := range strings.Split(string(data), "\n") { - fields := strings.Fields(line) - if len(fields) > 9 && inodes[fields[9]] { - counts[fields[3]]++ - } - } - } - return M{"descriptors": len(inodes), "established": counts["01"], "closeWait": counts["08"], "listening": counts["0A"], "truncated": truncated} -} diff --git a/backend/internal/server/process_metrics_other.go b/backend/internal/server/process_metrics_other.go deleted file mode 100644 index ccd987d..0000000 --- a/backend/internal/server/process_metrics_other.go +++ /dev/null @@ -1,6 +0,0 @@ -//go:build !linux - -package server - -func processCPUSeconds() (float64, bool) { return 0, false } -func processSockets() any { return nil } diff --git a/backend/internal/server/process_metrics_test.go b/backend/internal/server/process_metrics_test.go deleted file mode 100644 index 3d94151..0000000 --- a/backend/internal/server/process_metrics_test.go +++ /dev/null @@ -1,105 +0,0 @@ -package server - -import ( - "context" - "encoding/json" - "net" - "net/http/httptest" - "runtime" - "testing" - "time" - - "github.com/redis/go-redis/v9" - "go.mongodb.org/mongo-driver/v2/bson" -) - -func TestProcessSampleCadenceAndUnavailableMetrics(t *testing.T) { - s := &Server{started: time.Now(), requestMetrics: &requestMetrics{instance: "api:test"}} - now := time.Now() - sample := s.processSample(now) - if sample == nil || sample["runtime"] != "go" || obj(sample["eventLoop"])["p95Ms"] != nil || obj(sample["eventLoop"])["available"] != false { - t.Fatal("Go sample misrepresents event-loop metrics") - } - if sample["cpuPercent"] != nil { - t.Fatal("first CPU sample has no baseline") - } - if s.processSample(now.Add(time.Second)) != nil { - t.Fatal("sampling frequency unbounded") - } - second := s.processSample(now.Add(16 * time.Second)) - if second == nil { - t.Fatal("sample not refreshed") - } - if runtime.GOOS == "linux" { - rss, ok := obj(second["memory"])["rss"].(uint64) - if !ok || rss == 0 || second["cpuPercent"] == nil { - t.Fatal("missing Linux process measurements") - } - listener, err := net.Listen("tcp4", "127.0.0.1:0") - if err != nil { - t.Fatal(err) - } - defer listener.Close() - sockets := obj(processSockets()) - if number(sockets["listening"]) < 1 || number(sockets["descriptors"]) < 1 { - t.Fatal("process-owned listening socket missing", sockets) - } - } - if _, err := json.Marshal(second); err != nil { - t.Fatal("invalid JSON sample", err) - } -} - -func runProcessMetricsIntegration(t *testing.T, base *Server) { - ctx := context.Background() - id := "api:test:" + bson.NewObjectID().Hex() - s := &Server{Store: base.Store, started: time.Now(), requestMetrics: &requestMetrics{instance: id, pending: map[requestMetricKey]requestSample{}}} - now := time.Now() - stale := id + ":stale" - base.Store.Redis.ZAdd(ctx, "performance:v1:instances", redis.Z{Score: float64(now.Add(-91 * time.Second).UnixMilli()), Member: stale}) - base.Store.Redis.Set(ctx, "performance:v1:instance:"+stale, `{"instance":"`+stale+`","memory":{},"eventLoop":{}}`, time.Minute) - report, err := s.requestPerformance(&request{Server: s, R: httptest.NewRequest("GET", "/api/admin/performance", nil)}) - if err != nil || !boolean(obj(report)["available"]) { - t.Fatal("process report unavailable", err) - } - found := false - for _, v := range arr(obj(report)["instances"]) { - row := obj(v) - if row["instance"] == stale { - t.Fatal("stale instance reported") - } - if row["instance"] == id { - found = true - if row["runtime"] != "go" { - t.Fatal("runtime label missing") - } - } - } - if !found { - t.Fatal("live instance missing") - } - series := false - for _, v := range arr(obj(report)["runtimeSeries"]) { - if obj(v)["instance"] == id { - series = true - } - } - if !series { - t.Fatal("runtime history missing") - } - before, err := base.Store.Redis.LLen(ctx, "performance:v1:runtime:api").Result() - if err != nil { - t.Fatal(err) - } - if err := s.flushRequestMetrics(ctx); err != nil { - t.Fatal(err) - } - after, _ := base.Store.Redis.LLen(ctx, "performance:v1:runtime:api").Result() - if after != before { - t.Fatal("repeated report duplicated sample") - } - ttl, err := base.Store.Redis.TTL(ctx, "performance:v1:instance:"+id).Result() - if err != nil || ttl <= 0 || ttl > 90*time.Second { - t.Fatal("instance retention", ttl, err) - } -} diff --git a/backend/internal/server/project_names.go b/backend/internal/server/project_names.go deleted file mode 100644 index 2cc6f63..0000000 --- a/backend/internal/server/project_names.go +++ /dev/null @@ -1,35 +0,0 @@ -package server - -import ( - "strings" - "unicode" -) - -func utf16Length(value string) int { - n := 0 - for _, r := range value { - n++ - if r > 0xffff { - n++ - } - } - return n -} - -func validateProjectName(body M) (kind, id, name string, err error) { - kind, typeOK := body["type"].(string) - id, idOK := body["id"].(string) - name, nameOK := body["name"].(string) - trimmed := strings.TrimFunc(name, func(r rune) bool { return unicode.IsSpace(r) && r != '\u0085' || r == '\ufeff' }) - invalid := !typeOK || collection(kind) == "" || !idOK || id == "" || utf16Length(id) > 250 || !nameOK || utf16Length(trimmed) > 100 - for _, r := range name { - if r < 32 || r == 127 { - invalid = true - break - } - } - if invalid { - return "", "", "", fail("invalid_project_name", 400) - } - return kind, id, trimmed, nil -} diff --git a/backend/internal/server/project_names_integration_test.go b/backend/internal/server/project_names_integration_test.go deleted file mode 100644 index 0b35e53..0000000 --- a/backend/internal/server/project_names_integration_test.go +++ /dev/null @@ -1,110 +0,0 @@ -package server - -import ( - "bytes" - "context" - "encoding/json" - "net/http/httptest" - "testing" - "time" - - "github.com/tdurieux/anonymous_github/backend/internal/security" - "go.mongodb.org/mongo-driver/v2/bson" -) - -func runProjectNamesIntegration(t *testing.T, s *Server) { - t.Run("private project names and dashboard membership", func(t *testing.T) { - ctx := context.Background() - users := map[string]bson.ObjectID{} - for _, name := range []string{"owner", "member", "admin"} { - users[name] = bson.NewObjectID() - if _, err := s.Store.DB.Collection("users").InsertOne(ctx, M{"_id": users[name], "username": "project-name-" + name, "status": "active", "isAdmin": name == "admin", "externalIDs": M{"github": "project-name-id-" + name}, "apiTokens": []M{{"tokenHash": security.HashToken("synthetic-project-name-" + name)}}}); err != nil { - t.Fatal(err) - } - } - for _, kind := range []string{"repo", "pr", "gist"} { - if _, err := s.Store.DB.Collection(collection(kind)).InsertOne(ctx, M{"_id": bson.NewObjectID(), idKey(kind): "project-name-" + kind, "owner": users["owner"], "coauthors": []M{{"username": "old-member", "githubId": "project-name-id-member"}}, "status": "ready", "options": M{"expirationMode": "redirect", "expirationDate": time.Now().Add(-time.Hour)}}); err != nil { - t.Fatal(err) - } - } - call := func(actor, kind, id string, name any) *httptest.ResponseRecorder { - body, _ := json.Marshal(M{"type": kind, "id": id, "name": name}) - req := httptest.NewRequest("POST", "/api/user/project-name", bytes.NewReader(body)) - req.RemoteAddr = "198.51.100.24:1234" - req.Header.Set("Content-Type", "application/json") - req.Header.Set("Authorization", "Bearer synthetic-project-name-"+actor) - w := httptest.NewRecorder() - s.ServeHTTP(w, req) - return w - } - for _, c := range []struct { - actor, kind, id, name string - code int - }{ - {"owner", "repo", "project-name-repo", " Owner name ", 200}, - {"member", "repo", "project-name-repo", "Member name", 200}, - {"admin", "repo", "project-name-repo", "Admin name", 403}, - {"owner", "pr", "project-name-pr", "PR name", 200}, - {"member", "pr", "project-name-pr", "Forbidden", 403}, - {"admin", "pr", "project-name-pr", "Forbidden", 403}, - {"owner", "gist", "project-name-gist", "Gist name", 200}, - {"member", "gist", "project-name-gist", "Forbidden", 403}, - {"owner", "repo", "PROJECT-NAME-REPO", "Wrong case", 403}, - {"owner", "repo", "missing-project", "Missing", 403}, - } { - s.dashboardNames.run(ctx, "invalidation-sentinel", func() error { return nil }) - w := call(c.actor, c.kind, c.id, c.name) - if w.Code != c.code { - t.Fatal(c, w.Code, w.Body) - } - recalculated := false - s.dashboardNames.run(ctx, "invalidation-sentinel", func() error { recalculated = true; return nil }) - if recalculated != (c.code == 200) { - t.Fatal("project-name cache invalidation", c, recalculated) - } - } - key := projectNameKey("repo", "project-name-repo") - for actor, want := range map[string]string{"owner": "Owner name", "member": "Member name", "admin": ""} { - user, err := s.Store.one(ctx, "users", M{"_id": users[actor]}) - if err != nil { - t.Fatal(err) - } - if str(obj(user["projectNames"])[key]) != want { - t.Fatal("private names crossed users", actor, user["projectNames"]) - } - cached, err := s.Store.one(ctx, "dashboardnames", M{"owner": users[actor], "type": "repo", "artifactId": "project-name-repo"}) - if err != nil { - t.Fatal(err) - } - if str(cached["name"]) != want { - t.Fatal("dashboard name mismatch", actor, cached) - } - } - for _, kind := range []string{"repo", "pr", "gist"} { - row, err := s.Store.one(ctx, collection(kind), M{idKey(kind): "project-name-" + kind}) - if err != nil { - t.Fatal(err) - } - if row["status"] != "expiring" || row["projectName"] != nil { - t.Fatal("list expiry or private-name isolation", row) - } - } - if w := call("owner", "repo", "project-name-repo", false); w.Code != 400 { - t.Fatal("non-string accepted", w.Code) - } - if w := call("owner", "repo", "project-name-repo", "\ufeff \ufeff"); w.Code != 200 { - t.Fatal("clear failed", w.Code, w.Body) - } - user, err := s.Store.one(ctx, "users", M{"_id": users["owner"]}) - if err != nil { - t.Fatal(err) - } - if _, exists := obj(user["projectNames"])[key]; exists { - t.Fatal("clear retained private map entry") - } - cached, err := s.Store.one(ctx, "dashboardnames", M{"owner": users["owner"], "type": "repo", "artifactId": "project-name-repo"}) - if err != nil || cached != nil { - t.Fatal("clear retained dashboard entry", err) - } - }) -} diff --git a/backend/internal/server/project_names_test.go b/backend/internal/server/project_names_test.go deleted file mode 100644 index 728ad89..0000000 --- a/backend/internal/server/project_names_test.go +++ /dev/null @@ -1,37 +0,0 @@ -package server - -import ( - "encoding/json" - "os" - "testing" -) - -func TestTypeScriptProjectNames(t *testing.T) { - raw, err := os.ReadFile("testdata/project-names.json") - if err != nil { - t.Fatal(err) - } - var cases []struct { - Name string - Body M - Expected string - Rejected bool - } - if err := json.Unmarshal(raw, &cases); err != nil { - t.Fatal(err) - } - for _, c := range cases { - t.Run(c.Name, func(t *testing.T) { - kind, id, name, err := validateProjectName(c.Body) - if c.Rejected { - if err == nil { - t.Fatal("accepted invalid input") - } - return - } - if err != nil || name != c.Expected || kind != c.Body["type"] || id != c.Body["id"] { - t.Fatalf("got %q %q %q %v", kind, id, name, err) - } - }) - } -} diff --git a/backend/internal/server/provider_archive.go b/backend/internal/server/provider_archive.go deleted file mode 100644 index 47917ca..0000000 --- a/backend/internal/server/provider_archive.go +++ /dev/null @@ -1,58 +0,0 @@ -package server - -import ( - "context" - "github.com/tdurieux/anonymous_github/backend/internal/provider" - "io" -) - -type archiveProvider struct{ server *Server } - -func (p *archiveProvider) ID() string { return "archive" } -func (p *archiveProvider) Connect(context.Context, provider.ConnectRequest) (provider.Connection, error) { - return provider.Connection{}, fail("archive_upload_required", 400) -} -func (p *archiveProvider) Authorize(ctx context.Context, a provider.Access) error { - owner, e := oid(a.OwnerID) - if e != nil { - return fail("not_authorized", 403) - } - user, e := p.server.Store.one(ctx, "users", M{"_id": owner}) - if e != nil { - return e - } - if !identity(user).Active() { - return fail("not_authorized", 403) - } - return nil -} -func (p *archiveProvider) Repository(context.Context, provider.Access) (provider.Repository, error) { - return provider.Repository{}, provider.ErrCapability -} -func (p *archiveProvider) Commit(context.Context, provider.Access, string) (provider.Commit, error) { - return provider.Commit{}, provider.ErrCapability -} -func (p *archiveProvider) Tree(ctx context.Context, a provider.Access) ([]provider.Entry, error) { - rows, e := p.server.content.List(ctx, a.Ref.AnonymousID) - if e != nil { - return nil, e - } - out := make([]provider.Entry, 0, len(rows)) - for _, r := range rows { - out = append(out, provider.Entry{Path: r.Path, Size: r.Size}) - } - return out, nil -} -func (p *archiveProvider) Open(ctx context.Context, a provider.Access, f provider.Entry) (io.ReadCloser, error) { - body, e := p.server.content.Read(ctx, a.Ref.AnonymousID, f.Path) - if e != nil { - return nil, e - } - return checkedBody(body, f.Size), nil -} -func (p *archiveProvider) PublicURL(provider.Ref) string { return "" } -func (p *archiveProvider) SelfLinks(provider.Ref) []string { return []string{} } - -func (p *archiveProvider) Branch(context.Context, provider.Access, string) (provider.Commit, error) { - return provider.Commit{}, provider.ErrCapability -} diff --git a/backend/internal/server/provider_branch_integration_test.go b/backend/internal/server/provider_branch_integration_test.go deleted file mode 100644 index f2a79be..0000000 --- a/backend/internal/server/provider_branch_integration_test.go +++ /dev/null @@ -1,58 +0,0 @@ -package server - -import ( - "context" - "encoding/json" - "errors" - "github.com/tdurieux/anonymous_github/backend/internal/provider" - "io" - "net/http" - "strings" - "testing" -) - -func runGitHubBranchIntegration(t *testing.T, s *Server, owner any) { - t.Run("GitHub branches paginate and cannot resolve tags", func(t *testing.T) { - old := s.HTTP - defer func() { s.HTTP = old }() - sha := strings.Repeat("b", 40) - commits := 0 - pages := 0 - s.HTTP = &http.Client{Transport: roundTrip(func(r *http.Request) (*http.Response, error) { - var payload any - headers := http.Header{} - switch r.URL.Path { - case "/repos/owner/repo/branches": - pages++ - rows := []M{} - if r.URL.Query().Get("page") == "1" { - headers.Set("Link", `; rel="next"`) - for i := 0; i < 100; i++ { - rows = append(rows, M{"name": "other", "commit": M{"sha": sha}}) - } - } else { - rows = append(rows, M{"name": "release", "commit": M{"sha": sha}}) - } - payload = rows - case "/repos/owner/repo/commits/" + sha: - commits++ - payload = M{"sha": sha, "commit": M{"author": M{"date": "2025-01-01T00:00:00Z"}, "committer": M{"date": "2026-01-01T00:00:00Z"}}} - default: - t.Errorf("unexpected reference lookup: %s", r.URL.Path) - payload = M{} - } - raw, _ := json.Marshal(payload) - return &http.Response{StatusCode: 200, Header: headers, Body: io.NopCloser(strings.NewReader(string(raw)))}, nil - })} - g := &githubProvider{s} - a := provider.Access{OwnerID: str(owner), Ref: provider.Ref{Provider: "github", Name: "owner/repo"}, Binding: map[string]any{"kind": "oauth"}} - c, e := g.Branch(context.Background(), a, "release") - if e != nil || c.ID != sha || c.Date.Year() != 2025 || pages != 2 || commits != 1 { - t.Fatal(c, e, pages, commits) - } - _, e = g.Branch(context.Background(), a, "tag-only") - if !errors.Is(e, provider.ErrBranchNotFound) || commits != 1 { - t.Fatal("missing branch treated as a commit/tag", e, commits) - } - }) -} diff --git a/backend/internal/server/provider_errors_integration_test.go b/backend/internal/server/provider_errors_integration_test.go deleted file mode 100644 index 1f226a1..0000000 --- a/backend/internal/server/provider_errors_integration_test.go +++ /dev/null @@ -1,87 +0,0 @@ -package server - -import ( - "bytes" - "context" - "encoding/json" - "errors" - "fmt" - "net/http/httptest" - "net/url" - "strings" - "testing" - "time" - - "github.com/tdurieux/anonymous_github/backend/internal/provider" -) - -func runProviderErrorsIntegration(t *testing.T, s *Server, p *fixtureProvider, token string) { - t.Run("provider errors across discovery and lifecycle", func(t *testing.T) { - ctx := context.Background() - defer func() { p.failure = nil }() - call := func(method, path string, body any) *httptest.ResponseRecorder { - raw, _ := json.Marshal(body) - req := httptest.NewRequest(method, path, bytes.NewReader(raw)) - req.RemoteAddr = "198.51.100.6:1234" - req.Header.Set("Content-Type", "application/json") - req.Header.Set("Authorization", "Bearer "+token) - w := httptest.NewRecorder() - s.ServeHTTP(w, req) - return w - } - for i, c := range []struct { - err error - code string - status int - }{ - {provider.ErrNotFound, "resource_not_found", 404}, - {provider.ErrAccessDenied, "not_authorized", 403}, - {provider.ErrCapability, "provider_capability_not_supported", 400}, - {&provider.RateLimitError{ResetAt: time.UnixMilli(1800000000123)}, "rate_limited", 429}, - {provider.ErrUpstream, "upstream_error", 502}, - {errors.New("private upstream details"), "internal_error", 500}, - } { - p.failure = fmt.Errorf("private endpoint and credential: %w", c.err) - id := fmt.Sprintf("provider-error-%d", i) - body := M{"gistId": id, "source": M{"provider": "fixture", "gistId": "snippet"}, "options": M{}, "terms": []any{}} - for _, response := range []*httptest.ResponseRecorder{ - call("GET", "/api/providers/fixture/repository/metadata?name="+url.QueryEscape(p.name), nil), - call("POST", "/api/gist", body), - } { - var result M - if err := json.Unmarshal(response.Body.Bytes(), &result); err != nil { - t.Fatal(err) - } - if response.Code != c.status || result["error"] != c.code || strings.Contains(response.Body.String(), "private") { - t.Fatal(response.Code, response.Body) - } - if c.code == "rate_limited" && number(result["resetAt"]) != 1800000000123 { - t.Fatal(response.Body) - } - } - current, err := s.Store.one(ctx, collection("gist"), M{"gistId": id}) - want := c.code - if want == "internal_error" { - want = "preparation_failed" - } - if err != nil || current == nil || current["status"] != "error" || current["statusMessage"] != want { - t.Fatal("document failure not normalized", current, err) - } - if _, err := s.Store.update(ctx, collection("gist"), M{"_id": current["_id"]}, M{"$set": M{"status": "preparing"}}); err != nil { - t.Fatal(err) - } - if err := s.runJob(ctx, M{"kind": "gist", "resourceId": id, "action": "prepare", "attempts": 3}); err == nil { - t.Fatal("failed provider job succeeded") - } - current, err = s.Store.one(ctx, collection("gist"), M{"gistId": id}) - wantStatus := "error" - if c.code == "rate_limited" { - wantStatus = "queue" - want = "rate_limited:1800000000123" - } - if err != nil || current["status"] != wantStatus || current["statusMessage"] != want { - t.Fatal("job failure or quota delay not normalized", current, err) - } - } - }) -} diff --git a/backend/internal/server/provider_errors_test.go b/backend/internal/server/provider_errors_test.go deleted file mode 100644 index 77bac55..0000000 --- a/backend/internal/server/provider_errors_test.go +++ /dev/null @@ -1,53 +0,0 @@ -package server - -import ( - "encoding/json" - "errors" - "fmt" - "net/http/httptest" - "strings" - "testing" - "time" - - "github.com/tdurieux/anonymous_github/backend/internal/provider" -) - -func TestProviderErrorResponses(t *testing.T) { - for _, c := range []struct { - err error - code string - status int - }{ - {provider.ErrBranchNotFound, "branch_not_found", 404}, - {provider.ErrUnknown, "provider_not_supported", 400}, - {provider.ErrCapability, "provider_capability_not_supported", 400}, - {provider.ErrNotFound, "resource_not_found", 404}, - {provider.ErrAccessDenied, "not_authorized", 403}, - {provider.ErrRateLimited, "rate_limited", 429}, - {&provider.RateLimitError{ResetAt: time.UnixMilli(1800000000123)}, "rate_limited", 429}, - {provider.ErrUpstream, "upstream_error", 502}, - {errors.New("private upstream details"), "internal_error", 500}, - {fail("existing_github_code", 422), "existing_github_code", 422}, - } { - t.Run(c.code, func(t *testing.T) { - for _, err := range []error{c.err, fmt.Errorf("private endpoint and credential: %w", c.err)} { - w := httptest.NewRecorder() - writeError(w, err) - var body M - if e := json.Unmarshal(w.Body.Bytes(), &body); e != nil { - t.Fatal(e) - } - if w.Code != c.status || body["error"] != c.code || strings.Contains(w.Body.String(), "private") { - t.Fatal(w.Code, w.Body) - } - var limit *provider.RateLimitError - if errors.As(c.err, &limit) && number(body["resetAt"]) != 1800000000123 { - t.Fatal(w.Body) - } - if w.Header().Get("Cache-Control") != "no-store" { - t.Fatal(w.Header()) - } - } - }) - } -} diff --git a/backend/internal/server/provider_github.go b/backend/internal/server/provider_github.go deleted file mode 100644 index e9d1d88..0000000 --- a/backend/internal/server/provider_github.go +++ /dev/null @@ -1,285 +0,0 @@ -package server - -import ( - "context" - "errors" - "github.com/tdurieux/anonymous_github/backend/internal/anonymize" - "github.com/tdurieux/anonymous_github/backend/internal/provider" - "github.com/tdurieux/anonymous_github/backend/internal/security" - "io" - "net/http" - "net/url" - "path" - "strings" -) - -// GitHub-specific protocol and access binding stay in this adapter. Shared -// preparation, publication and file serving only see provider value types. -type githubProvider struct{ server *Server } - -func (g *githubProvider) ID() string { return "github" } -func (g *githubProvider) token(ctx context.Context, a provider.Access) (string, error) { - owner, e := oid(a.OwnerID) - if e != nil { - return "", fail("not_connected", 403) - } - return g.server.boundToken(ctx, owner, M(a.Binding), a.Ref.Name) -} -func (g *githubProvider) Connect(ctx context.Context, q provider.ConnectRequest) (provider.Connection, error) { - owner, e := oid(q.OwnerID) - if e != nil { - return provider.Connection{}, fail("not_connected", 403) - } - _, binding, resolvedName, e := g.server.selectAccessIdentity(ctx, owner, q.Name, q.Connection, q.RepositoryID) - if resolvedName == "" { - resolvedName = q.Name - } - repositoryID := str(binding["repositoryId"]) - if repositoryID == "" { - repositoryID = q.RepositoryID - } - return provider.Connection{Ref: provider.Ref{Provider: g.ID(), Name: resolvedName, ID: repositoryID}, Binding: map[string]any(binding)}, e -} -func (g *githubProvider) Authorize(ctx context.Context, a provider.Access) error { - _, e := g.token(ctx, a) - return e -} -func (g *githubProvider) Repository(ctx context.Context, a provider.Access) (provider.Repository, error) { - return g.repositoryMetadata(ctx, a, nil) -} -func (g *githubProvider) PreviewRepository(ctx context.Context, a provider.Access, cached *provider.Repository) (provider.Repository, error) { - return g.repositoryMetadata(ctx, a, cached) -} -func (g *githubProvider) repositoryMetadata(ctx context.Context, a provider.Access, cached *provider.Repository) (provider.Repository, error) { - if !safeRepositoryName(a.Ref.Name) { - return provider.Repository{}, fail("repo_not_found", 404) - } - token, e := g.token(ctx, a) - if e != nil { - return provider.Repository{}, e - } - endpoint := "/repos/" + a.Ref.Name - // The stable upstream ID survives repository and organization renames. - if a.Ref.ID != "" { - endpoint = "/repositories/" + segment(a.Ref.ID) - } - raw, e := g.server.githubObject(ctx, "GET", endpoint, token, nil) - if e != nil { - return provider.Repository{}, e - } - result := provider.Repository{ID: str(raw["id"]), Name: str(raw["full_name"]), URL: str(raw["html_url"]), DefaultBranch: str(raw["default_branch"]), Size: number(raw["size"]), HasPage: boolean(raw["has_pages"])} - if err := validateRepositoryIdentity(a, result); err != nil { - return provider.Repository{}, err - } - if cached != nil { - if cached.ID != result.ID { - return provider.Repository{}, fail("connection_changed", 409) - } - return *cached, nil - } - if result.HasPage { - if !safeRepositoryName(result.Name) { - return provider.Repository{}, fail("github_invalid_response", 502) - } - pages, err := g.server.githubObject(ctx, "GET", "/repos/"+result.Name+"/pages", token, nil) - if err != nil { - var upstream *githubHTTPError - if !errors.As(err, &upstream) || upstream.status != 403 && upstream.status != 404 { - return provider.Repository{}, err - } - } else { - source := obj(pages["source"]) - result.PageBranch, result.PagePath = str(source["branch"]), str(source["path"]) - } - } - return result, nil -} -func (g *githubProvider) Commit(ctx context.Context, a provider.Access, ref string) (provider.Commit, error) { - if !safeRepositoryName(a.Ref.Name) { - return provider.Commit{}, fail("repo_not_found", 404) - } - token, e := g.token(ctx, a) - if e != nil { - return provider.Commit{}, e - } - raw, e := g.server.githubObject(ctx, "GET", "/repos/"+a.Ref.Name+"/commits/"+segment(ref), token, nil) - if e != nil { - return provider.Commit{}, e - } - id := str(raw["sha"]) - if !commitID.MatchString(id) { - return provider.Commit{}, fail("github_invalid_response", 502) - } - stamp, valid := storedDate(obj(obj(raw["commit"])["author"])["date"]) - if !valid { - stamp = date(obj(obj(raw["commit"])["committer"])["date"]) - } - return provider.Commit{ID: id, Date: stamp}, nil -} -func (g *githubProvider) Tree(ctx context.Context, a provider.Access) ([]provider.Entry, error) { - entries, _, err := g.TreeWithTruncation(ctx, a) - return entries, err -} -func (g *githubProvider) TreeWithTruncation(ctx context.Context, a provider.Access) ([]provider.Entry, []string, error) { - truncated := []string{} - name, commit := a.Ref.Name, a.Ref.Commit - if !safeRepositoryName(name) || !commitID.MatchString(commit) { - return nil, nil, fail("invalid_source", 400) - } - token, e := g.token(ctx, a) - if e != nil { - return nil, nil, e - } - tree, e := g.server.githubObject(ctx, "GET", "/repos/"+name+"/git/trees/"+segment(commit)+"?recursive=1", token, nil) - if e != nil { - return nil, nil, e - } - entries := arr(tree["tree"]) - if boolean(tree["truncated"]) { - entries = []any{} - type dir struct{ sha, prefix string } - queue := []dir{{commit, ""}} - for len(queue) > 0 { - next := queue[0] - queue = queue[1:] - sub, e := g.server.githubObject(ctx, "GET", "/repos/"+name+"/git/trees/"+segment(next.sha), token, nil) - if e != nil { - return nil, nil, e - } - if boolean(sub["truncated"]) { - truncated = append(truncated, next.prefix) - } - for _, v := range arr(sub["tree"]) { - item := obj(v) - relative, e := security.RelativePath(str(item["path"])) - if e != nil { - return nil, nil, fail("invalid_file_path", 422) - } - p := path.Join(next.prefix, relative) - item["path"] = p - entries = append(entries, item) - if str(item["type"]) == "tree" { - queue = append(queue, dir{str(item["sha"]), p}) - } - } - } - } - out := make([]provider.Entry, 0, len(entries)) - for _, v := range entries { - row := obj(v) - kind := str(row["type"]) - if kind != "blob" && kind != "tree" && kind != "commit" { - continue - } - out = append(out, provider.Entry{Path: str(row["path"]), Revision: str(row["sha"]), Size: number(row["size"]), Directory: kind != "blob"}) - } - return out, truncated, nil -} -func (g *githubProvider) Open(ctx context.Context, a provider.Access, f provider.Entry) (io.ReadCloser, error) { - dir, name := path.Split(f.Path) - return g.server.githubBlob(ctx, providerRecord(a), M{"path": strings.TrimSuffix(dir, "/"), "name": name, "sha": f.Revision, "size": f.Size}) -} -func (g *githubProvider) PublicURL(r provider.Ref) string { - if !safeRepositoryName(r.Name) { - return "" - } - return "https://github.com/" + r.Name -} -func (g *githubProvider) SelfLinks(r provider.Ref) []string { - if r.Name == "" || r.Branch == "" { - return []string{} - } - return []string{"https://raw.githubusercontent.com/" + r.Name + "/" + r.Branch, "https://github.com/" + r.Name + "/blob/" + r.Branch, "https://github.com/" + r.Name + "/tree/" + r.Branch, "https://github.com/" + r.Name} -} - -func (s *Server) githubBlob(ctx context.Context, r, row M) (io.ReadCloser, error) { - if number(row["size"]) > anonymize.MaxInput { - return nil, fail("file_too_big", 413) - } - source := obj(r["source"]) - name := str(source["repositoryName"]) - if !safeRepositoryName(name) { - return nil, fail("repo_not_found", 404) - } - sha := str(row["sha"]) - if len(sha) != 40 || !commitID.MatchString(sha) { - return nil, fail("file_not_found", 404) - } - token, err := s.boundToken(ctx, r["owner"], obj(r["githubAccess"]), name) - if err != nil { - return nil, err - } - req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.github.com/repos/"+name+"/git/blobs/"+sha, nil) - req.Header.Set("Authorization", "Bearer "+token) - req.Header.Set("Accept", "application/vnd.github.raw+json") - req.Header.Set("User-Agent", "Anonymous-GitHub") - req.Header.Set("X-GitHub-Api-Version", "2022-11-28") - if err := s.checkGitHubQuota(ctx, token); err != nil { - return nil, err - } - response, err := s.HTTP.Do(req) - if err != nil { - return nil, fail("github_unavailable", 502) - } - if githubLimited(response) { - response.Body.Close() - return nil, s.recordGitHubQuota(ctx, token, response.Header) - } - if response.StatusCode != 200 { - response.Body.Close() - if response.StatusCode == 403 || response.StatusCode == 404 || response.StatusCode == 422 { - return s.rawBlob(ctx, r, row, token) - } - return nil, fail("file_not_available", 502) - } - if response.ContentLength > anonymize.MaxInput { - response.Body.Close() - return nil, fail("file_too_big", 413) - } - return s.inspectBlob(ctx, response.Body, r, row, token) -} - -func providerRecord(a provider.Access) M { - owner, _ := oid(a.OwnerID) - return M{"repoId": a.Ref.AnonymousID, "owner": owner, "source": M{"repositoryName": a.Ref.Name, "branch": a.Ref.Branch, "commit": a.Ref.Commit}, "githubAccess": M(a.Binding)} -} - -func (g *githubProvider) Branch(ctx context.Context, a provider.Access, name string) (provider.Commit, error) { - branches, e := g.Branches(ctx, a) - if e != nil { - return provider.Commit{}, e - } - for _, b := range branches { - if b.Name == name { - return g.Commit(ctx, a, b.Commit) - } - } - return provider.Commit{}, provider.ErrBranchNotFound -} - -func (g *githubProvider) FileMetadata(ctx context.Context, a provider.Access, requested string) (*provider.Entry, error) { - relative, err := security.RelativePath(requested) - if err != nil || relative != requested || !safeRepositoryName(a.Ref.Name) || !commitID.MatchString(a.Ref.Commit) { - return nil, fail("invalid_source", 400) - } - token, err := g.token(ctx, a) - if err != nil { - return nil, err - } - parts := strings.Split(requested, "/") - for i := range parts { - parts[i] = segment(parts[i]) - } - raw, err := g.server.githubObject(ctx, "GET", "/repos/"+a.Ref.Name+"/contents/"+strings.Join(parts, "/")+"?ref="+url.QueryEscape(a.Ref.Commit), token, nil) - if err != nil { - var upstream *githubHTTPError - if errors.As(err, &upstream) && upstream.status == 404 { - return nil, nil - } - return nil, err - } - if str(raw["type"]) != "file" || str(raw["sha"]) == "" { - return nil, nil - } - return &provider.Entry{Path: requested, Revision: str(raw["sha"]), Size: number(raw["size"])}, nil -} diff --git a/backend/internal/server/provider_github_archive.go b/backend/internal/server/provider_github_archive.go deleted file mode 100644 index 03a1c9b..0000000 --- a/backend/internal/server/provider_github_archive.go +++ /dev/null @@ -1,182 +0,0 @@ -package server - -import ( - "archive/tar" - "compress/gzip" - "context" - "errors" - "io" - "net/http" - "strings" - "time" - - "github.com/tdurieux/anonymous_github/backend/internal/anonymize" - "github.com/tdurieux/anonymous_github/backend/internal/provider" - "github.com/tdurieux/anonymous_github/backend/internal/security" -) - -var _ provider.Archives = (*githubProvider)(nil) - -func (g *githubProvider) OpenArchive(ctx context.Context, a provider.Access) (result provider.Archive, resultErr error) { - if !safeRepositoryName(a.Ref.Name) || !gitBlobSHA.MatchString(a.Ref.Commit) { - return nil, fail("invalid_source", 400) - } - token, err := g.token(ctx, a) - if err != nil { - return nil, err - } - if err = g.server.checkGitHubQuota(ctx, token); err != nil { - return nil, err - } - req, err := http.NewRequestWithContext(ctx, "GET", "https://api.github.com/repos/"+a.Ref.Name+"/tarball/"+a.Ref.Commit, nil) - if err != nil { - return nil, err - } - req.Header.Set("Authorization", "Bearer "+token) - req.Header.Set("Accept", "application/vnd.github+json") - req.Header.Set("User-Agent", "Anonymous-GitHub") - req.Header.Set("X-GitHub-Api-Version", "2022-11-28") - client := *g.server.HTTP - // The ordinary API timeout includes the entire body, too short for a - // backpressured repository stream. Keep a finite deadline for this request. - client.Timeout = 30 * time.Minute - client.CheckRedirect = archiveRedirect - done := g.server.startStage(ctx, "upstream") - defer func() { - if resultErr != nil { - done(resultErr) - } - }() - response, err := client.Do(req) - if err != nil { - return nil, fail("github_archive_unavailable", 502) - } - if githubLimited(response) { - response.Body.Close() - return nil, g.server.recordGitHubQuota(ctx, token, response.Header) - } - if response.StatusCode != http.StatusOK { - response.Body.Close() - return nil, fail("github_archive_unavailable", 502) - } - return newGitHubArchive(ctx, &measuredSource{ReadCloser: response.Body, done: done}) -} - -func archiveRedirect(next *http.Request, via []*http.Request) error { - if len(via) >= 5 || next.URL.Scheme != "https" || next.URL.User != nil || next.URL.Port() != "" || - (next.URL.Host != "api.github.com" && next.URL.Host != "codeload.github.com") { - return errors.New("unsafe_archive_redirect") - } - // Codeload receives the signed redirect URL, never the API credential. - if next.URL.Host != "api.github.com" || len(via) == 0 || via[len(via)-1].URL.Host != "api.github.com" { - next.Header.Del("Authorization") - } - return nil -} - -type githubArchive struct { - stop func() bool - ctx context.Context - body io.ReadCloser - gzip *gzip.Reader - tar *tar.Reader - root string - ended bool -} - -func newGitHubArchive(ctx context.Context, body io.ReadCloser) (provider.Archive, error) { - stop := context.AfterFunc(ctx, func() { body.Close() }) - gz, err := gzip.NewReader(&zipContextReader{ctx: ctx, reader: body}) - if err != nil { - stop() - body.Close() - return nil, err - } - return &githubArchive{stop: stop, ctx: ctx, body: body, gzip: gz, tar: tar.NewReader(gz)}, nil -} - -func (a *githubArchive) Close() error { - a.stop() - a.gzip.Close() - return a.body.Close() -} - -func (a *githubArchive) Next() (provider.Entry, io.Reader, error) { - for { - if err := a.ctx.Err(); err != nil { - return provider.Entry{}, nil, err - } - if a.ended { - return provider.Entry{}, nil, io.EOF - } - header, err := a.tar.Next() - if err == io.EOF { - // tar EOF precedes gzip's checksum. Consume bounded zero padding and - // require gzip EOF before allowing the outgoing ZIP to be finalized. - padding, e := io.ReadAll(io.LimitReader(a.gzip, (1<<20)+1)) - if e != nil { - return provider.Entry{}, nil, e - } - if len(padding) > 1<<20 || strings.Trim(string(padding), "\x00") != "" { - return provider.Entry{}, nil, errors.New("invalid_archive_trailer") - } - a.ended = true - return provider.Entry{}, nil, io.EOF - } - if err != nil { - return provider.Entry{}, nil, err - } - // GitHub starts archives with a global PAX comment containing the - // commit ID. archive/tar parses and bounds this metadata; it is not - // a repository entry and must not become the root path. - if header.Typeflag == tar.TypeXGlobalHeader { - continue - } - name := strings.TrimSuffix(header.Name, "/") - safe, err := security.RelativePath(name) - if err != nil || safe != name { - return provider.Entry{}, nil, errors.New("invalid_archive_path") - } - root, relative, found := strings.Cut(name, "/") - if a.root == "" { - a.root = root - } - if root != a.root { - return provider.Entry{}, nil, errors.New("invalid_archive_root") - } - if header.Typeflag == tar.TypeDir { - continue - } - if !found || relative == "" { - return provider.Entry{}, nil, errors.New("invalid_archive_path") - } - entry := provider.Entry{Path: relative, Size: header.Size} - switch header.Typeflag { - case tar.TypeReg, tar.TypeRegA: - if header.Size < 0 { - return provider.Entry{}, nil, fail("file_too_big", 413) - } - return entry, &zipContextReader{ctx: a.ctx, reader: a.tar}, nil - case tar.TypeSymlink: - // Git stores a symlink as a blob containing its target. Preserve those - // bytes as a regular output entry; never resolve or create a link. - entry.Size = int64(len(header.Linkname)) - if entry.Size > anonymize.MaxInput { - return provider.Entry{}, nil, fail("file_too_big", 413) - } - return entry, strings.NewReader(header.Linkname), nil - default: - return provider.Entry{}, nil, errors.New("unsupported_archive_entry") - } - } -} - -func (g *githubProvider) VerifyArchiveContent(ctx context.Context, a provider.Access, entry provider.Entry, proof provider.ContentProof, prefix []byte) error { - if err := ctx.Err(); err != nil { - return err - } - if proof.GitSHA != entry.Revision || strings.HasPrefix(string(prefix), "version https://git-lfs.github.com/spec/v1\n") { - return provider.ErrArchiveEntryFallback - } - return nil -} diff --git a/backend/internal/server/provider_github_archive_test.go b/backend/internal/server/provider_github_archive_test.go deleted file mode 100644 index e5cb08c..0000000 --- a/backend/internal/server/provider_github_archive_test.go +++ /dev/null @@ -1,165 +0,0 @@ -package server - -import ( - "archive/tar" - "bytes" - "compress/gzip" - "context" - "io" - "net/http" - "strings" - "testing" - "time" -) - -type tarTestEntry struct { - name, body, link string - kind byte -} - -func tarTestBytes(t *testing.T, entries ...tarTestEntry) []byte { - t.Helper() - var buffer bytes.Buffer - gz := gzip.NewWriter(&buffer) - tw := tar.NewWriter(gz) - if err := tw.WriteHeader(&tar.Header{Name: "pax_global_header", Typeflag: tar.TypeXGlobalHeader, PAXRecords: map[string]string{"comment": strings.Repeat("a", 40)}}); err != nil { - t.Fatal(err) - } - for _, entry := range entries { - kind := entry.kind - if kind == 0 { - kind = tar.TypeReg - } - size := int64(len(entry.body)) - if kind != tar.TypeReg { - size = 0 - } - if err := tw.WriteHeader(&tar.Header{Name: entry.name, Mode: 0600, Size: size, Typeflag: kind, Linkname: entry.link}); err != nil { - t.Fatal(err) - } - if _, err := tw.Write([]byte(entry.body)); err != nil { - t.Fatal(err) - } - } - if err := tw.Close(); err != nil { - t.Fatal(err) - } - if err := gz.Close(); err != nil { - t.Fatal(err) - } - return buffer.Bytes() -} - -func TestGitHubArchiveValidation(t *testing.T) { - t.Run("regular files and symlink blob bytes", func(t *testing.T) { - data := tarTestBytes(t, tarTestEntry{name: "root/", kind: tar.TypeDir}, tarTestEntry{name: "root/dir/a", body: "hello"}, tarTestEntry{name: "root/link", kind: tar.TypeSymlink, link: "../../target"}) - a, err := newGitHubArchive(t.Context(), io.NopCloser(bytes.NewReader(data))) - if err != nil { - t.Fatal(err) - } - defer a.Close() - for _, want := range []struct{ name, body string }{{"dir/a", "hello"}, {"link", "../../target"}} { - entry, body, err := a.Next() - if err != nil { - t.Fatal(err) - } - data, err := io.ReadAll(body) - if err != nil || entry.Path != want.name || string(data) != want.body || entry.Size != int64(len(data)) { - t.Fatal(entry, string(data), err) - } - } - if _, _, err = a.Next(); err != io.EOF { - t.Fatal(err) - } - }) - for _, name := range []string{"root/../escape", "/root/file", "root/dir//file", "root\\file", "plain-file"} { - t.Run(name, func(t *testing.T) { - a, err := newGitHubArchive(t.Context(), io.NopCloser(bytes.NewReader(tarTestBytes(t, tarTestEntry{name: name, body: "x"})))) - if err != nil { - t.Fatal(err) - } - defer a.Close() - if _, _, err = a.Next(); err == nil { - t.Fatal("unsafe path accepted") - } - }) - } - for _, kind := range []byte{tar.TypeLink, tar.TypeChar, tar.TypeFifo} { - a, err := newGitHubArchive(t.Context(), io.NopCloser(bytes.NewReader(tarTestBytes(t, tarTestEntry{name: "root/file", kind: kind, link: "root/target"})))) - if err != nil { - t.Fatal(err) - } - if _, _, err = a.Next(); err == nil { - t.Fatal("unsafe type accepted", kind) - } - a.Close() - } - t.Run("checksum and truncation", func(t *testing.T) { - good := tarTestBytes(t, tarTestEntry{name: "root/file", body: strings.Repeat("payload", 200)}) - corrupt := append([]byte(nil), good...) - corrupt[len(corrupt)-8] ^= 1 - for _, data := range [][]byte{corrupt, good[:len(good)-4]} { - a, err := newGitHubArchive(t.Context(), io.NopCloser(bytes.NewReader(data))) - if err != nil { - continue - } - for err == nil { - var body io.Reader - _, body, err = a.Next() - if err == nil { - _, err = io.Copy(io.Discard, body) - } - } - a.Close() - if err == io.EOF { - t.Fatal("corrupted archive accepted") - } - } - }) - t.Run("root change", func(t *testing.T) { - a, err := newGitHubArchive(t.Context(), io.NopCloser(bytes.NewReader(tarTestBytes(t, tarTestEntry{name: "root/a"}, tarTestEntry{name: "other/b"})))) - if err != nil { - t.Fatal(err) - } - defer a.Close() - if _, _, err = a.Next(); err != nil { - t.Fatal(err) - } - if _, _, err = a.Next(); err == nil { - t.Fatal("root changed") - } - }) -} - -func TestGitHubArchiveCancellationClosesBlockedRead(t *testing.T) { - ctx, cancel := context.WithCancel(t.Context()) - defer cancel() - reader, writer := io.Pipe() - defer writer.Close() - done := make(chan error, 1) - go func() { _, err := newGitHubArchive(ctx, reader); done <- err }() - cancel() - select { - case err := <-done: - if err == nil { - t.Fatal("cancelled read succeeded") - } - case <-time.After(time.Second): - t.Fatal("blocked archive read survived cancellation") - } -} - -func TestGitHubArchiveRedirect(t *testing.T) { - first, _ := http.NewRequest("GET", "https://api.github.com/repos/a/b/tarball/commit", nil) - for _, target := range []string{"http://codeload.github.com/a", "https://evil.test/a", "https://codeload.github.com:444/a", "https://user@codeload.github.com/a"} { - req, _ := http.NewRequest("GET", target, nil) - if err := archiveRedirect(req, []*http.Request{first}); err == nil { - t.Fatal("unsafe redirect", target) - } - } - req, _ := http.NewRequest("GET", "https://codeload.github.com/a/b/legacy.tar.gz/commit?token=signed", nil) - req.Header.Set("Authorization", "Bearer synthetic") - if err := archiveRedirect(req, []*http.Request{first}); err != nil || req.Header.Get("Authorization") != "" { - t.Fatal("credential forwarded", err) - } -} diff --git a/backend/internal/server/provider_github_cache.go b/backend/internal/server/provider_github_cache.go deleted file mode 100644 index 98f395e..0000000 --- a/backend/internal/server/provider_github_cache.go +++ /dev/null @@ -1,87 +0,0 @@ -package server - -import ( - "context" - "strings" - "time" - - "github.com/tdurieux/anonymous_github/backend/internal/provider" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/mongo" - "go.mongodb.org/mongo-driver/v2/mongo/options" -) - -func (g *githubProvider) cachedRepositories(ctx context.Context, user M) ([]provider.Repository, error) { - ids := []bson.ObjectID{} - for _, value := range arr(user["repositories"]) { - if id, err := oid(str(value)); err == nil { - ids = append(ids, id) - } - } - // Match TypeScript's find($in) behavior: database order, unique rows, and - // missing references omitted. Other providers never enter GitHub discovery. - rows, err := g.server.Store.list(ctx, "repositories", M{"_id": M{"$in": ids}, "externalId": M{"$regex": "^gh_"}}, 0, nil) - if err != nil { - return nil, err - } - out := []provider.Repository{} - for _, row := range rows { - out = append(out, provider.Repository{ID: strings.TrimPrefix(str(row["externalId"]), "gh_"), Name: str(row["name"]), URL: str(row["url"]), Size: number(row["size"]), DefaultBranch: str(row["defaultBranch"]), HasPage: boolean(row["hasPage"])}) - } - return out, nil -} - -func (g *githubProvider) cacheRepositories(ctx context.Context, user M, repos []provider.Repository) error { - ids := []bson.ObjectID{} - externalIDs := make([]string, 0, len(repos)) - for _, repo := range repos { - externalIDs = append(externalIDs, externalRepositoryID("github", repo.ID)) - } - existing, err := g.server.Store.list(ctx, "repositories", M{"externalId": M{"$in": externalIDs}}, 0, nil) - if err != nil { - return err - } - byExternalID := map[string]M{} - for _, row := range existing { - byExternalID[str(row["externalId"])] = row - } - for _, repo := range repos { - external := externalRepositoryID("github", repo.ID) - cached := byExternalID[external] - if cached == nil { - // TypeScript reuses existing rows without overwriting their metadata. - // Atomic insertion also prevents duplicate rows from concurrent discovery. - insert := M{"_id": bson.NewObjectID(), "externalId": external, "name": repo.Name, "url": repo.URL, "size": repo.Size, "defaultBranch": repo.DefaultBranch, "source": "github", "hasPage": false, "status": "ready", "branches": []any{}, "dateOfEntry": time.Now(), "__v": 0} - err := g.server.Store.DB.Collection("repositories").FindOneAndUpdate(ctx, M{"externalId": external}, M{"$setOnInsert": insert}, options.FindOneAndUpdate().SetUpsert(true).SetReturnDocument(options.After)).Decode(&cached) - if mongo.IsDuplicateKeyError(err) { - cached, err = g.server.Store.one(ctx, "repositories", M{"externalId": external}) - } - if err != nil { - return err - } - - byExternalID[external] = cached - } - id, err := oid(str(cached["_id"])) - if err != nil { - return err - } - ids = append(ids, id) - } - filter := M{"_id": user["_id"], "status": user["status"]} - if revision, ok := user["repositoryDiscoveryRevision"]; ok { - filter["repositoryDiscoveryRevision"] = revision - } else { - filter["repositoryDiscoveryRevision"] = M{"$exists": false} - } - // Reconnecting/disconnecting while discovery is in flight invalidates this - // publication, including when the old and new saved lists are both empty. - matched, err := g.server.Store.update(ctx, "users", filter, M{"$set": M{"repositories": ids}}) - if err != nil { - return err - } - if !matched { - return fail("connection_changed", 409) - } - return nil -} diff --git a/backend/internal/server/provider_github_content.go b/backend/internal/server/provider_github_content.go deleted file mode 100644 index 9293df3..0000000 --- a/backend/internal/server/provider_github_content.go +++ /dev/null @@ -1,142 +0,0 @@ -package server - -import ( - "context" - "crypto/sha1" - "encoding/hex" - "fmt" - "io" - "net/http" - "regexp" - "strconv" - "strings" - "sync" - "time" - - "github.com/tdurieux/anonymous_github/backend/internal/provider" -) - -var _ provider.ContentVerifier = (*githubProvider)(nil) -var gitBlobSHA = regexp.MustCompile(`^[a-f0-9]{40}$`) -var lfsOID = regexp.MustCompile(`^oid sha256:([a-f0-9]{64})$`) -var lfsSize = regexp.MustCompile(`^size ([0-9]+)$`) - -func (g *githubProvider) VerifyContent(ctx context.Context, a provider.Access, entry provider.Entry, proof provider.ContentProof) (string, error) { - return verifyGitHubContent(ctx, entry.Revision, proof, func(ctx context.Context) (io.ReadCloser, error) { - if !safeRepositoryName(a.Ref.Name) { - return nil, fail("repo_not_found", 404) - } - token, err := g.token(ctx, a) - if err != nil { - return nil, err - } - return g.server.githubPointer(ctx, a.Ref.Name, entry.Revision, token) - }) -} - -// Read the Git object itself, never the resolved raw/LFS fallback. A payload -// hash mismatch is only valid if this authenticated pointer proves its identity. -func (s *Server) githubPointer(ctx context.Context, name, revision, token string) (io.ReadCloser, error) { - if !safeRepositoryName(name) || !gitBlobSHA.MatchString(revision) { - return nil, fail("invalid_blob_hash", 502) - } - if err := s.checkGitHubQuota(ctx, token); err != nil { - return nil, err - } - req, err := http.NewRequestWithContext(ctx, http.MethodGet, "https://api.github.com/repos/"+name+"/git/blobs/"+revision, nil) - if err != nil { - return nil, err - } - req.Header.Set("Authorization", "Bearer "+token) - req.Header.Set("Accept", "application/vnd.github.raw+json") - req.Header.Set("User-Agent", "Anonymous-GitHub") - req.Header.Set("X-GitHub-Api-Version", "2022-11-28") - client := *s.HTTP - client.CheckRedirect = func(*http.Request, []*http.Request) error { return http.ErrUseLastResponse } - response, err := client.Do(req) - if err != nil { - if ctx.Err() != nil { - return nil, context.Cause(ctx) - } - return nil, fail("github_unavailable", 502) - } - if githubLimited(response) { - response.Body.Close() - return nil, s.recordGitHubQuota(ctx, token, response.Header) - } - if response.StatusCode != http.StatusOK { - response.Body.Close() - return nil, fail("file_not_available", 502) - } - if response.ContentLength > 1024 { - response.Body.Close() - return nil, fail("invalid_lfs_pointer", 502) - } - return response.Body, nil -} - -func verifyGitHubContent(ctx context.Context, revision string, proof provider.ContentProof, pointer func(context.Context) (io.ReadCloser, error)) (string, error) { - if ctx.Err() != nil { - return "", context.Cause(ctx) - } - if !gitBlobSHA.MatchString(revision) || proof.Size < 0 { - return "", fail("invalid_blob_hash", 502) - } - if proof.GitSHA == revision { - return "git-" + proof.GitSHA, nil - } - ctx, cancel := context.WithTimeout(ctx, 30*time.Second) - defer cancel() - body, err := pointer(ctx) - if err != nil { - return "", err - } - if body == nil { - return "", fail("invalid_lfs_pointer", 502) - } - var closed sync.Once - closeBody := func() { closed.Do(func() { body.Close() }) } - stop := context.AfterFunc(ctx, closeBody) - defer stop() - defer closeBody() - raw, err := io.ReadAll(io.LimitReader(body, 1025)) - if ctx.Err() != nil { - return "", context.Cause(ctx) - } - if err != nil { - return "", err - } - if len(raw) > 1024 { - return "", fail("invalid_lfs_pointer", 502) - } - hash := sha1.New() - fmt.Fprintf(hash, "blob %d\x00", len(raw)) - hash.Write(raw) - text := string(raw) - // JavaScript multiline anchors recognize CR, LF, U+2028 and U+2029. - // Preserve first-match behavior for duplicate fields as in TypeScript. - var oid, size []string - for _, line := range strings.FieldsFunc(text, func(r rune) bool { return r == '\r' || r == '\n' || r == '\u2028' || r == '\u2029' }) { - if oid == nil { - oid = lfsOID.FindStringSubmatch(line) - } - if size == nil { - size = lfsSize.FindStringSubmatch(line) - } - } - if hex.EncodeToString(hash.Sum(nil)) != revision || !strings.HasPrefix(text, "version https://git-lfs.github.com/spec/v1\n") || len(oid) != 2 || len(size) != 2 || oid[1] != proof.SHA256 { - return "", fail("invalid_blob_hash", 502) - } - bytes, err := strconv.ParseInt(size[1], 10, 64) - if err != nil || bytes != proof.Size { - return "", fail("invalid_blob_hash", 502) - } - return "sha256-" + proof.SHA256, nil -} - -func (g *githubProvider) ContentCacheKey(_ provider.Access, entry provider.Entry) string { - if gitBlobSHA.MatchString(entry.Revision) { - return "git-" + entry.Revision - } - return "" -} diff --git a/backend/internal/server/provider_github_content_test.go b/backend/internal/server/provider_github_content_test.go deleted file mode 100644 index 8257c91..0000000 --- a/backend/internal/server/provider_github_content_test.go +++ /dev/null @@ -1,173 +0,0 @@ -package server - -import ( - "context" - "encoding/json" - "errors" - "io" - "net/http" - "os" - "strings" - "testing" - "time" - - "github.com/tdurieux/anonymous_github/backend/internal/provider" -) - -func TestGitHubContentVerificationContracts(t *testing.T) { - raw, err := os.ReadFile("testdata/content-verification.json") - if err != nil { - t.Fatal(err) - } - var fixtures []struct { - Name, Pointer, Revision, Expected, Error string - Proof provider.ContentProof - Fetched int - } - if err = json.Unmarshal(raw, &fixtures); err != nil { - t.Fatal(err) - } - for _, f := range fixtures { - t.Run(f.Name, func(t *testing.T) { - fetched := 0 - result, err := verifyGitHubContent(t.Context(), f.Revision, f.Proof, func(context.Context) (io.ReadCloser, error) { - fetched++ - return io.NopCloser(strings.NewReader(f.Pointer)), nil - }) - if result != f.Expected || (err == nil) != (f.Error == "") || (err != nil && err.Error() != f.Error) || fetched != f.Fetched { - t.Fatal(result, err, f.Expected, f.Error, fetched, f.Fetched) - } - }) - } -} - -func TestGitHubContentVerificationCancellation(t *testing.T) { - ctx, cancel := context.WithCancel(t.Context()) - input, output := io.Pipe() - defer output.Close() - entered := make(chan struct{}) - done := make(chan error, 1) - go func() { - _, err := verifyGitHubContent(ctx, strings.Repeat("a", 40), provider.ContentProof{}, func(context.Context) (io.ReadCloser, error) { close(entered); return input, nil }) - done <- err - }() - <-entered - cancel() - select { - case err := <-done: - if !errors.Is(err, context.Canceled) { - t.Fatal(err) - } - case <-time.After(time.Second): - t.Fatal("blocked pointer not canceled") - } -} - -func TestGitHubPointerRequest(t *testing.T) { - for _, status := range []int{200, 302, 403, 404, 422, 500} { - t.Run(http.StatusText(status), func(t *testing.T) { - calls := 0 - s := &Server{HTTP: &http.Client{Transport: roundTrip(func(r *http.Request) (*http.Response, error) { - calls++ - if r.URL.String() != "https://api.github.com/repos/owner/repo/git/blobs/"+strings.Repeat("a", 40) || r.Header.Get("Authorization") != "Bearer synthetic" || r.Header.Get("Accept") != "application/vnd.github.raw+json" { - t.Fatal(r.URL, r.Header) - } - return &http.Response{StatusCode: status, Header: http.Header{"Location": []string{"https://attacker.example"}}, Body: io.NopCloser(strings.NewReader("pointer")), ContentLength: 7, Request: r}, nil - })}} - body, err := s.githubPointer(t.Context(), "owner/repo", strings.Repeat("a", 40), "synthetic") - if status == 200 { - if err != nil { - t.Fatal(err) - } - body.Close() - } else if err == nil { - body.Close() - t.Fatal("accepted failure") - } - if calls != 1 { - t.Fatal("pointer request followed redirect or fallback", calls) - } - }) - } -} - -func TestGitHubContentVerificationBoundsAndErrors(t *testing.T) { - for _, test := range []struct { - name, revision string - canceled bool - }{ - {name: "malformed revision", revision: "../main"}, - {name: "uppercase revision", revision: strings.Repeat("A", 40)}, - {name: "canceled", revision: strings.Repeat("a", 40), canceled: true}, - } { - t.Run(test.name, func(t *testing.T) { - ctx, cancel := context.WithCancel(t.Context()) - defer cancel() - if test.canceled { - cancel() - } - _, err := verifyGitHubContent(ctx, test.revision, provider.ContentProof{}, func(context.Context) (io.ReadCloser, error) { t.Fatal("unexpected pointer download"); return nil, nil }) - if err == nil { - t.Fatal("accepted invalid verification") - } - }) - } - t.Run("bounded read", func(t *testing.T) { - body := &trackedPointer{Reader: strings.NewReader(strings.Repeat("x", 4096))} - _, err := verifyGitHubContent(t.Context(), strings.Repeat("a", 40), provider.ContentProof{}, func(ctx context.Context) (io.ReadCloser, error) { - deadline, ok := ctx.Deadline() - if !ok || time.Until(deadline) > 30*time.Second { - t.Fatal("missing pointer deadline") - } - return body, nil - }) - if err == nil || err.Error() != "invalid_lfs_pointer" || body.bytes != 1025 || body.closes != 1 { - t.Fatal(err, body.bytes, body.closes) - } - }) - t.Run("upstream error", func(t *testing.T) { - sentinel := errors.New("upstream unavailable") - _, err := verifyGitHubContent(t.Context(), strings.Repeat("a", 40), provider.ContentProof{}, func(context.Context) (io.ReadCloser, error) { return nil, sentinel }) - if !errors.Is(err, sentinel) { - t.Fatal(err) - } - }) - t.Run("adapter ordinary content", func(t *testing.T) { - adapter := &githubProvider{} // The hash fast path requires no additional network request. - sha := strings.Repeat("a", 40) - result, err := adapter.VerifyContent(t.Context(), provider.Access{}, provider.Entry{Revision: sha}, provider.ContentProof{GitSHA: sha}) - if err != nil || result != "git-"+sha { - t.Fatal(result, err) - } - }) -} - -type trackedPointer struct { - io.Reader - bytes, closes int -} - -func (p *trackedPointer) Read(b []byte) (int, error) { - n, err := p.Reader.Read(b) - p.bytes += n - return n, err -} -func (p *trackedPointer) Close() error { p.closes++; return nil } - -func TestGitHubPointerRejectsOversizeAndInvalidIdentity(t *testing.T) { - body := &trackedPointer{Reader: strings.NewReader("unused")} - calls := 0 - s := &Server{HTTP: &http.Client{Transport: roundTrip(func(r *http.Request) (*http.Response, error) { - calls++ - return &http.Response{StatusCode: 200, Body: body, ContentLength: 1025, Header: make(http.Header), Request: r}, nil - })}} - for _, name := range []string{"../repo", "owner/repo?evil", "owner/repo"} { - reader, err := s.githubPointer(t.Context(), name, strings.Repeat("a", 40), "synthetic") - if err == nil || reader != nil { - t.Fatal("accepted invalid pointer response", reader, err) - } - } - if calls != 1 || body.bytes != 0 || body.closes != 1 { - t.Fatal(calls, body.bytes, body.closes) - } -} diff --git a/backend/internal/server/provider_github_discovery.go b/backend/internal/server/provider_github_discovery.go deleted file mode 100644 index 1bf87b5..0000000 --- a/backend/internal/server/provider_github_discovery.go +++ /dev/null @@ -1,160 +0,0 @@ -package server - -import ( - "context" - "fmt" - "github.com/tdurieux/anonymous_github/backend/internal/provider" -) - -func (g *githubProvider) List(ctx context.Context, request provider.ListRequest) ([]provider.Repository, error) { - s := g.server - owner, err := oid(request.OwnerID) - if err != nil { - return nil, fail("not_connected", 403) - } - repos := map[string]provider.Repository{} - order := []string{} - remember := func(r M) { - id := "gh_" + str(r["id"]) - if _, exists := repos[id]; !exists { - order = append(order, id) - } - repos[id] = provider.Repository{Name: str(r["full_name"]), ID: str(r["id"]), URL: str(r["html_url"]), Size: number(r["size"]), DefaultBranch: str(r["default_branch"])} - } - oauth, err := s.Store.one(ctx, "credentials", M{"ownerId": owner, "provider": "github", "revoked": M{"$ne": true}}) - if err != nil { - return nil, err - } - app, err := s.Store.one(ctx, "credentials", M{"ownerId": owner, "provider": "github-app-user"}) - if err != nil { - return nil, err - } - useApp := s.Config.AppEnabled && app != nil - user, err := s.Store.one(ctx, "users", M{"_id": owner}) - if err != nil { - return nil, err - } - if !identity(user).Active() { - return nil, fail("not_connected", 403) - } - if !useApp && !request.Force && len(arr(user["repositories"])) > 0 { - return g.cachedRepositories(ctx, user) - } - var oauthToken string - if oauth != nil { - oauthToken, err = s.credential(ctx, owner, "github") - if err != nil { - return nil, err - } - } - var appRepos []M - if useApp { - appRepos, err = g.appRepositories(ctx, request.OwnerID) - if err != nil && oauth == nil { - return nil, err - } - // App discovery is atomic: never publish a partial installation list. - // An independently connected OAuth grant can still supply discovery. - if err != nil { - appRepos = nil - } - } - if oauth != nil { - endpoint := "/user/repos?visibility=all" - if !useApp { - endpoint += "&sort=pushed" - } - err := s.githubPages(ctx, endpoint, oauthToken, "", func(r M) bool { remember(r); return false }) - if err != nil { - return nil, err - } - } - for _, r := range appRepos { - remember(r) - } - if oauth == nil && (!s.Config.AppEnabled || app == nil) { - return nil, fail("github_oauth_required", 403) - } - out := []provider.Repository{} - for _, id := range order { - out = append(out, repos[id]) - } - - if !useApp { - if err := g.cacheRepositories(ctx, user, out); err != nil { - return nil, err - } - } - return out, nil -} - -// appRepositories returns all installations' repositories or an error. Keeping -// this operation separate makes OAuth fallback cover every App request failure. -func (g *githubProvider) appRepositories(ctx context.Context, ownerID string) ([]M, error) { - owner, err := oid(ownerID) - if err != nil { - return nil, fail("not_connected", 403) - } - s := g.server - items, err := s.installations(ctx, owner) - if err != nil { - return nil, err - } - token, err := s.credential(ctx, owner, "github-app-user") - if err != nil { - return nil, err - } - out := []M{} - for _, installation := range items { - if inputTruthy(installation["suspended_at"]) { - continue - } - err := s.githubPages(ctx, fmt.Sprintf("/user/installations/%d/repositories", number(installation["id"])), token, "repositories", func(r M) bool { - out = append(out, r) - return false - }) - if err != nil { - return nil, err - } - } - return out, nil -} - -func (g *githubProvider) Branches(ctx context.Context, a provider.Access) ([]provider.Branch, error) { - if !safeRepositoryName(a.Ref.Name) { - return nil, fail("repo_not_found", 404) - } - token, e := g.token(ctx, a) - if e != nil { - return nil, e - } - - out := []provider.Branch{} - e = g.server.githubPages(ctx, "/repos/"+a.Ref.Name+"/branches", token, "", func(r M) bool { - out = append(out, provider.Branch{Name: str(r["name"]), Commit: str(obj(r["commit"])["sha"])}) - return false - }) - if e != nil { - return nil, e - } - return out, nil -} - -func (g *githubProvider) Readme(ctx context.Context, a provider.Access, branch string) (string, error) { - if !safeRepositoryName(a.Ref.Name) { - return "", fail("repo_not_found", 404) - } - token, e := g.token(ctx, a) - if e != nil { - return "", e - } - endpoint := "/repos/" + a.Ref.Name + "/readme" - if branch != "" { - endpoint += "?ref=" + queryEscape(branch) - } - raw, e := g.server.github(ctx, "GET", endpoint, token, nil) - if e != nil { - return "", e - } - return decodeGitHubReadme(raw) -} diff --git a/backend/internal/server/provider_github_documents.go b/backend/internal/server/provider_github_documents.go deleted file mode 100644 index d15673b..0000000 --- a/backend/internal/server/provider_github_documents.go +++ /dev/null @@ -1,117 +0,0 @@ -package server - -import ( - "context" - "encoding/base64" - "fmt" - "github.com/tdurieux/anonymous_github/backend/internal/provider" -) - -func (g *githubProvider) Document(ctx context.Context, q provider.DocumentRequest) (map[string]any, error) { - r := providerRecord(q.Access) - r["source"] = M{"gistId": q.ID, "repositoryFullName": q.Access.Ref.Name, "pullRequestId": q.Number} - return g.server.githubDocument(ctx, q.Kind, r) -} -func (g *githubProvider) DocumentURL(q provider.DocumentRequest) string { - if q.Kind == "gist" { - return "https://gist.github.com/" + segment(q.ID) - } - if !safeRepositoryName(q.Access.Ref.Name) { - return "" - } - return fmt.Sprintf("https://github.com/%s/pull/%d", q.Access.Ref.Name, q.Number) -} -func (s *Server) githubDocument(ctx context.Context, kind string, r M) (M, error) { - source := obj(r["source"]) - var payload M - var token string - var err error - if kind == "gist" { - provider := "github" - if s.Config.AppEnabled { - grant, e := s.Store.one(ctx, "credentials", M{"ownerId": r["owner"], "provider": "github-app-user"}) - if e != nil { - return nil, e - } - if grant != nil { - provider = "github-app-user" - } - } - token, err = s.credential(ctx, r["owner"], provider) - } else { - token, err = s.boundToken(ctx, r["owner"], obj(r["githubAccess"]), str(source["repositoryFullName"])) - } - if err != nil { - return nil, err - } - var endpoint string - if kind == "gist" { - endpoint = "/gists/" + segment(str(source["gistId"])) - } else { - endpoint = fmt.Sprintf("/repos/%s/pulls/%d", str(source["repositoryFullName"]), number(source["pullRequestId"])) - } - upstream, err := s.githubObject(ctx, "GET", endpoint, token, nil) - if err != nil { - return nil, err - } - if kind == "gist" { - files := []M{} - for _, value := range obj(upstream["files"]) { - f := obj(value) - if str(f["encoding"]) == "base64" { - decoded, e := base64.StdEncoding.DecodeString(str(f["content"])) - if e != nil { - return nil, fail("github_invalid_response", 502) - } - f["content"] = string(decoded) - } - if boolean(f["truncated"]) { - value, e := s.githubText(ctx, str(f["raw_url"]), token, "text/plain", 8*1024*1024) - if e != nil { - return nil, e - } - f["content"] = value - } - files = append(files, selectFields(f, "filename", "content", "language", "size", "type")) - } - payload = M{"description": upstream["description"], "isPublic": upstream["public"], "creationDate": date(upstream["created_at"]), "updatedDate": date(upstream["updated_at"]), "ownerLogin": obj(upstream["owner"])["login"], "files": files} - } else { - diff, e := s.githubText(ctx, "https://api.github.com"+endpoint, token, "application/vnd.github.diff", 8*1024*1024) - if e != nil { - return nil, e - } - payload = M{"title": upstream["title"], "body": upstream["body"], "creationDate": date(upstream["created_at"]), "updatedDate": date(upstream["updated_at"]), "draft": upstream["draft"], "merged": upstream["merged"], "mergedDate": date(upstream["merged_at"]), "state": upstream["state"], "baseRepositoryFullName": obj(obj(upstream["base"])["repo"])["full_name"], "headRepositoryFullName": obj(obj(upstream["head"])["repo"])["full_name"], "diff": diff} - } - comments := []M{} - commentsPath := endpoint + "/comments" - if kind == "pr" { - commentsPath = fmt.Sprintf("/repos/%s/issues/%d/comments", str(source["repositoryFullName"]), number(source["pullRequestId"])) - } - err = s.githubPages(ctx, commentsPath, token, "", func(c M) bool { - comments = append(comments, M{"body": c["body"], "author": obj(c["user"])["login"], "creationDate": date(c["created_at"]), "updatedDate": date(c["updated_at"])}) - return false - }) - if err != nil { - return nil, err - } - payload["comments"] = comments - return payload, nil -} - -func (g *githubProvider) ConnectDocument(ctx context.Context, q provider.DocumentRequest, connection string) (provider.Access, error) { - if q.Kind == "gist" { - if q.ID == "" { - return q.Access, fail("gist_not_found", 400) - } - return q.Access, nil - } - if q.Kind != "pr" || !safeRepositoryName(q.Access.Ref.Name) || q.Number <= 0 { - return q.Access, fail("pull_request_not_found", 400) - } - if len(q.Access.Binding) > 0 { - return q.Access, g.Authorize(ctx, q.Access) - } - c, e := g.Connect(ctx, provider.ConnectRequest{OwnerID: q.Access.OwnerID, Name: q.Access.Ref.Name, Connection: connection}) - q.Access.Binding = c.Binding - return q.Access, e -} diff --git a/backend/internal/server/provider_github_preview.go b/backend/internal/server/provider_github_preview.go deleted file mode 100644 index d969f6f..0000000 --- a/backend/internal/server/provider_github_preview.go +++ /dev/null @@ -1,135 +0,0 @@ -package server - -import ( - "context" - "errors" - - "github.com/tdurieux/anonymous_github/backend/internal/provider" - "github.com/tdurieux/anonymous_github/backend/internal/security" -) - -func previewBranchJSON(branch provider.Branch) M { - row := M{"name": branch.Name, "commit": branch.Commit} - if branch.Readme != nil { - row["readme"] = *branch.Readme - } - return row -} -func storedPreviewBranches(row M) []provider.Branch { - out := []provider.Branch{} - for _, value := range arr(row["branches"]) { - item := obj(value) - branch := provider.Branch{Name: str(item["name"]), Commit: str(item["commit"])} - if readme, ok := item["readme"].(string); ok { - branch.Readme = &readme - } - out = append(out, branch) - } - return out -} -func discoveryRevisionFilter(cached M) M { - filter := M{"_id": cached["_id"]} - if revision, present := cached["goDiscoveryRevision"]; present { - filter["goDiscoveryRevision"] = revision - } else { - filter["goDiscoveryRevision"] = M{"$exists": false} - } - return filter -} -func branchPreviewFailure(err error) error { - status := 404 - var upstream *githubHTTPError - if errors.As(err, &upstream) { - status = upstream.status - } - return fail("repo_not_found", status) -} -func (g *githubProvider) PreviewBranches(ctx context.Context, a provider.Access, force bool) ([]provider.Branch, error) { - if _, err := g.token(ctx, a); err != nil { - return nil, err - } - cached, err := g.server.Store.one(ctx, "repositories", M{"externalId": externalRepositoryID("github", a.Ref.ID)}) - if err != nil { - return nil, err - } - if cached == nil { - return nil, fail("repo_not_found", 404) - } - previous := storedPreviewBranches(cached) - if len(previous) > 0 && !force { - return previous, nil - } - fresh, err := g.Branches(ctx, a) - if err != nil { - return nil, branchPreviewFailure(err) - } - readmes := map[string]*string{} - for _, branch := range previous { - if _, exists := readmes[branch.Name]; !exists { - readmes[branch.Name] = branch.Readme - } - } - rows := []M{} - for i := range fresh { - fresh[i].Readme = readmes[fresh[i].Name] - rows = append(rows, previewBranchJSON(fresh[i])) - } - revision, err := security.RandomToken() - if err != nil { - return nil, branchPreviewFailure(err) - } - if _, err := g.server.Store.update(ctx, "repositories", discoveryRevisionFilter(cached), M{"$set": M{"branches": rows, "goDiscoveryRevision": revision}}); err != nil { - return nil, branchPreviewFailure(err) - } - return fresh, nil -} -func (g *githubProvider) PreviewReadme(ctx context.Context, a provider.Access, branch string, force bool) (string, error) { - if branch == "" { - branch = "master" - } - return g.PreviewSelectedReadme(ctx, a, func(name string) (bool, error) { return name == branch, nil }, force) -} - -func (g *githubProvider) PreviewSelectedReadme(ctx context.Context, a provider.Access, matches provider.BranchMatch, force bool) (string, error) { - cached, err := g.server.Store.one(ctx, "repositories", M{"externalId": externalRepositoryID("github", a.Ref.ID)}) - if err != nil { - return "", err - } - if cached == nil { - return "", fail("repo_not_found", 404) - } - branches, err := g.PreviewBranches(ctx, a, force) - if err != nil { - return "", err - } - var selected *provider.Branch - for i := range branches { - match, err := matches(branches[i].Name) - if err != nil { - return "", err - } - if match && selected == nil { - selected = &branches[i] - } - } - if selected == nil { - return "", fail("readme_not_available", 404) - } - if selected.Readme != nil && *selected.Readme != "" && !force { - return *selected.Readme, nil - } - // Resolve README content at the branch snapshot's commit, not a moving name. - value, err := g.Readme(ctx, a, selected.Commit) - if err != nil { - return "", fail("readme_not_available", 404) - } - revision, err := security.RandomToken() - if err != nil { - return "", fail("readme_not_available", 404) - } - filter := M{"_id": cached["_id"], "branches": M{"$elemMatch": M{"name": selected.Name, "commit": selected.Commit}}} - if _, err := g.server.Store.update(ctx, "repositories", filter, M{"$set": M{"branches.$.readme": value, "goDiscoveryRevision": revision}}); err != nil { - return "", fail("readme_not_available", 404) - } - return value, nil -} diff --git a/backend/internal/server/provider_github_readme.go b/backend/internal/server/provider_github_readme.go deleted file mode 100644 index bfeaec0..0000000 --- a/backend/internal/server/provider_github_readme.go +++ /dev/null @@ -1,209 +0,0 @@ -package server - -import ( - "encoding/hex" - "math" - "strconv" - "strings" - "unicode" - "unicode/utf16" - "unicode/utf8" - - unicodeencoding "golang.org/x/text/encoding/unicode" -) - -// Match Buffer.from(content, encoding).toString("utf-8") at the GitHub -// boundary. Other providers return normalized text through Discovery.Readme. -func decodeGitHubReadme(v any) (string, error) { - response := obj(v) - var data []byte - invalid := func() (string, error) { return "", fail("github_invalid_response", 502) } - switch content := response["content"].(type) { - case string: - if len(content) > maxReadmeBytes { - return invalid() - } - encoding, _ := response["encoding"].(string) - switch strings.ToLower(encoding) { - case "", "utf8", "utf-8": - if utf8.ValidString(content) { - return content, nil - } - data = []byte(content) - case "base64", "base64url": - // Node accepts either alphabet, skips non-alphabet bytes, permits missing - // padding, and stops at the first '='. UTF-16 units are narrowed to bytes. - var bits uint32 - var width uint - readmeUnits(content, func(unit uint16) bool { - ch := byte(unit) - if ch == '=' { - return false - } - var value byte - switch { - case ch >= 'A' && ch <= 'Z': - value = ch - 'A' - case ch >= 'a' && ch <= 'z': - value = ch - 'a' + 26 - case ch >= '0' && ch <= '9': - value = ch - '0' + 52 - case ch == '+' || ch == '-': - value = 62 - case ch == '/' || ch == '_': - value = 63 - default: - return true - } - bits = bits<<6 | uint32(value) - width += 6 - if width >= 8 { - width -= 8 - data = append(data, byte(bits>>width)) - } - return true - }) - case "hex": - // DecodeString returns the valid prefix before an invalid or odd pair. - narrowed := make([]byte, 0, len(content)) - readmeUnits(content, func(unit uint16) bool { narrowed = append(narrowed, byte(unit)); return true }) - data, _ = hex.DecodeString(string(narrowed)) - case "ascii", "latin1", "binary": - readmeUnits(content, func(unit uint16) bool { data = append(data, byte(unit)); return true }) - case "ucs2", "ucs-2", "utf16le", "utf-16le": - if utf16Length(content) > maxReadmeBytes/2 { - return invalid() - } - readmeUnits(content, func(unit uint16) bool { data = append(data, byte(unit), byte(unit>>8)); return true }) - default: - return invalid() - } - case []any: - if len(content) > maxReadmeBytes { - return invalid() - } - data = make([]byte, len(content)) - for i, value := range content { - decoded, err := readmeByte(value) - if err != nil { - return invalid() - } - data[i] = decoded - } - default: - if response["content"] == nil { - return invalid() - } - object := obj(content) - if length, ok := object["length"]; ok { - n, ok := length.(float64) - if !ok || math.IsNaN(n) || n <= 0 { - data = []byte{} - } else { - if math.IsInf(n, 0) || n > maxReadmeBytes { - return invalid() - } - data = make([]byte, int(n)) - for i := range data { - decoded, err := readmeByte(object[strconv.Itoa(i)]) - if err != nil { - return invalid() - } - data[i] = decoded - } - } - } else if object["type"] == "Buffer" { - values, ok := object["data"].([]any) - if !ok || len(values) > maxReadmeBytes { - return invalid() - } - data = make([]byte, len(values)) - for i, value := range values { - decoded, err := readmeByte(value) - if err != nil { - return invalid() - } - data[i] = decoded - } - } else { - return invalid() - } - } - if len(data) > maxReadmeBytes { - return invalid() - } - if utf8.Valid(data) { - return string(data), nil - } - decoded, err := unicodeencoding.UTF8.NewDecoder().Bytes(data) - if err != nil { - return invalid() - } - return string(decoded), nil -} - -// Array-like API responses must not turn a tiny JSON body into an unbounded -// allocation. Normal GitHub base64 responses fit within the HTTP body limit. -const maxReadmeBytes = 32 * 1024 * 1024 - -func readmeByte(value any) (byte, error) { - var n float64 - switch v := value.(type) { - case float64: - n = v - case int: - n = float64(v) - case int64: - n = float64(v) - case bool: - if v { - n = 1 - } - default: - text, err := tokenNameString(value) - if err != nil { - return 0, err - } - text = strings.TrimFunc(text, func(r rune) bool { return unicode.IsSpace(r) && r != '\u0085' || r == '\ufeff' }) - if dashboardDecimal.MatchString(text) { - n, _ = strconv.ParseFloat(text, 64) - } else if len(text) > 2 && text[0] == '0' { - base := 0 - switch text[1] { - case 'x', 'X': - base = 16 - case 'o', 'O': - base = 8 - case 'b', 'B': - base = 2 - } - if base != 0 { - v, err := strconv.ParseUint(text[2:], base, 64) - if err == nil { - n = float64(v) - } - } - } - } - if math.IsNaN(n) || math.IsInf(n, 0) { - return 0, nil - } - return byte(int64(math.Mod(math.Trunc(n), 256))), nil -} - -// Walk JavaScript UTF-16 units without allocating a rune slice or a second -// full-size UTF-16 copy of a potentially large upstream response. -func readmeUnits(text string, emit func(uint16) bool) { - for _, r := range text { - if r <= 0xffff { - if !emit(uint16(r)) { - return - } - } else { - high, low := utf16.EncodeRune(r) - if !emit(uint16(high)) || !emit(uint16(low)) { - return - } - } - } -} diff --git a/backend/internal/server/provider_github_readme_test.go b/backend/internal/server/provider_github_readme_test.go deleted file mode 100644 index 5d8fca2..0000000 --- a/backend/internal/server/provider_github_readme_test.go +++ /dev/null @@ -1,49 +0,0 @@ -package server - -import ( - "encoding/json" - "os" - "strings" - "testing" - "unicode/utf8" -) - -func TestGitHubReadmeDecodingContracts(t *testing.T) { - raw, err := os.ReadFile("testdata/readme-decoding.json") - if err != nil { - t.Fatal(err) - } - var cases []struct { - Name string - Data M - Expected string - Error string - } - if err = json.Unmarshal(raw, &cases); err != nil { - t.Fatal(err) - } - for _, c := range cases { - t.Run(c.Name, func(t *testing.T) { - got, err := decodeGitHubReadme(c.Data) - if c.Error != "" { - if err == nil { - t.Fatal("invalid response accepted", got) - } - return - } - if err != nil || got != c.Expected || !utf8.ValidString(got) { - t.Fatalf("got %q, %v; want %q", got, err, c.Expected) - } - }) - } -} -func TestGitHubReadmeAllocationBound(t *testing.T) { - for _, content := range []any{M{"length": float64(maxReadmeBytes + 1)}, M{"length": 1e300}} { - if _, err := decodeGitHubReadme(M{"content": content}); err == nil { - t.Fatal("unbounded array-like accepted") - } - } - if _, err := decodeGitHubReadme(M{"encoding": "utf16le", "content": strings.Repeat("a", maxReadmeBytes/2+1)}); err == nil { - t.Fatal("unbounded UTF-16 expansion accepted") - } -} diff --git a/backend/internal/server/provider_hint_integration_test.go b/backend/internal/server/provider_hint_integration_test.go deleted file mode 100644 index 0488937..0000000 --- a/backend/internal/server/provider_hint_integration_test.go +++ /dev/null @@ -1,249 +0,0 @@ -package server - -import ( - "context" - "encoding/base64" - "encoding/json" - "io" - "net/http" - "net/http/httptest" - "net/url" - "strings" - "testing" - - "github.com/tdurieux/anonymous_github/backend/internal/provider" - "go.mongodb.org/mongo-driver/v2/bson" -) - -type selectedPreviewProbe struct { - *previewProbe - selections int - force bool -} - -func (p *selectedPreviewProbe) PreviewSelectedReadme(ctx context.Context, a provider.Access, match provider.BranchMatch, force bool) (string, error) { - p.selections++ - p.force = force - p.discovered = a - ok, err := match("team/release") - if err != nil { - return "", err - } - if !ok { - return "", fail("readme_not_available", 404) - } - return "selected provider README", nil -} - -func runProviderHintIntegration(t *testing.T, base *Server) { - t.Run("provider cache hints preserve authorization and opaque identity", func(t *testing.T) { - ctx := context.Background() - owner, key := bson.NewObjectID(), bson.NewObjectID() - db := base.Store.DB.Client().Database("provider_hint_" + owner.Hex()) - defer db.Drop(ctx) - p := &previewProbe{fixtureProvider: &fixtureProvider{name: "new/team/project", commit: "opaque:commit"}, currentID: "project:123"} - registry, err := provider.New(p) - if err != nil { - t.Fatal(err) - } - s := &Server{Config: base.Config, Store: &Store{DB: db, Redis: base.Store.Redis}, providers: registry} - user := M{"_id": owner, "username": "owner", "status": "active"} - _, err = db.Collection("repositories").InsertOne(ctx, M{"_id": key, "source": "fixture", "externalId": "fixture_project:123", "name": "cached/team/project"}) - if err != nil { - t.Fatal(err) - } - call := func(mode string, query url.Values) (any, error) { - q := &request{Server: s, R: httptest.NewRequest("GET", "/?"+query.Encode(), nil), W: httptest.NewRecorder(), Params: map[string]string{"provider": "fixture"}, User: user, Identity: identity(user)} - return s.sourceRepository(mode)(q) - } - query := url.Values{"name": {"old/team/project"}, "repositoryID": {key.Hex()}} - for _, mode := range []string{"metadata", "branches", "readme"} { - result, err := call(mode, query) - if err != nil || p.connected.RepositoryID != "project:123" || p.connected.OwnerID != owner.Hex() || p.authorized.Ref.ID != "project:123" { - t.Fatal("cache did not pin authorized identity", mode, result, p.connected, err) - } - if mode != "metadata" && p.discovered.Ref.Name != p.name { - t.Fatal("stale discovery name", p.discovered) - } - } - for _, hint := range []url.Values{ - {"name": {"old/team/project"}, "repositoryID[]": {key.Hex()}}, - {"name": {"old/team/project"}, "repositoryID": {key.Hex(), key.Hex()}}, - {"name": {"old/team/project"}, "repositoryID[_id]": {key.Hex()}}, - } { - if _, err := call("metadata", hint); err != nil || p.connected.RepositoryID != "project:123" { - t.Fatal("extended cache ID", hint, err) - } - } - - if _, err := call("readme", url.Values{"name": {"old/team/project"}, "branch[]": {"team/release"}}); err != nil || p.readmeBranch != "team/release" { - t.Fatal("opaque provider branch query", p.readmeBranch, err) - } - selected := &selectedPreviewProbe{previewProbe: p} - selectedRegistry, err := provider.New(selected) - if err != nil { - t.Fatal(err) - } - s.providers = selectedRegistry - if _, err := call("readme", url.Values{"name": {"old/team/project"}, "branch[]": {"team/release"}, "force": {"1"}}); err != nil || selected.selections != 1 || !selected.force || selected.discovered.Ref.ID != "project:123" { - t.Fatal("provider branch selection", err, selected) - } - p.revoked = true - if _, err := call("readme", url.Values{"name": {"old/team/project"}, "branch[toString]": {"x"}}); err == nil || err.Error() != "fixture_access_revoked" || selected.selections != 1 { - t.Fatal("selection bypassed access denial", err, selected.selections) - } - p.revoked = false - s.providers = registry - before := p.repositories - p.revoked = true - _, err = call("metadata", query) - if err == nil || err.Error() != "fixture_access_revoked" || p.repositories != before { - t.Fatal("cached metadata bypassed revocation", err) - } - p.revoked = false - p.currentID = "replacement:456" - _, err = call("metadata", query) - if err == nil || err.Error() != "connection_changed" || p.repositories != before { - t.Fatal("adapter replaced pinned identity", err) - } - query.Set("reconnect", "1") - result, err := call("metadata", query) - if err != nil || p.connected.RepositoryID != "" || p.connected.Name != "old/team/project" || obj(result)["externalId"] != "fixture_replacement:456" { - t.Fatal("reconnect retained old cache pin", result, p.connected, err) - } - query.Del("reconnect") - p.currentID = "project:123" - for _, bad := range []url.Values{ - {"name": {"old/team/project"}, "repositoryID": {"invalid"}}, - {"name": {"old/team/project"}, "repositoryID[]": {"invalid"}}, - {"name": {"old/team/project"}, "repositoryID": {"invalid"}, "reconnect[]": {"1"}}, - {"name": {"old/team/project"}, "repositoryID[$exists]": {"true"}}, - } { - before := p.connects - if _, err := call("metadata", bad); err == nil || p.connects != before { - t.Fatal("malformed cache hint reached provider", err) - } - } - foreign := bson.NewObjectID() - if _, err := db.Collection("repositories").InsertOne(ctx, M{"_id": foreign, "source": "github", "externalId": "gh_42", "name": "other/project"}); err != nil { - t.Fatal(err) - } - query.Set("repositoryID", foreign.Hex()) - before = p.connects - if _, err := call("metadata", query); err == nil || err.Error() != "provider_binding_mismatch" || p.connects != before { - t.Fatal("foreign provider cache accepted", err) - } - query.Set("repositoryID", bson.NewObjectID().Hex()) - if _, err := call("metadata", query); err != nil || p.connected.RepositoryID != "" || p.connected.Name != "old/team/project" { - t.Fatal("missing hint failed to fall back", err) - } - // An explicitly saved identity cannot be replaced by another cache record. - if _, err := db.Collection(collection("repo")).InsertOne(ctx, M{"repoId": "saved-hint", "owner": owner, "source": M{"provider": "fixture", "repositoryName": "old/team/project", "providerRepositoryId": "different:identity"}, "providerAccess": M{"kind": "fixture-grant"}}); err != nil { - t.Fatal(err) - } - query.Set("repositoryID", key.Hex()) - query.Set("anonymizedRepoId", "saved-hint") - before = p.connects - if _, err := call("metadata", query); err == nil || err.Error() != "connection_changed" || p.connects != before { - t.Fatal("hint replaced saved identity", err) - } - if _, err := s.Store.update(ctx, collection("repo"), M{"repoId": "saved-hint"}, M{"$unset": M{"source.providerRepositoryId": ""}}); err != nil { - t.Fatal(err) - } - if _, err := call("metadata", query); err == nil || err.Error() != "connection_changed" || p.connects != before { - t.Fatal("hint redirected an unpinned saved source", err) - } - if _, err := s.Store.update(ctx, collection("repo"), M{"repoId": "saved-hint"}, M{"$set": M{"source.repositoryName": p.name}}); err != nil { - t.Fatal(err) - } - query.Set("name", p.name) - if _, err := call("metadata", query); err == nil || err.Error() != "connection_changed" || p.connects != before { - t.Fatal("matching name established an unverified saved identity", err) - } - - }) - t.Run("GitHub legacy cache hints resolve renames by upstream ID", func(t *testing.T) { - ctx := context.Background() - owner, key := bson.NewObjectID(), bson.NewObjectID() - db := base.Store.DB.Client().Database("github_hint_" + owner.Hex()) - defer db.Drop(ctx) - s := &Server{Config: base.Config, Store: &Store{DB: db, Redis: base.Store.Redis}} - s.Config.AppEnabled = false - registry, err := provider.New(&githubProvider{s}) - if err != nil { - t.Fatal(err) - } - s.providers = registry - user := M{"_id": owner, "username": "owner", "status": "active"} - if _, err := db.Collection("users").InsertOne(ctx, user); err != nil { - t.Fatal(err) - } - if _, err := db.Collection("repositories").InsertOne(ctx, M{"_id": key, "externalId": "gh_42", "name": "cached/project"}); err != nil { - t.Fatal(err) - } - q := &request{Server: s, R: httptest.NewRequest("GET", "/", nil), User: user, Identity: identity(user)} - if err := s.saveGrant(q, owner, "github", M{"access_token": "synthetic-oauth"}); err != nil { - t.Fatal(err) - } - counts := map[string]int{} - s.HTTP = &http.Client{Transport: roundTrip(func(r *http.Request) (*http.Response, error) { - if r.Header.Get("Authorization") != "Bearer synthetic-oauth" { - t.Fatal("wrong preview credential") - } - counts[r.URL.Path]++ - var data any - switch r.URL.Path { - case "/repositories/42": - data = M{"id": 42, "full_name": "renamed/project", "default_branch": "main", "size": 1} - case "/repos/renamed/project/branches": - data = []M{{"name": "main", "commit": M{"sha": strings.Repeat("a", 40)}}} - case "/repos/renamed/project/readme": - data = M{"encoding": "base64", "content": base64.StdEncoding.EncodeToString([]byte("renamed README"))} - default: - t.Fatal("stale name or foreign identity requested", r.URL) - } - b, _ := json.Marshal(data) - return &http.Response{StatusCode: 200, Header: http.Header{}, Body: io.NopCloser(strings.NewReader(string(b)))}, nil - })} - for _, mode := range []string{"metadata", "branches", "readme"} { - q.R = httptest.NewRequest("GET", "/?force=1&repositoryID="+key.Hex(), nil) - q.W = httptest.NewRecorder() - q.Params = map[string]string{"owner": "old", "repo": "project"} - result, err := s.sourceRepository(mode)(q) - if err != nil { - t.Fatal(mode, err) - } - if mode == "metadata" && (obj(result)["externalId"] != "gh_42" || obj(result)["fullName"] != "renamed/project") { - t.Fatal("wrong renamed preview", result) - } - } - if counts["/repositories/42"] != 3 || counts["/repos/renamed/project/branches"] != 2 || counts["/repos/renamed/project/readme"] != 1 { - t.Fatal("wrong preview lookups", counts) - } - s.Config.AppEnabled = true - if err := s.saveGrant(q, owner, "github-app-user", M{"access_token": "synthetic-app", "refresh_token": "synthetic-refresh", "expires_in": float64(3600), "refresh_token_expires_in": float64(7200)}); err != nil { - t.Fatal(err) - } - s.HTTP = &http.Client{Transport: roundTrip(func(r *http.Request) (*http.Response, error) { - if r.Header.Get("Authorization") != "Bearer synthetic-app" { - t.Fatal("wrong App credential") - } - data := M{} - switch r.URL.Path { - case "/user/installations": - data["installations"] = []M{} - case "/repositories/42", "/repos/renamed/project": - data = M{"id": 42, "full_name": "renamed/project", "private": false, "visibility": "public"} - default: - t.Fatal("App connection used stale name", r.URL) - } - b, _ := json.Marshal(data) - return &http.Response{StatusCode: 200, Header: http.Header{}, Body: io.NopCloser(strings.NewReader(string(b)))}, nil - })} - connection, err := (&githubProvider{s}).Connect(ctx, provider.ConnectRequest{OwnerID: owner.Hex(), Name: "cached/project", Connection: "github-app", RepositoryID: "42"}) - if err != nil || connection.Ref.ID != "42" || connection.Ref.Name != "renamed/project" || number(connection.Binding["repositoryId"]) != 42 { - t.Fatal("App connection lost resolved identity", connection, err) - } - - }) -} diff --git a/backend/internal/server/provider_identity_integration_test.go b/backend/internal/server/provider_identity_integration_test.go deleted file mode 100644 index e1087e9..0000000 --- a/backend/internal/server/provider_identity_integration_test.go +++ /dev/null @@ -1,117 +0,0 @@ -package server - -import ( - "bytes" - "context" - "encoding/json" - "net/http/httptest" - "net/url" - "testing" - - "github.com/tdurieux/anonymous_github/backend/internal/provider" -) - -type identityProbe struct { - *fixtureProvider - connection func(*provider.Connection) - repository func(*provider.Repository) -} - -func (p *identityProbe) Connect(ctx context.Context, q provider.ConnectRequest) (provider.Connection, error) { - c, e := p.fixtureProvider.Connect(ctx, q) - if e == nil && p.connection != nil { - p.connection(&c) - } - return c, e -} -func (p *identityProbe) Repository(ctx context.Context, a provider.Access) (provider.Repository, error) { - r, e := p.fixtureProvider.Repository(ctx, a) - if e == nil && p.repository != nil { - p.repository(&r) - } - return r, e -} -func (p *identityProbe) ConnectDocument(ctx context.Context, q provider.DocumentRequest, choice string) (provider.Access, error) { - a, e := p.fixtureProvider.ConnectDocument(ctx, q, choice) - if e == nil && p.connection != nil { - c := provider.Connection{Ref: a.Ref, Binding: a.Binding} - p.connection(&c) - a.Ref, a.Binding = c.Ref, c.Binding - } - return a, e -} - -func runProviderIdentityIntegration(t *testing.T, s *Server, p *fixtureProvider, token string) { - t.Run("provider identity checks before persistence", func(t *testing.T) { - original := s.providers - defer func() { s.providers = original }() - ctx := context.Background() - counts := map[string]int64{} - for _, coll := range []string{"repositories", collection("repo"), collection("gist")} { - n, err := s.Store.DB.Collection(coll).CountDocuments(ctx, M{}) - if err != nil { - t.Fatal(err) - } - counts[coll] = n - } - for _, c := range []struct { - name, code string - status int - connection func(*provider.Connection) - repository func(*provider.Repository) - }{ - {name: "foreign-provider", code: "provider_binding_mismatch", status: 409, connection: func(c *provider.Connection) { c.Ref.Provider = "github" }}, - {name: "foreign-binding", code: "provider_binding_mismatch", status: 409, connection: func(c *provider.Connection) { c.Binding["provider"] = "github" }}, - {name: "wrong-repository", code: "connection_changed", status: 409, repository: func(r *provider.Repository) { r.ID = "another-project" }}, - {name: "missing-id", code: "provider_invalid_response", status: 502, repository: func(r *provider.Repository) { r.ID = "" }}, - {name: "missing-name", code: "provider_invalid_response", status: 502, repository: func(r *provider.Repository) { r.Name = "" }}, - } { - providers := original.All() - for i, entry := range providers { - if entry.ID() == "fixture" { - providers[i] = &identityProbe{fixtureProvider: p, connection: c.connection, repository: c.repository} - } - } - registry, err := provider.New(providers...) - if err != nil { - t.Fatal(err) - } - s.providers = registry - requests := []struct { - method, path string - body any - }{ - {"GET", "/api/providers/fixture/repository/metadata?name=" + url.QueryEscape(p.name), nil}, - {"POST", "/api/repo", M{"repoId": "identity-" + c.name, "fullName": p.name, "source": M{"provider": "fixture", "branch": "main", "commit": p.commit}, "terms": []any{}, "options": M{}}}, - } - if c.connection != nil { - requests = append(requests, struct { - method, path string - body any - }{"POST", "/api/gist", M{"gistId": "identity-" + c.name, "source": M{"provider": "fixture", "gistId": "snippet"}, "terms": []any{}, "options": M{}}}) - } - for _, request := range requests { - raw, _ := json.Marshal(request.body) - req := httptest.NewRequest(request.method, request.path, bytes.NewReader(raw)) - req.RemoteAddr = "198.51.100.7:1234" - req.Header.Set("Content-Type", "application/json") - req.Header.Set("Authorization", "Bearer "+token) - w := httptest.NewRecorder() - s.ServeHTTP(w, req) - var body M - if err := json.Unmarshal(w.Body.Bytes(), &body); err != nil { - t.Fatal(err) - } - if w.Code != c.status || body["error"] != c.code { - t.Fatalf("%s %s: %d %s", c.name, request.path, w.Code, w.Body) - } - } - } - for coll, before := range counts { - after, err := s.Store.DB.Collection(coll).CountDocuments(ctx, M{}) - if err != nil || after != before { - t.Fatal("invalid identity persisted", coll, before, after, err) - } - } - }) -} diff --git a/backend/internal/server/provider_identity_test.go b/backend/internal/server/provider_identity_test.go deleted file mode 100644 index 0cad62f..0000000 --- a/backend/internal/server/provider_identity_test.go +++ /dev/null @@ -1,24 +0,0 @@ -package server - -import ( - "github.com/tdurieux/anonymous_github/backend/internal/provider" - "testing" -) - -func TestProviderConnectionIdentity(t *testing.T) { - for _, test := range []struct { - declared, binding string - valid bool - }{ - {"", "", true}, {"fixture", "fixture", true}, {"github", "fixture", false}, {"fixture", "github", false}, {"", "github", false}, - } { - connection := provider.Connection{Ref: provider.Ref{Provider: test.declared, ID: "immutable", Name: "team/nested/project"}, Binding: map[string]any{"provider": test.binding}} - access, err := connectionAccess("owner", "fixture", connection) - if (err == nil) != test.valid { - t.Fatal(test, err) - } - if err == nil && (access.OwnerID != "owner" || access.Ref.Provider != "fixture" || access.Ref.ID != "immutable") { - t.Fatal(access) - } - } -} diff --git a/backend/internal/server/provider_integration_test.go b/backend/internal/server/provider_integration_test.go deleted file mode 100644 index 61a1b4e..0000000 --- a/backend/internal/server/provider_integration_test.go +++ /dev/null @@ -1,350 +0,0 @@ -package server - -import ( - "archive/zip" - "bytes" - "context" - "github.com/tdurieux/anonymous_github/backend/internal/provider" - "io" - "net/http/httptest" - "strings" - "sync/atomic" - "testing" - "time" -) - -// Deliberately uses nested namespaces and opaque revisions, unlike GitHub. -type fixtureProvider struct { - failure error - openCount atomic.Int64 - authorizeCount atomic.Int64 - onOpen func() (io.ReadCloser, error) - revoked bool - missingBranch bool - onMetadata func(context.Context, provider.Access, string) (*provider.Entry, error) - onDocument func() - onAuthorized func() - onRepository func() - name, commit string -} - -func (p *fixtureProvider) FileMetadata(ctx context.Context, a provider.Access, path string) (*provider.Entry, error) { - if p.onMetadata != nil { - return p.onMetadata(ctx, a, path) - } - return nil, nil -} -func (p *fixtureProvider) ID() string { return "fixture" } -func (p *fixtureProvider) Connect(_ context.Context, q provider.ConnectRequest) (provider.Connection, error) { - return provider.Connection{Ref: provider.Ref{Provider: p.ID(), ID: "project:123", Name: q.Name}, Binding: map[string]any{"provider": p.ID(), "kind": "fixture-grant", "revision": "grant:1"}}, nil -} -func (p *fixtureProvider) Authorize(_ context.Context, a provider.Access) error { - p.authorizeCount.Add(1) - if p.revoked || a.Binding["kind"] != "fixture-grant" { - return fail("fixture_access_revoked", 403) - } - if p.onAuthorized != nil { - p.onAuthorized() - } - return nil -} -func (p *fixtureProvider) Repository(context.Context, provider.Access) (provider.Repository, error) { - if p.failure != nil { - return provider.Repository{}, p.failure - } - if p.onRepository != nil { - p.onRepository() - } - return provider.Repository{ID: "project:123", Name: p.name, URL: "https://forge.test/" + p.name, DefaultBranch: "main"}, nil -} -func (p *fixtureProvider) Commit(context.Context, provider.Access, string) (provider.Commit, error) { - return provider.Commit{ID: p.commit, Date: time.Date(2026, 1, 1, 0, 0, 0, 0, time.UTC)}, nil -} - -const fixtureContent = "hello Alice https://forge.test/team/subgroup/project/blob/main/Alice.txt https://github.com/team/subgroup/project" - -func (p *fixtureProvider) Tree(context.Context, provider.Access) ([]provider.Entry, error) { - return []provider.Entry{{Path: "Alice.txt", Revision: "blob:one", Size: int64(len(fixtureContent))}}, nil -} -func (p *fixtureProvider) Open(context.Context, provider.Access, provider.Entry) (io.ReadCloser, error) { - p.openCount.Add(1) - if p.onOpen != nil { - return p.onOpen() - } - return io.NopCloser(strings.NewReader(fixtureContent)), nil -} -func (p *fixtureProvider) PublicURL(r provider.Ref) string { return "https://forge.test/" + r.Name } -func (p *fixtureProvider) SelfLinks(r provider.Ref) []string { - return []string{p.PublicURL(r) + "/blob/" + r.Branch, p.PublicURL(r)} -} -func runProviderIntegration(t *testing.T, s *Server, p *fixtureProvider, call func(string, string, string, any) *httptest.ResponseRecorder, token, otherToken string) { - ctx := context.Background() - for _, kind := range []string{"gist", "pr"} { - source := M{"provider": "fixture", "gistId": "snippet:one", "repositoryFullName": p.name, "pullRequestId": 42} - body := M{idKey(kind): "fixture-document", "source": source, "terms": []string{"Alice"}, "options": M{"expirationMode": "never", "title": true, "body": true, "content": true}} - w := call("POST", "/api/"+kind, token, body) - if w.Code != 200 { - t.Fatal(kind, w.Code, w.Body) - } - r, e := s.Store.one(ctx, collection(kind), M{idKey(kind): "fixture-document"}) - if e != nil { - t.Fatal(e) - } - if str(r["status"]) != "ready" { - t.Fatal("create returned before publication", r) - } - w = call("GET", "/api/"+kind+"/fixture-document/content", "", nil) - if w.Code != 200 || strings.Contains(w.Body.String(), "Alice") || !strings.Contains(w.Body.String(), "XXXX-1") { - t.Fatal(kind, w.Code, w.Body) - } - w = call("GET", "/api/providers/fixture/"+kind+"/42?name=team/subgroup/project", token, nil) - if w.Code != 200 { - t.Fatal("document source", kind, w.Code, w.Body) - } - } - - runEmbeddedRefreshIntegration(t, s, p, call, token) - body := M{"repoId": "second-provider", "fullName": p.name, "source": M{"provider": p.ID(), "branch": "main", "commit": p.commit}, "terms": []string{"Alice"}, "options": M{"expirationMode": "never", "image": true, "pdf": true, "link": true}} - w := call("POST", "/api/repo", token, body) - if w.Code != 200 { - t.Fatal(w.Code, w.Body) - } - load := func() M { - t.Helper() - r, e := s.Store.one(ctx, collection("repo"), M{"repoId": "second-provider"}) - if e != nil || r == nil { - t.Fatal(r, e) - } - return r - } - r := load() - filtered, e := s.Store.list(ctx, collection("repo"), githubSources(M{"_id": r["_id"]}), 10, nil) - if e != nil || len(filtered) != 0 { - t.Fatal("provider treated as GitHub OAuth", filtered, e) - } - req := httptest.NewRequest("POST", "/github/connections/migrate", nil) - req.Header.Set("X-CSRF-Token", "test-csrf") - _, e = s.connections(&request{Server: s, R: req, W: httptest.NewRecorder(), User: M{"_id": r["owner"]}, Session: M{"githubConnectionCSRF": "test-csrf"}, Body: M{"type": "repository", "id": "second-provider", "connection": "oauth"}}) - if e == nil || e.Error() != "repository_busy" { - t.Fatal("unexpected preparation guard", e) - } - - if r["githubAccess"] != nil || str(obj(r["source"])["providerRepositoryId"]) != "project:123" { - t.Fatal("wrong binding", r) - } - if e := s.prepareTree(ctx, r); e != nil { - t.Fatal(e) - } - _, e = s.connections(&request{Server: s, R: req, W: httptest.NewRecorder(), User: M{"_id": r["owner"]}, Session: M{"githubConnectionCSRF": "test-csrf"}, Body: M{"type": "repository", "id": "second-provider", "connection": "oauth"}}) - if e == nil || e.Error() != "provider_capability_not_supported" { - t.Fatal("GitHub migration accepted another provider", e) - } - runConditionalResponseIntegration(t, s, p, token, otherToken) - runRepositoryRecoveryIntegration(t, s, call, token, r) - runRepositoryRefreshIntegration(t, s, p, call, r) - runTreeRetirementIntegration(t, s, p, call, r) - runGitHubBranchIntegration(t, s, r["owner"]) - runGitHubMetadataIntegration(t, s, r["owner"]) - runGitHubPartialTreeIntegration(t, s, r["owner"]) - runContentRetirementIntegration(t, s) - runRawCacheIntegration(t, s, p) - runSharedSourceIntegration(t, s, p, call) - runLegacySourceIntegration(t, s) - runSharedResultIntegration(t, s, p) - runSharedHTTPIntegration(t, s, p) - runSharedFallbackIntegration(t, s, p) - runFileMetadataIntegration(t, s, p) - runFileSearchIntegration(t, s) - runFolderPathIntegration(t, s) - runPathIndexParityIntegration(t, s) - runPathIndexEvictionIntegration(t, s) - runFileRecoveryIntegration(t, s, p) - runPendingMetadataIntegration(t, s) - runPartialTreeIntegration(t, s, p) - runWebsiteLookupIntegration(t, s) - runFileTreeScanIntegration(t, s) - runTransformedCacheIntegration(t, s, p) - runCachePresenceIntegration(t, s, p) - runRepositoryRemovalIntegration(t, s, token, otherToken) - runManualRefreshIntegration(t, s, p, call, token, r) - runExtensionIntegration(t, s, p, call, token, r) - runDocumentLifecycleIntegration(t, s, p, call, token) - runValidationIntegration(t, s, p, call, token, otherToken) - runResourceOptionsDifferentialIntegration(t, s, p, token, otherToken) - runSettingsLifecycleIntegration(t, s, p, token) - runProviderErrorsIntegration(t, s, p, token) - runProviderIdentityIntegration(t, s, p, token) - runProviderReconnectIntegration(t, s) - runProviderPreviewIntegration(t, s) - runProviderHintIntegration(t, s) - runCacheMetricsIntegration(t, s) - runCacheReportHTTPIntegration(t, s) - runPreviewMetadataIntegration(t, s) - runPreviewDiscoveryIntegration(t, s) - runDocumentIdentityIntegration(t, s, p, token) - runConferenceMembershipIntegration(t, s, token, r["owner"]) - runConferenceRecoveryIntegration(t, s, token, r["owner"]) - runConferenceFormIntegration(t, s, token, otherToken, r["owner"]) - runConferenceOptionsIntegration(t, s, token, otherToken, r["owner"]) - runConferenceLifecycleIntegration(t, s, token, r["owner"]) - runConferenceRemovalIntegration(t, s, token, otherToken, r["owner"]) - runAdminFiltersIntegration(t, s, token) - runAdminCastingIntegration(t, s) - runUserSearchIntegration(t, s) - runUserListsIntegration(t, s) - runUserListCapacityIntegration(t, s) - runAdminMutationsIntegration(t, s) - runAdminUserDetailIntegration(t, s, token) - runUserDefaultsIntegration(t, s) - runQuotaIntegration(t, s) - runGrantIntegration(t, s) - runGrantRevocationIntegration(t, s) - runWebhookIntegration(t, s) - runInstallationReconciliationIntegration(t, s) - runGrantReconciliationIntegration(t, s) - runConnectionsSummaryIntegration(t, s) - runConnectionMigrationIntegration(t, s) - runInstallationFlowIntegration(t, s) - runOAuthInstallIntegration(t, s) - runAppProfileIntegration(t, s) - runAccessSelectionIntegration(t, s) - runAccessPaginationIntegration(t, s) - runInstallationTokenIntegration(t, s) - runConferenceCapacityIntegration(t, s) - runLegacyGitHubQuotaIntegration(t, s) - runGitHubQuotaIntegration(t, s) - runJobRateLimitIntegration(t, s) - runImportedRemovalIntegration(t, s) - runJobRetryIntegration(t, s) - runAdminQueueIntegration(t, s) - runAccountRemovalIntegration(t, s) - runAccountRemovalLifecycleIntegration(t, s) - runDocumentCleanupIntegration(t, s) - runDiscoveryIntegration(t, s) - runDiscoveryCacheIntegration(t, s) - runCoauthorsIntegration(t, s) - runAdminTokensIntegration(t, s) - runProjectNamesIntegration(t, s) - runDashboardNamesIntegration(t, s) - runDashboardCursorIntegration(t, s) - runDashboardFiltersIntegration(t, s) - runOAuthCallbackIntegration(t, s, token) - runAppRefreshIntegration(t, s) - for _, route := range []string{"/api/repo/second-provider/files", "/api/repo/second-provider/files/search?q=XX", "/api/repo/second-provider/files/counts"} { - w = call("GET", route, "", nil) - if w.Code != 200 || strings.Contains(w.Body.String(), "Alice") { - t.Fatal(route, w.Code, w.Body) - } - } - w = call("GET", "/api/repo/second-provider", otherToken, nil) - if w.Code != 403 { - t.Fatal("private output exposed", w.Code) - } - w = call("GET", "/api/repo/second-provider/file/XXXX-1.txt", "", nil) - if w.Code != 200 || strings.Contains(w.Body.String(), "forge.test") || strings.Contains(w.Body.String(), "Alice") || !strings.Contains(w.Body.String(), "https://github.com/team/subgroup/project") { - t.Fatal("wrong provider self-link", w.Code, w.Body) - } - w = call("GET", "/api/repo/second-provider/zip", "", nil) - if w.Code != 200 { - t.Fatal(w.Code, w.Body) - } - archive, e := zip.NewReader(bytes.NewReader(w.Body.Bytes()), int64(w.Body.Len())) - if e != nil || len(archive.File) != 1 { - t.Fatal("invalid ZIP", e) - } - p.revoked = true - w = call("HEAD", "/api/repo/second-provider/zip", "", nil) - if w.Code != 200 || w.Body.Len() != 0 || w.Header().Get("Content-Disposition") == "" { - t.Fatal("ZIP HEAD streamed or fetched content", w.Code, w.Body) - } - w = call("GET", "/api/repo/second-provider/file/XXXX-1.txt", "", nil) - if w.Code != 403 { - t.Fatal("revoked access served content", w.Code, w.Body) - } - p.revoked = false - obj(body["source"])["provider"] = "github" - w = call("POST", "/api/repo/second-provider", token, body) - if w.Code != 409 { - t.Fatal("provider switch accepted", w.Code, w.Body) - } - obj(body["source"])["provider"] = "unknown" - body["repoId"] = "unknown-provider" - w = call("POST", "/api/repo", token, body) - if w.Code != 400 { - t.Fatal("unknown provider accepted", w.Code, w.Body) - } - w = call("GET", "/api/providers/fixture/repository/branches?name=team/subgroup/project", token, nil) - if w.Code != 400 { - t.Fatal("unsupported capability", w.Code, w.Body) - } - r = load() - p.name = "team/renamed/unchanged" - _, e = s.Store.update(ctx, collection("repo"), M{"_id": r["_id"]}, M{"$set": M{"options.update": true, "lastView": time.Now().Add(-48 * time.Hour)}}) - if e != nil { - t.Fatal(e) - } - if e = s.autoRefresh(ctx, load()); e != nil { - t.Fatal(e) - } - if got := str(obj(load()["source"])["repositoryName"]); got != p.name { - t.Fatal("unchanged-commit rename lost", got) - } - p.name = "team/renamed/project" - p.commit = "revision:two" - if _, e = s.Store.update(ctx, "gojobs", M{"_id": "repo:second-provider:prepare"}, M{"$set": M{"state": "completed", "finishedAt": time.Now()}}); e != nil { - t.Fatal(e) - } - w = call("POST", "/api/repo/second-provider/refresh", token, nil) - if w.Code != 200 { - t.Fatal("refresh", w.Code, w.Body) - } - r = load() - if str(obj(r["source"])["repositoryName"]) != p.name || str(obj(r["source"])["commit"]) != p.commit { - t.Fatal("refresh did not preserve provider", r) - } - if e = s.prepareTree(ctx, r); e != nil { - t.Fatal(e) - } - w = call("DELETE", "/api/repo/second-provider", token, nil) - if w.Code != 200 { - t.Fatal("remove", w.Code, w.Body) - } - if e = s.runJob(ctx, M{"kind": "repo", "resourceId": "second-provider", "action": "remove"}); e != nil { - t.Fatal(e) - } - w = call("GET", "/api/repo/second-provider/file/XXXX-1.txt", "", nil) - if w.Code != 410 { - t.Fatal("removed content served", w.Code, w.Body) - } -} - -func (p *fixtureProvider) ConnectDocument(ctx context.Context, q provider.DocumentRequest, connection string) (provider.Access, error) { - c, e := p.Connect(ctx, provider.ConnectRequest{OwnerID: q.Access.OwnerID, Name: q.Access.Ref.Name, Connection: connection}) - q.Access.Binding = c.Binding - return q.Access, e -} -func (p *fixtureProvider) Document(ctx context.Context, q provider.DocumentRequest) (map[string]any, error) { - if p.failure != nil { - return nil, p.failure - } - if e := p.Authorize(ctx, q.Access); e != nil { - return nil, e - } - if p.onDocument != nil { - p.onDocument() - } - if q.Kind == "gist" { - return map[string]any{"description": "Alice snippet", "isPublic": true, "files": []M{{"filename": "Alice.txt", "content": "hello Alice", "size": 11}}}, nil - } - return map[string]any{"title": "Alice change", "body": "hello Alice", "state": "open", "merged": false, "draft": false}, nil -} -func (p *fixtureProvider) DocumentURL(q provider.DocumentRequest) string { - return "https://forge.test/" + q.Kind + "/" + q.ID -} - -func (p *fixtureProvider) Branch(ctx context.Context, a provider.Access, name string) (provider.Commit, error) { - if p.missingBranch { - return provider.Commit{}, provider.ErrBranchNotFound - } - return p.Commit(ctx, a, name) -} diff --git a/backend/internal/server/provider_metadata_integration_test.go b/backend/internal/server/provider_metadata_integration_test.go deleted file mode 100644 index c29c27a..0000000 --- a/backend/internal/server/provider_metadata_integration_test.go +++ /dev/null @@ -1,58 +0,0 @@ -package server - -import ( - "encoding/json" - "io" - "net/http" - "strings" - "testing" - - "github.com/tdurieux/anonymous_github/backend/internal/provider" -) - -func runGitHubMetadataIntegration(t *testing.T, s *Server, owner any) { - t.Run("GitHub file metadata recovery", func(t *testing.T) { - old := s.HTTP - defer func() { s.HTTP = old }() - commit := strings.Repeat("a", 40) - s.HTTP = &http.Client{Transport: roundTrip(func(r *http.Request) (*http.Response, error) { - if r.URL.Query().Get("ref") != commit || r.Header.Get("Authorization") == "" { - t.Fatal("unpinned or unauthorized metadata lookup") - } - status := 200 - var body any = M{"type": "file", "sha": strings.Repeat("b", 40), "size": 19} - switch r.URL.Path { - case "/repos/owner/repo/contents/docs/a b.txt": - case "/repos/owner/repo/contents/missing": - status = 404 - body = M{"message": "Not Found"} - case "/repos/owner/repo/contents/directory": - body = []M{} - case "/repos/owner/repo/contents/denied": - status = 403 - body = M{"message": "Forbidden"} - default: - t.Fatal("unexpected path", r.URL.Path) - } - raw, _ := json.Marshal(body) - return &http.Response{StatusCode: status, Header: http.Header{}, Body: io.NopCloser(strings.NewReader(string(raw)))}, nil - })} - g := &githubProvider{s} - a := provider.Access{OwnerID: str(owner), Ref: provider.Ref{Provider: "github", Name: "owner/repo", Commit: commit}, Binding: map[string]any{"kind": "oauth"}} - entry, err := g.FileMetadata(t.Context(), a, "docs/a b.txt") - if err != nil || entry == nil || entry.Path != "docs/a b.txt" || entry.Size != 19 { - t.Fatal(entry, err) - } - for _, requested := range []string{"missing", "directory"} { - if entry, err := g.FileMetadata(t.Context(), a, requested); err != nil || entry != nil { - t.Fatal(requested, entry, err) - } - } - if _, err := g.FileMetadata(t.Context(), a, "denied"); err == nil { - t.Fatal("permission failure hidden") - } - if _, err := g.FileMetadata(t.Context(), a, "../escape"); err == nil { - t.Fatal("unsafe path accepted") - } - }) -} diff --git a/backend/internal/server/provider_preview.go b/backend/internal/server/provider_preview.go deleted file mode 100644 index 074c4c2..0000000 --- a/backend/internal/server/provider_preview.go +++ /dev/null @@ -1,141 +0,0 @@ -package server - -import ( - "strings" - - "github.com/tdurieux/anonymous_github/backend/internal/provider" -) - -// Saved-source previews use the resource owner's binding only after local edit -// authorization. A reconnect deliberately creates a new binding for the owner. -func (s *Server) previewRepositoryAccess(q *request, p provider.Repositories, id, name string) (provider.Access, error) { - query := parseExtendedQuery(q.R.URL.RawQuery).object - owner, choice := str(q.User["_id"]), "" - if resourceID, present := query["anonymizedRepoId"].scalarValue(); present { - resource, err := s.Store.one(q.ctx(), collection("repo"), resourceFilter("repo", resourceID)) - if err != nil { - return provider.Access{}, err - } - if resource == nil { - return provider.Access{}, fail("repo_not_found", 404) - } - if !canEdit(q.Identity, resource) { - return provider.Access{}, fail("not_authorized", 403) - } - access, err := s.providerAccess(resource) - if err != nil { - return access, err - } - if access.Ref.Provider != id { - return access, fail("provider_binding_mismatch", 409) - } - sameName := access.Ref.Name == name - if id == "github" { - sameName = strings.EqualFold(access.Ref.Name, name) - } - if !sameName { - return access, fail("repo_not_found", 404) - } - reconnect, _ := query["reconnect"].scalarValue() - if reconnect != "1" { - access, err = s.resolveSourceIdentity(q.ctx(), resource, access) - if err != nil { - return access, err - } - hint, err := s.previewRepositoryHint(q, id) - if err != nil { - return access, err - } - if hint != nil { - // An external cache hint cannot establish or replace the - // identity of a saved resource using its owner's binding. - if access.Ref.ID == "" || access.Ref.ID != hint.ID { - return access, fail("connection_changed", 409) - } - access.Ref.ID, access.Ref.Name = hint.ID, hint.Name - } - return access, nil - } - if q.Identity.ID != str(resource["owner"]) { - return access, fail("not_owner", 403) - } - if resource["status"] == "archived" { - return access, fail("repository_archived", 410) - } - owner, name, choice = access.OwnerID, access.Ref.Name, str(access.Binding["kind"]) - if id == "github" && choice == "" { - choice = "oauth" - } - } else { - if id == "github" && !safeRepositoryName(name) { - return provider.Access{}, fail("repo_not_found", 400) - } - var err error - choice, err = previewConnectionChoice(query["connection"], id) - if err != nil { - return provider.Access{}, err - } - } - hint, err := s.previewRepositoryHint(q, id) - if err != nil { - return provider.Access{}, err - } - request := provider.ConnectRequest{OwnerID: owner, Name: name, Connection: choice} - if hint != nil { - request.Name, request.RepositoryID = hint.Name, hint.ID - } - connected, err := p.Connect(q.ctx(), request) - if err != nil { - return provider.Access{}, err - } - access, err := connectionAccess(owner, id, connected) - if err != nil { - return access, err - } - if hint != nil { - if access.Ref.ID != "" && access.Ref.ID != hint.ID { - return access, fail("connection_changed", 409) - } - access.Ref.ID = hint.ID - } - return access, nil -} - -// Cache IDs select metadata only. They never supply credentials or skip the -// adapter's Connect, Authorize and Repository checks. -func (s *Server) previewRepositoryHint(q *request, id string) (*provider.Ref, error) { - filter, err := previewHintFilter(q.R.URL.RawQuery) - if err != nil || filter == nil { - return nil, err - } - cached, err := s.Store.one(q.ctx(), "repositories", filter) - if err != nil || cached == nil { - return nil, err - } - prefix := externalRepositoryID(id, "") - external := str(cached["externalId"]) - if declared := str(cached["source"]); declared != "" && declared != id { - return nil, fail("provider_binding_mismatch", 409) - } - if !strings.HasPrefix(external, prefix) || len(external) == len(prefix) { - return nil, fail("provider_binding_mismatch", 409) - } - name := str(cached["name"]) - if name == "" { - return nil, fail("provider_invalid_response", 502) - } - return &provider.Ref{Provider: id, ID: strings.TrimPrefix(external, prefix), Name: name}, nil -} - -// Provider connection names stay opaque outside the GitHub adapter's legacy -// choices. Query arrays/objects must never select a credential by their first item. -func previewConnectionChoice(value *queryValue, id string) (string, error) { - if value == nil { - return "", nil - } - choice, scalar := value.scalarValue() - if !scalar || id == "github" && choice != "oauth" && choice != "github-app" { - return "", fail("invalid_connection", 400) - } - return choice, nil -} diff --git a/backend/internal/server/provider_preview_cache.go b/backend/internal/server/provider_preview_cache.go deleted file mode 100644 index 154ea90..0000000 --- a/backend/internal/server/provider_preview_cache.go +++ /dev/null @@ -1,26 +0,0 @@ -package server - -import ( - "regexp" - "strings" - - "github.com/tdurieux/anonymous_github/backend/internal/provider" -) - -// Read the snapshot before the upstream check. A cache hit is read-only, so a -// slow preview cannot overwrite a concurrent forced metadata refresh. -func (s *Server) previewMetadataSnapshot(q *request, id string, a provider.Access) (M, *provider.Repository, error) { - prefix := externalRepositoryID(id, "") - filter := M{"name": a.Ref.Name, "externalId": M{"$regex": "^" + regexp.QuoteMeta(prefix)}} - if a.Ref.ID != "" { - filter = M{"externalId": externalRepositoryID(id, a.Ref.ID)} - } - filter["source"] = M{"$in": []any{id, nil, ""}} - cached, err := s.Store.one(q.ctx(), "repositories", filter) - if err != nil || cached == nil { - return nil, nil, err - } - page := obj(cached["pageSource"]) - r := &provider.Repository{ID: strings.TrimPrefix(str(cached["externalId"]), prefix), Name: str(cached["name"]), URL: str(cached["url"]), DefaultBranch: str(cached["defaultBranch"]), Size: number(cached["size"]), HasPage: boolean(cached["hasPage"]), PageBranch: str(page["branch"]), PagePath: str(page["path"])} - return cached, r, nil -} diff --git a/backend/internal/server/provider_preview_integration_test.go b/backend/internal/server/provider_preview_integration_test.go deleted file mode 100644 index fcb3312..0000000 --- a/backend/internal/server/provider_preview_integration_test.go +++ /dev/null @@ -1,164 +0,0 @@ -package server - -import ( - "context" - "net/http/httptest" - "net/url" - "testing" - - "github.com/tdurieux/anonymous_github/backend/internal/provider" - "go.mongodb.org/mongo-driver/v2/bson" -) - -type previewProbe struct { - *fixtureProvider - currentID string - readmeBranch string - connects, authorizations, repositories int - connected provider.ConnectRequest - authorized, discovered provider.Access -} - -func (p *previewProbe) Connect(ctx context.Context, q provider.ConnectRequest) (provider.Connection, error) { - p.connects++ - p.connected = q - c, err := p.fixtureProvider.Connect(ctx, q) - c.Ref.ID = p.currentID - return c, err -} -func (p *previewProbe) Authorize(ctx context.Context, a provider.Access) error { - p.authorizations++ - p.authorized = a - return p.fixtureProvider.Authorize(ctx, a) -} -func (p *previewProbe) Repository(ctx context.Context, a provider.Access) (provider.Repository, error) { - p.repositories++ - r, e := p.fixtureProvider.Repository(ctx, a) - r.ID = p.currentID - return r, e -} -func (p *previewProbe) List(context.Context, provider.ListRequest) ([]provider.Repository, error) { - return nil, nil -} -func (p *previewProbe) Branches(_ context.Context, a provider.Access) ([]provider.Branch, error) { - p.discovered = a - return []provider.Branch{{Name: "main", Commit: p.commit}}, nil -} -func (p *previewProbe) Readme(_ context.Context, a provider.Access, branch string) (string, error) { - p.discovered = a - p.readmeBranch = branch - return "provider README", nil -} - -func runProviderPreviewIntegration(t *testing.T, base *Server) { - t.Run("saved source previews authorize before using owner bindings", func(t *testing.T) { - ctx := context.Background() - owner := bson.NewObjectID() - db := base.Store.DB.Client().Database("provider_preview_" + owner.Hex()) - defer db.Drop(ctx) - p := &previewProbe{fixtureProvider: &fixtureProvider{name: "team/subgroup/renamed", commit: "opaque:commit"}, currentID: "project:123"} - registry, err := provider.New(p) - if err != nil { - t.Fatal(err) - } - s := &Server{Config: base.Config, Store: &Store{DB: db, Redis: base.Store.Redis}, providers: registry} - savedName := "team/subgroup/project" - record := M{"_id": bson.NewObjectID(), "repoId": "preview-probe", "owner": owner, "status": "ready", "source": M{"provider": "fixture", "repositoryName": savedName, "providerRepositoryId": "project:123", "branch": "main"}, "providerAccess": M{"provider": "fixture", "kind": "fixture-grant", "revision": "saved:binding"}, "coauthors": []M{{"username": "collaborator"}}} - if _, err := db.Collection(collection("repo")).InsertOne(ctx, record); err != nil { - t.Fatal(err) - } - users := map[string]M{ - "owner": {"_id": owner, "username": "owner", "status": "active"}, - "collaborator": {"_id": bson.NewObjectID(), "username": "collaborator", "status": "active"}, - "stranger": {"_id": bson.NewObjectID(), "username": "stranger", "status": "active"}, - } - call := func(actor, mode, name, id, reconnect string) (any, error) { - query := url.Values{"name": {name}, "anonymizedRepoId": {id}, "connection": {"untrusted-choice"}} - if reconnect != "" { - query.Set("reconnect", reconnect) - } - user := users[actor] - q := &request{Server: s, R: httptest.NewRequest("GET", "/?"+query.Encode(), nil), W: httptest.NewRecorder(), Params: map[string]string{"provider": "fixture"}, User: user, Identity: identity(user)} - return s.sourceRepository(mode)(q) - } - for _, mode := range []string{"metadata", "branches", "readme"} { - result, err := call("collaborator", mode, savedName, "preview-probe", "") - if err != nil || p.connects != 0 || p.authorized.OwnerID != owner.Hex() || p.authorized.Binding["revision"] != "saved:binding" { - t.Fatal("saved owner access not retained", mode, result, p.authorized, err) - } - if mode != "metadata" && (p.discovered.Ref.Name != p.name || p.discovered.Ref.ID != "project:123") { - t.Fatal("discovery used stale name", p.discovered) - } - if mode == "metadata" && obj(result)["externalId"] != "fixture_project:123" { - t.Fatal("wrong preview identity", result) - } - } - { - user := users["collaborator"] - q := &request{Server: s, User: user, Identity: identity(user), R: httptest.NewRequest("GET", "/?anonymizedRepoId=preview-probe&connection[]=ignored", nil)} - access, err := s.previewRepositoryAccess(q, p, "fixture", savedName) - if err != nil || access.OwnerID != owner.Hex() || access.Binding["revision"] != "saved:binding" || p.connects != 0 { - t.Fatal("saved preview used untrusted query choice", access, err) - } - } - beforeAuth, beforeRepo := p.authorizations, p.repositories - for _, c := range []struct{ actor, name, id, reconnect, code string }{ - {"stranger", savedName, "preview-probe", "", "not_authorized"}, - {"owner", "different/project", "preview-probe", "", "repo_not_found"}, - {"owner", savedName, "missing", "", "repo_not_found"}, - {"collaborator", savedName, "preview-probe", "1", "not_owner"}, - } { - _, err := call(c.actor, "metadata", c.name, c.id, c.reconnect) - if err == nil || err.Error() != c.code || p.connects != 0 || p.authorizations != beforeAuth || p.repositories != beforeRepo { - t.Fatal("unauthorized preview reached provider", c, err) - } - } - if _, err := s.Store.update(ctx, collection("repo"), M{"_id": record["_id"]}, M{"$set": M{"status": "archived"}}); err != nil { - t.Fatal(err) - } - _, err = call("owner", "metadata", savedName, "preview-probe", "1") - if err == nil || err.Error() != "repository_archived" || p.connects != 0 { - t.Fatal("archived reconnect reached provider", err) - } - if _, err := s.Store.update(ctx, collection("repo"), M{"_id": record["_id"]}, M{"$set": M{"status": "ready"}}); err != nil { - t.Fatal(err) - } - p.revoked = true - _, err = call("collaborator", "metadata", savedName, "preview-probe", "") - if err == nil || err.Error() != "fixture_access_revoked" || p.repositories != beforeRepo { - t.Fatal("revoked preview returned cached metadata", err) - } - p.revoked = false - p.currentID = "project:replacement" - _, err = call("owner", "metadata", savedName, "preview-probe", "") - if err == nil || err.Error() != "connection_changed" || p.connects != 0 { - t.Fatal("preview silently switched identity", err) - } - result, err := call("owner", "metadata", savedName, "preview-probe", "1") - if err != nil || obj(result)["externalId"] != "fixture_project:replacement" || p.connects != 1 || p.connected.OwnerID != owner.Hex() || p.connected.Connection != "fixture-grant" || p.connected.Name != savedName { - t.Fatal("owner reconnect did not use saved connection choice", result, p.connected, err) - } - // Malformed connection values cannot reach a provider adapter. - for _, query := range []string{"connection[]=fixture-grant", "connection=fixture-grant&connection[]=other", "connection[x]=fixture-grant"} { - user := users["stranger"] - q := &request{Server: s, User: user, Identity: identity(user), R: httptest.NewRequest("GET", "/?"+query, nil)} - before := p.connects - _, err := s.previewRepositoryAccess(q, p, "fixture", savedName) - if err == nil || err.Error() != "invalid_connection" || p.connects != before { - t.Fatal("invalid choice reached provider", query, err) - } - } - // A mixed saved-resource parameter is an array in Express. It must - // connect as the caller rather than borrowing the saved owner's grant. - user := users["stranger"] - q := &request{Server: s, User: user, Identity: identity(user), R: httptest.NewRequest("GET", "/?anonymizedRepoId=preview-probe&anonymizedRepoId[]=preview-probe&connection=provider-specific-grant", nil)} - access, err := s.previewRepositoryAccess(q, p, "fixture", savedName) - if err != nil || access.OwnerID != str(user["_id"]) || p.connected.OwnerID != str(user["_id"]) || p.connected.Connection != "provider-specific-grant" { - t.Fatal("mixed resource selected owner credentials", access, err) - } - current, err := s.Store.one(ctx, collection("repo"), M{"_id": record["_id"]}) - if err != nil || obj(current["source"])["providerRepositoryId"] != "project:123" || obj(current["providerAccess"])["revision"] != "saved:binding" { - t.Fatal("preview changed saved resource", current, err) - } - }) -} diff --git a/backend/internal/server/provider_reconnect.go b/backend/internal/server/provider_reconnect.go deleted file mode 100644 index 0e037e1..0000000 --- a/backend/internal/server/provider_reconnect.go +++ /dev/null @@ -1,40 +0,0 @@ -package server - -import ( - "regexp" - "strings" -) - -var githubReconnectID = regexp.MustCompile(`^gh_[1-9][0-9]*$`) - -// Reconnect is an owner-only operation pinned to the preview's upstream ID. -// Test key presence: JSON null is an invalid reconnect, not a settings-only save. -func validateRepositoryReconnect(q *request, previous M, providerID string) (bool, string, error) { - value, present := q.Body["reconnectRepositoryId"] - if previous == nil || !present { - return false, "", nil - } - if q.Identity.ID != str(previous["owner"]) { - return true, "", fail("not_owner", 403) - } - id, valid := value.(string) - prefix := providerID + "_" - if providerID == "github" { - prefix = "gh_" - } - valid = valid && strings.HasPrefix(id, prefix) && len(id) > len(prefix) - if providerID == "github" { - valid = valid && githubReconnectID.MatchString(id) - } - name, stringName := q.Body["fullName"].(string) - if !valid || !stringName || name != str(obj(previous["source"])["repositoryName"]) { - return true, "", fail("repo_not_found", 400) - } - switch str(previous["status"]) { - case "preparing", "queue", "download", "removing", "expiring": - return true, "", fail("invalid_status", 409) - case "archived": - return true, "", fail("repository_archived", 410) - } - return true, id, nil -} diff --git a/backend/internal/server/provider_reconnect_integration_test.go b/backend/internal/server/provider_reconnect_integration_test.go deleted file mode 100644 index 6ecec5a..0000000 --- a/backend/internal/server/provider_reconnect_integration_test.go +++ /dev/null @@ -1,117 +0,0 @@ -package server - -import ( - "context" - "encoding/json" - "fmt" - "net/http/httptest" - "strings" - "testing" - "time" - - "github.com/tdurieux/anonymous_github/backend/internal/provider" - "go.mongodb.org/mongo-driver/v2/bson" -) - -type reconnectProbe struct { - *fixtureProvider - branchError error - calls, commits int -} - -func (p *reconnectProbe) Connect(ctx context.Context, q provider.ConnectRequest) (provider.Connection, error) { - p.calls++ - return p.fixtureProvider.Connect(ctx, q) -} -func (p *reconnectProbe) Commit(ctx context.Context, a provider.Access, ref string) (provider.Commit, error) { - p.commits++ - return p.fixtureProvider.Commit(ctx, a, ref) -} -func (p *reconnectProbe) Branch(context.Context, provider.Access, string) (provider.Commit, error) { - return provider.Commit{ID: p.commit}, p.branchError -} - -func runProviderReconnectIntegration(t *testing.T, base *Server) { - t.Run("provider reconnect validates before upstream access and preserves failures", func(t *testing.T) { - ctx := context.Background() - owner := bson.NewObjectID() - db := base.Store.DB.Client().Database("provider_reconnect_" + owner.Hex()) - defer db.Drop(ctx) - p := &reconnectProbe{fixtureProvider: &fixtureProvider{name: "team/subgroup/project", commit: "revision:one"}} - registry, err := provider.New(p) - if err != nil { - t.Fatal(err) - } - s := &Server{Config: base.Config, Store: &Store{DB: db, Redis: base.Store.Redis}, providers: registry} - user := M{"_id": owner, "status": "active", "username": "owner"} - previous := M{"_id": bson.NewObjectID(), "repoId": "reconnect-probe", "owner": owner, "status": "ready", "source": M{"provider": "fixture", "repositoryName": p.name, "providerRepositoryId": "old:identity", "branch": "main", "commit": p.commit}, "providerAccess": M{"kind": "fixture-grant"}, "options": M{}} - if _, err := db.Collection(collection("repo")).InsertOne(ctx, previous); err != nil { - t.Fatal(err) - } - source := M{"provider": "fixture", "branch": "main", "commit": p.commit} - q := &request{Server: s, R: httptest.NewRequest("POST", "/", nil), Params: map[string]string{"id": "reconnect-probe"}, User: user, Identity: identity(user), Body: M{"repoId": "reconnect-probe", "fullName": p.name, "source": source, "options": M{}, "terms": []any{}, "reconnectRepositoryId": nil}} - // Exercise the real save handler: null must not take its settings-only shortcut. - _, err = s.saveResource("repo", false)(q) - if err == nil || err.Error() != "repo_not_found" || p.calls != 0 { - t.Fatal("null bypassed preflight", p.calls, err) - } - for _, c := range []struct { - value any - status, name, actor, code string - }{ - {"", "ready", p.name, owner.Hex(), "repo_not_found"}, - {"fixture_project:123", "ready", "different/project", owner.Hex(), "repo_not_found"}, - {"fixture_project:123", "queue", p.name, owner.Hex(), "invalid_status"}, - {"fixture_project:123", "ready", p.name, "another-owner", "not_owner"}, - } { - q.Body["reconnectRepositoryId"], q.Body["fullName"], q.Identity.ID = c.value, c.name, c.actor - previous["status"] = c.status - _, _, err := s.saveRepositorySource(q, previous, source) - if err == nil || err.Error() != c.code || p.calls != 0 { - t.Fatal("provider called before validation", c, p.calls, err) - } - } - previous["status"] = "ready" - q.Identity.ID = owner.Hex() - q.Body["fullName"], q.Body["reconnectRepositoryId"] = p.name, "fixture_project:123" - for _, c := range []struct { - err error - code string - status int - }{ - {provider.ErrBranchNotFound, "branch_not_specified", 400}, - {provider.ErrAccessDenied, "not_authorized", 403}, - {&provider.RateLimitError{ResetAt: time.UnixMilli(1800000000123)}, "rate_limited", 429}, - {provider.ErrUpstream, "upstream_error", 502}, - } { - p.branchError = fmt.Errorf("private provider details: %w", c.err) - _, _, err := s.saveRepositorySource(q, previous, source) - w := httptest.NewRecorder() - writeError(w, err) - var result M - if err := json.Unmarshal(w.Body.Bytes(), &result); err != nil { - t.Fatal(err) - } - if w.Code != c.status || result["error"] != c.code || strings.Contains(w.Body.String(), "private") || p.commits != 0 { - t.Fatal("branch failure lost", w.Code, w.Body, p.commits) - } - if c.code == "rate_limited" && number(result["resetAt"]) != 1800000000123 { - t.Fatal("retry time lost", result) - } - } - q.Body["reconnectRepositoryId"] = "fixture_another:identity" - _, _, err = s.saveRepositorySource(q, previous, source) - if err == nil || err.Error() != "connection_changed" || p.commits != 0 { - t.Fatal("preview mismatch not checked first", err) - } - if count, err := db.Collection("repositories").CountDocuments(ctx, M{}); err != nil || count != 0 { - t.Fatal("failed reconnect cached metadata", count, err) - } - p.branchError = nil - q.Body["reconnectRepositoryId"] = "fixture_project:123" - saved, binding, err := s.saveRepositorySource(q, previous, source) - if err != nil || saved["providerRepositoryId"] != "project:123" || saved["commit"] != p.commit || binding["kind"] != "fixture-grant" || p.commits != 1 { - t.Fatal("valid opaque reconnect failed", saved, binding, p.commits, err) - } - }) -} diff --git a/backend/internal/server/provider_reconnect_test.go b/backend/internal/server/provider_reconnect_test.go deleted file mode 100644 index 177435e..0000000 --- a/backend/internal/server/provider_reconnect_test.go +++ /dev/null @@ -1,54 +0,0 @@ -package server - -import ( - "errors" - "testing" - - "github.com/tdurieux/anonymous_github/backend/internal/security" -) - -func TestRepositoryReconnectPreflight(t *testing.T) { - for _, c := range []struct { - name, provider, owner, status string - value any - code string - httpStatus int - }{ - {"null", "github", "owner", "ready", nil, "repo_not_found", 400}, - {"empty", "github", "owner", "ready", "", "repo_not_found", 400}, - {"numeric", "github", "owner", "ready", 42, "repo_not_found", 400}, - {"object", "github", "owner", "ready", M{"id": "gh_42"}, "repo_not_found", 400}, - {"zero", "github", "owner", "ready", "gh_0", "repo_not_found", 400}, - {"negative", "github", "owner", "ready", "gh_-1", "repo_not_found", 400}, - {"leading-zero", "github", "owner", "ready", "gh_042", "repo_not_found", 400}, - {"foreign", "fixture", "owner", "ready", "gh_42", "repo_not_found", 400}, - {"owner-first", "github", "other", "ready", nil, "not_owner", 403}, - {"active", "github", "owner", "download", "gh_42", "invalid_status", 409}, - {"archived", "github", "owner", "archived", "gh_42", "repository_archived", 410}, - {"github", "github", "owner", "ready", "gh_42", "", 0}, - {"opaque", "fixture", "owner", "ready", "fixture_project:123", "", 0}, - } { - t.Run(c.name, func(t *testing.T) { - q := &request{Body: M{"fullName": "team/project", "reconnectRepositoryId": c.value}, Identity: security.Identity{ID: c.owner}} - previous := M{"owner": "owner", "status": c.status, "source": M{"repositoryName": "team/project"}} - present, id, err := validateRepositoryReconnect(q, previous, c.provider) - if !present { - t.Fatal("reconnect ignored") - } - if c.code == "" { - if err != nil || id != c.value { - t.Fatal(id, err) - } - return - } - var api *APIError - if !errors.As(err, &api) || api.Code != c.code || api.Status != c.httpStatus { - t.Fatal(err) - } - }) - } - q := &request{Body: M{}, Identity: security.Identity{ID: "owner"}} - if present, _, err := validateRepositoryReconnect(q, M{}, "github"); present || err != nil { - t.Fatal("ordinary save treated as reconnect", err) - } -} diff --git a/backend/internal/server/provider_resources.go b/backend/internal/server/provider_resources.go deleted file mode 100644 index e900a57..0000000 --- a/backend/internal/server/provider_resources.go +++ /dev/null @@ -1,228 +0,0 @@ -package server - -import ( - "errors" - "github.com/tdurieux/anonymous_github/backend/internal/provider" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/mongo/options" - "strings" -) - -func (s *Server) saveRepositorySource(q *request, previous, source M) (M, M, error) { - id, e := sourceProvider(source) - if previous != nil && source["provider"] == nil { - id, e = sourceProvider(obj(previous["source"])) - } - if e != nil { - return nil, nil, e - } - if previous != nil { - existing, e := sourceProvider(obj(previous["source"])) - if e != nil { - return nil, nil, e - } - if source["provider"] == nil { - id = existing - } else if id != existing { - return nil, nil, fail("provider_binding_mismatch", 409) - } - } - reconnect, reconnectID, e := validateRepositoryReconnect(q, previous, id) - if e != nil { - return nil, nil, e - } - p, e := s.providers.Repositories(id) - if e != nil { - return nil, nil, providerFailure(e) - } - owner := q.User["_id"] - if previous != nil { - owner = previous["owner"] - } - name := str(q.Body["fullName"]) - branch, commit := str(source["branch"]), str(source["commit"]) - if branch == "" { - return nil, nil, fail("branch_not_specified", 400) - } - if commit == "" || len(commit) > 256 { - return nil, nil, fail("invalid_commit_format", 400) - } - if id == "github" && !commitID.MatchString(commit) { - return nil, nil, fail("invalid_commit_format", 400) - } - if previous != nil && name != str(obj(previous["source"])["repositoryName"]) && q.Identity.ID != str(owner) { - return nil, nil, fail("not_owner", 403) - } - var access provider.Access - choice := str(q.Body["connection"]) - if previous != nil && !reconnect && name == str(obj(previous["source"])["repositoryName"]) { - access, e = s.providerAccess(previous) - if e == nil { - access, e = s.resolveSourceIdentity(q.ctx(), previous, access) - } - if e != nil { - return nil, nil, e - } - } else { - if previous != nil { - old, e := s.providerAccess(previous) - if e != nil { - return nil, nil, e - } - choice = str(old.Binding["kind"]) - } - connected, e := p.Connect(q.ctx(), provider.ConnectRequest{OwnerID: str(owner), Name: name, Connection: choice}) - if e != nil { - return nil, nil, e - } - access, e = connectionAccess(str(owner), id, connected) - if e != nil { - return nil, nil, e - } - access.Ref.Name = name - } - access.Ref.Branch = branch - access.Ref.Commit = commit - if e = p.Authorize(q.ctx(), access); e != nil { - return nil, nil, e - } - metadata, e := p.Repository(q.ctx(), access) - if e != nil { - return nil, nil, e - } - if e := validateRepositoryIdentity(access, metadata); e != nil { - return nil, nil, e - } - access.Ref.Name = metadata.Name - access.Ref.ID = metadata.ID - if reconnect { - if reconnectID != externalRepositoryID(id, metadata.ID) { - return nil, nil, fail("connection_changed", 409) - } - if _, e = p.Branch(q.ctx(), access, branch); e != nil { - if errors.Is(e, provider.ErrBranchNotFound) { - return nil, nil, fail("branch_not_specified", 400) - } - return nil, nil, providerFailure(e) - } - } - verified, e := p.Commit(q.ctx(), access, commit) - if e != nil { - return nil, nil, e - } - - cached, e := s.cacheProviderRepository(q, id, metadata) - if e != nil { - return nil, nil, e - } - kind := "Provider" - if id == "github" { - kind = "GitHubStream" - } - saved := M{"type": kind, "branch": branch, "commit": verified.ID, "commitDate": verified.Date, "repositoryName": metadata.Name, "repositoryId": str(cached["id"]), "providerRepositoryId": metadata.ID} - if id != "github" { - saved["provider"] = id - } - return saved, M(access.Binding), nil -} -func externalRepositoryID(id, value string) string { - if id == "github" { - return "gh_" + value - } - return id + "_" + value -} -func (s *Server) cacheProviderRepository(q *request, id string, r provider.Repository) (M, error) { - external := externalRepositoryID(id, r.ID) - set := M{"name": r.Name, "url": r.URL, "source": id, "defaultBranch": r.DefaultBranch, "size": r.Size, "hasPage": r.HasPage} - if r.PageBranch != "" { - set["pageSource"] = M{"branch": r.PageBranch, "path": r.PagePath} - } - var cached M - e := s.Store.DB.Collection("repositories").FindOneAndUpdate(q.ctx(), M{"externalId": external}, M{"$set": set, "$setOnInsert": M{"_id": bson.NewObjectID()}}, options.FindOneAndUpdate().SetUpsert(true).SetReturnDocument(options.After)).Decode(&cached) - if e != nil { - return nil, e - } - return providerRepositoryJSON(id, r, cached), nil -} -func providerRepositoryJSON(id string, r provider.Repository, cached M) M { - external := externalRepositoryID(id, r.ID) - parts := strings.Split(r.Name, "/") - owner, name := "", r.Name - if len(parts) > 1 { - owner = strings.Join(parts[:len(parts)-1], "/") - name = parts[len(parts)-1] - } - out := M{"id": cached["_id"], "externalId": external, "repo": name, "owner": owner, "fullName": r.Name, "defaultBranch": r.DefaultBranch, "size": r.Size, "hasPage": r.HasPage} - if v, ok := cached["pageSource"]; ok { - out["pageSource"] = v - } - if id != "github" { - out["provider"] = id - } - return out -} - -func (s *Server) saveDocumentSource(q *request, kind string, previous, source M, owner any) (M, M, error) { - if previous != nil { - source = obj(previous["source"]) - } - id, e := sourceProvider(source) - if e != nil { - return nil, nil, e - } - if previous != nil && source["provider"] == nil { - id, e = sourceProvider(obj(previous["source"])) - if e != nil { - return nil, nil, e - } - } - saved := selectFields(source, "gistId", "repositoryFullName", "pullRequestId") - // Only a prior server-owned source may supply an immutable provider ID. - // New request bodies cannot choose the identity returned by ConnectDocument. - if previous != nil { - if value := obj(previous["source"])["providerRepositoryId"]; value != nil { - saved["providerRepositoryId"] = value - } - } - if kind == "pr" { - saved["pullRequestId"] = normalizedIntegerInput(saved["pullRequestId"]) - } - if id != "github" { - saved["provider"] = id - } - record := M{"owner": owner, "source": saved} - choice := str(q.Body["connection"]) - if previous != nil { - old := obj(previous["source"]) - if str(old["repositoryFullName"]) == str(source["repositoryFullName"]) { - record["githubAccess"] = previous["githubAccess"] - record["providerAccess"] = previous["providerAccess"] - } - a, err := s.providerAccess(previous) - if err != nil { - return nil, nil, err - } - choice = str(a.Binding["kind"]) - } - p, req, e := s.documentProvider(record, kind) - if e != nil { - return nil, nil, e - } - a, e := p.ConnectDocument(q.ctx(), req, choice) - if e != nil { - return nil, nil, e - } - if a.Ref.Provider != id || a.OwnerID != str(owner) { - return nil, nil, fail("provider_binding_mismatch", 409) - } - if _, e := connectionAccess(str(owner), id, provider.Connection{Ref: a.Ref, Binding: a.Binding}); e != nil { - return nil, nil, e - } - if req.Access.Ref.ID != "" && a.Ref.ID != req.Access.Ref.ID { - return nil, nil, fail("connection_changed", 409) - } - if a.Ref.ID != "" { - saved["providerRepositoryId"] = a.Ref.ID - } - return saved, M(a.Binding), nil -} diff --git a/backend/internal/server/providers.go b/backend/internal/server/providers.go deleted file mode 100644 index e4f2255..0000000 --- a/backend/internal/server/providers.go +++ /dev/null @@ -1,199 +0,0 @@ -package server - -import ( - "context" - "errors" - "github.com/tdurieux/anonymous_github/backend/internal/provider" - "strings" -) - -// Missing provider fields only mean GitHub for recognized legacy source types. -func sourceProvider(source M) (string, error) { - if id := str(source["provider"]); id != "" { - return id, nil - } - switch str(source["type"]) { - case "Zip": - return "archive", nil - case "", "GitHubStream", "GitHubDownload": - return "github", nil - } - return "", fail("provider_not_supported", 400) -} -func providerFailure(e error) error { - for _, category := range []struct { - err error - code string - status int - }{ - {provider.ErrBranchNotFound, "branch_not_found", 404}, - {provider.ErrUnknown, "provider_not_supported", 400}, - {provider.ErrCapability, "provider_capability_not_supported", 400}, - {provider.ErrNotFound, "resource_not_found", 404}, - {provider.ErrAccessDenied, "not_authorized", 403}, - {provider.ErrRateLimited, "rate_limited", 429}, - {provider.ErrUpstream, "upstream_error", 502}, - } { - if errors.Is(e, category.err) { - api := &APIError{Code: category.code, Status: category.status} - var limited *provider.RateLimitError - if errors.As(e, &limited) && limited != nil && !limited.ResetAt.IsZero() { - api.ResetAt = limited.ResetAt.UnixMilli() - } - return api - } - } - return e -} - -func (s *Server) providerAccess(r M) (provider.Access, error) { - source := obj(r["source"]) - id, e := sourceProvider(source) - if e != nil { - return provider.Access{}, e - } - binding := obj(r["providerAccess"]) - if id == "github" { - binding = obj(r["githubAccess"]) - } - if declared := str(binding["provider"]); declared != "" && declared != id { - return provider.Access{}, fail("provider_binding_mismatch", 409) - } - name := str(source["repositoryName"]) - if name == "" { - name = str(source["repositoryFullName"]) - } - return provider.Access{OwnerID: str(r["owner"]), Ref: provider.Ref{Provider: id, ID: str(source["providerRepositoryId"]), Name: name, Branch: str(source["branch"]), Commit: str(source["commit"]), AnonymousID: str(r["repoId"])}, Binding: map[string]any(binding)}, nil -} -func (s *Server) repositoryProvider(r M) (provider.Repositories, provider.Access, error) { - access, e := s.providerAccess(r) - if e != nil { - return nil, access, e - } - p, e := s.providers.Repositories(access.Ref.Provider) - return p, access, providerFailure(e) -} -func (s *Server) authorizeSource(ctx context.Context, r M) (resultErr error) { - done := s.startStage(ctx, "authorization") - defer func() { done(resultErr) }() - p, a, e := s.repositoryProvider(r) - if e != nil { - return e - } - return p.Authorize(ctx, a) -} -func (s *Server) documentProvider(r M, kind string) (provider.Documents, provider.DocumentRequest, error) { - a, e := s.providerAccess(r) - q := provider.DocumentRequest{Access: a, Kind: kind, ID: str(obj(r["source"])["gistId"]), Number: number(obj(r["source"])["pullRequestId"])} - if e != nil { - return nil, q, e - } - p, e := s.providers.Get(a.Ref.Provider) - if e != nil { - return nil, q, providerFailure(e) - } - d, ok := p.(provider.Documents) - if !ok { - return nil, q, providerFailure(provider.ErrCapability) - } - return d, q, nil -} -func (s *Server) downloadEmbedded(ctx context.Context, kind string, r M) (M, error) { - p, q, e := s.documentProvider(r, kind) - if e != nil { - return nil, e - } - done := s.startStage(ctx, "upstream") - v, e := p.Document(ctx, q) - done(e) - return M(v), e -} -func (s *Server) sourceURL(r M, kind string) (string, error) { - if kind == "repo" { - p, a, e := s.repositoryProvider(r) - if e != nil { - return "", e - } - return p.PublicURL(a.Ref), nil - } - p, q, e := s.documentProvider(r, kind) - if e != nil { - return "", e - } - return p.DocumentURL(q), nil -} - -func (s *Server) providerCapabilities(q *request) (any, error) { - out := []M{} - for _, id := range s.providers.IDs() { - p, _ := s.providers.Get(id) - _, repositories := p.(provider.Repositories) - _, discovery := p.(provider.Discovery) - _, documents := p.(provider.Documents) - out = append(out, M{"id": id, "repositories": repositories, "discovery": discovery, "documents": documents}) - } - return out, nil -} - -// Upgrade legacy GitHub references through the cached immutable upstream ID. -// A renamed repository must not accidentally bind to a new repository at its old name. -func (s *Server) resolveSourceIdentity(ctx context.Context, r M, a provider.Access) (provider.Access, error) { - if a.Ref.Provider != "github" || a.Ref.ID != "" { - return a, nil - } - if id := str(a.Binding["repositoryId"]); id != "" { - a.Ref.ID = id - return a, nil - } - cachedID := str(obj(r["source"])["repositoryId"]) - if cachedID == "" { - return a, nil - } - id, e := oid(cachedID) - if e != nil { - return a, fail("repo_not_found", 404) - } - cached, e := s.Store.one(ctx, "repositories", M{"_id": id}) - if e != nil { - return a, e - } - external := str(cached["externalId"]) - if !strings.HasPrefix(external, "gh_") || len(external) <= 3 { - return a, fail("repo_not_found", 404) - } - a.Ref.ID = strings.TrimPrefix(external, "gh_") - return a, nil -} -func validateRepositoryIdentity(a provider.Access, r provider.Repository) error { - if r.ID == "" || r.Name == "" { - return fail("provider_invalid_response", 502) - } - if a.Ref.ID != "" && a.Ref.ID != r.ID { - return fail("connection_changed", 409) - } - return nil -} - -// Provider-specific account tools must not treat other providers as legacy OAuth. -func githubSources(filter M) M { - out := M{} - for k, v := range filter { - out[k] = v - } - source := M{"$or": []M{{"source.provider": "github"}, {"source.provider": M{"$in": []any{nil, ""}}, "source.type": M{"$in": []any{nil, "", "GitHubStream", "GitHubDownload"}}}}} - out["$and"] = []M{source} - return out -} - -// Connection identity comes from the selected adapter, never from the client. -func connectionAccess(owner, id string, connection provider.Connection) (provider.Access, error) { - if connection.Ref.Provider != "" && connection.Ref.Provider != id { - return provider.Access{}, fail("provider_binding_mismatch", 409) - } - if declared := str(connection.Binding["provider"]); declared != "" && declared != id { - return provider.Access{}, fail("provider_binding_mismatch", 409) - } - access := provider.Access{OwnerID: owner, Ref: connection.Ref, Binding: connection.Binding} - access.Ref.Provider = id - return access, nil -} diff --git a/backend/internal/server/providers_test.go b/backend/internal/server/providers_test.go deleted file mode 100644 index 8fd047b..0000000 --- a/backend/internal/server/providers_test.go +++ /dev/null @@ -1,53 +0,0 @@ -package server - -import ( - "context" - "errors" - "net/http/httptest" - "strings" - "testing" -) - -func TestProviderResolution(t *testing.T) { - for _, c := range []struct { - source M - want string - fail bool - }{{M{}, "github", false}, {M{"type": "GitHubStream"}, "github", false}, {M{"type": "GitHubDownload"}, "github", false}, {M{"type": "Zip"}, "archive", false}, {M{"type": "Provider", "provider": "fixture"}, "fixture", false}, {M{"type": "Other"}, "", true}} { - got, e := sourceProvider(c.source) - if got != c.want || (e != nil) != c.fail { - t.Fatalf("%v: %s %v", c.source, got, e) - } - } - s := &Server{} - if _, e := s.providerAccess(M{"source": M{"provider": "fixture"}, "providerAccess": M{"provider": "github"}}); e == nil { - t.Fatal("accepted mismatched binding") - } -} - -func TestResourceStatusErrors(t *testing.T) { - s := &Server{} - for _, c := range []struct { - kind, status, message, code string - http int - }{ - {"repo", "queue", "rate_limited:1790000000000", "rate_limited", 425}, - {"repo", "error", "repository_access_revoked", "repository_access_revoked", 500}, - {"gist", "error", "", "gist_not_available", 500}, - {"pr", "error", "", "pull_request_not_available", 500}, - {"repo", "removed", "", "repository_expired", 410}, - } { - e := s.checkResource(context.Background(), c.kind, M{"status": c.status, "statusMessage": c.message}) - var api *APIError - if !errors.As(e, &api) || api.Code != c.code || api.Status != c.http { - t.Fatalf("%+v: %v", c, e) - } - if c.code == "rate_limited" { - w := httptest.NewRecorder() - writeError(w, e) - if !strings.Contains(w.Body.String(), `"resetAt":1790000000000`) { - t.Fatal(w.Body) - } - } - } -} diff --git a/backend/internal/server/proxy.go b/backend/internal/server/proxy.go deleted file mode 100644 index 04178da..0000000 --- a/backend/internal/server/proxy.go +++ /dev/null @@ -1,54 +0,0 @@ -package server - -import ( - "errors" - "net" - "net/netip" - "strconv" - "strings" -) - -var cloudflareRanges = []string{"173.245.48.0/20", "103.21.244.0/22", "103.22.200.0/22", "103.31.4.0/22", "141.101.64.0/18", "108.162.192.0/18", "190.93.240.0/20", "188.114.96.0/20", "197.234.240.0/22", "198.41.128.0/17", "162.158.0.0/15", "104.16.0.0/13", "104.24.0.0/14", "172.64.0.0/13", "131.0.72.0/22", "2400:cb00::/32", "2606:4700::/32", "2803:f800::/32", "2405:b500::/32", "2405:8100::/32", "2a06:98c0::/29", "2c0f:f248::/32"} - -func configureProxy(c *Config, value string) error { - value = strings.TrimSpace(value) - if hops, e := strconv.Atoi(value); e == nil { - c.TrustedHops = max(0, hops) - return nil - } - aliases := map[string][]string{"loopback": {"127.0.0.0/8", "::1/128"}, "linklocal": {"169.254.0.0/16", "fe80::/10"}, "uniquelocal": {"10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16", "fc00::/7"}, "cloudflare": cloudflareRanges} - for _, part := range strings.Split(value, ",") { - part = strings.TrimSpace(part) - if part == "" || part == "false" { - continue - } - ranges := aliases[strings.ToLower(part)] - if ranges == nil { - ranges = []string{part} - } - for _, value := range ranges { - if ip := net.ParseIP(value); ip != nil { - bits := 128 - if ip.To4() != nil { - bits = 32 - } - value += "/" + strconv.Itoa(bits) - } - _, network, e := net.ParseCIDR(value) - if e != nil { - return errors.New("invalid_trusted_proxy") - } - c.TrustedProxies = append(c.TrustedProxies, network) - } - } - return nil -} -func cloudflareIP(ip netip.Addr) bool { - for _, s := range cloudflareRanges { - prefix, _ := netip.ParsePrefix(s) - if prefix.Contains(ip.Unmap()) { - return true - } - } - return false -} diff --git a/backend/internal/server/proxy_test.go b/backend/internal/server/proxy_test.go deleted file mode 100644 index fd9ba2a..0000000 --- a/backend/internal/server/proxy_test.go +++ /dev/null @@ -1,30 +0,0 @@ -package server - -import ( - "net/http/httptest" - "testing" -) - -func TestProxyBoundary(t *testing.T) { - for _, tc := range []struct{ trust, remote, forwarded, cf, want string }{ - {"", "192.0.2.1:12", "10.0.0.1", "203.0.113.2", "192.0.2.1"}, - {"loopback", "127.0.0.1:12", "203.0.113.2, 192.0.2.1", "", "192.0.2.1"}, - {"loopback,10.0.0.0/8", "127.0.0.1:12", "203.0.113.2, 10.0.0.1", "", "203.0.113.2"}, - {"1", "127.0.0.1:12", "203.0.113.2, 192.0.2.1", "", "192.0.2.1"}, - {"cloudflare", "173.245.48.1:12", "", "203.0.113.2", "203.0.113.2"}, - {"loopback", "[::1]:12", "2001:db8::1", "", "2001:db8::1"}, - } { - var c Config - if e := configureProxy(&c, tc.trust); e != nil { - t.Fatal(e) - } - s := &Server{Config: c} - req := httptest.NewRequest("GET", "/", nil) - req.RemoteAddr = tc.remote - req.Header.Set("X-Forwarded-For", tc.forwarded) - req.Header.Set("CF-Connecting-IP", tc.cf) - if got := s.clientIP(req).String(); got != tc.want { - t.Errorf("trust %s: got %s want %s", tc.trust, got, tc.want) - } - } -} diff --git a/backend/internal/server/query_value.go b/backend/internal/server/query_value.go deleted file mode 100644 index 5cfb4f1..0000000 --- a/backend/internal/server/query_value.go +++ /dev/null @@ -1,405 +0,0 @@ -package server - -import ( - "errors" - "math" - "net/url" - "sort" - "strconv" - "strings" - "unicode" - "unicode/utf8" -) - -// queryValue models the bounded extended query values used by Express/qs. -// Arrays stay sparse until string conversion, as qs compacts after merging. -type queryValue struct { - kind byte // s: string, a: array, o: object - scalar string - array []*queryValue - object map[string]*queryValue - keys []string - overflow, conflict bool - maximum int -} - -func queryObject() *queryValue { - return &queryValue{kind: 'o', object: map[string]*queryValue{}, maximum: -1} -} -func (v *queryValue) put(k string, x *queryValue) { - if _, ok := v.object[k]; !ok { - v.keys = append(v.keys, k) - } - v.object[k] = x - if n, e := strconv.Atoi(k); e == nil && n >= 0 && strconv.Itoa(n) == k && n > v.maximum { - v.maximum = n - } -} -func queryArrayObject(v *queryValue) *queryValue { - o := queryObject() - o.conflict = v.conflict - for i, x := range v.array { - if x != nil { - o.put(strconv.Itoa(i), x) - } - } - return o -} -func queryConcat(a, b *queryValue) *queryValue { - if a.kind == 'o' && a.overflow { - values := []*queryValue{b} - if b.kind == 'a' { - values = b.array - } - for _, v := range values { - a.put(strconv.Itoa(a.maximum+1), v) - } - return a - } - values := []*queryValue{} - for _, v := range []*queryValue{a, b} { - if v.kind == 'a' { - values = append(values, v.array...) - } else { - values = append(values, v) - } - } - result := &queryValue{kind: 'a', array: values} - if len(values) > 20 { - result = queryArrayObject(result) - result.overflow = true - } - return result -} -func mergeQuery(a, b *queryValue) *queryValue { - if a == nil { - return b - } - if b.kind == 's' && b.scalar == "" { - return a - } - if b.kind == 's' { - switch a.kind { - case 'a': - a.array = append(a.array, b) - count := 0 - for _, v := range a.array { - if v != nil { - count++ - } - } - if count > 20 { - a = queryArrayObject(a) - a.overflow = true - } - return a - case 'o': - if a.overflow || a.conflict { - a.put(strconv.Itoa(a.maximum+1), b) - return a - } - return &queryValue{kind: 'a', array: []*queryValue{a, b}, conflict: true} - default: - return queryConcat(a, b) - } - } - if a.kind == 's' { - if b.overflow { - out := queryObject() - out.put("0", a) - out.overflow = true - for _, k := range b.keys { - n, _ := strconv.Atoi(k) - out.put(strconv.Itoa(n+1), b.object[k]) - } - return out - } - return queryConcat(a, b) - } - if a.kind == 'a' && b.kind == 'a' { - for i, v := range b.array { - if v == nil { - continue - } - if i < len(a.array) && a.array[i] != nil { - if a.array[i].kind != 's' && v.kind != 's' { - a.array[i] = mergeQuery(a.array[i], v) - } else { - a.array = append(a.array, v) - } - } else { - for len(a.array) <= i { - a.array = append(a.array, nil) - } - a.array[i] = v - } - } - count := 0 - for _, v := range a.array { - if v != nil { - count++ - } - } - if count > 20 { - a = queryArrayObject(a) - a.overflow = true - } - return a - } - if a.kind == 'a' { - a = queryArrayObject(a) - } - if b.kind == 'a' { - b = queryArrayObject(b) - } - for _, k := range b.keys { - a.put(k, mergeQuery(a.object[k], b.object[k])) - } - a.overflow = a.overflow || b.overflow - return a -} -func decodeQuery(s string) string { - decoded, err := url.QueryUnescape(s) - if err != nil || !utf8.ValidString(decoded) { - return strings.ReplaceAll(s, "+", " ") - } - return decoded -} -func querySegments(key string) []string { - first := strings.IndexByte(key, '[') - if first < 0 { - return []string{key} - } - out := []string{} - if first > 0 { - out = append(out, key[:first]) - } - open := first - for depth := 0; open >= 0 && depth < 5; depth++ { - level, close := 1, -1 - for i := open + 1; i < len(key); i++ { - if key[i] == '[' { - level++ - } - if key[i] == ']' { - level-- - if level == 0 { - close = i - break - } - } - } - if close < 0 { - return append(out, "["+key[open:]+"]") - } - out = append(out, key[open:close+1]) - next := strings.IndexByte(key[close+1:], '[') - if next < 0 { - open = -1 - } else { - open = close + 1 + next - } - } - if open >= 0 { - out = append(out, "["+key[open:]+"]") - } - return out -} -func queryTree(key string, v *queryValue) *queryValue { - parts := querySegments(key) - for i := len(parts) - 1; i >= 0; i-- { - part := parts[i] - if part == "[]" { - if !v.overflow { - v = queryConcat(&queryValue{kind: 'a'}, v) - } - continue - } - bracket := strings.HasPrefix(part, "[") && strings.HasSuffix(part, "]") - if bracket { - part = part[1 : len(part)-1] - } - index, err := strconv.Atoi(part) - if bracket && err == nil && index >= 0 && strconv.Itoa(index) == part && index < 20 { - a := &queryValue{kind: 'a', array: make([]*queryValue, index+1)} - a.array[index] = v - v = a - } else { - o := queryObject() - if part != "__proto__" { - o.put(part, v) - } - o.overflow = bracket && err == nil && index >= 20 && strconv.Itoa(index) == part - v = o - } - } - return v -} -func (v *queryValue) stringValue() (string, error) { - if v == nil { - return "undefined", nil - } - if v.kind == 's' { - return v.scalar, nil - } - if v.kind == 'o' { - if v.object["toString"] != nil { - return "", errors.New("invalid_query_value") - } - return "[object Object]", nil - } - parts := []string{} - for _, x := range v.array { - if x != nil { - s, e := x.stringValue() - if e != nil { - return "", e - } - parts = append(parts, s) - } - } - return strings.Join(parts, ","), nil -} - -// extendedQueryString follows the application's Express extended parser: -// at most 1000 parameters, depth 5 and 20 array entries. No prototype state is -// represented, and malformed escapes remain literal rather than disappearing. -func extendedQueryString(raw, name string) (string, error) { - return parseExtendedQuery(raw).object[name].stringValue() -} - -func parseExtendedQuery(raw string) *queryValue { - raw = strings.NewReplacer("%5B", "[", "%5b", "[", "%5D", "]", "%5d", "]").Replace(raw) - fields := strings.SplitN(raw, "&", 1001) - if len(fields) > 1000 { - fields = fields[:1000] - } - values := map[string]*queryValue{} - keys := []string{} - for _, field := range fields { - pos := strings.IndexByte(field, '=') - if bracket := strings.Index(field, "]="); bracket >= 0 { - pos = bracket + 1 - } - key, val := field, "" - if pos >= 0 { - key, val = field[:pos], field[pos+1:] - } - key = decodeQuery(key) - if key == "" { - continue - } - v := &queryValue{kind: 's', scalar: decodeQuery(val)} - if old := values[key]; old != nil { - values[key] = queryConcat(old, v) - } else { - values[key] = v - keys = append(keys, key) - } - } - // JS enumerates canonical numeric object keys before other keys. - sort.SliceStable(keys, func(i, j int) bool { - a, ea := strconv.ParseUint(keys[i], 10, 32) - b, eb := strconv.ParseUint(keys[j], 10, 32) - na := ea == nil && a < 4294967295 && strconv.FormatUint(a, 10) == keys[i] - nb := eb == nil && b < 4294967295 && strconv.FormatUint(b, 10) == keys[j] - return na && (!nb || a < b) - }) - root := queryObject() - for _, key := range keys { - root = mergeQuery(root, queryTree(key, values[key])) - } - return root -} - -// Query arrays and objects are truthy even when their string form is empty. -func (v *queryValue) truthy() bool { return v != nil && (v.kind != 's' || v.scalar != "") } -func (v *queryValue) stringDefault(fallback string) (string, error) { - if !v.truthy() { - return fallback, nil - } - return v.stringValue() -} -func (v *queryValue) nativeValue() any { - if v == nil { - return nil - } - if v.kind == 's' { - return v.scalar - } - if v.kind == 'a' { - out := []any{} - for _, x := range v.array { - if x != nil { - out = append(out, x.nativeValue()) - } - } - return out - } - out := M{} - for k, x := range v.object { - out[k] = x.nativeValue() - } - return out -} - -// scalarValue never coerces arrays or objects into authorization inputs. -func (v *queryValue) scalarValue() (string, bool) { - if v == nil || v.kind != 's' { - return "", false - } - return v.scalar, true -} - -// Parse JavaScript numeric forms relevant to monitoring windows. Radix -// literals beyond uint64 cannot equal any supported window and return NaN. -func queryWindowNumber(raw string) float64 { - value := strings.TrimFunc(raw, func(r rune) bool { return unicode.IsSpace(r) && r != '\u0085' || r == '\ufeff' }) - if value == "" { - return 0 - } - if value == "Infinity" || value == "+Infinity" { - return math.Inf(1) - } - if value == "-Infinity" { - return math.Inf(-1) - } - if dashboardDecimal.MatchString(value) { - n, _ := strconv.ParseFloat(value, 64) - return n - } - if len(value) > 2 && value[0] == '0' { - base := 0 - switch value[1] { - case 'x', 'X': - base = 16 - case 'b', 'B': - base = 2 - case 'o', 'O': - base = 8 - } - if base != 0 { - n, err := strconv.ParseUint(value[2:], base, 64) - if err == nil { - return float64(n) - } - } - } - return math.NaN() -} - -func (v *queryValue) looseStringEqual(expected string) (bool, error) { - if v == nil { - return false, nil - } - value, err := v.stringValue() - return value == expected, err -} -func previewRefresh(raw string) (bool, error) { - query := parseExtendedQuery(raw).object - reconnect, _ := query["reconnect"].scalarValue() - if reconnect == "1" { - return true, nil - } - return query["force"].looseStringEqual("1") -} diff --git a/backend/internal/server/query_value_test.go b/backend/internal/server/query_value_test.go deleted file mode 100644 index 6735ed4..0000000 --- a/backend/internal/server/query_value_test.go +++ /dev/null @@ -1,33 +0,0 @@ -package server - -import ( - "encoding/json" - "os" - "testing" -) - -func TestExpressExtendedQueryContracts(t *testing.T) { - data, err := os.ReadFile("testdata/query-values.json") - if err != nil { - t.Fatal(err) - } - var rows []struct { - Query, Value string - Error bool - Scalar, Truthy bool - } - if err = json.Unmarshal(data, &rows); err != nil { - t.Fatal(err) - } - for _, row := range rows { - value := parseExtendedQuery(row.Query).object["days"] - _, scalar := value.scalarValue() - if scalar != row.Scalar || value.truthy() != row.Truthy { - t.Errorf("query %q: scalar=%v truthy=%v, want scalar=%v truthy=%v", row.Query, scalar, value.truthy(), row.Scalar, row.Truthy) - } - got, err := extendedQueryString(row.Query, "days") - if (err != nil) != row.Error || (err == nil && got != row.Value) { - t.Errorf("query %q: got %q error=%v, want %q error=%v", row.Query, got, err, row.Value, row.Error) - } - } -} diff --git a/backend/internal/server/queue_metrics.go b/backend/internal/server/queue_metrics.go deleted file mode 100644 index 474b18b..0000000 --- a/backend/internal/server/queue_metrics.go +++ /dev/null @@ -1,131 +0,0 @@ -package server - -import ( - "context" - "fmt" - "math" - "sync" - "time" - - "github.com/redis/go-redis/v9" -) - -type queueMetricPoint struct { - TS int64 `json:"ts"` - Completed int64 `json:"completed"` - Failed int64 `json:"failed"` - AvgMs int64 `json:"avgMs"` -} -type queueMetricCacheKey struct { - name string - minutes int64 -} -type queueMetricCacheEntry struct { - points []queueMetricPoint - expires time.Time -} -type queueMetricHistory struct { - mu sync.Mutex - entries map[queueMetricCacheKey]queueMetricCacheEntry -} - -func queueMetricSelection(raw string) (name, selected string, minutes int64, err error) { - query := parseExtendedQuery(raw).object - name, err = query["queue"].stringDefault("download") - if err != nil { - return - } - if queueAction(name) == "" { - err = fail("queue_not_found", 404) - return - } - selected, err = query["range"].stringDefault("1h") - if err != nil { - return - } - minutes = map[string]int64{"1h": 60, "6h": 360, "24h": 1440, "7d": 10080}[selected] - if minutes == 0 { - // TypeScript's range object inherits these nonnumeric properties; - // its metric reader consequently produces an empty series. - switch selected { - case "constructor", "__defineGetter__", "__defineSetter__", "hasOwnProperty", "__lookupGetter__", "__lookupSetter__", "isPrototypeOf", "propertyIsEnumerable", "toString", "valueOf", "__proto__", "toLocaleString": - default: - minutes = 60 - } - } - return -} -func (s *Server) queueMetric(ctx context.Context, job M, failed bool, duration time.Duration) { - if s.Store == nil || s.Store.Redis == nil { - return - } - name := "download" - switch str(job["action"]) { - case "remove", "expire": - name = "remove" - case "cache": - name = "cache" - } - key := fmt.Sprintf("qmetrics:%s:%d", name, time.Now().Truncate(time.Minute).UnixMilli()) - field := "c" - if failed { - field = "f" - } - p := s.Store.Redis.TxPipeline() - p.HIncrBy(ctx, key, field, 1) - p.HIncrBy(ctx, key, "ms", int64(math.Round(math.Max(0, float64(duration)/float64(time.Millisecond))))) - p.Expire(ctx, key, 7*24*time.Hour+time.Hour) - p.Exec(ctx) -} -func (s *Server) queueMetrics(q *request) (any, error) { - name, selected, minutes, err := queueMetricSelection(q.R.URL.RawQuery) - if err != nil { - return nil, err - } - return M{"queue": name, "range": selected, "points": s.queueMetricPoints(q.ctx(), name, minutes, time.Now())}, nil -} -func (s *Server) queueMetricPoints(ctx context.Context, name string, minutes int64, now time.Time) []queueMetricPoint { - // Only three known queues and four normalized windows enter the cache. - if queueAction(name) == "" || (minutes != 60 && minutes != 360 && minutes != 1440 && minutes != 10080) { - return []queueMetricPoint{} - } - key := queueMetricCacheKey{name, minutes} - s.queueHistory.mu.Lock() - cached, ok := s.queueHistory.entries[key] - s.queueHistory.mu.Unlock() - if ok && now.Before(cached.expires) { - return cached.points - } - if s.Store == nil || s.Store.Redis == nil { - return []queueMetricPoint{} - } - ctx, cancel := context.WithTimeout(ctx, 3*time.Second) - defer cancel() - minute := now.Truncate(time.Minute) - points := make([]queueMetricPoint, 0, minutes) - pipe := s.Store.Redis.Pipeline() - commands := make([]*redis.SliceCmd, 0, minutes) - for i := minutes - 1; i >= 0; i-- { - at := minute.Add(-time.Duration(i) * time.Minute).UnixMilli() - points = append(points, queueMetricPoint{TS: at}) - commands = append(commands, pipe.HMGet(ctx, fmt.Sprintf("qmetrics:%s:%d", name, at), "c", "f", "ms")) - } - if _, err := pipe.Exec(ctx); err != nil { - return []queueMetricPoint{} - } - for i, command := range commands { - values := command.Val() - completed, failed, ms := errorPageInt(str(values[0]), 0), errorPageInt(str(values[1]), 0), errorPageInt(str(values[2]), 0) - points[i].Completed, points[i].Failed = completed, failed - if total := completed + failed; total > 0 { - points[i].AvgMs = int64(math.Floor(float64(ms)/float64(total) + .5)) - } - } - s.queueHistory.mu.Lock() - if s.queueHistory.entries == nil { - s.queueHistory.entries = map[queueMetricCacheKey]queueMetricCacheEntry{} - } - s.queueHistory.entries[key] = queueMetricCacheEntry{points: points, expires: now.Add(30 * time.Second)} - s.queueHistory.mu.Unlock() - return points -} diff --git a/backend/internal/server/queue_metrics_test.go b/backend/internal/server/queue_metrics_test.go deleted file mode 100644 index 04befde..0000000 --- a/backend/internal/server/queue_metrics_test.go +++ /dev/null @@ -1,138 +0,0 @@ -package server - -import ( - "context" - "encoding/json" - "net/http/httptest" - "net/url" - "os" - "reflect" - "testing" - "time" - - "github.com/redis/go-redis/v9" -) - -type queueMetricFixture struct { - Now int64 - Ranges []struct { - Input any - Queue, Range string - Minutes, Count int64 - First, Last queueMetricPoint - } - Durations []struct { - Input float64 - Ms int64 - } -} - -func readQueueMetricFixture(t *testing.T) queueMetricFixture { - t.Helper() - data, err := os.ReadFile("testdata/queue-metrics.json") - if err != nil { - t.Fatal(err) - } - var fixture queueMetricFixture - if err = json.Unmarshal(data, &fixture); err != nil { - t.Fatal(err) - } - return fixture -} -func TestQueueMetricRangeContracts(t *testing.T) { - for _, row := range readQueueMetricFixture(t).Ranges { - values := url.Values{} - switch v := row.Input.(type) { - case string: - values.Set("range", v) - case []any: - for _, value := range v { - values.Add("range", str(value)) - } - } - name, selected, minutes, err := queueMetricSelection(values.Encode()) - if err != nil { - t.Fatal(err) - } - if name != row.Queue || selected != row.Range || minutes != row.Minutes { - t.Fatal(row, name, selected, minutes) - } - } - s := &Server{} - result, err := s.queueMetrics(&request{R: httptest.NewRequest("GET", "/api/admin/queues/metrics?range=24h", nil)}) - if err != nil || obj(result)["range"] != "24h" || len(obj(result)["points"].([]queueMetricPoint)) != 0 { - t.Fatal(result, err) - } - _, err = s.queueMetrics(&request{R: httptest.NewRequest("GET", "/api/admin/queues/metrics?queue=unknown", nil)}) - if err == nil || err.Error() != "queue_not_found" { - t.Fatal(err) - } -} -func runQueueMetricIntegration(t *testing.T, base *Server) { - options := *base.Store.Redis.Options() - options.DB = 15 - client := redis.NewClient(&options) - defer client.Close() - ctx := context.Background() - if err := client.FlushDB(ctx).Err(); err != nil { - t.Fatal(err) - } - defer client.FlushDB(ctx) - s := &Server{Store: &Store{Redis: client}} - fixture := readQueueMetricFixture(t) - now := time.UnixMilli(fixture.Now) - key := "qmetrics:download:1800000000000" - if err := client.HSet(ctx, key, "c", 2, "f", 1, "ms", 11).Err(); err != nil { - t.Fatal(err) - } - for _, row := range fixture.Ranges { - points := s.queueMetricPoints(ctx, row.Queue, row.Minutes, now) - if int64(len(points)) != row.Count || !reflect.DeepEqual(points[0], row.First) || !reflect.DeepEqual(points[len(points)-1], row.Last) { - t.Fatal("queue contract", row.Range, len(points)) - } - } - client.HSet(ctx, key, "ms", 30) - cached := s.queueMetricPoints(ctx, "download", 60, now.Add(29*time.Second)) - if cached[len(cached)-1].AvgMs != 4 { - t.Fatal("cache expired before 30 seconds") - } - fresh := s.queueMetricPoints(ctx, "download", 60, now.Add(31*time.Second)) - if fresh[len(fresh)-1].AvgMs != 10 { - t.Fatal("cache failed to expire") - } - other := s.queueMetricPoints(ctx, "remove", 60, now) - if other[len(other)-1].Completed != 0 { - t.Fatal("cross-queue cache collision") - } - // Failed reads yield an empty chart and are retried on the next request. - s.queueHistory.entries = nil - canceled, cancel := context.WithCancel(ctx) - cancel() - if points := s.queueMetricPoints(canceled, "download", 60, now); len(points) != 0 { - t.Fatal("failed Redis read returned partial chart") - } - if points := s.queueMetricPoints(ctx, "download", 60, now); len(points) != 60 { - t.Fatal("failed chart cached") - } - for _, row := range fixture.Durations { - s.queueMetric(ctx, M{"action": "cache"}, false, time.Duration(row.Input*float64(time.Millisecond))) - keys, err := client.Keys(ctx, "qmetrics:cache:*").Result() - if err != nil || len(keys) == 0 { - t.Fatal(keys, err) - } - var ms, count int64 - for _, k := range keys { - v := client.HGetAll(ctx, k).Val() - ms += errorPageInt(v["ms"], 0) - count += errorPageInt(v["c"], 0) - ttl := client.TTL(ctx, k).Val() - if ttl < 7*24*time.Hour || ttl > 7*24*time.Hour+time.Hour { - t.Fatal(ttl) - } - client.Del(ctx, k) - } - if ms != row.Ms || count != 1 { - t.Fatal(row, ms, count) - } - } -} diff --git a/backend/internal/server/queue_overview_test.go b/backend/internal/server/queue_overview_test.go deleted file mode 100644 index c32275f..0000000 --- a/backend/internal/server/queue_overview_test.go +++ /dev/null @@ -1,126 +0,0 @@ -package server - -import ( - "context" - "fmt" - "net/http/httptest" - "testing" - "time" - - "github.com/redis/go-redis/v9" - "go.mongodb.org/mongo-driver/v2/bson" -) - -func runQueueOverviewIntegration(t *testing.T, base *Server) { - ctx := context.Background() - db := base.Store.DB.Client().Database("queue_overview_" + bson.NewObjectID().Hex()) - defer db.Drop(ctx) - options := *base.Store.Redis.Options() - options.DB = 15 - client := redis.NewClient(&options) - defer client.Close() - if err := client.FlushDB(ctx).Err(); err != nil { - t.Fatal(err) - } - defer client.FlushDB(ctx) - s := &Server{Store: &Store{DB: db, Redis: client}} - now := time.Now().UTC().Truncate(time.Millisecond) - delayed := M{"_id": "delayed-fixture", "resourceId": "DelayedRepo", "kind": "repo", "action": "prepare", "state": "delayed", "createdAt": now.Add(-time.Hour), "availableAt": now.Add(time.Hour), "attempts": 2} - completed := M{"_id": "completed-fixture", "resourceId": "DoneRepo", "kind": "repo", "action": "prepare", "state": "completed", "createdAt": now.Add(-time.Hour), "startedAt": now.Add(-time.Minute), "finishedAt": now, "attempts": 1} - if _, err := db.Collection("gojobs").InsertMany(ctx, []any{delayed, completed}); err != nil { - t.Fatal(err) - } - for _, queue := range []string{"download", "remove", "cache"} { - key := fmt.Sprintf("qmetrics:%s:%d", queue, now.Add(-time.Minute).Truncate(time.Minute).UnixMilli()) - if err := client.HSet(ctx, key, "c", 7, "f", 2, "ms", 90).Err(); err != nil { - t.Fatal(err) - } - } - // Process samples distinguish actual worker loops from configured capacity, - // exclude stale instances, and retain concurrency only when a worker exists. - for _, fixture := range []struct { - id string - age time.Duration - count int64 - }{{"live", 0, 3}, {"stopped", 0, 0}, {"stale", 91 * time.Second, 9}} { - sample := M{"instance": "api:" + fixture.id, "runtime": "go", "service": "api", "sampledAt": now.Add(-fixture.age).UnixMilli(), "memory": M{}, "eventLoop": M{}, "queueWorkers": M{"download": fixture.count}} - pipe := client.TxPipeline() - writeProcessSample(ctx, pipe, sample) - if _, err := pipe.Exec(ctx); err != nil { - t.Fatal(err) - } - } - request := func(query string) *request { - return &request{Server: s, R: httptest.NewRequest("GET", "/api/admin/queues"+query, nil)} - } - raw, err := s.adminQueues(request("?queue=unknown")) - if err != nil { - t.Fatal(err) - } - report := obj(raw) - if report["selectedQueue"] != "download" { - t.Fatal(report) - } - for _, row := range report["queues"].([]M) { - if number(row["completed24h"]) != 7 || number(row["failed24h"]) != 2 { - t.Fatal(row) - } - if row["key"] == "download" { - if number(row["workers"]) != 1 || number(row["concurrency"]) != 3 { - t.Fatal(row) - } - } else if number(row["workers"]) != 0 || row["concurrency"] != nil { - t.Fatal(row) - } - } - jobs := report["jobs"].([]M) - if len(jobs) != 2 || jobs[0]["_state"] != "delayed" || number(jobs[0]["delayUntil"]) != now.Add(time.Hour).UnixMilli() || number(jobs[1]["processedOn"]) != now.Add(-time.Minute).UnixMilli() || number(jobs[1]["finishedOn"]) != now.UnixMilli() { - t.Fatal(jobs) - } - raw, err = s.adminQueues(request("?search=dELAyED")) - if err != nil || len(obj(raw)["jobs"].([]M)) != 1 { - t.Fatal(raw, err) - } - for _, tc := range []struct { - query, selected string - count int - }{ - {"?queue[]=remove", "remove", 0}, - {"?queue=remove&queue=cache", "download", 2}, - {"?search[]=dELAyED", "download", 1}, - {"?search=Delayed&search=Repo", "download", 0}, - {"?search[x]=Delayed", "download", 0}, - } { - raw, err := s.adminQueues(request(tc.query)) - if err != nil || obj(raw)["selectedQueue"] != tc.selected || len(obj(raw)["jobs"].([]M)) != tc.count { - t.Fatal(tc, raw, err) - } - } - s.requestMetrics = &requestMetrics{instance: "api:live"} - s.removeProcessSample(ctx) - instances, err := s.readProcessInstances(ctx, time.Now()) - if err != nil { - t.Fatal(err) - } - for _, instance := range instances { - if instance["instance"] == "api:live" { - t.Fatal("stopped instance still advertised") - } - } - s.requestMetrics = nil - // A paused worker still exists; cancellation removes its local presence. - client.Set(ctx, "go:pause:download", "1", time.Minute) - work, cancel := context.WithCancel(ctx) - done := make(chan struct{}) - go func() { defer close(done); s.jobLoop(work, "download") }() - deadline := time.Now().Add(2 * time.Second) - for s.jobWorkerCounts[0].Load() == 0 && time.Now().Before(deadline) { - time.Sleep(time.Millisecond) - } - sample := s.queueWorkerSample() - cancel() - <-done - if number(sample["download"]) != 1 || s.jobWorkerCounts[0].Load() != 0 { - t.Fatal(sample, s.jobWorkerCounts[0].Load()) - } -} diff --git a/backend/internal/server/quota.go b/backend/internal/server/quota.go deleted file mode 100644 index ecf1876..0000000 --- a/backend/internal/server/quota.go +++ /dev/null @@ -1,63 +0,0 @@ -package server - -import ( - "context" - "time" -) - -func quotaFilter(owner any, now time.Time) M { - return M{"owner": owner, "status": "ready", "$or": []M{{"options.expirationMode": "never"}, {"options.expirationDate": M{"$exists": false}}, {"options.expirationDate": nil}, {"options.expirationDate": M{"$gt": now}}}} -} -func quotaSizeCached(row M) bool { - size := obj(row["size"]) - return len(size) > 0 && (decimal(size["file"]) > 0 || inputTruthy(row["sizeComputedAt"])) && size["storage"] != nil -} -func (s *Server) cacheQuotaSize(ctx context.Context, row, size M, at time.Time) error { - revision := row["fileMetadataRevision"] - if !inputTruthy(revision) { - revision = M{"$exists": false} - } - _, err := s.Store.update(ctx, collection("repo"), M{"_id": row["_id"], "status": "ready", "treeGeneration": activeGeneration(row), "fileMetadataRevision": revision}, M{"$set": M{"size": size, "sizeComputedAt": at}}) - return err -} -func (s *Server) quota(q *request) (any, error) { - rows, err := s.Store.list(q.ctx(), collection("repo"), quotaFilter(q.User["_id"], time.Now()), 0, nil) - if err != nil { - return nil, err - } - var used, files float64 - uncached := []M{} - matches := []M{} - for _, row := range rows { - if quotaSizeCached(row) { - size := obj(row["size"]) - used += decimal(size["storage"]) - files += decimal(size["file"]) - continue - } - uncached = append(uncached, row) - matches = append(matches, M{"repoId": row["repoId"], "treeGeneration": activeGeneration(row)}) - } - if len(uncached) > 0 { - sizes, err := s.aggregate(q, "files", []M{{"$match": M{"$or": matches}}, {"$group": M{"_id": "$repoId", "storage": M{"$sum": "$size"}, "file": M{"$sum": 1}}}}) - if err != nil { - return nil, err - } - byID := map[string]M{} - for _, size := range sizes { - byID[str(size["_id"])] = M{"storage": size["storage"], "file": size["file"]} - } - for _, row := range uncached { - size := byID[str(row["repoId"])] - if size == nil { - size = M{"storage": 0, "file": 0} - } - used += decimal(size["storage"]) - files += decimal(size["file"]) - if err := s.cacheQuotaSize(q.ctx(), row, size, time.Now().Truncate(time.Millisecond)); err != nil { - return nil, err - } - } - } - return M{"storage": M{"used": used, "total": int64(2) * 1024 * 1024 * 1024 * 8}, "file": M{"used": files, "total": 0}, "repository": M{"used": len(rows), "total": 20}}, nil -} diff --git a/backend/internal/server/quota_integration_test.go b/backend/internal/server/quota_integration_test.go deleted file mode 100644 index 6af5bf9..0000000 --- a/backend/internal/server/quota_integration_test.go +++ /dev/null @@ -1,112 +0,0 @@ -package server - -import ( - "context" - "encoding/json" - "net/http/httptest" - "testing" - "time" - - "github.com/tdurieux/anonymous_github/backend/internal/security" - "go.mongodb.org/mongo-driver/v2/bson" -) - -func runQuotaIntegration(t *testing.T, s *Server) { - t.Run("quota uses valid caches and only current owned trees", func(t *testing.T) { - ctx := context.Background() - owner, other := bson.NewObjectID(), bson.NewObjectID() - token := "synthetic-quota-user" - if _, err := s.Store.DB.Collection("users").InsertOne(ctx, M{"_id": owner, "username": "quota-fixture", "status": "active", "apiTokens": []M{{"tokenHash": security.HashToken(token)}}}); err != nil { - t.Fatal(err) - } - before := time.Now().Add(-time.Hour).Truncate(time.Millisecond) - records := map[string]M{ - "positive": {"size": M{"storage": 100, "file": 2}}, - "empty": {"size": M{"storage": 0, "file": 0}, "sizeComputedAt": before}, - "current": {"treeGeneration": "current", "fileMetadataRevision": "first"}, - "legacy": {"size": M{"storage": 0, "file": 0}}, - "missing-storage": {"size": M{"file": 9}, "sizeComputedAt": before}, - "overdue": {"size": M{"storage": 777, "file": 77}, "options": M{"expirationDate": before}}, - "never": {"size": M{"storage": 20, "file": 1}, "options": M{"expirationMode": "never", "expirationDate": before}}, - "other": {"owner": other, "size": M{"storage": 9999, "file": 999}, "coauthors": []M{{"username": "quota-fixture"}}}, - "inactive": {"status": "preparing", "size": M{"storage": 888, "file": 88}}, - } - for name, row := range records { - defaults(row, M{"_id": bson.NewObjectID(), "repoId": "quota-" + name, "owner": owner, "status": "ready", "options": M{}, "source": M{"provider": "fixture"}}) - if _, err := s.Store.DB.Collection(collection("repo")).InsertOne(ctx, row); err != nil { - t.Fatal(err) - } - } - addFile := func(name, path, generation string, size int64) { - t.Helper() - row := M{"repoId": "quota-" + name, "path": "", "name": path, "size": size} - if generation != "" { - row["treeGeneration"] = generation - } - if _, err := s.Store.DB.Collection("files").InsertOne(ctx, row); err != nil { - t.Fatal(err) - } - } - addFile("positive", "ignored", "", 999) - addFile("empty", "ignored", "", 999) - addFile("current", "a", "current", 7) - addFile("current", "b", "current", 11) - addFile("current", "old", "old", 999) - addFile("legacy", "a", "", 3) - addFile("legacy", "old", "old", 500) - addFile("missing-storage", "a", "", 5) - call := func() M { - t.Helper() - req := httptest.NewRequest("GET", "/api/user/quota", nil) - req.RemoteAddr = "198.51.100.21:1234" - req.Header.Set("Authorization", "Bearer "+token) - w := httptest.NewRecorder() - s.ServeHTTP(w, req) - if w.Code != 200 { - t.Fatal(w.Code, w.Body) - } - var out M - if err := json.Unmarshal(w.Body.Bytes(), &out); err != nil { - t.Fatal(err) - } - return out - } - check := func(out M) { - t.Helper() - if number(obj(out["storage"])["used"]) != 146 || number(obj(out["file"])["used"]) != 7 || number(obj(out["repository"])["used"]) != 6 { - t.Fatal(out) - } - } - check(call()) - for name, want := range map[string]int64{"current": 18, "legacy": 3, "missing-storage": 5} { - row, err := s.Store.one(ctx, collection("repo"), M{"repoId": "quota-" + name}) - if err != nil { - t.Fatal(err) - } - if number(obj(row["size"])["storage"]) != want || !date(row["sizeComputedAt"]).After(before) { - t.Fatal("cache not saved", name, row) - } - } - addFile("current", "later", "current", 100) - check(call()) - row, err := s.Store.one(ctx, collection("repo"), M{"repoId": "quota-current"}) - if err != nil { - t.Fatal(err) - } - for _, change := range []M{{"fileMetadataRevision": "new"}, {"fileMetadataRevision": "first", "treeGeneration": "replacement"}, {"treeGeneration": "current", "status": "removing"}} { - if _, err := s.Store.update(ctx, collection("repo"), M{"_id": row["_id"]}, M{"$set": change}); err != nil { - t.Fatal(err) - } - if err := s.cacheQuotaSize(ctx, row, M{"storage": 9999, "file": 999}, time.Now()); err != nil { - t.Fatal(err) - } - current, err := s.Store.one(ctx, collection("repo"), M{"_id": row["_id"]}) - if err != nil { - t.Fatal(err) - } - if number(obj(current["size"])["storage"]) != 18 { - t.Fatal("stale calculation overwrote newer revision", current) - } - } - }) -} diff --git a/backend/internal/server/quota_test.go b/backend/internal/server/quota_test.go deleted file mode 100644 index bcd82cd..0000000 --- a/backend/internal/server/quota_test.go +++ /dev/null @@ -1,43 +0,0 @@ -package server - -import ( - "encoding/json" - "os" - "reflect" - "testing" - "time" -) - -func TestTypeScriptQuota(t *testing.T) { - raw, err := os.ReadFile("testdata/quota.json") - if err != nil { - t.Fatal(err) - } - var fixture struct { - Now time.Time - Filter M - Cases []struct { - Row M - Expected bool - } - } - if err := json.Unmarshal(raw, &fixture); err != nil { - t.Fatal(err) - } - for _, c := range fixture.Cases { - if got := quotaSizeCached(c.Row); got != c.Expected { - t.Fatal(c.Row, got, c.Expected) - } - } - raw, err = json.Marshal(responseJSON(quotaFilter("owner", fixture.Now))) - if err != nil { - t.Fatal(err) - } - var actual M - if err := json.Unmarshal(raw, &actual); err != nil { - t.Fatal(err) - } - if !reflect.DeepEqual(actual, fixture.Filter) { - t.Fatal(actual, fixture.Filter) - } -} diff --git a/backend/internal/server/raw.go b/backend/internal/server/raw.go deleted file mode 100644 index 808db24..0000000 --- a/backend/internal/server/raw.go +++ /dev/null @@ -1,80 +0,0 @@ -package server - -import ( - "bufio" - "context" - "io" - "net/http" - "net/url" - "strings" - - "github.com/tdurieux/anonymous_github/backend/internal/anonymize" - "github.com/tdurieux/anonymous_github/backend/internal/security" -) - -type bufferedBody struct { - io.Reader - io.Closer -} - -func (s *Server) inspectBlob(ctx context.Context, body io.ReadCloser, r, row M, token string) (io.ReadCloser, error) { - reader := bufio.NewReader(body) - prefix, _ := reader.Peek(256) - if strings.HasPrefix(string(prefix), "version https://git-lfs.github.com/spec/v1\n") { - body.Close() - return s.rawBlob(ctx, r, row, token) - } - return checkedBody(&bufferedBody{Reader: reader, Closer: body}, number(row["size"])), nil -} -func rawHost(host string) bool { - return host == "github.com" || host == "raw.githubusercontent.com" || host == "media.githubusercontent.com" -} -func (s *Server) rawBlob(ctx context.Context, r, row M, token string) (io.ReadCloser, error) { - source := obj(r["source"]) - name, commit := str(source["repositoryName"]), str(source["commit"]) - original := str(row["name"]) - if folder := str(row["path"]); folder != "" { - original = folder + "/" + original - } - if _, e := security.RelativePath(original); e != nil || !safeRepositoryName(name) || !commitID.MatchString(commit) { - return nil, fail("invalid_source", 400) - } - parts := strings.Split(original, "/") - for i, p := range parts { - parts[i] = url.PathEscape(p) - } - req, _ := http.NewRequestWithContext(ctx, "GET", "https://github.com/"+name+"/raw/"+commit+"/"+strings.Join(parts, "/"), nil) - req.Header.Set("Authorization", "Bearer "+token) - req.Header.Set("User-Agent", "Anonymous-GitHub") - client := *s.HTTP - client.CheckRedirect = func(next *http.Request, via []*http.Request) error { - if len(via) >= 5 || next.URL.Scheme != "https" || next.URL.User != nil || next.URL.Port() != "" || !rawHost(next.URL.Hostname()) { - return fail("invalid_github_redirect", 502) - } - // Never propagate a grant to a CDN, even when GitHub redirects there. - if next.URL.Host != via[0].URL.Host { - next.Header.Del("Authorization") - } - return nil - } - if err := s.checkGitHubQuota(ctx, token); err != nil { - return nil, err - } - response, e := client.Do(req) - if e != nil { - return nil, fail("github_unavailable", 502) - } - if githubLimited(response) { - response.Body.Close() - return nil, s.recordGitHubQuota(ctx, token, response.Header) - } - if response.StatusCode != 200 { - response.Body.Close() - return nil, fail("file_not_available", 502) - } - if response.ContentLength > anonymize.MaxInput { - response.Body.Close() - return nil, fail("file_too_big", 413) - } - return checkedBody(response.Body, response.ContentLength), nil -} diff --git a/backend/internal/server/raw_test.go b/backend/internal/server/raw_test.go deleted file mode 100644 index 3ab2bab..0000000 --- a/backend/internal/server/raw_test.go +++ /dev/null @@ -1,44 +0,0 @@ -package server - -import ( - "context" - "io" - "net/http" - "strings" - "testing" -) - -func TestLFSRedirectAuthorization(t *testing.T) { - source := M{"repositoryName": "owner/repo", "commit": strings.Repeat("a", 40)} - row := M{"name": "file.bin", "size": 123} - for _, target := range []string{"https://media.githubusercontent.com/file", "https://attacker.example/file", "http://media.githubusercontent.com/file"} { - calls := 0 - s := &Server{HTTP: &http.Client{Transport: roundTrip(func(r *http.Request) (*http.Response, error) { - calls++ - if calls == 1 { - if r.Header.Get("Authorization") != "Bearer synthetic" { - t.Fatal("missing initial grant") - } - return &http.Response{StatusCode: 302, Header: http.Header{"Location": []string{target}}, Body: io.NopCloser(strings.NewReader("")), Request: r}, nil - } - if r.Header.Get("Authorization") != "" { - t.Fatal("grant leaked to content host") - } - return &http.Response{StatusCode: 200, ContentLength: 4, Body: io.NopCloser(strings.NewReader("data")), Request: r}, nil - })}} - body, e := s.inspectBlob(context.Background(), io.NopCloser(strings.NewReader("version https://git-lfs.github.com/spec/v1\noid sha256:abc\nsize 4\n")), M{"source": source}, row, "synthetic") - allowed := strings.HasPrefix(target, "https://media.") - if allowed { - if e != nil { - t.Fatal(e) - } - data, e := io.ReadAll(body) - body.Close() - if e != nil || string(data) != "data" { - t.Fatalf("%q %v", data, e) - } - } else if e == nil || calls != 1 { - t.Fatal("unsafe redirect accepted") - } - } -} diff --git a/backend/internal/server/reactivation_contract_test.go b/backend/internal/server/reactivation_contract_test.go deleted file mode 100644 index 1756c75..0000000 --- a/backend/internal/server/reactivation_contract_test.go +++ /dev/null @@ -1,35 +0,0 @@ -package server - -import ( - "encoding/json" - "os" - "testing" -) - -type reactivationCase struct { - Name, Status, Now string - Options M - Expected bool -} - -func reactivationCases(t *testing.T) []reactivationCase { - t.Helper() - raw, err := os.ReadFile("testdata/reactivation.json") - if err != nil { - t.Fatal(err) - } - var cases []reactivationCase - if err := json.Unmarshal(raw, &cases); err != nil { - t.Fatal(err) - } - return cases -} -func TestTypeScriptReactivation(t *testing.T) { - for _, c := range reactivationCases(t) { - t.Run(c.Name, func(t *testing.T) { - if got := shouldReactivateRepository(c.Status, c.Options, date(c.Now)); got != c.Expected { - t.Fatalf("got %v; want %v", got, c.Expected) - } - }) - } -} diff --git a/backend/internal/server/refresh.go b/backend/internal/server/refresh.go deleted file mode 100644 index ae38c57..0000000 --- a/backend/internal/server/refresh.go +++ /dev/null @@ -1,333 +0,0 @@ -package server - -import ( - "context" - "errors" - "github.com/tdurieux/anonymous_github/backend/internal/provider" - "github.com/tdurieux/anonymous_github/backend/internal/security" - "time" -) - -// A durable compare-and-swap claim prevents simultaneous viewers from starting -// competing refreshes. Failure leaves the saved tree intact. -func (s *Server) autoRefresh(ctx context.Context, r M) error { - return s.updateRepository(ctx, r, false, "") -} -func refreshRevisionFilter(r M, token string) M { - f := revisionFilter(r) - if token != "" { - f["refreshToken"] = token - f["refreshUntil"] = M{"$gt": time.Now()} - } - return f -} -func (s *Server) updateRepository(ctx context.Context, r M, force bool, token string) error { - source := obj(r["source"]) - lastView, hasLastView := storedDate(r["lastView"]) - if str(source["type"]) == "Zip" || (!force && (!hasLastView || !boolean(obj(r["options"])["update"]) || lastView.After(time.Now().Add(-24*time.Hour)))) { - return nil - } - if !force && (date(r["refreshUntil"]).After(time.Now()) || date(r["goRefreshCheckedAt"]).After(time.Now().Add(-30*time.Second))) { - return nil - } - filter := refreshRevisionFilter(r, token) - if token == "" { - filter["$or"] = []M{{"refreshUntil": M{"$exists": false}}, {"refreshUntil": M{"$lte": time.Now()}}} - } - filter["goRefreshCheckedAt"] = r["goRefreshCheckedAt"] - now := time.Now() - claimed, e := s.Store.update(ctx, collection("repo"), filter, M{"$set": M{"goRefreshCheckedAt": now}}) - if e != nil { - return e - } - if !claimed { - if force { - return fail("repository_changed", 409) - } - return nil - } - defer func() { - cleanup, cancel := context.WithTimeout(context.WithoutCancel(ctx), 5*time.Second) - defer cancel() - s.Store.update(cleanup, collection("repo"), M{"_id": r["_id"], "goRefreshCheckedAt": now}, M{"$unset": M{"goRefreshCheckedAt": ""}}) - }() - p, a, e := s.repositoryProvider(r) - if e != nil { - return e - } - a, e = s.resolveSourceIdentity(ctx, r, a) - if e != nil { - return e - } - if e = p.Authorize(ctx, a); e != nil { - return e - } - metadata, e := p.Repository(ctx, a) - if e != nil { - return e - } - if e = validateRepositoryIdentity(a, metadata); e != nil { - return e - } - a.Ref.Name = metadata.Name - resolved, e := p.Branch(ctx, a, a.Ref.Branch) - if errors.Is(e, provider.ErrBranchNotFound) { - return s.missingBranch(ctx, r, token) - } - if e != nil { - return providerFailure(e) - } - commit := resolved.ID - if commit == str(source["commit"]) && str(r["status"]) == "ready" { - saved, err := s.Store.update(ctx, collection("repo"), refreshRevisionFilter(r, token), M{"$set": M{"source.repositoryName": metadata.Name, "source.providerRepositoryId": metadata.ID}}) - if err != nil { - return err - } - if !saved { - return fail("repository_changed", 409) - } - source["repositoryName"] = metadata.Name - source["providerRepositoryId"] = metadata.ID - return nil - } - filter = refreshRevisionFilter(r, token) - filter["goRefreshCheckedAt"] = now - generation, e := security.RandomToken() - if e != nil { - return e - } - oldGeneration, oldPrefix := str(r["treeGeneration"]), contentPrefix(r) - changed, e := s.Store.update(ctx, collection("repo"), filter, M{"$set": M{"source.commit": commit, "source.commitDate": resolved.Date, "source.repositoryName": metadata.Name, "source.providerRepositoryId": metadata.ID, "anonymizeDate": now, "status": "preparing", "statusDate": now, "treeGeneration": generation, "size": M{"storage": 0, "file": 0}, "isReseted": true}, "$unset": M{"statusMessage": "", "pathIndexKey": "", "pathIndexBuiltAt": "", "sizeComputedAt": "", "emptyTreeGeneration": ""}, "$addToSet": M{"retiredTreeGenerations": oldGeneration, "retiredContentPrefixes": oldPrefix}}) - if e != nil { - return e - } - if !changed { - return fail("repository_changed", 409) - } - source["commit"] = commit - source["commitDate"] = resolved.Date - source["repositoryName"] = metadata.Name - source["providerRepositoryId"] = metadata.ID - r["anonymizeDate"] = now - r["status"] = "preparing" - r["statusDate"] = now - delete(r, "statusMessage") - r["treeGeneration"] = generation - r["size"] = M{"storage": 0, "file": 0} - r["isReseted"] = true - current, e := s.Store.one(ctx, collection("repo"), M{"_id": r["_id"]}) - if e != nil { - return e - } - if current == nil { - return fail("repository_changed", 409) - } - if e = s.cleanupRepositoryTrees(ctx, current); e != nil { - return e - } - if e = s.cleanupContent(ctx, current); e != nil { - return e - } - current, e = s.Store.one(ctx, collection("repo"), refreshRevisionFilter(r, token)) - if e != nil { - return e - } - if current == nil { - return fail("repository_changed", 409) - } - if e = s.enqueue(ctx, "repo", str(r["repoId"]), "prepare"); e != nil { - return e - } - return nil -} - -// Embedded documents refresh synchronously on public options, as in the TS -// routes. Claim and publication compare revisions so a concurrent edit/removal -// cannot be overwritten by an upstream request that finishes later. -func (s *Server) refreshEmbedded(ctx context.Context, kind string, r M) error { - now := time.Now() - claimed, e := s.Store.update(ctx, collection(kind), revisionFilter(r), M{"$set": M{"status": "download", "statusDate": now}}) - if e != nil { - return e - } - if !claimed { - return fail("repository_changed", 409) - } - r["status"] = "download" - r["statusDate"] = now - if e = s.prepareEmbedded(ctx, kind, r); e != nil { - code := "preparation_failed" - var api *APIError - if errors.As(providerFailure(e), &api) { - code = api.Code - } - _, saveErr := s.Store.update(ctx, collection(kind), revisionFilter(r), M{"$set": M{"status": "error", "statusDate": time.Now(), "statusMessage": code}}) - if saveErr != nil { - return saveErr - } - return e - } - current, e := s.Store.one(ctx, collection(kind), M{"_id": r["_id"]}) - if e != nil { - return e - } - if current == nil { - return fail(missing(kind), 404) - } - for k := range r { - delete(r, k) - } - for k, v := range current { - r[k] = v - } - return nil -} -func (s *Server) embeddedOptionsCheck(ctx context.Context, kind string, r M) error { - prefix := "gist" - notReady := 425 - if kind == "pr" { - prefix = "pull_request" - notReady = 404 - } - status := str(r["status"]) - switch status { - case "expired", "expiring", "removing", "removed": - return fail(prefix+"_expired", 410) - } - if status != "ready" { - if d, valid := storedDate(r["statusDate"]); valid && d.Before(time.Now().Add(-5*time.Minute)) { - if e := s.refreshEmbedded(ctx, kind, r); e != nil { - return e - } - } - if str(r["status"]) == "error" { - code := str(r["statusMessage"]) - if code == "" { - code = prefix + "_not_available" - } - return fail(code, 500) - } - // TS returns not-ready for this request even when forced recovery completed. - return fail(prefix+"_not_ready", notReady) - } - if d, valid := storedDate(r["anonymizeDate"]); boolean(obj(r["options"])["update"]) && valid && d.Before(time.Now().Add(-24*time.Hour)) { - return s.refreshEmbedded(ctx, kind, r) - } - return nil -} - -func (s *Server) repositoryOptionsCheck(ctx context.Context, r M) error { - status := str(r["status"]) - switch status { - case "ready": - if e := s.checkResource(ctx, "repo", r); e != nil { - return e - } - return s.autoRefresh(ctx, r) - case "queue", "archived", "expired", "expiring", "removed", "removing": - return s.checkResource(ctx, "repo", r) - } - if d, valid := storedDate(r["statusDate"]); valid && d.Before(time.Now().Add(-5*time.Minute)) { - now := time.Now() - changed, e := s.Store.update(ctx, collection("repo"), revisionFilter(r), M{"$set": M{"status": "preparing", "statusDate": now}, "$unset": M{"statusMessage": ""}}) - if e != nil { - return e - } - if !changed { - return fail("repository_changed", 409) - } - r["status"] = "preparing" - r["statusDate"] = now - delete(r, "statusMessage") - if e = s.enqueue(ctx, "repo", str(r["repoId"]), "prepare"); e != nil { - return e - } - } - return s.checkResource(ctx, "repo", r) -} - -// Detach the failed tree before retiring its rows. Cleanup cannot delete a tree -// published by a concurrent edit because the state transition uses a revision CAS. -func (s *Server) missingBranch(ctx context.Context, r M, token string) error { - generation, e := security.RandomToken() - if e != nil { - return e - } - now := time.Now() - changed, e := s.Store.update(ctx, collection("repo"), refreshRevisionFilter(r, token), M{"$set": M{"treeGeneration": generation, "status": "error", "statusDate": now, "statusMessage": "branch_not_found", "size": M{"storage": 0, "file": 0}, "isReseted": true}, "$unset": M{"pathIndexKey": "", "pathIndexBuiltAt": "", "sizeComputedAt": "", "emptyTreeGeneration": ""}, "$addToSet": M{"retiredTreeGenerations": str(r["treeGeneration"]), "retiredContentPrefixes": contentPrefix(r)}}) - if e != nil { - return e - } - if !changed { - return fail("repository_changed", 409) - } - if e = s.cleanupRepositoryTrees(ctx, r); e != nil { - return e - } - current, e := s.Store.one(ctx, collection("repo"), M{"_id": r["_id"]}) - if e != nil { - return e - } - if current != nil { - if e = s.cleanupContent(ctx, current); e != nil { - return e - } - } - return fail("branch_not_found", 404) -} - -func (s *Server) manualRepositoryRefresh(ctx context.Context, r M) (result error) { - status := str(r["status"]) - switch status { - case "archived": - return fail("repository_archived", 410) - case "preparing", "queue", "removing", "expiring": - return fail("invalid_status", 409) - case "download": - if date(r["statusDate"]).After(time.Now().Add(-5 * time.Minute)) { - return fail("invalid_status", 409) - } - } - now := time.Now() - token, e := security.RandomToken() - if e != nil { - return e - } - filter := revisionFilter(r) - filter["$and"] = []M{{"$or": []M{{"refreshUntil": M{"$exists": false}}, {"refreshUntil": M{"$lte": now}}}}, {"$or": []M{{"goRefreshCheckedAt": M{"$exists": false}}, {"goRefreshCheckedAt": M{"$lte": now.Add(-30 * time.Second)}}}}} - claimed, e := s.Store.update(ctx, collection("repo"), filter, M{"$set": M{"refreshToken": token, "refreshUntil": now.Add(5 * time.Minute)}}) - if e != nil { - return e - } - if !claimed { - return fail("invalid_status", 409) - } - defer func() { - cleanup, cancel := context.WithTimeout(context.WithoutCancel(ctx), 5*time.Second) - defer cancel() - if result != nil && str(r["status"]) == "preparing" { - failed := revisionFilter(r) - failed["refreshToken"] = token - s.Store.update(cleanup, collection("repo"), failed, M{"$set": M{"status": "error", "statusDate": time.Now(), "statusMessage": "preparation_interrupted"}}) - } - s.Store.update(cleanup, collection("repo"), M{"_id": r["_id"], "refreshToken": token}, M{"$unset": M{"refreshToken": "", "refreshUntil": ""}}) - }() - key := "repo:" + str(r["repoId"]) + ":prepare" - job, e := s.Store.one(ctx, "gojobs", M{"_id": key}) - if e != nil { - return e - } - if job != nil { - if str(job["state"]) != "completed" && str(job["state"]) != "failed" { - return fail("invalid_status", 409) - } - deleted, e := s.Store.DB.Collection("gojobs").DeleteOne(ctx, M{"_id": key, "state": job["state"], "finishedAt": job["finishedAt"]}) - if e != nil { - return e - } - if deleted.DeletedCount == 0 { - return fail("invalid_status", 409) - } - } - return s.updateRepository(ctx, r, true, token) -} diff --git a/backend/internal/server/registry_capabilities_test.go b/backend/internal/server/registry_capabilities_test.go deleted file mode 100644 index 34920f1..0000000 --- a/backend/internal/server/registry_capabilities_test.go +++ /dev/null @@ -1,32 +0,0 @@ -package server - -import ( - "testing" - - "github.com/tdurieux/anonymous_github/backend/internal/provider" -) - -type mutableProviderID struct{ id string } - -func (p *mutableProviderID) ID() string { return p.id } - -func TestCapabilitiesUseRegisteredIdentity(t *testing.T) { - extension := &mutableProviderID{id: "other-forge"} - registry, err := provider.New(extension) - if err != nil { - t.Fatal(err) - } - extension.id = "github" - s := &Server{providers: registry} - result, err := s.providerCapabilities(nil) - if err != nil { - t.Fatal(err) - } - rows := result.([]M) - if len(rows) != 1 || rows[0]["id"] != "other-forge" || rows[0]["repositories"] != false || rows[0]["discovery"] != false || rows[0]["documents"] != false { - t.Fatal("capabilities advertised mutable adapter identity", rows) - } - if _, err := registry.Get("github"); err != provider.ErrUnknown { - t.Fatal("extension appeared under unregistered identity", err) - } -} diff --git a/backend/internal/server/removal_integration_test.go b/backend/internal/server/removal_integration_test.go deleted file mode 100644 index d4d6fba..0000000 --- a/backend/internal/server/removal_integration_test.go +++ /dev/null @@ -1,185 +0,0 @@ -package server - -import ( - "context" - "encoding/json" - "errors" - "io/fs" - "net/http/httptest" - "strings" - "testing" - - "go.mongodb.org/mongo-driver/v2/bson" -) - -func runRepositoryRemovalIntegration(t *testing.T, s *Server, token, otherToken string) { - ctx := context.Background() - source, err := s.Store.one(ctx, collection("repo"), M{"repoId": "second-provider"}) - if err != nil { - t.Fatal(err) - } - insert := func(id, status string) M { - t.Helper() - r := selectFields(source, "owner", "source", "providerAccess", "options") - r["_id"], r["repoId"], r["status"] = bson.NewObjectID(), id, status - if _, err := s.Store.DB.Collection(collection("repo")).InsertOne(ctx, r); err != nil { - t.Fatal(err) - } - return r - } - call := func(id, credential string) *httptest.ResponseRecorder { - request := httptest.NewRequest("DELETE", "/api/repo/"+id, nil) - request.RemoteAddr = "198.51.100.4:1234" - request.Header.Set("Authorization", "Bearer "+credential) - response := httptest.NewRecorder() - s.ServeHTTP(response, request) - return response - } - t.Run("stale removal snapshot preserves restored content", func(t *testing.T) { - id := "removal-restored-snapshot" - r := insert(id, "removing") - oldPath := contentPrefix(r) + "/file" - if err := s.content.Put(ctx, id, oldPath, strings.NewReader("old"), 3, 3); err != nil { - t.Fatal(err) - } - for _, name := range []string{"files", "anonymizedpaths"} { - if _, err := s.Store.DB.Collection(name).InsertOne(ctx, M{"repoId": id, "name": "old"}); err != nil { - t.Fatal(err) - } - } - snapshot, err := s.snapshotRemoval(ctx, r) - if err != nil || snapshot == nil { - t.Fatal(snapshot, err) - } - // Another worker completes removal before this worker resumes deletion. - if err := s.runJob(ctx, M{"kind": "repo", "resourceId": id, "action": "remove"}); err != nil { - t.Fatal(err) - } - if _, err := s.Store.update(ctx, collection("repo"), M{"_id": r["_id"]}, M{"$set": M{"status": "ready", "treeGeneration": "restored-generation"}}); err != nil { - t.Fatal(err) - } - restored := M{"treeGeneration": "restored-generation"} - newPath := contentPrefix(restored) + "/file" - if err := s.content.Put(ctx, id, newPath, strings.NewReader("new"), 3, 3); err != nil { - t.Fatal(err) - } - for _, name := range []string{"files", "anonymizedpaths"} { - if _, err := s.Store.DB.Collection(name).InsertOne(ctx, M{"repoId": id, "name": "new"}); err != nil { - t.Fatal(err) - } - } - for i := 0; i < 2; i++ { - if err := s.deleteRemovalSnapshot(ctx, id, snapshot); err != nil { - t.Fatal(err) - } - } - if size, err := s.content.Size(ctx, id, newPath); err != nil || size != 3 { - t.Fatal("restored content removed", size, err) - } - for _, name := range []string{"files", "anonymizedpaths"} { - if n, err := s.Store.DB.Collection(name).CountDocuments(ctx, M{"repoId": id}); err != nil || n != 1 { - t.Fatal(name, n, err) - } - } - if snapshot, err := s.snapshotRemoval(ctx, r); err != nil || snapshot != nil { - t.Fatal("stale revision accepted", snapshot, err) - } - }) - t.Run("repository removal state matrix", func(t *testing.T) { - for _, status := range []string{"ready", "preparing", "queue", "download", "error", "expired", "expiring", "removing", "removed", "archived"} { - id := "removal-state-" + status - insert(id, status) - w := call(id, token) - var body M - if err := json.Unmarshal(w.Body.Bytes(), &body); err != nil { - t.Fatal(err) - } - if status == "removed" || status == "archived" { - code := "is_removed" - if status == "archived" { - code = "repository_archived" - } - if w.Code != 410 || body["error"] != code { - t.Fatalf("%s: %d %s", status, w.Code, w.Body) - } - continue - } - if w.Code != 200 || body["status"] != "removing" { - t.Fatalf("%s: %d %s", status, w.Code, w.Body) - } - if err := s.content.Put(ctx, id, "raw", strings.NewReader("raw"), 3, 3); err != nil { - t.Fatal(err) - } - if _, err := s.Store.DB.Collection("files").InsertOne(ctx, M{"repoId": id, "path": "", "name": "raw", "size": 3}); err != nil { - t.Fatal(err) - } - if _, err := s.Store.DB.Collection("anonymizedpaths").InsertOne(ctx, M{"repoId": id, "path": "raw"}); err != nil { - t.Fatal(err) - } - job, err := s.Store.one(ctx, "gojobs", M{"_id": "repo:" + id + ":remove"}) - if err != nil || job == nil || job["state"] != "waiting" { - t.Fatal(job, err) - } - if err := s.runJob(ctx, job); err != nil { - t.Fatal(err) - } - current, err := s.Store.one(ctx, collection("repo"), M{"repoId": id}) - if err != nil || current["status"] != "removed" || !boolean(current["isReseted"]) { - t.Fatal(current, err) - } - for _, coll := range []string{"files", "anonymizedpaths"} { - count, err := s.Store.DB.Collection(coll).CountDocuments(ctx, M{"repoId": id}) - if err != nil || count != 0 { - t.Fatal(coll, count, err) - } - } - rows, err := s.content.List(ctx, id) - if (err != nil && !errors.Is(err, fs.ErrNotExist)) || len(rows) != 0 { - t.Fatal(rows, err) - } - if w := call(id, token); w.Code != 410 { - t.Fatal("repeated deletion", w.Code, w.Body) - } - } - }) - t.Run("removal requires ownership", func(t *testing.T) { - insert("removal-not-owner", "ready") - if w := call("removal-not-owner", otherToken); w.Code != 403 { - t.Fatal(w.Code, w.Body) - } - }) - t.Run("removal survives enqueue failure", func(t *testing.T) { - id := "removal-queue-failure" - insert(id, "ready") - command := func(validator M) error { - return s.Store.DB.RunCommand(ctx, bson.D{{Key: "collMod", Value: "gojobs"}, {Key: "validator", Value: validator}, {Key: "validationLevel", Value: "strict"}, {Key: "validationAction", Value: "error"}}).Err() - } - if err := command(M{"_id": M{"$ne": "repo:" + id + ":remove"}}); err != nil { - t.Fatal(err) - } - defer command(M{}) - if w := call(id, token); w.Code != 500 { - t.Fatal(w.Code, w.Body) - } - current, err := s.Store.one(ctx, collection("repo"), M{"repoId": id}) - if err != nil || current["status"] != "removing" { - t.Fatal("removal intent lost", current, err) - } - if err := s.checkResource(ctx, "repo", current); err == nil { - t.Fatal("removing content remained public") - } - if err := command(M{}); err != nil { - t.Fatal(err) - } - if w := call(id, token); w.Code != 200 { - t.Fatal("retry failed", w.Code, w.Body) - } - if err := s.runJob(ctx, M{"kind": "repo", "resourceId": id, "action": "remove"}); err != nil { - t.Fatal(err) - } - current, err = s.Store.one(ctx, collection("repo"), M{"repoId": id}) - if err != nil || current["status"] != "removed" { - t.Fatal(current, err) - } - }) -} diff --git a/backend/internal/server/removal_snapshot.go b/backend/internal/server/removal_snapshot.go deleted file mode 100644 index f8cf34c..0000000 --- a/backend/internal/server/removal_snapshot.go +++ /dev/null @@ -1,77 +0,0 @@ -package server - -import ( - "context" - "errors" - - "go.mongodb.org/mongo-driver/v2/mongo/options" -) - -// Removal takes a snapshot before checking the resource revision. A duplicate -// worker may finish after restoration, so deletion must never rescan a prefix -// or delete every row belonging to the repository. -type removalSnapshot struct { - content []string - rows map[string][]any -} - -func (s *Server) snapshotRemoval(ctx context.Context, r M) (*removalSnapshot, error) { - id := str(r["repoId"]) - entries, err := s.content.List(ctx, id) - if err != nil { - return nil, err - } - snapshot := &removalSnapshot{rows: map[string][]any{}} - for _, entry := range entries { - snapshot.content = append(snapshot.content, entry.Path) - } - for _, name := range []string{"files", "anonymizedpaths"} { - cursor, err := s.Store.DB.Collection(name).Find(ctx, M{"repoId": id}, options.Find().SetProjection(M{"_id": 1})) - if err != nil { - return nil, err - } - for cursor.Next(ctx) { - var row M - if err = cursor.Decode(&row); err != nil { - break - } - if len(snapshot.rows[name]) >= 1000000 { - err = errors.New("removal_snapshot_too_large") - break - } - snapshot.rows[name] = append(snapshot.rows[name], row["_id"]) - } - if err == nil { - err = cursor.Err() - } - cursor.Close(ctx) - if err != nil { - return nil, err - } - } - // Reading after the snapshots also rejects snapshots that overlap a restore. - current, err := s.Store.one(ctx, collection("repo"), revisionFilter(r)) - if err != nil || current == nil { - return nil, err - } - return snapshot, nil -} - -func (s *Server) deleteRemovalSnapshot(ctx context.Context, id string, snapshot *removalSnapshot) error { - // Go publishes remote content under immutable generation paths. Archive - // originals are read-only. New content cannot reuse a captured object name. - if err := s.content.RemoveFiles(ctx, id, snapshot.content); err != nil { - return err - } - for _, name := range []string{"files", "anonymizedpaths"} { - ids := snapshot.rows[name] - for len(ids) > 0 { - n := min(len(ids), 1000) - if _, err := s.Store.DB.Collection(name).DeleteMany(ctx, M{"repoId": id, "_id": M{"$in": ids[:n]}}); err != nil { - return err - } - ids = ids[n:] - } - } - return nil -} diff --git a/backend/internal/server/repository_recovery_integration_test.go b/backend/internal/server/repository_recovery_integration_test.go deleted file mode 100644 index 8e208fa..0000000 --- a/backend/internal/server/repository_recovery_integration_test.go +++ /dev/null @@ -1,214 +0,0 @@ -package server - -import ( - "context" - "errors" - "go.mongodb.org/mongo-driver/v2/bson" - "net/http/httptest" - "testing" - "time" -) - -func runRepositoryRecoveryIntegration(t *testing.T, s *Server, call func(string, string, string, any) *httptest.ResponseRecorder, token string, source M) { - t.Helper() - ctx := context.Background() - for _, status := range []string{"error", "preparing", "download", "queue", "removed", "removing", "expired", "expiring", "archived"} { - for _, stale := range []bool{false, true} { - t.Run("repository recovery/"+status+"/"+map[bool]string{true: "stale", false: "fresh"}[stale], func(t *testing.T) { - r := M{} - for k, v := range source { - r[k] = v - } - r["_id"] = bson.NewObjectID() - id := "recovery-" + str(r["_id"]) - r["repoId"] = id - r["status"] = status - stamp := time.Now() - if stale { - stamp = stamp.Add(-10 * time.Minute) - } - r["statusDate"] = stamp - r["statusMessage"] = "old_failure" - if _, e := s.Store.DB.Collection(collection("repo")).InsertOne(ctx, r); e != nil { - t.Fatal(e) - } - // Authenticated owners may inspect options without triggering recovery. - w := call("GET", "/api/repo/"+id+"/options", token, nil) - wantOwner := 200 - if status == "archived" { - wantOwner = 410 - } - if w.Code != wantOwner { - t.Fatal("owner options", w.Code, w.Body) - } - w = call("GET", "/api/repo/"+id+"/options", "", nil) - expected := 425 - switch status { - case "removed", "removing", "expired", "expiring", "archived": - expected = 410 - case "error": - if !stale { - expected = 500 - } - } - if w.Code != expected { - t.Fatal(w.Code, w.Body) - } - current, e := s.Store.one(ctx, collection("repo"), M{"_id": r["_id"]}) - if e != nil { - t.Fatal(e) - } - job, e := s.Store.one(ctx, "gojobs", M{"_id": "repo:" + id + ":prepare"}) - if e != nil { - t.Fatal(e) - } - recover := stale && (status == "error" || status == "preparing" || status == "download") - if recover { - if str(current["status"]) != "preparing" || current["statusMessage"] != nil || job == nil || str(job["state"]) != "waiting" { - t.Fatal("recovery not scheduled", current, job) - } - // A duplicate view must not reset queue attempts or enqueue another job. - s.Store.update(ctx, "gojobs", M{"_id": job["_id"]}, M{"$set": M{"attempts": 2}}) - w = call("GET", "/api/repo/"+id+"/options", "", nil) - if w.Code != 425 { - t.Fatal(w.Code, w.Body) - } - job, e = s.Store.one(ctx, "gojobs", M{"_id": job["_id"]}) - if e != nil || number(job["attempts"]) != 2 { - t.Fatal("duplicate recovery reset job", job, e) - } - } else if str(current["status"]) != status || job != nil { - t.Fatal("protected state changed", current, job) - } - }) - } - } - t.Run("repository recovery date presence", func(t *testing.T) { - for _, tc := range []struct { - name string - stamp any - recover bool - }{ - {"zero", time.Time{}, true}, {"epoch", time.UnixMilli(0), true}, {"missing", nil, false}, {"invalid", "invalid", false}, - } { - t.Run(tc.name, func(t *testing.T) { - r := M{} - for k, v := range source { - r[k] = v - } - r["_id"] = bson.NewObjectID() - r["repoId"] = "date-recovery-" + str(r["_id"]) - r["status"] = "error" - r["statusDate"] = tc.stamp - if _, err := s.Store.DB.Collection(collection("repo")).InsertOne(ctx, r); err != nil { - t.Fatal(err) - } - defer s.Store.DB.Collection(collection("repo")).DeleteOne(ctx, M{"_id": r["_id"]}) - defer s.Store.DB.Collection("gojobs").DeleteMany(ctx, M{"resourceId": r["repoId"]}) - err := s.repositoryOptionsCheck(ctx, r) - var api *APIError - want := 500 - if tc.recover { - want = 425 - } - if !errors.As(err, &api) || api.Status != want { - t.Fatal("recovery response", err) - } - job, err := s.Store.one(ctx, "gojobs", M{"resourceId": r["repoId"]}) - if err != nil || (job != nil) != tc.recover { - t.Fatal("recovery scheduling", job, err) - } - }) - } - }) - t.Run("stale snapshot cannot recover a removed repository", func(t *testing.T) { - r := M{} - for k, v := range source { - r[k] = v - } - r["_id"] = bson.NewObjectID() - r["repoId"] = "stale-recovery-cas" - r["status"] = "error" - r["statusDate"] = time.Now().Add(-10 * time.Minute) - if _, e := s.Store.DB.Collection(collection("repo")).InsertOne(ctx, r); e != nil { - t.Fatal(e) - } - if _, e := s.Store.update(ctx, collection("repo"), M{"_id": r["_id"]}, M{"$set": M{"status": "removing", "statusDate": time.Now()}}); e != nil { - t.Fatal(e) - } - e := s.repositoryOptionsCheck(ctx, r) - var api *APIError - if !errors.As(e, &api) || api.Status != 409 { - t.Fatal("stale recovery accepted", e) - } - }) -} - -func runRepositoryRefreshIntegration(t *testing.T, s *Server, p *fixtureProvider, call func(string, string, string, any) *httptest.ResponseRecorder, source M) { - t.Run("repository refresh trigger and retries", func(t *testing.T) { - ctx := context.Background() - r := M{} - for k, v := range source { - r[k] = v - } - r["_id"] = bson.NewObjectID() - r["repoId"] = "refresh-trigger" - r["status"] = "ready" - r["lastView"] = time.Now().Add(-48 * time.Hour) - r["options"] = M{"expirationMode": "never", "update": true, "terms": []string{}} - if _, e := s.Store.DB.Collection(collection("repo")).InsertOne(ctx, r); e != nil { - t.Fatal(e) - } - calls := 0 - oldCommit := p.commit - p.onRepository = func() { calls++ } - defer func() { p.onRepository = nil; p.commit = oldCommit; p.revoked = false }() - load := func() M { - t.Helper() - v, e := s.Store.one(ctx, collection("repo"), M{"_id": r["_id"]}) - if e != nil { - t.Fatal(e) - } - return v - } - w := call("GET", "/api/repo/refresh-trigger/files", "", nil) - if w.Code != 200 || calls != 0 { - t.Fatal("file read triggered refresh", w.Code, calls, w.Body) - } - url := "/api/repo/refresh-trigger/options" - for expected := 1; expected <= 2; expected++ { - w = call("GET", url, "", nil) - if w.Code != 200 || calls != expected || load()["goRefreshCheckedAt"] != nil { - t.Fatal("up-to-date check throttled", w.Code, calls, w.Body) - } - } - p.revoked = true - w = call("GET", url, "", nil) - if w.Code != 403 || load()["goRefreshCheckedAt"] != nil { - t.Fatal("failed refresh retained claim", w.Code, w.Body) - } - p.revoked = false - w = call("GET", url, "", nil) - if w.Code != 200 || calls != 3 { - t.Fatal("failed refresh suppressed retry", w.Code, calls, w.Body) - } - p.commit = "revision:updated" - w = call("GET", url, "", nil) - saved := load() - if w.Code != 200 || str(saved["status"]) != "preparing" || str(obj(saved["source"])["commit"]) != p.commit || date(saved["anonymizeDate"]).Before(time.Now().Add(-time.Minute)) { - t.Fatal("changed commit response", w.Code, w.Body, saved) - } - if _, e := s.Store.update(ctx, collection("repo"), M{"_id": r["_id"]}, M{"$set": M{"status": "ready"}}); e != nil { - t.Fatal(e) - } - p.onRepository = func() { - if _, e := s.Store.update(ctx, collection("repo"), M{"_id": r["_id"]}, M{"$set": M{"status": "removing", "statusDate": time.Now()}}); e != nil { - t.Fatal(e) - } - } - w = call("GET", url, "", nil) - if w.Code != 409 || str(load()["status"]) != "removing" { - t.Fatal("refresh overwrote removal", w.Code, w.Body) - } - }) -} diff --git a/backend/internal/server/request_metrics.go b/backend/internal/server/request_metrics.go deleted file mode 100644 index 8df7680..0000000 --- a/backend/internal/server/request_metrics.go +++ /dev/null @@ -1,353 +0,0 @@ -package server - -import ( - "context" - "encoding/json" - "math" - "net/http" - "os" - "sort" - "strconv" - "strings" - "sync" - "sync/atomic" - "time" - - "github.com/redis/go-redis/v9" -) - -var requestLatencyBuckets = []float64{10, 50, 100, 250, 500, 1000, 2500, 5000, 10000, 30000, 60000} - -type requestMetricKey struct { - minute int64 - metric, route, method string -} -type requestSample struct { - count, sumMs, bytes, aborted, errors, slow int64 - buckets [12]int64 -} -type requestMetrics struct { - mu sync.Mutex - flushMu sync.Mutex - pending map[requestMetricKey]requestSample - dropped atomic.Int64 - droppedBatches atomic.Int64 - active atomic.Int64 - stop, done chan struct{} - instance string - sampledAt, cpuAt, lastFlush time.Time - cpuSeconds float64 -} - -func (s *Server) startRequestMetrics() { - if s.Store == nil || s.Store.Redis == nil { - return - } - m := &requestMetrics{pending: map[requestMetricKey]requestSample{}, stop: make(chan struct{}), done: make(chan struct{})} - host, _ := os.Hostname() - m.instance = "api:" + host + ":" + strconv.Itoa(os.Getpid()) - if seconds, ok := processCPUSeconds(); ok { - m.cpuAt, m.cpuSeconds = time.Now(), seconds - } - s.requestMetrics = m - go func() { - defer close(m.done) - ticker := time.NewTicker(15 * time.Second) - defer ticker.Stop() - for { - select { - case <-m.stop: - return - case <-ticker.C: - ctx, cancel := context.WithTimeout(context.Background(), 3*time.Second) - s.flushRequestMetrics(ctx) - cancel() - } - } - }() -} - -func (m *requestMetrics) observe(key requestMetricKey, elapsed time.Duration, bytes int64, aborted, failed, slow bool) { - ms := math.Max(0, float64(elapsed)/float64(time.Millisecond)) - m.mu.Lock() - defer m.mu.Unlock() - v, exists := m.pending[key] - if !exists && len(m.pending) >= 512 { - m.dropped.Add(1) - return - } - v.count++ - v.sumMs += int64(math.Round(ms)) - v.bytes += bytes - if aborted { - v.aborted++ - } - if failed { - v.errors++ - } - if slow { - v.slow++ - } - i := sort.SearchFloat64s(requestLatencyBuckets, ms) - v.buckets[i]++ - m.pending[key] = v -} - -// Labels are registered route templates or fixed fallbacks, never caller paths. -func (s *Server) performanceRoute(r *http.Request) string { - for _, route := range s.routes { - if route.pattern.MatchString(r.URL.Path) { - return route.template - } - } - path := r.URL.Path - for _, prefix := range []string{"/script/", "/css/", "/fonts/", "/partials/", "/favicon/"} { - if strings.HasPrefix(path, prefix) { - return "/assets/:path" - } - } - if path == "/healthcheck" || path == "/api/healthcheck" || path == "/github/app/webhook" { - return path - } - return "other" -} - -func (s *Server) monitorRequest(state *responseState, r *http.Request) func() { - m := s.requestMetrics - started := time.Now() - route := s.performanceRoute(r) - method := r.Method - switch method { - case "GET", "HEAD", "POST", "PUT", "PATCH", "DELETE", "OPTIONS": - default: - method = "OTHER" - } - if m != nil { - m.active.Add(1) - } - return func() { - if m != nil { - m.active.Add(-1) - } - elapsed := time.Since(started) - threshold := time.Second - if strings.Contains(route, "/file/") || strings.HasSuffix(route, "/zip") || strings.HasPrefix(route, "/w/") { - threshold = 10 * time.Second - } - bytes := state.bytes - if method == "HEAD" { - bytes = 0 - } - aborted := r.Context().Err() != nil || state.writeFailed - detail := traceFrom(r.Context()).log(r, state, route, method, started, elapsed, bytes, aborted, elapsed > threshold) - if detail != nil { - message := "slow request" - if aborted { - message = "request interrupted" - } - s.enqueueError("warn", "requests", message, "_", int(number(detail["status"])), detail) - } - if m == nil { - return - } - key := requestMetricKey{time.Now().UnixMilli() / 60000 * 60000, "request", route, method} - m.observe(key, elapsed, bytes, r.Context().Err() != nil || state.writeFailed, state.status >= 500, elapsed > threshold) - if !state.firstWrite.IsZero() { - key.metric = "first_byte" - m.observe(key, state.firstWrite.Sub(started), 0, false, false, false) - } - } -} - -func (s *Server) flushRequestMetrics(ctx context.Context) error { - // Error persistence shares the existing bounded periodic flush lifecycle. - if err := s.flushErrorLog(ctx); err != nil { - return err - } - m := s.requestMetrics - if m == nil { - return nil - } - m.flushMu.Lock() - defer m.flushMu.Unlock() - m.mu.Lock() - entries := m.pending - m.pending = map[requestMetricKey]requestSample{} - m.mu.Unlock() - now := time.Now() - sample := s.processSample(now) - if len(entries) == 0 && sample == nil { - return nil - } - pipe := s.Store.Redis.TxPipeline() - if sample != nil { - writeProcessSample(ctx, pipe, sample) - } - for k, v := range entries { - key := "performance:v1:minute:api:" + strconv.FormatInt(k.minute, 10) - label, _ := json.Marshal([]string{k.metric, k.route, k.method}) - for field, n := range map[string]int64{"count": v.count, "sumMs": v.sumMs, "bytes": v.bytes, "aborted": v.aborted, "errors": v.errors, "slow": v.slow} { - pipe.HIncrBy(ctx, key, string(label)+"|"+field, n) - } - for i, n := range v.buckets { - if n > 0 { - pipe.HIncrBy(ctx, key, string(label)+"|b"+strconv.Itoa(i), n) - } - } - pipe.Expire(ctx, key, 2*time.Hour) - } - _, err := pipe.Exec(ctx) - // Do not replay an uncertain write: that would duplicate counts. - if err != nil { - m.droppedBatches.Add(1) - } else { - m.lastFlush = now - } - return err -} - -func latencyUpper(buckets [12]int64, quantile float64) any { - var total, cumulative int64 - for _, n := range buckets { - total += n - } - if total == 0 { - return nil - } - for i, n := range buckets { - cumulative += n - if float64(cumulative) >= math.Ceil(float64(total)*quantile) { - if i == len(requestLatencyBuckets) { - return nil - } - return requestLatencyBuckets[i] - } - } - return nil -} - -func (s *Server) requestPerformance(q *request) (any, error) { - rawMinutes, err := extendedQueryString(q.R.URL.RawQuery, "minutes") - if err != nil { - return nil, err - } - minutes := int64(15) - if queryWindowNumber(rawMinutes) == 60 { - minutes = 60 - } - out := M{"available": false, "windowMinutes": minutes, "instances": []any{}, "routes": []M{}, "stages": []M{}, "series": []M{}, "runtimeSeries": []any{}, "latencyBucketsMs": requestLatencyBuckets, "percentileNote": "Percentiles are histogram bucket upper bounds; null means no samples or above 60s."} - if s.requestMetrics == nil { - return out, nil - } - ctx, cancel := context.WithTimeout(q.ctx(), 3*time.Second) - defer cancel() - if s.flushRequestMetrics(ctx) != nil { - return out, nil - } - now := time.Now() - minute := now.UnixMilli() / 60000 * 60000 - type read struct { - service string - minute int64 - cmd *redis.MapStringStringCmd - } - reads := []read{} - pipe := s.Store.Redis.Pipeline() - for _, service := range []string{"api", "streamer"} { - for i := int64(0); i < minutes; i++ { - at := minute - i*60000 - reads = append(reads, read{service, at, pipe.HGetAll(ctx, "performance:v1:minute:"+service+":"+strconv.FormatInt(at, 10))}) - } - } - if _, err := pipe.Exec(ctx); err != nil { - return out, nil - } - type group struct{ service, metric, route, method string } - groups := map[group]requestSample{} - series := map[int64]M{} - for _, read := range reads { - for label, raw := range read.cmd.Val() { - split := strings.LastIndexByte(label, '|') - if split < 0 { - continue - } - var fields []string - if json.Unmarshal([]byte(label[:split]), &fields) != nil || len(fields) != 3 { - continue - } - n, err := strconv.ParseInt(raw, 10, 64) - if err != nil || n < 0 { - continue - } - g := group{read.service, fields[0], fields[1], fields[2]} - v := groups[g] - field := label[split+1:] - switch field { - case "count": - v.count += n - case "sumMs": - v.sumMs += n - case "bytes": - v.bytes += n - case "aborted": - v.aborted += n - case "errors": - v.errors += n - case "slow": - v.slow += n - default: - if strings.HasPrefix(field, "b") { - i, e := strconv.Atoi(field[1:]) - if e == nil && i >= 0 && i < len(v.buckets) { - v.buckets[i] += n - } - } - } - groups[g] = v - if g.service == "api" && g.metric == "request" { - point := series[read.minute] - if point == nil { - point = M{"minute": read.minute, "requests": int64(0), "aborted": int64(0), "errors": int64(0), "sumMs": int64(0)} - } - target := field - if field == "count" { - target = "requests" - } - if _, ok := point[target]; ok && target != "minute" { - point[target] = number(point[target]) + n - } - series[read.minute] = point - } - } - } - routes, stages := []M{}, []M{} - for g, v := range groups { - avg := float64(0) - if v.count > 0 { - avg = math.Round(float64(v.sumMs) / float64(v.count)) - } - row := M{"service": g.service, "metric": g.metric, "route": g.route, "method": g.method, "count": v.count, "sumMs": v.sumMs, "bytes": v.bytes, "aborted": v.aborted, "errors": v.errors, "slow": v.slow, "buckets": v.buckets, "avgMs": avg, "p95UpperMs": latencyUpper(v.buckets, .95), "p99UpperMs": latencyUpper(v.buckets, .99)} - if g.metric == "request" { - first := groups[group{g.service, "first_byte", g.route, g.method}] - row["firstByteCount"] = first.count - row["firstByteP95UpperMs"] = latencyUpper(first.buckets, .95) - routes = append(routes, row) - } else { - stages = append(stages, row) - } - } - sort.Slice(routes, func(i, j int) bool { return number(routes[i]["sumMs"]) > number(routes[j]["sumMs"]) }) - points := []M{} - for _, p := range series { - points = append(points, p) - } - sort.Slice(points, func(i, j int) bool { return number(points[i]["minute"]) < number(points[j]["minute"]) }) - instances, runtimeSeries, err := s.readProcessSamples(ctx, now, minutes) - if err != nil { - return out, nil - } - out["instances"], out["runtimeSeries"] = instances, runtimeSeries - out["available"], out["generatedAt"], out["routes"], out["stages"], out["series"] = true, now.UnixMilli(), routes, stages, points - out["droppedMetrics"], out["droppedBatches"] = s.requestMetrics.dropped.Load(), s.requestMetrics.droppedBatches.Load() - return out, nil -} diff --git a/backend/internal/server/request_metrics_test.go b/backend/internal/server/request_metrics_test.go deleted file mode 100644 index 4de33fd..0000000 --- a/backend/internal/server/request_metrics_test.go +++ /dev/null @@ -1,153 +0,0 @@ -package server - -import ( - "context" - "net/http" - "net/http/httptest" - "strconv" - "strings" - "testing" - "time" - - "github.com/redis/go-redis/v9" -) - -func TestRequestMetricBoundsAndPercentiles(t *testing.T) { - m := &requestMetrics{pending: map[requestMetricKey]requestSample{}} - key := requestMetricKey{0, "request", "/api/repo/:id/file/*path", "GET"} - for _, ms := range []int{0, 10, 11, 50, 60001} { - m.observe(key, time.Duration(ms)*time.Millisecond, 3, false, false, false) - } - v := m.pending[key] - if v.count != 5 || v.bytes != 15 || v.buckets[0] != 2 || v.buckets[1] != 2 || v.buckets[11] != 1 || latencyUpper(v.buckets, .95) != nil || latencyUpper(v.buckets, .5) != float64(50) { - t.Fatalf("unexpected histogram: %+v", v) - } - for i := 0; i < 600; i++ { - k := key - k.minute = int64(i + 1) - m.observe(k, time.Millisecond, 0, false, false, false) - } - if len(m.pending) != 512 || m.dropped.Load() != 89 { - t.Fatal("unbounded pending metrics") - } -} - -func TestRequestMetricHTTPPrivacyAndCompression(t *testing.T) { - m := &requestMetrics{pending: map[requestMetricKey]requestSample{}} - s := &Server{requestMetrics: m} - s.add("GET", "/api/repo/:id/file/*path", "", nil) - secretPath := "/api/repo/private-repository/file/private-file.txt" - req := httptest.NewRequest("GET", secretPath+"?token=private-query", nil) - if label := s.performanceRoute(req); label != "/api/repo/:id/file/*path" { - t.Fatal("unsafe route label", label) - } - // The real handler path validates compression accounting and first-byte timing. - for _, method := range []string{"GET", "HEAD"} { - r := httptest.NewRequest(method, "/api/healthcheck", nil) - r.Header.Set("Accept-Encoding", "gzip") - w := httptest.NewRecorder() - s.ServeHTTP(w, r) - if w.Code != 200 { - t.Fatal(w.Code) - } - for k, v := range m.pending { - if k.method == method && k.metric == "request" { - if v.count != 1 || v.errors != 0 || v.aborted != 0 || v.bytes != int64(w.Body.Len()) { - t.Fatalf("wire count: %+v, actual %d", v, w.Body.Len()) - } - first := k - first.metric = "first_byte" - if m.pending[first].count != 1 { - t.Fatal("missing first-byte sample") - } - } - } - } - ctx, cancel := context.WithCancel(context.Background()) - cancel() - r := httptest.NewRequest("GET", "/api/healthcheck", nil).WithContext(ctx) - func() { - defer func() { - if value := recover(); value != nil && value != http.ErrAbortHandler { - panic(value) - } - }() - s.ServeHTTP(httptest.NewRecorder(), r) - }() - var aborted int64 - for k, v := range m.pending { - if k.metric == "request" { - aborted += v.aborted - } - } - if aborted != 1 || m.active.Load() != 0 { - t.Fatal("cancellation/active accounting") - } - for k := range m.pending { - if strings.Contains(k.route, "private") { - t.Fatal("sensitive label stored") - } - } -} - -func runRequestMetricsIntegration(t *testing.T, base *Server) { - m := &requestMetrics{pending: map[requestMetricKey]requestSample{}} - s := &Server{Store: base.Store, requestMetrics: m} - now := time.Now().UnixMilli() / 60000 * 60000 - label := "/metric-test-" + strconv.FormatInt(time.Now().UnixNano(), 10) - k := requestMetricKey{now, "request", label, "GET"} - m.observe(k, 25*time.Millisecond, 9, false, false, false) - m.observe(k, 75*time.Millisecond, 11, true, true, false) - first := k - first.metric = "first_byte" - m.observe(first, 5*time.Millisecond, 0, false, false, false) - old := k - old.minute = now - 16*60000 - m.observe(old, time.Second, 0, false, false, false) - report, err := s.requestPerformance(&request{Server: s, R: httptest.NewRequest("GET", "/api/admin/performance", nil)}) - if err != nil || !boolean(obj(report)["available"]) { - t.Fatal("report unavailable", err) - } - check := func(report any, want int64) { - t.Helper() - for _, row := range arr(obj(report)["routes"]) { - r := obj(row) - if r["route"] == label { - if number(r["count"]) != want || number(r["bytes"]) != 20 || number(r["firstByteCount"]) != 1 || number(r["aborted"]) != 1 || number(r["errors"]) != 1 { - t.Fatalf("incorrect aggregation: %v", r) - } - if want == 2 && (number(r["avgMs"]) != 50 || number(r["p95UpperMs"]) != 100 || number(r["firstByteP95UpperMs"]) != 10) { - t.Fatal("incorrect bounds", r) - } - return - } - } - t.Fatal("request group absent") - } - check(report, 2) - // A second process reads shared persisted history and the 60-minute window. - other := &Server{Store: base.Store, requestMetrics: &requestMetrics{pending: map[requestMetricKey]requestSample{}}} - report, err = other.requestPerformance(&request{Server: other, R: httptest.NewRequest("GET", "/api/admin/performance?minutes=60", nil)}) - if err != nil { - t.Fatal(err) - } - check(report, 3) - ttl, err := base.Store.Redis.TTL(context.Background(), "performance:v1:minute:api:"+strconv.FormatInt(now, 10)).Result() - if err != nil || ttl <= time.Hour || ttl > 2*time.Hour { - t.Fatal("retention", ttl, err) - } -} - -func TestRequestMetricsUnavailableDoesNotReplay(t *testing.T) { - client := redis.NewClient(&redis.Options{Addr: "127.0.0.1:1", DialTimeout: 20 * time.Millisecond, ReadTimeout: 20 * time.Millisecond, WriteTimeout: 20 * time.Millisecond, MaxRetries: -1, ContextTimeoutEnabled: true}) - defer client.Close() - m := &requestMetrics{pending: map[requestMetricKey]requestSample{}} - s := &Server{Store: &Store{Redis: client}, requestMetrics: m} - m.observe(requestMetricKey{time.Now().UnixMilli() / 60000 * 60000, "request", "other", "GET"}, time.Millisecond, 1, false, false, false) - ctx, cancel := context.WithTimeout(context.Background(), 100*time.Millisecond) - defer cancel() - report, err := s.requestPerformance(&request{Server: s, R: httptest.NewRequest("GET", "/api/admin/performance", nil).WithContext(ctx)}) - if err != nil || boolean(obj(report)["available"]) || m.droppedBatches.Load() != 1 || len(m.pending) != 0 { - t.Fatal("outage not reported, or uncertain batch retained", err) - } -} diff --git a/backend/internal/server/request_trace.go b/backend/internal/server/request_trace.go deleted file mode 100644 index 6f64156..0000000 --- a/backend/internal/server/request_trace.go +++ /dev/null @@ -1,70 +0,0 @@ -package server - -import ( - "context" - "log/slog" - "math" - "net/http" - "strings" - "sync" - "time" - - "github.com/google/uuid" -) - -type requestTrace struct { - id string - logger *slog.Logger - mu sync.Mutex - stages map[string]float64 -} - -func newRequestTrace() *requestTrace { - return &requestTrace{id: uuid.NewString(), logger: slog.Default(), stages: map[string]float64{}} -} -func traceFrom(ctx context.Context) *requestTrace { - trace, _ := ctx.Value(performanceContextKey{}).(*requestTrace) - return trace -} -func (t *requestTrace) observe(name string, elapsed time.Duration) { - t.mu.Lock() - defer t.mu.Unlock() - t.stages[name] += math.Max(0, float64(elapsed)/float64(time.Millisecond)) -} -func (t *requestTrace) log(r *http.Request, state *responseState, route, method string, started time.Time, elapsed time.Duration, bytes int64, aborted, slow bool) M { - if t == nil || t.logger == nil { - return nil - } - t.mu.Lock() - stages := make(map[string]float64, len(t.stages)) - for k, v := range t.stages { - stages[k] = v - } - t.mu.Unlock() - var firstByte any - if !state.firstWrite.IsZero() { - firstByte = math.Max(0, float64(state.firstWrite.Sub(started))/float64(time.Millisecond)) - } - status := state.status - if status == 0 { - status = http.StatusOK - } - outcome := "completed" - if aborted { - outcome = "interrupted" - } - fields := []any{"requestId", t.id, "service", "api", "method", method, "route", route, "status", status, "outcome", outcome, "ms", math.Round(float64(elapsed) / float64(time.Millisecond)), "firstByteMs", firstByte, "bytes", bytes, "stages", stages} - switch { - case aborted: - t.logger.WarnContext(r.Context(), "request interrupted", fields...) - case slow: - t.logger.WarnContext(r.Context(), "slow request", fields...) - case !strings.Contains(route, "healthcheck"): - t.logger.InfoContext(r.Context(), "request", fields...) - } - if aborted || slow { - return M{"requestId": t.id, "service": "api", "method": method, "route": route, "status": status, "outcome": outcome, "ms": math.Round(float64(elapsed) / float64(time.Millisecond)), "firstByteMs": firstByte, "bytes": bytes, "stages": stages} - } - return nil - -} diff --git a/backend/internal/server/request_trace_test.go b/backend/internal/server/request_trace_test.go deleted file mode 100644 index 23c4c23..0000000 --- a/backend/internal/server/request_trace_test.go +++ /dev/null @@ -1,121 +0,0 @@ -package server - -import ( - "bytes" - "context" - "encoding/json" - "io" - "log/slog" - "net/http/httptest" - "strings" - "sync" - "testing" - "time" - - "github.com/google/uuid" -) - -func TestRequestTraceIDsWithoutRedis(t *testing.T) { - s := &Server{} - seen := map[string]bool{} - for _, path := range []string{"/api/healthcheck", "/api/repo/private/file/secret%2fpath?token=private-token"} { - r := httptest.NewRequest("GET", path, nil) - r.Header.Set("X-Request-ID", "attacker-controlled-id") - w := httptest.NewRecorder() - s.ServeHTTP(w, r) - id := w.Header().Get("X-Request-ID") - parsed, err := uuid.Parse(id) - if err != nil || parsed.Version() != 4 || seen[id] { - t.Fatal("missing, invalid or reused generated request ID", id) - } - seen[id] = true - } -} - -func TestRequestTraceLoggingPrivacyAndStages(t *testing.T) { - var output bytes.Buffer - trace := newRequestTrace() - trace.logger = slog.New(slog.NewJSONHandler(&output, nil)) - ctx := context.WithValue(context.Background(), performanceContextKey{}, trace) - s := &Server{} - s.add("GET", "/api/repo/:id/file/*path", "", nil) - // Concurrent work is accumulated into the same request without leaking IDs - // or depending on Redis being available. - var workers sync.WaitGroup - for i := 0; i < 32; i++ { - workers.Add(1) - go func() { defer workers.Done(); s.stageObserver(ctx)("anonymize", time.Millisecond, nil) }() - } - workers.Wait() - s.stageObserver(ctx)("private-stage-name", time.Second, nil) - r := httptest.NewRequest("GET", "/api/repo/private-repo/file/private-file?token=private-token", nil).WithContext(ctx) - r.Header.Set("Authorization", "Bearer private-credential") - state := &responseState{ResponseWriter: httptest.NewRecorder()} - done := s.monitorRequest(state, r) - state.WriteHeader(200) - io.WriteString(state, "body") - done() - var row map[string]any - if err := json.Unmarshal(output.Bytes(), &row); err != nil { - t.Fatal(err, output.String()) - } - if row["requestId"] != trace.id || row["route"] != "/api/repo/:id/file/*path" || row["bytes"] != float64(4) || row["status"] != float64(200) || row["level"] != "INFO" || row["outcome"] != "completed" { - t.Fatal(row) - } - stages := row["stages"].(map[string]any) - if stages["anonymize"] != float64(32) || len(stages) != 1 { - t.Fatal(stages) - } - if strings.Contains(output.String(), "private-") { - t.Fatal("private request data leaked into logs") - } -} - -func TestRequestTraceInterruptedAndHealthLogging(t *testing.T) { - for _, interrupted := range []bool{false, true} { - var output bytes.Buffer - trace := newRequestTrace() - trace.logger = slog.New(slog.NewJSONHandler(&output, nil)) - ctx, cancel := context.WithCancel(context.WithValue(context.Background(), performanceContextKey{}, trace)) - s := &Server{} - r := httptest.NewRequest("GET", "/api/healthcheck", nil).WithContext(ctx) - state := &responseState{ResponseWriter: httptest.NewRecorder()} - done := s.monitorRequest(state, r) - if interrupted { - cancel() - } - done() - cancel() - if !interrupted { - if output.Len() != 0 { - t.Fatal("successful healthcheck logged") - } - continue - } - var row map[string]any - if err := json.Unmarshal(output.Bytes(), &row); err != nil { - t.Fatal(err) - } - if row["level"] != "WARN" || row["outcome"] != "interrupted" || row["firstByteMs"] != nil { - t.Fatal(row) - } - } -} - -func TestRequestTraceLegacyCacheResults(t *testing.T) { - s := &Server{requestMetrics: &requestMetrics{pending: map[requestMetricKey]requestSample{}}} - ctx := context.WithValue(context.Background(), performanceContextKey{}, newRequestTrace()) - for _, name := range []string{"legacy_source_hit", "legacy_source_miss", "legacy_result_hit", "legacy_result_miss", "source_hit", "result_hit", "arbitrary"} { - s.observeCache(ctx, name, 123, time.Second) - s.observeCache(context.Background(), name, 123, time.Second) - } - if len(s.requestMetrics.pending) != 4 { - t.Fatal(s.requestMetrics.pending) - } - expected := map[string]bool{"source_hit": true, "source_miss": true, "transformed_hit": true, "transformed_miss": true} - for key, v := range s.requestMetrics.pending { - if !expected[key.metric] || key.route != "all" || key.method != "all" || v.count != 1 || v.bytes != 0 || v.sumMs != 0 { - t.Fatal(key, v) - } - } -} diff --git a/backend/internal/server/resource_contract_test.go b/backend/internal/server/resource_contract_test.go deleted file mode 100644 index 8dc555b..0000000 --- a/backend/internal/server/resource_contract_test.go +++ /dev/null @@ -1,50 +0,0 @@ -package server - -import ( - "context" - "encoding/json" - "os" - "reflect" - "testing" -) - -func TestTypeScriptResourceOutput(t *testing.T) { - raw, e := os.ReadFile("testdata/resources.json") - if e != nil { - t.Fatal(e) - } - var cases []struct { - Name, Kind, Operation string - Record M - Expected any - } - if e = json.Unmarshal(raw, &cases); e != nil { - t.Fatal(e) - } - s := &Server{Config: Config{Mask: "XXXX", Hostname: "anonymous.test"}} - for _, c := range cases { - t.Run(c.Name, func(t *testing.T) { - var out M - var e error - if c.Operation == "private" { - out = resourceJSON(c.Kind, c.Record) - } else { - out, e = s.embeddedOutput(context.Background(), c.Kind, c.Record) - } - if e != nil { - t.Fatal(e) - } - raw, e := json.Marshal(out) - if e != nil { - t.Fatal(e) - } - var actual any - if e = json.Unmarshal(raw, &actual); e != nil { - t.Fatal(e) - } - if !reflect.DeepEqual(actual, c.Expected) { - t.Fatalf("got %s; want %#v", raw, c.Expected) - } - }) - } -} diff --git a/backend/internal/server/resource_options_integration_test.go b/backend/internal/server/resource_options_integration_test.go deleted file mode 100644 index f9b8250..0000000 --- a/backend/internal/server/resource_options_integration_test.go +++ /dev/null @@ -1,142 +0,0 @@ -package server - -import ( - "bytes" - "context" - "encoding/json" - "fmt" - "net/http/httptest" - "os" - "os/exec" - "reflect" - "testing" - "time" - - "go.mongodb.org/mongo-driver/v2/bson" -) - -func runResourceOptionsDifferentialIntegration(t *testing.T, s *Server, p *fixtureProvider, token, otherToken string) { - t.Run("resource option create edit database differential", func(t *testing.T) { - ctx, cancel := context.WithTimeout(context.Background(), 45*time.Second) - defer cancel() - name := "resource_options_" + bson.NewObjectID().Hex() - defer s.Store.DB.Client().Database(name).Drop(context.Background()) - command := exec.CommandContext(ctx, "node", "backend/contracts/resource-options-database.cjs") - command.Dir = "../../.." - command.Env = append(os.Environ(), "RESOURCE_OPTIONS_DATABASE="+name, "TZ=UTC") - raw, err := command.Output() - if err != nil { - if e, ok := err.(*exec.ExitError); ok { - t.Fatalf("TypeScript option oracle: %s", e.Stderr) - } - t.Fatal(err) - } - var cases []struct { - Kind string - Create bool - Body, Stored M - Error *struct { - Status int - Error string - } - } - if err = json.Unmarshal(raw, &cases); err != nil { - t.Fatal(err) - } - if len(cases) != 150 { - t.Fatal("unexpected option case count", len(cases)) - } - // Compatibility covers valid inputs. Invalid casts intentionally reject - // both creates and edits instead of reproducing TS partial writes/500s. - inputKey := func(kind string, body M) string { raw, _ := json.Marshal(body["options"]); return kind + string(raw) } - invalid := map[string]bool{} - for _, c := range cases { - if c.Create && c.Error != nil { - invalid[inputKey(c.Kind, c.Body)] = true - } - } - calls := 0 - call := func(path, credential string, body M) *httptest.ResponseRecorder { - data, _ := json.Marshal(body) - req := httptest.NewRequest("POST", path, bytes.NewReader(data)) - req.RemoteAddr = fmt.Sprintf("198.51.103.%d:1234", calls/30+1) - calls++ - req.Header.Set("Authorization", "Bearer "+credential) - req.Header.Set("Content-Type", "application/json") - w := httptest.NewRecorder() - s.ServeHTTP(w, req) - return w - } - for i, c := range cases { - rejected := invalid[inputKey(c.Kind, c.Body)] - id := fmt.Sprintf("option-write-%d", i) - body := c.Body - body[idKey(c.Kind)] = id - body["fullName"] = p.name - body["source"] = M{"provider": "fixture", "branch": "main", "commit": p.commit, "gistId": "snippet", "repositoryFullName": p.name, "pullRequestId": 1} - route := "/api/" + c.Kind - var before M - if !c.Create { - seed := M{} - for k, v := range body { - seed[k] = v - } - seed["terms"] = []any{"before"} - seed["options"] = M{"image": true, "link": true, "expirationDate": "2040-01-01T00:00:00.000Z"} - if w := call(route, token, seed); w.Code != 200 { - t.Fatal("seed", c.Kind, w.Code, w.Body) - } - route += "/" + id - before, err = s.Store.one(ctx, collection(c.Kind), M{idKey(c.Kind): id}) - if err != nil { - t.Fatal(err) - } - if w := call(route, otherToken, body); w.Code != 403 { - t.Fatal("non-owner mutation allowed", c.Kind, w.Code, w.Body) - } - afterDenied, readErr := s.Store.one(ctx, collection(c.Kind), M{idKey(c.Kind): id}) - if readErr != nil || !reflect.DeepEqual(afterDenied, before) { - t.Fatal("denied edit changed document", c.Kind, readErr) - } - } - w := call(route, token, body) - if rejected { - var result M - json.Unmarshal(w.Body.Bytes(), &result) - code := "invalid_options" - if _, present := obj(c.Body["options"])["expirationDate"]; present { - code = "invalid_expiration_date" - } - if w.Code != 400 || result["error"] != code { - t.Fatal(c.Kind, c.Create, c.Body["options"], w.Code, w.Body) - } - } else if w.Code != 200 { - t.Fatal(c.Kind, c.Create, c.Body["options"], w.Code, w.Body) - } - stored, err := s.Store.one(ctx, collection(c.Kind), M{idKey(c.Kind): id}) - if err != nil { - t.Fatal(err) - } - if rejected { - if !reflect.DeepEqual(stored, before) { - t.Fatal("invalid options changed document", c.Kind, c.Create) - } - continue - } - // Go consistently omits empty pageSource objects on both paths. - if page, present := c.Stored["pageSource"]; present && page != nil && len(obj(page)) == 0 { - delete(c.Stored, "pageSource") - } - if stored == nil { - if c.Stored != nil { - t.Fatal("missing persisted options") - } - continue - } - actual := defaultsJSON(t, responseJSON(stored["options"])) - if !reflect.DeepEqual(actual, defaultsJSON(t, c.Stored)) { - t.Fatalf("%s create=%v input=%v: stored %v want %v", c.Kind, c.Create, c.Body["options"], actual, c.Stored) - } - } - }) -} diff --git a/backend/internal/server/resources.go b/backend/internal/server/resources.go deleted file mode 100644 index 8a77177..0000000 --- a/backend/internal/server/resources.go +++ /dev/null @@ -1,825 +0,0 @@ -package server - -import ( - "context" - "crypto/sha1" - "encoding/hex" - "encoding/json" - "regexp" - "strconv" - "strings" - "time" - - "github.com/tdurieux/anonymous_github/backend/internal/anonymize" - "github.com/tdurieux/anonymous_github/backend/internal/security" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/mongo/options" - "golang.org/x/text/cases" - "golang.org/x/text/language" -) - -func (q *request) resource(kind string, edit bool) (result M, resultErr error) { - done := q.Server.startStage(q.ctx(), "repository") - defer func() { done(resultErr) }() - id := q.Params["id"] - if id == "" || id == "undefined" { - return nil, fail(missing(kind), 404) - } - r, err := q.Server.Store.one(q.ctx(), collection(kind), resourceFilter(kind, id)) - if err != nil { - return nil, err - } - if r == nil { - return nil, fail(missing(kind), 404) - } - if edit && !canEdit(q.Identity, r) { - return nil, fail("not_authorized", 403) - } - return r, nil -} -func canEdit(u security.Identity, r M) bool { - co := []security.Coauthor{} - for _, v := range arr(r["coauthors"]) { - c := obj(v) - co = append(co, security.Coauthor{Username: str(c["username"]), GitHubID: str(c["githubId"])}) - } - return u.CanEdit(str(r["owner"]), co) -} -func (s *Server) checkResource(ctx context.Context, kind string, r M) error { - status := str(r["status"]) - if status == "archived" { - return fail("repository_archived", 410) - } - opt := obj(r["options"]) - if status == "ready" && str(opt["expirationMode"]) != "never" && inputTruthy(opt["expirationDate"]) && !date(opt["expirationDate"]).After(time.Now()) { - ok, err := s.Store.update(ctx, collection(kind), revisionFilter(r), M{"$set": M{"status": "expiring", "statusDate": time.Now()}}) - if err != nil { - return err - } - if !ok { - return fail("repository_changed", 409) - } - status = "expiring" - } - for _, inactive := range []string{"expired", "expiring", "removed", "removing"} { - if status == inactive { - prefix := kind - if kind == "repo" { - prefix = "repository" - } - if kind == "pr" { - prefix = "pull_request" - } - return fail(prefix+"_expired", 410) - } - } - if status != "ready" { - prefix := kind - if kind == "repo" { - prefix = "repository" - } - if kind == "pr" { - prefix = "pull_request" - } - if status == "error" { - code := str(r["statusMessage"]) - if code == "" { - code = prefix + "_not_accessible" - if kind != "repo" { - code = prefix + "_not_available" - } - } - return fail(code, 500) - } - if kind == "repo" && strings.HasPrefix(str(r["statusMessage"]), "rate_limited:") { - if reset, e := strconv.ParseInt(strings.TrimPrefix(str(r["statusMessage"]), "rate_limited:"), 10, 64); e == nil && reset > 0 { - return &APIError{Code: "rate_limited", Status: 425, ResetAt: reset} - } - } - return fail(prefix+"_not_ready", 425) - } - return nil -} -func (s *Server) anonymizerOptions(r M, kind string) (anonymize.Options, error) { - var opt anonymize.Options - b, _ := json.Marshal(r["options"]) - if json.Unmarshal(b, &opt) != nil { - return opt, fail("invalid_options", 400) - } - opt.RepoID = str(r[idKey(kind)]) - if kind == "repo" { - p, a, e := s.repositoryProvider(r) - if e != nil { - return opt, e - } - opt.RepoName = a.Ref.Name - opt.BranchName = a.Ref.Branch - opt.SourceURLs = p.SelfLinks(a.Ref) - if opt.SourceURLs == nil { - opt.SourceURLs = []string{} - } - } - return opt, nil -} -func (s *Server) engine(r M, kind string) (*anonymize.Engine, error) { - opt, e := s.anonymizerOptions(r, kind) - if e != nil { - return nil, e - } - return anonymize.New(opt, anonymize.Context{Mask: s.Config.Mask, Hostname: s.Config.Hostname}) -} - -func (s *Server) privateResource(kind string) handler { - return func(q *request) (any, error) { - r, err := q.resource(kind, true) - if err != nil { - return nil, err - } - out := resourceJSON(kind, r) - if kind == "repo" { - out["ownerId"] = str(r["owner"]) - role := "coauthor" - if q.Identity.ID == str(r["owner"]) { - role = "owner" - } else if q.Identity.Admin { - role = "admin" - } - out["role"] = role - a, e := s.providerAccess(r) - if e != nil { - return nil, e - } - connection := str(a.Binding["kind"]) - if connection == "" && a.Ref.Provider == "github" { - connection = "oauth" - } - out["connection"] = connection - } - return out, nil - } -} -func (s *Server) publicOptions(kind string) handler { - return func(q *request) (any, error) { - q.W.Header().Set("Cache-Control", "no-cache") - r, err := q.resource(kind, false) - if err != nil { - return nil, err - } - can := canEdit(q.Identity, r) - status := str(r["status"]) - opt := obj(r["options"]) - var redirect any - if status == "archived" { - return nil, fail("repository_archived", 410) - } - if !can && status == "expired" && str(opt["expirationMode"]) == "redirect" { - url, e := s.sourceURL(r, kind) - if e != nil { - return nil, e - } - if url != "" { - redirect = url - } - - } else if !can { - if kind == "repo" { - err = s.repositoryOptionsCheck(q.ctx(), r) - } else { - err = s.embeddedOptionsCheck(q.ctx(), kind, r) - } - if err != nil { - return nil, err - } - } - out := M{"url": redirect, "lastUpdateDate": r["statusDate"], "isAdmin": q.Identity.Admin, "isOwner": q.Identity.Active() && q.Identity.ID == str(r["owner"])} - if kind == "repo" { - out["lastUpdateDate"] = latestStoredDate(r["anonymizeDate"], r["settingsSavedAt"], r["publishedAt"]) - if v, ok := r["anonymizeDate"]; ok { - out["anonymizedAt"] = v - } - if v, ok := obj(r["source"])["commitDate"]; ok { - out["sourceCommitDate"] = v - } - for _, k := range []string{"settingsSavedAt", "publishedAt"} { - if v, ok := r[k]; ok { - out[k] = v - } - } - out["download"] = s.Config.Download || q.Identity.Admin - out["hasWebsite"] = boolean(opt["page"]) && opt["pageSource"] != nil - e, err := s.engine(r, kind) - if err != nil { - return nil, err - } - folders := []string{} - for _, p := range stringsOf(r["truncatedFolders"]) { - value, err := e.Path(q.ctx(), p) - if err != nil { - return nil, err - } - folders = append(folders, value) - } - out["truncatedFolders"] = folders - sub, err := s.Store.one(q.ctx(), "files", M{"repoId": r["repoId"], "treeGeneration": activeGeneration(r), "path": "", "name": ".gitmodules"}) - if err != nil { - return nil, err - } - out["hasSubmodules"] = sub != nil - } - return out, nil - } -} -func (s *Server) preview(q *request) (any, error) { - var inputs []string - single := false - if value, ok := q.Body["content"].(string); ok { - inputs = []string{value} - single = true - } else if values, ok := q.Body["contents"].([]any); ok { - for _, v := range values { - value, ok := v.(string) - if !ok { - return nil, fail("missing_content", 400) - } - inputs = append(inputs, value) - } - } else { - return nil, fail("missing_content", 400) - } - var opt anonymize.Options - b, _ := json.Marshal(q.Body["options"]) - if json.Unmarshal(b, &opt) != nil { - return nil, fail("invalid_options", 400) - } - e, err := anonymize.New(opt, anonymize.Context{Mask: s.Config.Mask, Hostname: s.Config.Hostname}) - if err != nil { - return nil, fail(err.Error(), 400) - } - outputs := []string{} - ctx, cancel := context.WithTimeout(q.ctx(), time.Second) - defer cancel() - for _, input := range inputs { - result, err := e.Transform(ctx, input, 1024*1024) - if err != nil { - return nil, fail("anonymization_failed", 422) - } - outputs = append(outputs, result.Content) - } - if single { - return M{"content": outputs[0]}, nil - } - return M{"contents": outputs}, nil -} - -var resourceID = regexp.MustCompile(`^[0-9a-zA-Z_-]{3,}$`) -var commitID = regexp.MustCompile(`^[a-fA-F0-9]+$`) - -// Mongoose string fields accept scalar values and documents with a string _id. -func resourceOptionString(value any) (string, bool) { - if id, ok := obj(value)["_id"].(string); ok && id != "" { - return id, true - } - return termString(value) -} - -func validatedOptions(kind string, body M) (M, error) { - raw, ok := body["terms"].([]any) - if !ok { - return nil, fail("invalid_terms_format", 400) - } - if len(raw) > 1000 { - return nil, fail("too_many_anonymization_terms", 400) - } - terms := []string{} - for _, t := range raw { - s, ok := termString(t) - if !ok || len(s) > 8192 { - return nil, fail("invalid_terms_format", 400) - } - terms = append(terms, s) - } - if body["options"] == nil { - return nil, fail("options_not_provided", 400) - } - fields := []string{"expirationMode", "expirationDate", "update", "image", "link"} - switch kind { - case "repo": - fields = append(fields, "pdf", "notebook", "page", "pageSource") - case "gist", "pr": - fields = append(fields, "title", "body", "comments", "origin", "username", "date") - if kind == "gist" { - fields = append(fields, "content") - } else { - fields = append(fields, "diff") - } - } - opt := selectFields(obj(body["options"]), fields...) - castStringField := func(fields M, key string) error { - value, exists := fields[key] - if !exists || value == nil { - return nil - } - converted, valid := resourceOptionString(value) - if !valid { - return fail("invalid_options", 400) - } else { - fields[key] = converted - } - return nil - } - if err := castStringField(opt, "expirationMode"); err != nil { - return nil, err - } - if source, exists := opt["pageSource"]; exists && source != nil { - switch source.(type) { - case M, map[string]any, []any: - page := selectFields(obj(source), "branch", "path") - for _, key := range []string{"branch", "path"} { - if err := castStringField(page, key); err != nil { - return nil, err - } - } - if len(page) == 0 { - delete(opt, "pageSource") - } else { - opt["pageSource"] = page - } - default: - return nil, fail("invalid_options", 400) - } - } - opt["terms"] = terms - if v, ok := opt["expirationDate"]; ok && inputTruthy(v) { - t, valid, err := javascriptDateValue(v) - if err != nil || !valid { - return nil, fail("invalid_expiration_date", 400) - } - opt["expirationDate"] = t - } else { - delete(opt, "expirationDate") - } - for _, k := range []string{"update", "image", "pdf", "notebook", "link", "page", "title", "body", "comments", "content", "origin", "username", "date", "diff"} { - if v, ok := opt[k]; ok { - converted, valid := optionBoolean(v) - if !valid { - return nil, fail("invalid_options", 400) - } - opt[k] = converted - } - } - return opt, nil -} -func (s *Server) saveResource(kind string, create bool) handler { - return func(q *request) (any, error) { - body := q.Body - var previous M - var err error - existingProvider := "" - if !create { - previous, err = q.resource(kind, true) - if err != nil { - return nil, err - } - for _, st := range []string{"archived", "removing", "expiring"} { - if _, reconnect := body["reconnectRepositoryId"]; kind == "repo" && reconnect && st == "archived" { - continue - } - if str(previous["status"]) == st { - return nil, fail("invalid_status", 409) - } - } - existingProvider, err = sourceProvider(obj(previous["source"])) - if err != nil { - return nil, err - } - if incoming := obj(body["source"])["provider"]; incoming != nil && str(incoming) != existingProvider { - return nil, fail("provider_binding_mismatch", 409) - } - } - if err := validateResourceProviderInput(kind, body, existingProvider); err != nil { - return nil, err - } - if kind == "repo" && previous != nil { - if _, _, err := validateRepositoryReconnect(q, previous, existingProvider); err != nil { - return nil, err - } - if err := s.flushConferenceMembership(q.ctx(), previous); err != nil { - return nil, err - } - } - oldConference := "" - if previous != nil { - oldConference = str(previous["conference"]) - } - newConference := str(body["conference"]) - if kind != "repo" || previous == nil || oldConference != newConference { - if err := s.validateConference(q, newConference); err != nil { - return nil, err - } - } - id := str(body[idKey(kind)]) - opt, err := validatedOptions(kind, body) - if err != nil { - return nil, err - } - source := obj(body["source"]) - if body["source"] == nil { - return nil, fail("source_not_provided", 400) - } - if previous != nil && str(previous[idKey(kind)]) != id { - return nil, fail("invalid_"+idKey(kind), 400) - } - - _, reconnectRequested := body["reconnectRepositoryId"] - // Settings-only saves must not need a working GitHub grant or replace its identity binding. - if kind == "repo" && previous != nil && !reconnectRequested { - old := obj(previous["source"]) - same := str(body["fullName"]) == str(old["repositoryName"]) && str(source["branch"]) == str(old["branch"]) && str(source["commit"]) == str(old["commit"]) - if same { - now := membershipSaveTime(previous) - set := M{"options": opt, "conference": str(body["conference"]), "settingsSavedAt": now} - recordConferenceMembership(set, oldConference, newConference, now) - reactivating := shouldReactivateRepository(str(previous["status"]), opt, now) - if reactivating { - set["status"], set["statusDate"], set["anonymizeDate"], set["statusMessage"] = "preparing", now, now, nil - } - ok, e := s.Store.update(q.ctx(), collection(kind), membershipSaveFilter(kind, previous), M{"$set": set}) - if e != nil { - return nil, e - } - if !ok { - return nil, fail("connection_changed", 409) - } - for key, value := range set { - previous[key] = value - } - if err := s.flushConferenceMembership(q.ctx(), previous); err != nil { - return nil, err - } - if reactivating { - if e := s.enqueueSavedSnapshot(q.ctx(), previous); e != nil { - return nil, e - } - } - return M{"status": previous["status"]}, nil - } - } - owner := q.User["_id"] - if previous != nil { - owner = previous["owner"] - } - savedSource := M{} - binding := M{} - switch kind { - case "repo": - savedSource, binding, err = s.saveRepositorySource(q, previous, source) - if err != nil { - return nil, err - } - - case "gist", "pr": - savedSource, binding, err = s.saveDocumentSource(q, kind, previous, source, owner) - if err != nil { - return nil, err - } - } - - now := membershipSaveTime(previous) - record := M{idKey(kind): id, "owner": owner, "source": savedSource, "options": opt, "conference": str(body["conference"]), "settingsSavedAt": now, "anonymizeDate": now, "status": "preparing", "statusDate": now, "githubAccess": binding} - if id, e := sourceProvider(savedSource); e == nil && id != "github" { - delete(record, "githubAccess") - record["providerAccess"] = binding - } - if kind == "repo" { - recordConferenceMembership(record, oldConference, newConference, now) - } - if create { - record["_id"] = bson.NewObjectID() - record["dateOfEntry"] = now - record["coauthors"] = []any{} - record["size"] = M{"storage": 0, "file": 0} - if _, err = s.Store.DB.Collection(collection(kind)).InsertOne(q.ctx(), record); err != nil { - return nil, fail(idKey(kind)+"_already_used", 400) - } - } else { - ok, err := s.Store.update(q.ctx(), collection(kind), membershipSaveFilter(kind, previous), M{"$set": record}) - if err != nil { - return nil, err - } - if !ok { - return nil, fail("connection_changed", 409) - } - record["_id"] = previous["_id"] - } - if kind != "repo" { - // TS returns the fully downloaded document from create and update. - current, e := s.Store.one(q.ctx(), collection(kind), M{"_id": record["_id"]}) - if e != nil { - return nil, e - } - if current == nil { - return nil, fail(missing(kind), 404) - } - if e = s.refreshEmbedded(q.ctx(), kind, current); e != nil { - return nil, e - } - return resourceJSON(kind, current), nil - } - if err := s.flushConferenceMembership(q.ctx(), record); err != nil { - return nil, err - } - err = s.enqueueSavedSnapshot(q.ctx(), record) - if err != nil { - return nil, err - } - return M{"status": "preparing"}, nil - } -} -func (s *Server) lifecycle(kind, action string) handler { - return func(q *request) (any, error) { - r, err := q.resource(kind, true) - if err != nil { - return nil, err - } - if str(r["status"]) == "archived" { - return nil, fail("repository_archived", 410) - } - if action == "extend" { - return s.extendResource(q.ctx(), kind, r) - } - - if action == "refresh" && kind != "repo" { - if err = s.refreshEmbedded(q.ctx(), kind, r); err != nil { - return nil, err - } - return M{"status": r["status"]}, nil - } - status, job := "preparing", "prepare" - if action == "remove" { - if str(r["status"]) == "removed" { - return nil, fail("is_removed", 410) - } - if !q.Identity.Owns(str(r["owner"])) { - return nil, fail("not_authorized", 403) - } - status, job = "removing", "remove" - } - if (str(r["status"]) == "removing" || str(r["status"]) == "expiring") && !(kind == "repo" && action == "remove") { - return nil, fail("invalid_status", 409) - } - set := M{"status": status, "statusDate": time.Now()} - if action == "refresh" && kind == "repo" { - if err = s.manualRepositoryRefresh(q.ctx(), r); err != nil { - return nil, err - } - return M{"status": r["status"]}, nil - } - if action == "refresh" { - switch str(r["status"]) { - case "preparing", "queue", "download": - return nil, fail("invalid_status", 409) - } - } - - ok, err := s.Store.update(q.ctx(), collection(kind), revisionFilter(r), M{"$set": set}) - if err != nil { - return nil, err - } - if !ok { - return nil, fail("connection_changed", 409) - } - if kind != "repo" && action == "remove" { - if err = s.runJob(q.ctx(), M{"kind": kind, "resourceId": r[idKey(kind)], "action": "remove"}); err != nil { - return nil, err - } - current, e := s.Store.one(q.ctx(), collection(kind), M{"_id": r["_id"]}) - if e != nil { - return nil, e - } - if current == nil { - return nil, fail(missing(kind), 404) - } - return M{"status": current["status"]}, nil - } - if err = s.enqueue(q.ctx(), kind, str(r[idKey(kind)]), job); err != nil { - return nil, err - } - return M{"status": status}, nil - } -} -func (s *Server) files(mode string) handler { - return func(q *request) (any, error) { - if mode == "search" { - q.W.Header().Set("Cache-Control", "no-cache") - } - r, err := q.resource("repo", false) - if err != nil { - return nil, err - } - if err = s.checkResource(q.ctx(), "repo", r); err != nil { - return nil, err - } - if mode == "counts" { - q.W.Header().Set("Cache-Control", "no-cache") - return s.folderCounts(q.ctx(), r) - } - - query := "" - if mode == "search" { - var usable bool - query, usable, err = fileSearchQuery(q.R.URL.RawQuery) - if err != nil { - return nil, err - } - if !usable { - return []M{}, nil - } - } - requested := "" - if mode != "search" && mode != "counts" { - requested, err = folderQuery(q.R.URL.RawQuery) - if err != nil { - return nil, err - } - requested, err = s.originalFolder(q.ctx(), r, requested) - if err != nil { - return nil, err - } - } - filter := M{"repoId": r["repoId"], "treeGeneration": activeGeneration(r)} - if mode != "search" && mode != "counts" { - filter["path"] = requested - } - cursor, err := s.Store.DB.Collection("files").Find(q.ctx(), filter, options.Find().SetSort(bson.D{{Key: "path", Value: 1}, {Key: "name", Value: 1}}).SetBatchSize(256).SetProjection(M{"name": 1, "path": 1, "size": 1, "sha": 1})) - if err != nil { - return nil, err - } - defer cursor.Close(q.ctx()) - e, err := s.engine(r, "repo") - if err != nil { - return nil, err - } - q.W.Header().Set("Cache-Control", "no-cache") - out := []M{} - lower := cases.Lower(language.Und) - for cursor.Next(q.ctx()) { - var row M - if err := cursor.Decode(&row); err != nil { - return nil, err - } - name, err := e.Path(q.ctx(), str(row["name"])) - if err != nil { - return nil, err - } - path, err := e.Path(q.ctx(), str(row["path"])) - if err != nil { - return nil, err - } - if mode == "search" { - if !strings.Contains(lower.String(path+"/"+name), query) { - continue - } - } else if str(row["path"]) != requested { - continue - } - item := M{"name": name, "path": path} - if value, ok := row["size"]; ok { - item["size"] = value - } - - if mode != "search" && number(row["size"]) != 0 { - digest := sha1.Sum([]byte(str(row["sha"]))) - item["sha"] = hex.EncodeToString(digest[:])[:8] - } - - out = append(out, item) - if mode == "search" && len(out) == 500 { - break - } - } - if err := cursor.Err(); err != nil { - return nil, err - } - return out, nil - } -} -func (s *Server) embeddedContent(kind string) handler { - return func(q *request) (any, error) { - r, err := q.resource(kind, false) - if err != nil { - return nil, err - } - if err = s.checkResource(q.ctx(), kind, r); err != nil { - return nil, err - } - out, err := s.embeddedOutput(q.ctx(), kind, r) - if err != nil { - return nil, err - } - _, err = s.Store.update(q.ctx(), collection(kind), M{"_id": r["_id"]}, M{"$inc": M{"pageView": 1}, "$set": M{"lastView": time.Now()}}) - q.W.Header().Set("Cache-Control", "no-cache") - return out, err - } -} - -func (s *Server) embeddedOutput(ctx context.Context, kind string, r M) (M, error) { - e, err := s.engine(r, kind) - if err != nil { - return nil, err - } - opt := obj(r["options"]) - key := "gist" - if kind == "pr" { - key = "pullRequest" - } - source := obj(r[key]) - out := selectFields(r, "anonymizeDate") - if kind == "gist" { - if v, ok := source["isPublic"]; ok { - out["isPublic"] = v - } - } else { - for _, k := range []string{"merged", "mergedDate", "state", "draft"} { - if v, ok := source[k]; ok { - out[k] = v - } - } - } - transform := func(value any) (string, error) { - r, err := e.Transform(ctx, str(value), anonymize.MaxOutput) - return r.Content, err - } - fields := map[string]string{"body": "body", "diff": "diff"} - if kind == "gist" { - fields = map[string]string{"title": "description", "username": "ownerLogin"} - } else { - fields["title"] = "title" - } - for option, field := range fields { - if boolean(opt[option]) { - value, err := transform(source[field]) - if err != nil { - return nil, err - } - out[field] = value - } - } - if kind == "gist" && boolean(opt["content"]) { - files := []M{} - for _, item := range arr(source["files"]) { - f := obj(item) - v := selectFields(f, "language", "size", "type") - for _, k := range []string{"filename", "content"} { - v[k], err = transform(f[k]) - if err != nil { - return nil, err - } - } - files = append(files, v) - } - out["files"] = files - } - if boolean(opt["comments"]) && source["comments"] != nil { - comments := []M{} - for _, item := range arr(source["comments"]) { - c := obj(item) - v := M{} - for option, field := range map[string]string{"body": "body", "username": "author"} { - if boolean(opt[option]) { - v[field], err = transform(c[field]) - if err != nil { - return nil, err - } - } - } - if boolean(opt["date"]) { - for _, k := range []string{"updatedDate", "creationDate"} { - if x, ok := c[k]; ok { - v[k] = x - } - } - } - comments = append(comments, v) - } - out["comments"] = comments - } - if boolean(opt["date"]) { - for _, k := range []string{"updatedDate", "creationDate"} { - if x, ok := source[k]; ok { - out[k] = x - } - } - } - if boolean(opt["origin"]) { - if kind == "gist" { - if x, ok := obj(r["source"])["gistId"]; ok { - out["sourceGistId"] = x - } - } else { - if x, ok := source["baseRepositoryFullName"]; ok { - out["baseRepositoryFullName"] = x - } - } - } - return out, nil -} diff --git a/backend/internal/server/response_state.go b/backend/internal/server/response_state.go deleted file mode 100644 index de7b045..0000000 --- a/backend/internal/server/response_state.go +++ /dev/null @@ -1,71 +0,0 @@ -package server - -import ( - "net/http" - "time" -) - -// responseState sits below compression and tracks irreversible writes, including -// responses on routes that do not use compression. -type responseState struct { - http.ResponseWriter - committed bool - status int - bytes int64 - firstWrite time.Time - writeFailed bool -} - -func (w *responseState) Unwrap() http.ResponseWriter { return w.ResponseWriter } - -func (w *responseState) WriteHeader(status int) { - if w.committed { - return - } - w.ResponseWriter.WriteHeader(status) - if status >= 200 || status == http.StatusSwitchingProtocols { - w.committed = true - w.status = status - w.firstWrite = time.Now() - } -} - -func (w *responseState) Write(p []byte) (int, error) { - if !w.committed { - w.WriteHeader(http.StatusOK) - } - n, err := w.ResponseWriter.Write(p) - w.bytes += int64(n) - w.writeFailed = w.writeFailed || err != nil - return n, err -} - -func (w *responseState) FlushError() error { - if !w.committed { - w.WriteHeader(http.StatusOK) - } - err := http.NewResponseController(w.ResponseWriter).Flush() - w.writeFailed = w.writeFailed || err != nil - return err -} - -func (w *responseState) Flush() { _ = w.FlushError() } - -func responseCommitted(w http.ResponseWriter) bool { - for depth := 0; depth < 16; depth++ { - switch v := w.(type) { - case *responseState: - return v.committed - case *compressionWriter: - if v.started { - return true - } - } - wrapped, ok := w.(interface{ Unwrap() http.ResponseWriter }) - if !ok { - return false - } - w = wrapped.Unwrap() - } - return false -} diff --git a/backend/internal/server/response_state_test.go b/backend/internal/server/response_state_test.go deleted file mode 100644 index 212b2fc..0000000 --- a/backend/internal/server/response_state_test.go +++ /dev/null @@ -1,142 +0,0 @@ -package server - -import ( - "compress/gzip" - "io" - "net/http" - "net/http/httptest" - "strings" - "testing" -) - -func TestRecoveryBeforeCommit(t *testing.T) { - for _, earlyHints := range []bool{false, true} { - s := &Server{} - s.add("GET", "/fixture", "", func(q *request) (any, error) { - if earlyHints { - q.W.WriteHeader(http.StatusEarlyHints) - } - for _, name := range []string{"Content-Encoding", "Content-Disposition", "Content-Range", "ETag", "Last-Modified", "Trailer"} { - q.W.Header().Set(name, "stale") - } - q.W.Header().Set("Content-Length", "9999") - panic("private detail") - }) - srv := httptest.NewServer(s) - resp, err := srv.Client().Get(srv.URL + "/fixture") - if err != nil { - srv.Close() - t.Fatal(err) - } - body, err := io.ReadAll(resp.Body) - resp.Body.Close() - srv.Close() - if err != nil || resp.StatusCode != 500 || string(body) != `{"error":"server_error"}` { - t.Fatalf("hints=%v: status=%d body=%q err=%v", earlyHints, resp.StatusCode, body, err) - } - for _, name := range []string{"Content-Encoding", "Content-Disposition", "Content-Range", "Last-Modified", "Trailer"} { - if resp.Header.Get(name) != "" { - t.Errorf("stale %s", name) - } - } - if resp.Header.Get("ETag") == "stale" { - t.Error("stale ETag") - } - if s.failures.Load() != 1 { - t.Error("panic not counted") - } - } -} - -func TestRecoveryAfterCommitAbortsHTTP(t *testing.T) { - for _, encoding := range []string{"identity", "gzip"} { - for _, mode := range []string{"panic", "error", "returned-error", "abort", "flush"} { - t.Run(encoding+"/"+mode, func(t *testing.T) { - s := &Server{} - prefix := strings.Repeat("partial response ", 100) - s.add("GET", "/fixture", "", func(q *request) (any, error) { - q.W.Header().Set("Content-Type", "text/plain") - if mode != "flush" { - if _, err := io.WriteString(q.W, prefix); err != nil { - panic(err) - } - } - if err := http.NewResponseController(q.W).Flush(); err != nil { - panic(err) - } - switch mode { - case "error": - writeError(q.W, fail("late_error", 500)) - case "returned-error": - return nil, fail("late_error", 400) - case "abort": - panic(http.ErrAbortHandler) - default: - panic("private detail") - } - return written{}, nil - }) - srv := httptest.NewServer(s) - defer srv.Close() - transport := &http.Transport{DisableCompression: true} - defer transport.CloseIdleConnections() - client := &http.Client{Transport: transport} - req, _ := http.NewRequest("GET", srv.URL+"/fixture", nil) - req.Header.Set("Accept-Encoding", encoding) - resp, err := client.Do(req) - if err != nil { - t.Fatal(err) - } - defer resp.Body.Close() - var reader io.Reader = resp.Body - if encoding == "gzip" { - gz, err := gzip.NewReader(reader) - if err != nil { - t.Fatal(err) - } - defer gz.Close() - reader = gz - } - body, err := io.ReadAll(reader) - if err == nil { - t.Fatal("truncated response reported success") - } - expected := prefix - if mode == "flush" { - expected = "" - } - if string(body) != expected { - t.Fatalf("unexpected body: %q", body) - } - expectedFailures := uint64(1) - if mode == "abort" || mode == "error" { - expectedFailures = 0 - } - if s.failures.Load() != expectedFailures { - t.Errorf("failures=%d", s.failures.Load()) - } - }) - } - } -} - -func TestResponseStateInformationalAndFlush(t *testing.T) { - recorder := httptest.NewRecorder() - w := &responseState{ResponseWriter: recorder} - w.WriteHeader(103) - if responseCommitted(w) { - t.Fatal("early hints committed response") - } - if err := w.FlushError(); err != nil { - t.Fatal(err) - } - if !responseCommitted(w) { - t.Fatal("flush did not commit") - } - defer func() { - if recover() != http.ErrAbortHandler { - t.Error("late error did not abort") - } - }() - writeError(w, fail("late_error", 500)) -} diff --git a/backend/internal/server/routes.go b/backend/internal/server/routes.go deleted file mode 100644 index fcbd593..0000000 --- a/backend/internal/server/routes.go +++ /dev/null @@ -1,120 +0,0 @@ -package server - -import ( - "github.com/tdurieux/anonymous_github/backend/internal/anonymize" - "net/url" - "strings" - "time" -) - -func queryEscape(s string) string { return url.QueryEscape(s) } -func (s *Server) register() { - s.registerAdmin() - s.add("GET", "/api/providers", "user", s.providerCapabilities) - s.add("GET", "/api/providers/:provider/gist/:id", "user", s.embeddedSource("gist")) - s.add("GET", "/api/providers/:provider/pr/:id", "user", s.embeddedSource("pr")) - s.add("GET", "/api/providers/:provider/repositories", "user", s.allRepositories) - for _, mode := range []string{"metadata", "branches", "readme"} { - s.add("GET", "/api/providers/:provider/repository/"+mode, "user", s.sourceRepository(mode)) - } - s.add("GET", "/script/go-project-page.js", "", s.projectPageScript) - s.add("POST", "/api/repo/claim", "user", s.claim) - s.add("GET", "/api/stat", "", s.stats) - s.add("GET", "/api/stat/history", "", s.stats) - s.add("GET", "/api/message", "", s.message) - s.add("GET", "/api/gist/source/:id", "user", s.embeddedSource("gist")) - s.add("GET", "/api/pr/:owner/:repository/:id", "user", s.embeddedSource("pr")) - s.add("GET", "/w/:id/*path", "", s.webview) - s.add("GET", "/w/:id", "", func(q *request) (any, error) { - if !strings.HasSuffix(q.R.URL.Path, "/") { - return q.redirect(q.R.URL.Path + "/"), nil - } - return s.webview(q) - }) - for _, method := range []string{"GET", "PATCH"} { - s.add(method, "/api/maintenance/repositories/:id", "user", s.maintenanceResource) - } - for _, method := range []string{"GET", "POST"} { - s.add(method, "/api/user/maintenance-tokens", "user", s.maintenanceTokens) - } - s.add("DELETE", "/api/user/maintenance-tokens/:id", "user", s.maintenanceTokens) - s.add("GET", "/github/app/install", "user", s.appInstall) - s.add("GET", "/github/app/setup", "", s.appInstall) - s.add("GET", "/github/connections", "user", s.connections) - s.add("POST", "/github/connections/migrate", "user", s.connections) - s.add("POST", "/github/connections/disconnect-oauth", "user", s.connections) - s.add("DELETE", "/api/user", "user", s.deleteAccount) - s.add("GET", "/api/conferences/plans", "user", func(q *request) (any, error) { return plans, nil }) - for _, method := range []string{"GET", "POST"} { - s.add(method, "/api/conferences", "user", s.conferences) - } - for _, method := range []string{"GET", "POST", "DELETE"} { - s.add(method, "/api/conferences/:id", "user", s.conferences) - } - s.add("GET", "/api/user/dashboard", "user", s.dashboard) - s.add("GET", "/api/options", "", func(q *request) (any, error) { - return M{"GITHUB_APP_ENABLED": s.Config.AppEnabled && s.Config.AppNewConnections, "GITHUB_OAUTH_ENABLED": s.Config.OAuthEnabled, "ENABLE_DOWNLOAD": s.Config.Download, "MAX_FILE_SIZE": anonymize.MaxInput, "MAX_REPO_SIZE": 60000, "ANONYMIZATION_MASK": s.Config.Mask}, nil - }) - s.add("POST", "/api/anonymize-preview", "user", s.preview) - s.add("POST", "/github/login-token", "", s.loginToken) - for _, prefix := range []string{"/github", "/github/app"} { - s.add("GET", prefix+"/login", "", s.oauthStart) - } - s.add("GET", "/github/auth", "", s.oauthCallback) - s.add("GET", "/github/app/callback", "", s.oauthCallback) - s.add("GET", "/github/account-recovery", "", func(q *request) (any, error) { - flow := obj(q.Session["githubRecovery"]) - return M{"required": number(flow["expires"]) > time.Now().UnixMilli()}, nil - }) - s.add("GET", "/api/user/logout", "user", s.logout) - s.add("GET", "/api/user", "user", func(q *request) (any, error) { - return userProfile(q.User), nil - }) - s.add("GET", "/api/user/default", "user", func(q *request) (any, error) { return userDefaults(q.User), nil }) - s.add("POST", "/api/user/default", "user", func(q *request) (any, error) { - value, err := castUserDefaults(q.Body) - if err != nil { - return nil, err - } - _, err = s.Store.update(q.ctx(), "users", M{"_id": q.User["_id"]}, M{"$set": M{"default": value}}) - if err != nil { - return nil, err - } - return q.text("ok"), nil - }) - s.add("GET", "/api/user/quota", "user", s.quota) - s.add("POST", "/api/user/project-name", "user", s.projectName) - s.add("GET", "/api/user/search/github-users", "user", s.githubUsers) - s.add("GET", "/api/user/all_repositories", "user", s.allRepositories) - s.add("GET", "/api/user/:username/all_repositories", "user", s.allRepositories) - for kind, suffix := range map[string]string{"repo": "repositories", "pr": "pull_requests", "gist": "gists"} { - s.add("GET", "/api/user/anonymized_"+suffix, "user", s.userResources(kind)) - } - s.add("GET", "/api/admin/tokens", "admin", s.tokens) - s.add("POST", "/api/admin/tokens", "admin", s.tokens) - s.add("DELETE", "/api/admin/tokens/:id", "admin", s.tokens) - for _, kind := range []string{"repo", "pr", "gist"} { - prefix := "/api/" + kind - s.add("GET", prefix+"/:id/options", "", s.publicOptions(kind)) - if kind != "repo" { - s.add("GET", prefix+"/:id/content", "", s.embeddedContent(kind)) - } - s.add("GET", prefix+"/:id", "user", s.privateResource(kind)) - s.add("POST", prefix, "user", s.saveResource(kind, true)) - s.add("POST", prefix+"/:id", "user", s.saveResource(kind, false)) - s.add("DELETE", prefix+"/:id", "user", s.lifecycle(kind, "remove")) - s.add("POST", prefix+"/:id/refresh", "user", s.lifecycle(kind, "refresh")) - s.add("POST", prefix+"/:id/extend", "user", s.lifecycle(kind, "extend")) - } - s.add("GET", "/api/repo/:id/files", "", s.files("list")) - s.add("GET", "/api/repo/:id/files/search", "", s.files("search")) - s.add("GET", "/api/repo/:id/files/counts", "", s.files("counts")) - s.add("GET", "/api/repo/:id/coauthors", "user", s.coauthors) - s.add("POST", "/api/repo/:id/coauthors", "user", s.coauthors) - s.add("DELETE", "/api/repo/:id/coauthors/:username", "user", s.coauthors) - s.add("GET", "/api/repo/:id/file/*path", "", s.file) - s.add("GET", "/api/repo/:id/zip", "", s.zip) - s.add("GET", "/api/repo/:owner/:repo/branches", "user", s.sourceRepository("branches")) - s.add("GET", "/api/repo/:owner/:repo/readme", "user", s.sourceRepository("readme")) - s.add("GET", "/api/repo/:owner/:repo", "user", s.sourceRepository("metadata")) -} diff --git a/backend/internal/server/routes_test.go b/backend/internal/server/routes_test.go deleted file mode 100644 index efab3c0..0000000 --- a/backend/internal/server/routes_test.go +++ /dev/null @@ -1,112 +0,0 @@ -package server - -import ( - "encoding/json" - "net/http/httptest" - "os" - "strings" - "testing" -) - -func TestRouteInventory(t *testing.T) { - raw, e := os.ReadFile("../../contracts/routes.json") - if e != nil { - t.Fatal(e) - } - var contracts []struct{ Method, Path string } - if e = json.Unmarshal(raw, &contracts); e != nil { - t.Fatal(e) - } - s := &Server{} - s.register() - for _, contract := range contracts { - if contract.Path == "/api/healthcheck" || contract.Path == "/github/app/webhook" { - recorder := httptest.NewRecorder() - s.ServeHTTP(recorder, httptest.NewRequest(contract.Method, contract.Path, nil)) - expected := 200 - if contract.Path == "/github/app/webhook" { - expected = 401 - } - if recorder.Code != expected { - t.Errorf("special route %s: status %d, want %d", contract.Path, recorder.Code, expected) - } - continue - } - path := strings.ReplaceAll(strings.ReplaceAll(contract.Path, "{", ""), "}", "") - parts := strings.Split(path, "/") - for i, p := range parts { - if strings.HasPrefix(p, ":") { - parts[i] = "fixture" - } - if strings.HasPrefix(p, "*") { - parts[i] = "file.txt" - } - } - path = strings.Join(parts, "/") - found := false - for _, r := range s.routes { - if r.method == contract.Method && r.pattern.MatchString(path) { - found = true - if normalizeRouteTemplate(r.template) != normalizeRouteTemplate(contract.Path) { - t.Errorf("%s %s dispatched to %s", contract.Method, contract.Path, r.template) - } - break - } - } - if !found { - t.Errorf("unregistered route: %s %s", contract.Method, contract.Path) - } - } -} - -func normalizeRouteTemplate(path string) string { - path = strings.Trim(strings.NewReplacer("{", "", "}", "").Replace(path), "/") - parts := strings.Split(path, "/") - for i, part := range parts { - if strings.HasPrefix(part, ":") { - parts[i] = ":param" - } - if strings.HasPrefix(part, "*") { - parts[i] = "*path" - } - } - return strings.Join(parts, "/") -} - -func TestCacheMonitoringAvailability(t *testing.T) { - s := &Server{} - s.register() - for _, route := range s.routes { - if route.method != "GET" || !route.pattern.MatchString("/api/admin/cache") { - continue - } - if route.auth != "admin" { - t.Fatal("cache monitoring must require administrator access") - } - recorder := httptest.NewRecorder() - response, err := route.handler(&request{W: recorder, R: httptest.NewRequest("GET", "/api/admin/cache", nil)}) - if err != nil { - t.Fatal(err) - } - body, err := json.Marshal(response) - if err != nil { - t.Fatal(err) - } - var report struct { - Available bool - Reason string - Rows []any - } - if err := json.Unmarshal(body, &report); err != nil { - t.Fatal(err) - } - if report.Available || report.Reason == "" || report.Rows == nil || len(report.Rows) != 0 { - t.Fatalf("invalid unavailable telemetry response: %s", body) - } - if recorder.Header().Get("Cache-Control") != "no-store" { - t.Fatal("monitoring response must not be cached") - } - return - } - t.Fatal("cache monitoring route missing") -} diff --git a/backend/internal/server/session.go b/backend/internal/server/session.go deleted file mode 100644 index 9737d03..0000000 --- a/backend/internal/server/session.go +++ /dev/null @@ -1,54 +0,0 @@ -package server - -import ( - "encoding/json" - "net/http" - "net/url" - "time" - - "github.com/tdurieux/anonymous_github/backend/internal/security" -) - -const authenticatedSessionTTL = 30 * 24 * time.Hour - -func (q *request) sessionCookieMetadata(ttl time.Duration) { - cookie := M{"originalMaxAge": nil, "expires": nil, "secure": q.Server.Config.SecureCookies, "httpOnly": true, "path": "/", "sameSite": "lax"} - if q.Identity.Active() { - cookie["originalMaxAge"] = ttl.Milliseconds() - cookie["expires"] = time.Now().Add(ttl).UTC().Format(time.RFC3339Nano) - } - q.Session["cookie"] = cookie -} - -func (q *request) setSessionCookie(ttl time.Duration) { - cookie := &http.Cookie{Name: "connect.sid", Value: url.QueryEscape(security.SignSession(q.SessionID, q.Server.Config.SessionSecret)), Path: "/", HttpOnly: true, Secure: q.Server.Config.SecureCookies, SameSite: http.SameSiteLaxMode} - if q.Identity.Active() { - cookie.MaxAge = int(ttl.Seconds()) - cookie.Expires = time.Now().Add(ttl).UTC() - } - http.SetCookie(q.W, cookie) -} - -// Refresh at most once per day. Compare-and-set prevents an in-flight request -// from recreating a session deleted by logout or overwriting a concurrent save. -const renewSession = `if redis.call('get',KEYS[1]) ~= ARGV[1] then return 0 end; redis.call('set',KEYS[1],ARGV[2],'PX',ARGV[3]); return 1` - -func (q *request) refreshSession(raw []byte) error { - expires, err := time.Parse(time.RFC3339Nano, str(obj(q.Session["cookie"])["expires"])) - if err == nil && time.Until(expires) > authenticatedSessionTTL-24*time.Hour { - return nil - } - q.sessionCookieMetadata(authenticatedSessionTTL) - updated, err := json.Marshal(q.Session) - if err != nil { - return err - } - renewed, err := q.Server.Store.Redis.Eval(q.ctx(), renewSession, []string{"anoGH_session:" + q.SessionID}, raw, updated, authenticatedSessionTTL.Milliseconds()).Int() - if err != nil { - return fail("session_unavailable", 503) - } - if renewed == 1 { - q.setSessionCookie(authenticatedSessionTTL) - } - return nil -} diff --git a/backend/internal/server/settings_lifecycle_integration_test.go b/backend/internal/server/settings_lifecycle_integration_test.go deleted file mode 100644 index d9f3498..0000000 --- a/backend/internal/server/settings_lifecycle_integration_test.go +++ /dev/null @@ -1,128 +0,0 @@ -package server - -import ( - "bytes" - "context" - "encoding/json" - "fmt" - "net/http/httptest" - "reflect" - "testing" - "time" - - "go.mongodb.org/mongo-driver/v2/bson" -) - -func runSettingsLifecycleIntegration(t *testing.T, s *Server, p *fixtureProvider, token string) { - t.Run("unchanged source settings lifecycle", func(t *testing.T) { - ctx := context.Background() - original, err := s.Store.one(ctx, collection("repo"), M{"repoId": "second-provider"}) - if err != nil { - t.Fatal(err) - } - p.revoked = true - defer func() { p.revoked = false }() - before := time.Now().Add(-time.Hour).Truncate(time.Millisecond) - call := func(id string, options M) *httptest.ResponseRecorder { - source := obj(original["source"]) - body := M{"repoId": id, "fullName": source["repositoryName"], "source": M{"branch": source["branch"], "commit": source["commit"]}, "terms": []any{"new term"}, "options": options} - raw, _ := json.Marshal(body) - req := httptest.NewRequest("POST", "/api/repo/"+id, bytes.NewReader(raw)) - req.RemoteAddr = "198.51.100.5:1234" - req.Header.Set("Content-Type", "application/json") - req.Header.Set("Authorization", "Bearer "+token) - w := httptest.NewRecorder() - s.ServeHTTP(w, req) - return w - } - insert := func(id, status string) M { - t.Helper() - r := selectFields(original, "owner", "source", "providerAccess", "options") - r["_id"], r["repoId"], r["status"], r["anonymizeDate"], r["statusDate"] = bson.NewObjectID(), id, status, before, before - if _, err := s.Store.DB.Collection(collection("repo")).InsertOne(ctx, r); err != nil { - t.Fatal(err) - } - return r - } - for i, c := range reactivationCases(t) { - id := fmt.Sprintf("settings-lifecycle-%d", i) - insert(id, c.Status) - blocked := c.Status == "archived" || c.Status == "removing" || c.Status == "expiring" - liveJob := c.Status == "preparing" || c.Status == "queue" || c.Status == "download" - if liveJob { - if err := s.enqueue(ctx, "repo", id, "prepare"); err != nil { - t.Fatal(err) - } - if _, err := s.Store.update(ctx, "gojobs", M{"_id": "repo:" + id + ":prepare"}, M{"$set": M{"state": "active", "attempts": 2}}); err != nil { - t.Fatal(err) - } - } - w := call(id, c.Options) - if blocked { - if w.Code != 409 { - t.Fatalf("%s: %d %s", c.Name, w.Code, w.Body) - } - continue - } - want := c.Status - if c.Expected { - want = "preparing" - } - var response M - if err := json.Unmarshal(w.Body.Bytes(), &response); err != nil { - t.Fatal(err) - } - if w.Code != 200 || response["status"] != want { - t.Fatalf("%s: %d %s", c.Name, w.Code, w.Body) - } - current, err := s.Store.one(ctx, collection("repo"), M{"repoId": id}) - if err != nil { - t.Fatal(err) - } - if !reflect.DeepEqual(current["source"], original["source"]) || !reflect.DeepEqual(current["providerAccess"], original["providerAccess"]) { - t.Fatal("source or binding changed", c.Name) - } - if !date(current["settingsSavedAt"]).After(before) { - t.Fatal("settings timestamp missing", c.Name) - } - if c.Expected { - if !date(current["anonymizeDate"]).After(before) || current["statusMessage"] != nil { - t.Fatal("reactivation metadata", c.Name, current) - } - } else if !date(current["anonymizeDate"]).Equal(before) || !date(current["statusDate"]).Equal(before) { - t.Fatal("settings edit changed lifecycle", c.Name, current) - } - job, err := s.Store.one(ctx, "gojobs", M{"_id": "repo:" + id + ":prepare"}) - if err != nil { - t.Fatal(err) - } - if liveJob { - if job["state"] != "active" || number(job["attempts"]) != 2 { - t.Fatal("active job changed", c.Name, job) - } - } else if c.Expected { - if job == nil || job["state"] != "waiting" { - t.Fatal("reactivation not queued", c.Name, job) - } - } else if job != nil { - t.Fatal("unnecessary preparation", c.Name, job) - } - } - id := "settings-reactivation-failure" - insert(id, "removed") - command := func(v M) error { - return s.Store.DB.RunCommand(ctx, bson.D{{Key: "collMod", Value: "gojobs"}, {Key: "validator", Value: v}, {Key: "validationLevel", Value: "strict"}, {Key: "validationAction", Value: "error"}}).Err() - } - if err := command(M{"_id": M{"$ne": "repo:" + id + ":prepare"}}); err != nil { - t.Fatal(err) - } - defer command(M{}) - if w := call(id, M{"expirationMode": "never"}); w.Code != 500 { - t.Fatal(w.Code, w.Body) - } - current, err := s.Store.one(ctx, collection("repo"), M{"repoId": id}) - if err != nil || current["status"] != "error" || current["statusMessage"] != "preparation_interrupted" { - t.Fatal("failed enqueue stranded reactivation", current, err) - } - }) -} diff --git a/backend/internal/server/shared_cache.go b/backend/internal/server/shared_cache.go deleted file mode 100644 index 61ff5a0..0000000 --- a/backend/internal/server/shared_cache.go +++ /dev/null @@ -1,253 +0,0 @@ -package server - -import ( - "context" - "crypto/sha256" - "encoding/hex" - "errors" - "io" - "path/filepath" - "sync" - "time" - - "github.com/tdurieux/anonymous_github/backend/internal/anonymize" - "github.com/tdurieux/anonymous_github/backend/internal/blobcache" - "github.com/tdurieux/anonymous_github/backend/internal/provider" -) - -func (s *Server) startSharedCache() error { - if !s.Config.SharedCacheEnabled || s.Config.Storage != "filesystem" { - return nil - } - options := s.Config.SharedCache - options.Root = filepath.Join(options.Root, "source") - options.Name = "source" - options.Stage = func(ctx context.Context, name string, elapsed time.Duration, err error) { - if observe := s.stageObserver(ctx); observe != nil { - if errors.Is(err, errResultUnchanged) { - err = nil - } - observe(name, elapsed, err) - } - } - options.Observe = func(event blobcache.Event) { - s.observeCache(event.Context, event.Name, event.Bytes, event.Duration) - } - cache, err := blobcache.New(context.Background(), options) - if err != nil { - return err - } - s.sourceCache = cache - if s.Config.SharedCacheDecisions { - resultOptions := options - resultOptions.Root = filepath.Join(s.Config.SharedCache.Root, "results") - resultOptions.Name = "result" - resultOptions.Budget = s.Config.SharedResultBytes - resultOptions.MaxObject = min(options.MaxObject, s.Config.SharedResultBytes/8) - // TypeScript uses the default 10% saving and 90% low-water for results. - resultOptions.Saving = nil - resultOptions.LowWater = nil - s.resultCache, err = blobcache.New(context.Background(), resultOptions) - if err != nil { - return err - } - } - - ctx, cancel := context.WithCancel(context.Background()) - s.sharedCacheCancel = cancel - s.sharedCacheDone = make(chan struct{}) - go func() { - defer close(s.sharedCacheDone) - ticker := time.NewTicker(time.Minute) - defer ticker.Stop() - for { - for _, store := range []*blobcache.Cache{s.sourceCache, s.resultCache} { - if store == nil { - continue - } - work, stop := context.WithTimeout(ctx, 30*time.Second) - err := store.Maintain(work) - stop() - if err != nil && ctx.Err() == nil { - name := "source_error" - if store == s.resultCache { - name = "result_error" - } - s.observeCache(ctx, name, 0, 0) - } - } - select { - case <-ctx.Done(): - return - case <-ticker.C: - } - } - }() - return nil -} - -func sharedSourceKey(r M, p provider.Repositories, a provider.Access, entry provider.Entry) string { - if identity, ok := p.(provider.ContentIdentity); ok { - if key := identity.ContentCacheKey(a, entry); key != "" { - return key - } - } - // Opaque revisions need repository, path and lifecycle namespaces. Only a - // provider that can prove a global content identity may share keys globally. - hash := sha256.Sum256([]byte(rawCachePath(r, a, entry))) - return "provider-" + hex.EncodeToString(hash[:]) -} - -func (s *Server) sharedSource(ctx context.Context, r M, p provider.Repositories, a provider.Access, entry provider.Entry) (io.ReadCloser, error) { - return s.sharedSourceRead(ctx, r, p, a, entry, false) -} - -// Internal transform consumers authorize their final output before release. -// Producers still authorize before fetching; raw callers retain release checks. -func (s *Server) sharedSourceRead(ctx context.Context, r M, p provider.Repositories, a provider.Access, entry provider.Entry, internalTransform bool) (result io.ReadCloser, resultErr error) { - started := time.Now() - defer func() { - if resultErr != nil { - s.observeCache(ctx, "source_error", 0, time.Since(started)) - } - }() - check := func(ctx context.Context) error { - if err := s.activeContentCache(ctx, r); err != nil { - return err - } - return s.authorizeMeasured(ctx, p, a) - } - // Lookup does not expose cached bytes. Producers authorize before reading - // upstream/legacy data, and every reader authorizes at release below, - // after any cache wait. Avoid an extra upstream check before lookup. - if err := s.activeContentCache(ctx, r); err != nil { - return nil, err - } - download := func(ctx context.Context) (io.ReadCloser, error) { - if err := check(ctx); err != nil { - return nil, err - } - body, err := s.openMeasuredSource(ctx, p, a, entry) - if err != nil { - return nil, err - } - return &bufferedBody{Reader: &cacheLimitReader{reader: body, remaining: anonymize.MaxInput}, Closer: body}, nil - } - verify := blobcache.Verifier(func(_ context.Context, proof blobcache.Proof) (string, error) { - if proof.Size < entry.Size { - return "", fail("storage_write_size_mismatch", 502) - } - return "sha256-" + proof.SHA256, nil - }) - if verifier, ok := p.(provider.ContentVerifier); ok { - verify = func(ctx context.Context, proof blobcache.Proof) (string, error) { - return verifier.VerifyContent(ctx, a, entry, provider.ContentProof{GitSHA: proof.GitSHA, SHA256: proof.SHA256, Size: proof.Size}) - } - } - _, canVerify := p.(provider.ContentVerifier) - allowLegacy, legacy := canVerify, false - produce := func(ctx context.Context) (io.ReadCloser, error) { - legacy = false - if allowLegacy { - for _, name := range legacySourcePaths(r, a, entry) { - size, err := s.content.Size(ctx, str(r["repoId"]), name) - if err != nil || size < entry.Size || size > anonymize.MaxInput { - continue - } - // Recheck after cache coordination before opening legacy bytes. - // Upstream downloads perform this same check in download. - if err := check(ctx); err != nil { - return nil, err - } - body, err := s.content.Read(ctx, str(r["repoId"]), name) - if err != nil { - continue - } - legacy = true - s.observeCache(ctx, "source_legacy_promotion", size, 0) - return &bufferedBody{Reader: &cacheLimitReader{reader: body, remaining: anonymize.MaxInput}, Closer: body}, nil - } - } - return download(ctx) - } - reader, err := s.sourceCache.GetOrFill(ctx, sharedSourceKey(r, p, a, entry), produce, verify, &entry.Size) - var admission *blobcache.AdmissionError - if err != nil && legacy && !errors.As(err, &admission) && ctx.Err() == nil { - allowLegacy = false - reader, err = s.sourceCache.GetOrFill(ctx, sharedSourceKey(r, p, a, entry), produce, verify, &entry.Size) - } - if err != nil { - var admission *blobcache.AdmissionError - if !errors.As(err, &admission) { - return nil, err - } - s.observeCache(ctx, "source_bypass", entry.Size, 0) - // Admission is an optimization decision, not a failed content request. - // Keep upstream reads bounded even when no cache space is available. - work, cancel := context.WithTimeout(ctx, 120*time.Second) - body, err := download(work) - if err != nil { - cancel() - return nil, err - } - if err = check(work); err != nil { - body.Close() - cancel() - return nil, err - } - // Match the minimum-size rule used by the generic fill verifier even - // when disk/object admission bypasses it. Provider-specific verifiers - // can interpret sizes differently, for example a Git LFS pointer size. - if !canVerify { - body = checkedBody(body, entry.Size) - } - bounded := &sharedFallback{body: body, reader: cacheLimitReader{reader: body, remaining: anonymize.MaxInput}, ctx: work, cancel: cancel} - context.AfterFunc(work, func() { bounded.Close() }) - return bounded, nil - } - if reader.Record().Size > anonymize.MaxInput { - reader.Close() - return nil, fail("file_too_big", 413) - } - var releaseErr error - if internalTransform { - releaseErr = s.activeContentCache(ctx, r) - } else { - releaseErr = check(ctx) - } - if err = releaseErr; err != nil { - reader.Close() - return nil, err - } - return reader, nil -} - -type sharedFallback struct { - body io.ReadCloser - reader cacheLimitReader - ctx context.Context - cancel context.CancelFunc - once sync.Once - terminal error -} - -func (r *sharedFallback) Close() error { r.once.Do(func() { r.cancel(); r.body.Close() }); return nil } -func (r *sharedFallback) Read(p []byte) (int, error) { - // Peek may consume a terminal error while retaining buffered bytes. Keep - // EOF/read failures stable after Close cancels the download context. - if r.terminal != nil { - return 0, r.terminal - } - if r.ctx.Err() != nil { - return 0, context.Cause(r.ctx) - } - n, err := r.reader.Read(p) - if r.ctx.Err() != nil { - err = context.Cause(r.ctx) - } - if err != nil { - r.terminal = err - r.Close() - } - return n, err -} diff --git a/backend/internal/server/shared_cache_integration_test.go b/backend/internal/server/shared_cache_integration_test.go deleted file mode 100644 index 65e0061..0000000 --- a/backend/internal/server/shared_cache_integration_test.go +++ /dev/null @@ -1,210 +0,0 @@ -package server - -import ( - "context" - "crypto/sha256" - "encoding/hex" - "errors" - "io" - "net/http/httptest" - "strings" - "testing" - "time" - - "github.com/tdurieux/anonymous_github/backend/internal/blobcache" - "github.com/tdurieux/anonymous_github/backend/internal/provider" - "go.mongodb.org/mongo-driver/v2/bson" -) - -func runSharedSourceIntegration(t *testing.T, s *Server, p *fixtureProvider, call func(string, string, string, any) *httptest.ResponseRecorder) { - t.Run("shared source cache", func(t *testing.T) { - cache, err := blobcache.New(t.Context(), blobcache.Options{Root: t.TempDir(), Budget: 65536, MaxObject: 4096, Gzip: true}) - if err != nil { - t.Fatal(err) - } - defer cache.Close() - s.sourceCache = cache - defer func() { s.sourceCache = nil; p.onOpen = nil; p.revoked = false }() - ctx := t.Context() - original, err := s.Store.one(ctx, collection("repo"), M{"repoId": "second-provider"}) - if err != nil { - t.Fatal(err) - } - r := selectFields(original, "owner", "source", "providerAccess", "options") - r["_id"], r["repoId"], r["status"] = bson.NewObjectID(), "shared-source-fixture", "ready" - r["treeGeneration"], r["anonymizeDate"] = "shared-generation", time.Now().Truncate(time.Millisecond) - if _, err = s.Store.DB.Collection(collection("repo")).InsertOne(ctx, r); err != nil { - t.Fatal(err) - } - row := M{"path": "", "name": "Alice.txt", "sha": "blob:one", "size": int64(len(fixtureContent))} - read := func() (string, error) { - body, err := s.blob(ctx, r, row) - if err != nil { - return "", err - } - defer body.Close() - data, err := io.ReadAll(body) - return string(data), err - } - start := p.openCount.Load() - for i := 0; i < 2; i++ { - beforeAuth := p.authorizeCount.Load() - body, err := read() - if err != nil || body != fixtureContent { - t.Fatal(body, err) - } - // Cold reads check producer and release. Warm reads authorize - // at release, after lookup, without exposing bytes beforehand. - want := int64(2) - if i == 1 { - want = 1 - } - if got := p.authorizeCount.Load() - beforeAuth; got != want { - t.Fatalf("read %d: authorization calls %d, want %d", i, got, want) - } - } - if p.openCount.Load() != start+1 { - t.Fatal("warm request downloaded again") - } - stats, err := cache.Stats(ctx) - if err != nil || stats.Blobs != 1 || stats.ActiveReaders != 0 || stats.ReservedBytes != 0 { - t.Fatal(stats, err) - } - p.revoked = true - if _, err = read(); err == nil || err.Error() != "fixture_access_revoked" { - t.Fatal("revoked cache hit", err) - } - p.revoked = false - // Distinct opaque revisions cannot collide even when their paths match. - row["sha"] = "blob:two" - p.onOpen = func() (io.ReadCloser, error) { - p.revoked = true - return io.NopCloser(strings.NewReader(fixtureContent)), nil - } - if _, err = read(); err == nil || err.Error() != "fixture_access_revoked" { - t.Fatal("revocation during fill", err) - } - p.revoked = false - p.onOpen = nil - if _, err = read(); err != nil { - t.Fatal(err) - } - // A removal while bytes are fetched must reject the completed fill. - row["sha"] = "blob:three" - p.onOpen = func() (io.ReadCloser, error) { - _, err := s.Store.update(ctx, collection("repo"), M{"_id": r["_id"]}, M{"$set": M{"status": "removed"}}) - return io.NopCloser(strings.NewReader(fixtureContent)), err - } - if _, err = read(); err == nil || err.Error() != "repository_changed" { - t.Fatal("stale lifecycle served", err) - } - p.onOpen = nil - // Exercise the public file handler and anonymization with shared source reads. - before := p.openCount.Load() - for i := 0; i < 2; i++ { - w := call("GET", "/api/repo/second-provider/file/XXXX-1.txt", "", nil) - if w.Code != 200 || strings.Contains(w.Body.String(), "Alice") { - t.Fatal(w.Code, w.Body) - } - } - if p.openCount.Load() != before+1 { - t.Fatal("HTTP requests did not share source", p.openCount.Load()-before) - } - p.revoked = true - if w := call("GET", "/api/repo/second-provider/file/XXXX-1.txt", "", nil); w.Code != 403 { - t.Fatal("HTTP hit bypassed authorization", w.Code, w.Body) - } - // Bodyless responses must still reject revoked grants, even with a - // matching validator that would otherwise return 304. - for _, method := range []string{"GET", "HEAD"} { - req := httptest.NewRequest(method, "/api/repo/second-provider/file/XXXX-1.txt", nil) - req.RemoteAddr = "192.0.2.1:1234" - req.Header.Set("If-None-Match", "*") - w := httptest.NewRecorder() - s.ServeHTTP(w, req) - if w.Code != 403 { - t.Fatalf("revoked conditional %s: %d", method, w.Code) - } - } - if w := call("HEAD", "/api/repo/second-provider/file/XXXX-1.txt", "", nil); w.Code != 403 { - t.Fatal("revoked HEAD", w.Code) - } - p.revoked = false - // An optional verifier receives the computed proof for an opaque - // provider revision and can reject publication without GitHub rules. - accessForVerify, err := s.providerAccess(original) - if err != nil { - t.Fatal(err) - } - verified := &verifyingFixture{fixtureProvider: p, reject: true} - verifyEntry := provider.Entry{Path: "verified.txt", Revision: "opaque:verified", Size: int64(len(fixtureContent))} - if body, err := s.sharedSource(ctx, original, verified, accessForVerify, verifyEntry); err == nil { - body.Close() - t.Fatal("verifier rejection ignored") - } else if err.Error() != "fixture_hash_rejected" { - t.Fatal(err) - } - if hit, err := cache.Lookup(ctx, sharedSourceKey(original, verified, accessForVerify, verifyEntry)); err != nil || hit != nil { - if hit != nil { - hit.Close() - } - t.Fatal("failed proof was published", err) - } - verified.reject = false - verifiedBody, err := s.sharedSource(ctx, original, verified, accessForVerify, verifyEntry) - if err != nil { - t.Fatal(err) - } - verifiedBytes, err := io.ReadAll(verifiedBody) - verifiedBody.Close() - if err != nil || string(verifiedBytes) != fixtureContent || verified.calls != 2 { - t.Fatal(string(verifiedBytes), err, verified.calls) - } - // Disk admission failure falls back to a bounded upstream stream. - tiny, err := blobcache.New(ctx, blobcache.Options{Root: t.TempDir(), Budget: 1, MaxObject: 4096}) - if err != nil { - t.Fatal(err) - } - defer tiny.Close() - s.sourceCache = tiny - access, err := s.providerAccess(original) - if err != nil { - t.Fatal(err) - } - body, err := s.sharedSource(ctx, original, p, access, provider.Entry{Path: "Alice.txt", Revision: "opaque:fallback", Size: int64(len(fixtureContent))}) - if err != nil { - t.Fatal(err) - } - data, err := io.ReadAll(body) - body.Close() - if err != nil || string(data) != fixtureContent { - t.Fatal(string(data), err) - } - stats, err = tiny.Stats(ctx) - if err != nil || stats.Blobs != 0 || stats.ReservedBytes != 0 { - t.Fatal(stats, err) - } - }) -} - -type verifyingFixture struct { - afterVerify func() - *fixtureProvider - reject bool - calls int -} - -func (p *verifyingFixture) VerifyContent(_ context.Context, _ provider.Access, _ provider.Entry, proof provider.ContentProof) (string, error) { - p.calls++ - if p.afterVerify != nil { - defer p.afterVerify() - } - sum := sha256.Sum256([]byte(fixtureContent)) - if proof.SHA256 != hex.EncodeToString(sum[:]) || proof.Size != int64(len(fixtureContent)) { - return "", errors.New("incorrect_proof") - } - if p.reject { - return "", errors.New("fixture_hash_rejected") - } - return "sha256-" + proof.SHA256, nil -} diff --git a/backend/internal/server/shared_cache_test.go b/backend/internal/server/shared_cache_test.go deleted file mode 100644 index dbaaf7f..0000000 --- a/backend/internal/server/shared_cache_test.go +++ /dev/null @@ -1,115 +0,0 @@ -package server - -import ( - "context" - "errors" - "io" - "os" - "path/filepath" - "strings" - "testing" - - "github.com/tdurieux/anonymous_github/backend/internal/blobcache" - "github.com/tdurieux/anonymous_github/backend/internal/provider" -) - -func TestSharedCacheConfiguration(t *testing.T) { - t.Setenv("SESSION_SECRET", "synthetic-config") - t.Setenv("CREDENTIAL_KEYS", `{"test":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="}`) - t.Setenv("CREDENTIAL_ACTIVE_KEY_ID", "test") - t.Setenv("SHARED_CACHE_ENABLED", "true") - t.Setenv("SHARED_CACHE_DECISIONS", "true") - t.Setenv("SHARED_CACHE_RESULT_BYTES", "32768") - t.Setenv("SHARED_CACHE_PATH", t.TempDir()) - t.Setenv("SHARED_CACHE_BYTES", "65536") - t.Setenv("SHARED_CACHE_MAX_FILE_BYTES", "4096") - t.Setenv("SHARED_CACHE_FREE_BYTES", "0") - t.Setenv("SHARED_CACHE_GZIP_MIN_SAVING", "0.2") - t.Setenv("SHARED_CACHE_LOW_WATER", "0.8") - c, err := LoadConfig() - if err != nil { - t.Fatal(err) - } - if !c.SharedCacheDecisions || c.SharedResultBytes != 32768 || !c.SharedCacheEnabled || c.SharedCache.Budget != 65536 || c.SharedCache.MaxObject != 4096 || c.SharedCache.FreeBytes != 0 || *c.SharedCache.Saving != 0.2 || *c.SharedCache.LowWater != 0.8 { - t.Fatal(c.SharedCache) - } - for _, bad := range []struct{ key, value string }{{"SHARED_CACHE_RESULT_BYTES", "0"}, {"SHARED_CACHE_BYTES", "-1"}, {"SHARED_CACHE_MAX_FILE_BYTES", "bad"}, {"SHARED_CACHE_FREE_BYTES", "-1"}, {"SHARED_CACHE_LOW_WATER", "NaN"}, {"SHARED_CACHE_GZIP_MIN_SAVING", "1.1"}} { - t.Run(bad.key, func(t *testing.T) { - t.Setenv(bad.key, bad.value) - if _, err := LoadConfig(); err == nil { - t.Fatal("accepted invalid cache limit") - } - }) - } -} - -func TestSharedCacheLifecycle(t *testing.T) { - root := t.TempDir() - s, err := New(Config{Storage: "filesystem", Root: t.TempDir(), PublicDir: t.TempDir(), Workers: 1, SharedCacheEnabled: true, SharedCacheDecisions: true, SharedResultBytes: 65536, SharedCache: blobcache.Options{Root: root, Budget: 65536, MaxObject: 4096}}, nil) - if err != nil { - t.Fatal(err) - } - if s.sourceCache == nil || s.resultCache == nil { - t.Fatal("cache not initialized") - } - if _, err := os.Stat(filepath.Join(root, "source", "index.sqlite")); err != nil { - s.Close() - t.Fatal(err) - } - s.sharedCacheCancel() - <-s.sharedCacheDone - s.sharedCacheCancel = nil - s.cacheMetrics = testCacheMetrics() - // Use a request traffic value through the cache observer, without starting - // the metrics flusher against a database in this unit test. - ctx := context.WithValue(t.Context(), cacheTrafficKey{}, "website") - reader, err := s.sourceCache.GetOrFill(ctx, "lifecycle", func(context.Context) (io.ReadCloser, error) { return io.NopCloser(strings.NewReader("content")), nil }, nil, nil) - if err != nil { - s.cacheMetrics = nil - s.Close() - t.Fatal(err) - } - reader.Close() - found := false - for key := range s.cacheMetrics.pending { - if key.name == "source_fill" && key.traffic == "website" { - found = true - } - } - s.cacheMetrics = nil - s.Close() - if _, err := s.resultCache.GetOrFill(t.Context(), "closed", nil, nil, nil); !errors.Is(err, os.ErrClosed) { - t.Fatal("result cache survived shutdown", err) - } - if !found { - t.Fatal("cache lost request traffic context") - } - if _, err := s.sourceCache.GetOrFill(t.Context(), "lifecycle", nil, nil, nil); !errors.Is(err, os.ErrClosed) { - t.Fatal("cache survived server shutdown", err) - } - for _, storage := range []string{"s3", ""} { - other := &Server{Config: Config{Storage: storage, SharedCacheEnabled: true}} - if err := other.startSharedCache(); err != nil || other.sourceCache != nil { - t.Fatal("unexpected shared filesystem cache", storage, err) - } - } -} - -func TestSharedSourceProviderKeys(t *testing.T) { - p := &fixtureProvider{} - a := provider.Access{Ref: provider.Ref{Provider: "fixture", ID: "opaque:one", Commit: "revision:one"}} - r := M{"treeGeneration": "generation"} - entry := provider.Entry{Path: "a.txt", Revision: "blob:one"} - key := sharedSourceKey(r, p, a, entry) - for _, change := range []func(){func() { a.Ref.ID = "opaque:two" }, func() { a.Ref.Provider = "another" }, func() { entry.Path = "b.txt" }, func() { entry.Revision = "blob:two" }, func() { r["contentCacheRevision"] = "new" }} { - change() - if got := sharedSourceKey(r, p, a, entry); got == key { - t.Fatal("cache identity collision") - } - key = sharedSourceKey(r, p, a, entry) - } - sha := strings.Repeat("a", 40) - if got := sharedSourceKey(r, &githubProvider{}, a, provider.Entry{Revision: sha}); got != "git-"+sha { - t.Fatal(got) - } -} diff --git a/backend/internal/server/shared_fallback_integration_test.go b/backend/internal/server/shared_fallback_integration_test.go deleted file mode 100644 index 3191e0a..0000000 --- a/backend/internal/server/shared_fallback_integration_test.go +++ /dev/null @@ -1,145 +0,0 @@ -package server - -import ( - "errors" - "io" - "net/http/httptest" - "strings" - "sync/atomic" - "testing" - "time" - - "github.com/tdurieux/anonymous_github/backend/internal/blobcache" - "github.com/tdurieux/anonymous_github/backend/internal/provider" - "go.mongodb.org/mongo-driver/v2/bson" -) - -type fallbackTestBody struct { - io.Reader - closed atomic.Int32 -} - -func (r *fallbackTestBody) Close() error { r.closed.Add(1); return nil } - -func runSharedFallbackIntegration(t *testing.T, s *Server, p *fixtureProvider) { - t.Run("shared fallback completeness", func(t *testing.T) { - ctx := t.Context() - original, err := s.Store.one(ctx, collection("repo"), M{"repoId": "second-provider"}) - if err != nil { - t.Fatal(err) - } - r := selectFields(original, "owner", "source", "providerAccess") - r["_id"] = bson.NewObjectID() - r["repoId"] = "fallback-" + r["_id"].(bson.ObjectID).Hex() - r["status"] = "ready" - r["treeGeneration"] = "fallback-generation" - r["anonymizeDate"] = time.Now().Truncate(time.Millisecond) - r["options"] = M{"terms": []string{"Alice"}, "image": true, "link": true, "expirationMode": "never"} - if _, err = s.Store.DB.Collection(collection("repo")).InsertOne(ctx, r); err != nil { - t.Fatal(err) - } - for _, name := range []string{"data.txt", "data.bin"} { - if _, err = s.Store.DB.Collection("files").InsertOne(ctx, M{"repoId": r["repoId"], "treeGeneration": r["treeGeneration"], "path": "", "name": name, "sha": "opaque:minimum", "size": 32}); err != nil { - t.Fatal(err) - } - } - access, err := s.providerAccess(r) - if err != nil { - t.Fatal(err) - } - oldSource, oldOpen := s.sourceCache, p.onOpen - defer func() { s.sourceCache = oldSource; p.onOpen = oldOpen }() - for _, mode := range []string{"budget", "object"} { - t.Run(mode, func(t *testing.T) { - budget, limit := int64(1), int64(4096) - if mode == "object" { - budget, limit = 65536, 8 - } - cache, err := blobcache.New(ctx, blobcache.Options{Root: t.TempDir(), Budget: budget, MaxObject: limit}) - if err != nil { - t.Fatal(err) - } - defer cache.Close() - s.sourceCache = cache - starts := s.pool.Stats()["workerStarts"].(uint64) - for _, test := range []struct { - name, content string - failure error - }{ - {"data.txt", "Alice partial", nil}, {"data.txt", "", nil}, {"data.bin", strings.Repeat("\x00", 8), nil}, - {"data.txt", "Alice partial", errors.New("private upstream error")}, - } { - var body *fallbackTestBody - p.onOpen = func() (io.ReadCloser, error) { - var input io.Reader = strings.NewReader(test.content) - if test.failure != nil { - input = io.MultiReader(input, failingFallbackReader{test.failure}) - } - body = &fallbackTestBody{Reader: input} - return body, nil - } - response := httptest.NewRecorder() - s.ServeHTTP(response, httptest.NewRequest("GET", "/api/repo/"+str(r["repoId"])+"/file/"+test.name, nil)) - code := "storage_write_size_mismatch" - if test.failure != nil { - code = "file_not_available" - } - if response.Code != 502 || response.Body.String() != `{"error":"`+code+`"}` { - t.Fatalf("%s: %d %s", test.name, response.Code, response.Body) - } - if body == nil || body.closed.Load() != 1 { - t.Fatal("source not closed exactly once", body) - } - } - if s.pool.Stats()["workerStarts"].(uint64) != starts { - t.Fatal("short input launched a worker") - } - // Entry sizes are minimums: complete and expanded bodies remain valid. - for _, size := range []int{32, 64} { - p.onOpen = func() (io.ReadCloser, error) { return io.NopCloser(strings.NewReader(strings.Repeat("x", size))), nil } - body, err := s.sharedSource(ctx, r, p, access, provider.Entry{Path: "data.txt", Revision: "opaque:minimum", Size: 32}) - if err != nil { - t.Fatal(err) - } - data, err := io.ReadAll(body) - body.Close() - if err != nil || len(data) != size { - t.Fatal(len(data), err) - } - for _, name := range []string{"data.txt", "data.bin"} { - response := httptest.NewRecorder() - s.ServeHTTP(response, httptest.NewRequest("GET", "/api/repo/"+str(r["repoId"])+"/file/"+name, nil)) - if response.Code != 200 || response.Body.String() != strings.Repeat("x", size) { - t.Fatalf("complete %s: %d %s", name, response.Code, response.Body) - } - } - } - // A provider verifier owns its size semantics, such as Git LFS pointer - // metadata. Admission fallback must not substitute the generic minimum. - verified := &verifyingFixture{fixtureProvider: p} - p.onOpen = func() (io.ReadCloser, error) { return io.NopCloser(strings.NewReader("small resolved payload")), nil } - body, err := s.sharedSource(ctx, r, verified, access, provider.Entry{Path: "data.txt", Revision: "opaque:verified", Size: 32}) - if err != nil { - t.Fatal(err) - } - data, err := io.ReadAll(body) - body.Close() - if err != nil || string(data) != "small resolved payload" || verified.calls != 0 { - t.Fatal(string(data), err, verified.calls) - } - stats, err := cache.Stats(ctx) - if err != nil || stats.Blobs != 0 || stats.ReservedBytes != 0 || stats.ActiveReaders != 0 { - t.Fatal(stats, err) - } - }) - } - current, err := s.Store.one(ctx, collection("repo"), M{"_id": r["_id"]}) - if err != nil || number(current["pageView"]) != 8 { - t.Fatal("view count includes failed sources or misses successful ones", current, err) - } - }) -} - -type failingFallbackReader struct{ err error } - -func (r failingFallbackReader) Read([]byte) (int, error) { return 0, r.err } diff --git a/backend/internal/server/shared_http.go b/backend/internal/server/shared_http.go deleted file mode 100644 index 3712fe4..0000000 --- a/backend/internal/server/shared_http.go +++ /dev/null @@ -1,227 +0,0 @@ -package server - -import ( - "compress/gzip" - "context" - "errors" - "io" - "math" - "net/http" - "strconv" - "strings" - "unicode" - - "github.com/tdurieux/anonymous_github/backend/internal/blobcache" -) - -var errSharedEncoding = errors.New("shared_encoding_not_acceptable") - -type sharedResponse struct { - accept, encoding string - eligible bool - head bool -} - -func encodingWhitespace(r rune) bool { return unicode.IsSpace(r) && r != '\u0085' || r == '\ufeff' } - -// Match accepts/negotiator with the caller's offered encodings. Unlike the -// general compression middleware, this path has no Brotli/gzip preference list. -func sharedEncoding(header string, offered ...string) string { - accepted := parseSharedEncodings(header) - identity, minimum := false, float64(1) - identityOrder := 0 - for _, entry := range accepted { - identityOrder = max(identityOrder, entry.order+1) - identity = identity || entry.name == "identity" || entry.name == "*" - if entry.quality != 0 && !math.IsNaN(entry.quality) { - minimum = math.Min(minimum, entry.quality) - } - } - if !identity { - accepted = append(accepted, encodingPreference{name: "identity", quality: minimum, order: identityOrder}) - } - best := encodingPreference{order: -1, index: len(offered)} - for i, name := range offered { - priority := encodingPreference{name: name, order: -1, index: i} - for _, a := range accepted { - specificity := 0 - if strings.EqualFold(a.name, name) { - specificity = 1 - } else if a.name != "*" { - continue - } - diff := float64(priority.specificity - specificity) - if diff == 0 { - diff = priority.quality - a.quality - } - if diff == 0 || math.IsNaN(diff) { - diff = float64(priority.order - a.order) - } - if diff < 0 { - priority = encodingPreference{name: name, quality: a.quality, specificity: specificity, order: a.order, index: i} - } - } - if priority.quality <= 0 || math.IsNaN(priority.quality) { - continue - } - if best.quality == 0 || priority.quality > best.quality || priority.quality == best.quality && (priority.specificity > best.specificity || priority.specificity == best.specificity && (priority.order < best.order || priority.order == best.order && priority.index < best.index)) { - best = priority - } - } - return best.name -} - -func sharedVary(h http.Header) { - value := strings.Join(h.Values("Vary"), ", ") - for _, field := range strings.Split(value, ",") { - if strings.TrimSpace(field) == "*" || strings.EqualFold(strings.TrimSpace(field), "Accept-Encoding") { - return - } - } - if value != "" { - value += ", " - } - h.Set("Vary", value+"Accept-Encoding") -} - -// The bool reports whether body streaming started, distinguishing preparation -// errors from failures that must abort an already committed response. -func sendSharedBlob(ctx context.Context, w http.ResponseWriter, body *blobcache.Reader, response *sharedResponse) (bool, error) { - record := body.Record() - reader := body - if record.Encoding == "gzip" && response.encoding == "gzip" { - encoded, err := body.Reopen(ctx, true) - if err != nil { - return false, err - } - if encoded == nil { - return false, fail("file_not_available", 502) - } - defer encoded.Close() - reader = encoded - record = encoded.Record() - } - h := w.Header() - h.Set("Accept-Ranges", "none") - if record.Encoding == "gzip" && response.encoding == "gzip" { - h.Set("Content-Encoding", "gzip") - h.Set("Content-Length", strconv.FormatInt(record.Stored, 10)) - } else { - h.Del("Content-Encoding") - h.Set("Content-Length", strconv.FormatInt(record.Size, 10)) - } - if record.Encoding == "identity" && sharedEncoding(response.accept, "identity") == "" { - h.Set("Content-Encoding", "gzip") - h.Del("Content-Length") - if response.head { - w.WriteHeader(http.StatusOK) - return true, nil - } - writer := gzip.NewWriter(w) - _, err := io.Copy(writer, reader) - closeErr := writer.Close() - if err != nil { - return true, err - } - return true, closeErr - } - if response.head { - w.WriteHeader(http.StatusOK) - return true, nil - } - _, err := io.Copy(w, reader) - return true, err -} - -// Parameter parsing follows the installed MIT-licensed content-type parser -// used by accepts/negotiator. See LICENSE.content-type and LICENSE.negotiator. -func parseSharedEncodings(header string) []encodingPreference { - entries := []encodingPreference{} - index, order := 0, 0 - skipOWS := func() { - for index < len(header) && (header[index] == ' ' || header[index] == '\t') { - index++ - } - } - skipValue := func() { - for index < len(header) && header[index] != ';' && header[index] != ',' { - index++ - } - } - for index < len(header) { - skipOWS() - start := index - skipValue() - name := strings.ToLower(strings.Trim(header[start:index], " \t")) - params := map[string]string{} - parameters: - for index < len(header) && header[index] != ',' { - index++ - skipOWS() - keyStart := index - for index < len(header) { - switch header[index] { - case ',': - break parameters - case ';': - continue parameters - case '=': - key := strings.ToLower(strings.TrimRight(header[keyStart:index], " \t")) - index++ - skipOWS() - if index < len(header) && header[index] == '"' { - index++ - var value strings.Builder - for index < len(header) { - ch := header[index] - index++ - if ch == '"' { - skipValue() - if _, ok := params[key]; !ok { - params[key] = value.String() - } - continue parameters - } - if ch == '\\' && index < len(header) { - value.WriteByte(header[index]) - index++ - continue - } - value.WriteByte(ch) - } - continue parameters - } - valueStart := index - skipValue() - if _, ok := params[key]; !ok { - params[key] = strings.TrimRight(header[valueStart:index], " \t") - } - continue parameters - default: - index++ - } - } - } - if name != "" { - quality := float64(1) - if raw := params["q"]; raw != "" { - quality = math.NaN() - prefix := qualityPrefix.FindString(strings.TrimLeftFunc(raw, encodingWhitespace)) - switch prefix { - case "Infinity", "+Infinity": - quality = math.Inf(1) - case "-Infinity": - quality = math.Inf(-1) - default: - if prefix != "" { - quality, _ = strconv.ParseFloat(prefix, 64) - } - } - } - entries = append(entries, encodingPreference{name: name, quality: quality, order: order}) - } - index++ - order++ - } - return entries -} diff --git a/backend/internal/server/shared_http_integration_test.go b/backend/internal/server/shared_http_integration_test.go deleted file mode 100644 index dbc4a71..0000000 --- a/backend/internal/server/shared_http_integration_test.go +++ /dev/null @@ -1,184 +0,0 @@ -package server - -import ( - "bytes" - "compress/gzip" - "crypto/sha256" - "encoding/hex" - "io" - "net/http" - "net/http/httptest" - "strconv" - "strings" - "testing" - - "github.com/tdurieux/anonymous_github/backend/internal/blobcache" -) - -func runSharedHTTPIntegration(t *testing.T, s *Server, p *fixtureProvider) { - t.Run("shared HTTP representations", func(t *testing.T) { - ctx := t.Context() - source, err := blobcache.New(ctx, blobcache.Options{Root: t.TempDir(), Budget: 65536, MaxObject: 4096, Gzip: true}) - if err != nil { - t.Fatal(err) - } - results, err := blobcache.New(ctx, blobcache.Options{Root: t.TempDir(), Budget: 65536, MaxObject: 4096, Gzip: true}) - if err != nil { - source.Close() - t.Fatal(err) - } - oldSource, oldResults, oldOpen := s.sourceCache, s.resultCache, p.onOpen - oldEnabled := s.Config.SharedCacheEnabled - s.Config.SharedCacheEnabled = true - payload := strings.Repeat("Alice hello\n", 180) - p.onOpen = func() (io.ReadCloser, error) { return io.NopCloser(strings.NewReader(payload)), nil } - s.sourceCache, s.resultCache = source, results - defer func() { - p.onOpen = oldOpen - s.Config.SharedCacheEnabled = oldEnabled - p.revoked = false - s.sourceCache, s.resultCache = oldSource, oldResults - source.Close() - results.Close() - }() - server := httptest.NewServer(s) - defer server.Close() - transport := &http.Transport{DisableCompression: true} - defer transport.CloseIdleConnections() - client := &http.Client{Transport: transport} - call := func(method, accept string) (*http.Response, []byte) { - req, _ := http.NewRequest(method, server.URL+"/api/repo/second-provider/file/XXXX-1.txt", nil) - req.Header.Set("Accept-Encoding", accept) - response, err := client.Do(req) - if err != nil { - t.Fatal(err) - } - data, err := io.ReadAll(response.Body) - response.Body.Close() - if err != nil { - t.Fatal(err) - } - return response, data - } - starts := s.pool.Stats()["workerStarts"].(uint64) - response, wire := call("GET", "gzip") - if response.StatusCode != 200 || response.Header.Get("Content-Encoding") != "gzip" || response.Header.Get("Accept-Ranges") != "none" || response.Header.Get("Vary") != "Accept-Encoding" { - t.Fatal(response.StatusCode, response.Header, string(wire)) - } - zipped, err := gzip.NewReader(bytes.NewReader(wire)) - if err != nil { - t.Fatal(err) - } - decoded, err := io.ReadAll(zipped) - zipped.Close() - if err != nil || strings.Contains(string(decoded), "Alice") || !strings.Contains(string(decoded), "XXXX-1") { - t.Fatal(string(decoded), err) - } - r, err := s.Store.one(ctx, collection("repo"), M{"repoId": "second-provider"}) - if err != nil { - t.Fatal(err) - } - opt, err := s.anonymizerOptions(r, "repo") - if err != nil { - t.Fatal(err) - } - sum := sha256.Sum256([]byte(payload)) - key, err := s.sharedResultKey(r, M{"path": "", "name": "Alice.txt"}, "sha256-"+hex.EncodeToString(sum[:]), opt) - if err != nil { - t.Fatal(err) - } - decision, err := results.Decision(ctx, key) - if err != nil || decision == nil || !decision.Changed { - t.Fatal("missing changed decision", decision, err) - } - encoded, err := results.Open(ctx, decision.Digest, true) - if err != nil || encoded == nil { - t.Fatal(encoded, err) - } - stored, err := io.ReadAll(encoded) - encoded.Close() - if err != nil || !bytes.Equal(stored, wire) { - t.Fatal("HTTP recompressed the cached result", err) - } - if response.Header.Get("Content-Length") != strconv.Itoa(len(stored)) { - t.Fatal(response.Header, len(stored)) - } - response, identity := call("GET", "identity") - if response.StatusCode != 200 || response.Header.Get("Content-Encoding") != "" || !bytes.Equal(identity, decoded) || response.Header.Get("Content-Length") != strconv.Itoa(len(decoded)) { - t.Fatal(response.StatusCode, response.Header) - } - response, head := call("HEAD", "gzip") - if response.StatusCode != 200 || len(head) != 0 || response.Header.Get("Content-Encoding") != "" || response.Header.Get("Content-Length") != "" { - t.Fatal(response.StatusCode, response.Header, string(head)) - } - for _, method := range []string{"GET", "HEAD"} { - response, body := call(method, "*;q=0") - wantStatus := 406 - if method == "HEAD" { - wantStatus = 200 - } - if response.StatusCode != wantStatus || len(body) != 0 || response.Header.Get("Vary") != "Accept-Encoding" { - t.Fatal(response.StatusCode, response.Header, string(body)) - } - } - if got := s.pool.Stats()["workerStarts"].(uint64); got != starts+1 { - t.Fatal("warm/HEAD/rejected request launched a worker", got, starts) - } - // Website assets use the same encoded result while keeping sandboxing. - oldOptions := obj(r["options"]) - pageOptions := M{} - for key, value := range oldOptions { - pageOptions[key] = value - } - pageOptions["page"], pageOptions["pageSource"] = true, M{"branch": obj(r["source"])["branch"], "path": "/"} - if _, err := s.Store.update(ctx, collection("repo"), M{"_id": r["_id"]}, M{"$set": M{"options": pageOptions}}); err != nil { - t.Fatal(err) - } - defer s.Store.update(ctx, collection("repo"), M{"_id": r["_id"]}, M{"$set": M{"options": oldOptions}}) - pageReq, _ := http.NewRequest("GET", server.URL+"/w/second-provider/XXXX-1.txt", nil) - pageReq.Header.Set("Accept-Encoding", "gzip") - pageResponse, err := client.Do(pageReq) - if err != nil { - t.Fatal(err) - } - pageWire, err := io.ReadAll(pageResponse.Body) - pageResponse.Body.Close() - if err != nil || pageResponse.StatusCode != 200 || pageResponse.Header.Get("Content-Encoding") != "gzip" || !strings.Contains(pageResponse.Header.Get("Content-Security-Policy"), "sandbox") { - t.Fatal("website encoding", pageResponse.StatusCode, pageResponse.Header, err) - } - pageGzip, err := gzip.NewReader(bytes.NewReader(pageWire)) - if err != nil { - t.Fatal(err) - } - pageDecoded, err := io.ReadAll(pageGzip) - pageGzip.Close() - if err != nil || !bytes.Equal(pageDecoded, decoded) { - t.Fatal("website output changed", err) - } - server.Close() - // Authorization must win even when encoding negotiation would reject the - // request; run after draining network handlers before changing the fixture. - p.revoked = true - req := httptest.NewRequest("GET", "/api/repo/second-provider/file/XXXX-1.txt", nil) - req.Header.Set("Accept-Encoding", "*;q=0") - denied := httptest.NewRecorder() - s.ServeHTTP(denied, req) - if denied.Code != 403 || strings.Contains(denied.Body.String(), "Alice hello") { - t.Fatal("negotiation bypassed authorization", denied.Code, denied.Body) - } - for _, method := range []string{"GET", "HEAD"} { - pageReq := httptest.NewRequest(method, "/w/second-provider/XXXX-1.txt", nil) - denied := httptest.NewRecorder() - s.ServeHTTP(denied, pageReq) - if denied.Code != 403 { - t.Fatal("website revocation", method, denied.Code) - } - } - for _, cache := range []*blobcache.Cache{source, results} { - stats, err := cache.Stats(ctx) - if err != nil || stats.ActiveReaders != 0 || stats.ReservedBytes != 0 { - t.Fatal("HTTP cache leases leaked", stats, err) - } - } - }) -} diff --git a/backend/internal/server/shared_http_test.go b/backend/internal/server/shared_http_test.go deleted file mode 100644 index 2ccffff..0000000 --- a/backend/internal/server/shared_http_test.go +++ /dev/null @@ -1,139 +0,0 @@ -package server - -import ( - "bytes" - "compress/gzip" - "context" - "crypto/sha256" - "encoding/base64" - "encoding/hex" - "encoding/json" - "io" - "net/http" - "net/http/httptest" - "os" - "os/exec" - "path/filepath" - "strconv" - "testing" - "time" - - "github.com/tdurieux/anonymous_github/backend/internal/blobcache" -) - -func TestSharedHTTPContracts(t *testing.T) { - raw, err := os.ReadFile("testdata/shared-http.json") - if err != nil { - t.Fatal(err) - } - var fixtures []struct { - Store, Accept, Method, Vary string - Size int - Expected struct { - Status, BodyBytes int - Encoding, Length, Vary, Ranges, SHA256, Wire string - } - } - if err = json.Unmarshal(raw, &fixtures); err != nil { - t.Fatal(err) - } - root := t.TempDir() - ctx, cancel := context.WithTimeout(t.Context(), 30*time.Second) - defer cancel() - command := exec.CommandContext(ctx, "node", "../../scripts/test-shared-http-cache.cjs", root) - if output, err := command.CombinedOutput(); err != nil { - t.Fatal(err, string(output)) - } - stores := map[string]*blobcache.Cache{} - for _, mode := range []string{"identity", "gzip"} { - cache, err := blobcache.New(t.Context(), blobcache.Options{Root: filepath.Join(root, mode), Budget: 65536, MaxObject: 4096}) - if err != nil { - t.Fatal(err) - } - stores[mode] = cache - t.Cleanup(func() { cache.Close() }) - } - server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - index, _ := strconv.Atoi(r.Header.Get("X-Fixture")) - fixture := fixtures[index] - compressed := &compressionWriter{ResponseWriter: w, request: r} - w = compressed - defer compressed.finish() - w.Header().Set("Content-Type", "application/octet-stream") - if fixture.Vary != "" { - w.Header().Set("Vary", fixture.Vary) - } - sharedVary(w.Header()) - response := &sharedResponse{accept: r.Header.Get("Accept-Encoding"), eligible: true, head: r.Method == "HEAD"} - response.encoding = sharedEncoding(response.accept, "gzip", "identity") - if response.encoding == "" { - if r.Method != "HEAD" { - w.Header().Set("Content-Length", "0") - } - w.WriteHeader(406) - return - } - body, err := stores[fixture.Store].Lookup(r.Context(), "payload-"+strconv.Itoa(fixture.Size)) - if err != nil || body == nil { - t.Error(body, err) - http.Error(w, "cache unavailable", 500) - return - } - defer body.Close() - if _, err := sendSharedBlob(r.Context(), w, body, response); err != nil { - t.Error(err) - } - })) - defer server.Close() - transport := &http.Transport{DisableCompression: true} - defer transport.CloseIdleConnections() - client := &http.Client{Transport: transport} - for i, fixture := range fixtures { - t.Run(strconv.Itoa(i)+"-"+fixture.Store+"-"+fixture.Accept+"-"+fixture.Method, func(t *testing.T) { - req, _ := http.NewRequest(fixture.Method, server.URL+"/api/repo/fixture/file/body", nil) - req.Header.Set("X-Fixture", strconv.Itoa(i)) - if fixture.Accept != "" { - req.Header.Set("Accept-Encoding", fixture.Accept) - } - response, err := client.Do(req) - if err != nil { - t.Fatal(err) - } - wire, err := io.ReadAll(response.Body) - response.Body.Close() - if err != nil { - t.Fatal(err) - } - e := fixture.Expected - if response.StatusCode != e.Status || response.Header.Get("Content-Encoding") != e.Encoding || response.Header.Get("Content-Length") != e.Length || response.Header.Get("Vary") != e.Vary || response.Header.Get("Accept-Ranges") != e.Ranges { - t.Fatalf("got %d %v; want %+v", response.StatusCode, response.Header, e) - } - if e.Wire != "" && base64.StdEncoding.EncodeToString(wire) != e.Wire { - t.Fatal("stored gzip was recompressed") - } - decoded := wire - if len(wire) > 0 && e.Encoding == "gzip" { - reader, err := gzip.NewReader(bytes.NewReader(wire)) - if err != nil { - t.Fatal(err) - } - decoded, err = io.ReadAll(reader) - reader.Close() - if err != nil { - t.Fatal(err) - } - } - sum := sha256.Sum256(decoded) - if len(decoded) != e.BodyBytes || hex.EncodeToString(sum[:]) != e.SHA256 { - t.Fatal("wrong response bytes", len(decoded), e) - } - }) - } - server.Close() - for name, store := range stores { - stats, err := store.Stats(t.Context()) - if err != nil || stats.ActiveReaders != 0 { - t.Fatal("HTTP readers leaked", name, stats, err) - } - } -} diff --git a/backend/internal/server/shared_result.go b/backend/internal/server/shared_result.go deleted file mode 100644 index b090896..0000000 --- a/backend/internal/server/shared_result.go +++ /dev/null @@ -1,167 +0,0 @@ -package server - -import ( - "bytes" - "context" - "crypto/sha256" - "encoding/hex" - "encoding/json" - "errors" - "io" - "path" - "sync" - "time" - - "github.com/tdurieux/anonymous_github/backend/internal/anonymize" - "github.com/tdurieux/anonymous_github/backend/internal/blobcache" -) - -var errResultUnchanged = errors.New("shared_result_unchanged") - -// The additional sourceURLs field captures provider-specific rewrite rules. -// It deliberately separates these decisions from older Node decisions that do -// not describe those rules. Payloads still use the shared content digest format. -func (s *Server) sharedResultKey(r, row M, digest string, opt anonymize.Options) (string, error) { - options := struct { - FilePath string `json:"filePath"` - Generation string `json:"cacheGeneration"` - Terms []string `json:"terms"` - Revision any `json:"cacheRevision,omitempty"` - Image *bool `json:"image,omitempty"` - Link *bool `json:"link,omitempty"` - RepoID string `json:"repoId"` - RepoName string `json:"repoName"` - BranchName string `json:"branchName"` - SourceURLs []string `json:"sourceURLs"` - }{path.Join(str(row["path"]), str(row["name"])), contentGeneration(r), opt.Terms, r["contentCacheRevision"], opt.Image, opt.Link, opt.RepoID, opt.RepoName, opt.BranchName, opt.SourceURLs} - var data bytes.Buffer - encoder := json.NewEncoder(&data) - encoder.SetEscapeHTML(false) - if err := encoder.Encode([]any{"anonymizer-v2", digest, options, s.Config.Mask, s.Config.Hostname, []string{"license", "dockerfile", "sbt", "ipynb", "gp", "out", "sol", "in", "jsonl", "ndjson"}}); err != nil { - return "", err - } - sum := sha256.Sum256(jsonSeparators(bytes.TrimSuffix(data.Bytes(), []byte("\n")))) - return hex.EncodeToString(sum[:]), nil -} - -// A false handled result leaves the original buffered source untouched so the -// caller can use its existing transform path after cache admission failure. -func (s *Server) sharedResult(ctx context.Context, r, row M, source *blobcache.Reader, isText bool, opt anonymize.Options) (output *blobcache.Reader, handled bool, err error) { - record := source.Record() - key, err := s.sharedResultKey(r, row, record.Digest, opt) - if err != nil { - return nil, true, err - } - check := func() error { - if err := s.activeContentCache(ctx, r); err != nil { - return err - } - _, err := s.authorizeContent(ctx, r) - return err - } - // The source reader was authorized on release by sharedSource. Keep the - // local lifecycle fence here, then reauthorize the result after lookup or - // transformation, immediately before returning it to the caller. - if err = s.activeContentCache(ctx, r); err != nil { - return nil, true, err - } - defer func() { - if err == nil && output != nil { - if err = check(); err != nil { - output.Close() - output = nil - } - } - }() - lookupDone := s.startStage(ctx, "cache_lookup") - decision, err := s.resultCache.Decision(ctx, key) - lookupDone(err) - if err != nil { - return nil, true, err - } - if decision != nil { - store := s.resultCache - if !decision.Changed { - store = s.sourceCache - } - output, err = store.Open(ctx, decision.Digest, false) - if err != nil { - return nil, true, err - } - if output != nil { - s.observeCache(ctx, "decision_hit", record.Size, 0) - name := "rewrite_unchanged_cached" - if decision.Changed { - name = "rewrite_changed_cached" - } - s.observeCache(ctx, name, record.Size, 0) - return output, true, nil - } - } - s.observeCache(ctx, "decision_miss", record.Size, 0) - if !isText { - if err = s.resultCache.SaveDecision(ctx, key, record.Digest, false); err != nil { - return nil, true, err - } - s.observeCache(ctx, "rewrite_binary", record.Size, 0) - output, err = s.sourceCache.Open(ctx, record.Digest, false) - return output, output != nil || err != nil, err - } - started := time.Now() - produce := func(work context.Context) (io.ReadCloser, error) { - input, err := s.sourceCache.Open(work, record.Digest, false) - if err != nil { - return nil, err - } - if input == nil { - return nil, &blobcache.AdmissionError{Code: "source_evicted"} - } - defer input.Close() - file, _, cleanup, err := s.pool.Process(work, input, anonymize.ProcessRequest{StageEvent: s.stageObserver(ctx), Options: opt, Context: anonymize.Context{Mask: s.Config.Mask, Hostname: s.Config.Hostname}, MaxOutput: anonymize.MaxOutput}) - if err != nil { - return nil, transformFailure(err) - } - return &resultFile{Reader: file, cleanup: cleanup}, nil - } - verify := func(work context.Context, proof blobcache.Proof) (string, error) { - unchanged := record.Digest == "git-"+proof.GitSHA || record.Digest == "sha256-"+proof.SHA256 - name := "rewrite_changed" - if unchanged { - name = "rewrite_unchanged" - } - s.observeCache(work, name, record.Size, time.Since(started)) - if unchanged { - if err := s.resultCache.SaveDecision(work, key, record.Digest, false); err != nil { - return "", err - } - return "", errResultUnchanged - } - return "sha256-" + proof.SHA256, nil - } - output, err = s.resultCache.GetOrFill(ctx, "render-"+key, produce, verify, &record.Size) - if errors.Is(err, errResultUnchanged) { - output, err = s.sourceCache.Open(ctx, record.Digest, false) - return output, output != nil || err != nil, err - } - if err != nil { - var admission *blobcache.AdmissionError - if errors.As(err, &admission) { - s.observeCache(ctx, "decision_bypass", record.Size, 0) - return nil, false, nil - } - return nil, true, err - } - if err = s.resultCache.SaveDecision(ctx, key, output.Record().Digest, true); err != nil { - output.Close() - return nil, true, err - } - return output, true, nil -} - -type resultFile struct { - io.Reader - cleanup func() - once sync.Once -} - -func (f *resultFile) Close() error { f.once.Do(f.cleanup); return nil } diff --git a/backend/internal/server/shared_result_integration_test.go b/backend/internal/server/shared_result_integration_test.go deleted file mode 100644 index 6ac5951..0000000 --- a/backend/internal/server/shared_result_integration_test.go +++ /dev/null @@ -1,193 +0,0 @@ -package server - -import ( - "io" - "os" - "path/filepath" - "strings" - "testing" - "time" - - "github.com/tdurieux/anonymous_github/backend/internal/blobcache" - "go.mongodb.org/mongo-driver/v2/bson" -) - -func runSharedResultIntegration(t *testing.T, base *Server, p *fixtureProvider) { - t.Run("shared transformed results", func(t *testing.T) { - original, err := base.Store.one(t.Context(), collection("repo"), M{"repoId": "second-provider"}) - if err != nil { - t.Fatal(err) - } - for _, mode := range []string{"changed", "unchanged", "binary", "admission"} { - t.Run(mode, func(t *testing.T) { - ctx := t.Context() - expectedBody := fixtureContent - if mode == "unchanged" { - expectedBody = "nothing private here\n" - } - previousOpen := p.onOpen - p.onOpen = func() (io.ReadCloser, error) { return io.NopCloser(strings.NewReader(expectedBody)), nil } - defer func() { p.onOpen = previousOpen }() - - r := selectFields(original, "owner", "source", "providerAccess") - r["_id"] = bson.NewObjectID() - r["repoId"] = "result-" + r["_id"].(bson.ObjectID).Hex() - r["status"] = "ready" - r["treeGeneration"], r["anonymizeDate"] = "result-generation", time.Now().Truncate(time.Millisecond) - r["options"] = M{"terms": []string{"Alice"}, "image": false, "link": false} - if mode == "unchanged" { - r["options"] = M{"terms": []string{}, "image": false, "link": false} - } - if _, err := base.Store.DB.Collection(collection("repo")).InsertOne(ctx, r); err != nil { - t.Fatal(err) - } - sourceRoot, resultRoot := t.TempDir(), t.TempDir() - sources, err := blobcache.New(ctx, blobcache.Options{Root: sourceRoot, Budget: 65536, MaxObject: 4096}) - if err != nil { - t.Fatal(err) - } - defer sources.Close() - budget := int64(65536) - if mode == "admission" { - budget = 1 - } - results, err := blobcache.New(ctx, blobcache.Options{Root: resultRoot, Budget: budget, MaxObject: 4096, Gzip: true}) - if err != nil { - t.Fatal(err) - } - defer results.Close() - s := &Server{Config: base.Config, Store: base.Store, providers: base.providers, content: base.content, pool: base.pool, sourceCache: sources, resultCache: results, cacheMetrics: testCacheMetrics()} - row := M{"path": "", "name": "Alice.txt", "sha": "blob:shared-result", "size": len(expectedBody)} - if mode == "binary" { - row["name"] = "image.png" - } - read := func() (string, error) { - reader, cleanup, _, err := s.transformed(ctx, r, row) - if err != nil { - return "", err - } - defer cleanup() - data, err := io.ReadAll(reader) - return string(data), err - } - start := s.pool.Stats()["workerStarts"].(uint64) - first, err := read() - if err != nil { - t.Fatal(err) - } - if mode == "unchanged" || mode == "binary" { - if first != expectedBody { - t.Fatal("unchanged bytes rewritten", first) - } - } else if strings.Contains(first, "Alice") { - t.Fatal("private term leaked", first) - } - cold := s.pool.Stats()["workerStarts"].(uint64) - expected := uint64(1) - if mode == "binary" { - expected = 0 - } - if cold-start != expected { - t.Fatal("unexpected cold worker count", cold-start, expected) - } - // Reopen the SQLite cache through another connection to prove decisions and - // results survive the first cache instance rather than a process-local map. - reopened, err := blobcache.New(ctx, blobcache.Options{Root: resultRoot, Budget: budget, MaxObject: 4096, Gzip: true}) - if err != nil { - t.Fatal(err) - } - defer reopened.Close() - s.resultCache = reopened - second, err := read() - if err != nil || second != first { - t.Fatal(second, first, err) - } - if got := s.pool.Stats()["workerStarts"].(uint64); got != cold { - t.Fatal("warm request launched a worker", got, cold) - } - stats, err := reopened.Stats(ctx) - if err != nil || stats.ReservedBytes != 0 || stats.ActiveReaders != 0 { - t.Fatal(stats, err) - } - if mode == "changed" { - if stats.Blobs != 1 || stats.Decisions != 1 { - t.Fatal(stats) - } - } else if stats.Blobs != 0 { - t.Fatal("stored redundant result", stats) - } - if mode != "admission" && stats.Decisions != 1 { - t.Fatal("missing decision", stats) - } - // Warm internal transforms only authorize when output is released. - authStart := p.authorizeCount.Load() - if _, err := read(); err != nil { - t.Fatal(err) - } - if got := p.authorizeCount.Load() - authStart; got != 1 { - t.Fatalf("warm output authorization count %d", got) - } - // Revocation during a cold source fill must reject final output, - // even though internal source release defers authorization. - oldSHA, sourceOpen := row["sha"], p.onOpen - row["sha"] = "blob:revoked-during-fill" - p.onOpen = func() (io.ReadCloser, error) { - p.revoked = true - return io.NopCloser(strings.NewReader(expectedBody)), nil - } - _, revokedFillErr := read() - row["sha"], p.onOpen, p.revoked = oldSHA, sourceOpen, false - if revokedFillErr == nil || revokedFillErr.Error() != "fixture_access_revoked" { - t.Fatal("revoked fill released transformed output", revokedFillErr) - } - p.revoked = true - _, err = read() - p.revoked = false - if err == nil || err.Error() != "fixture_access_revoked" { - t.Fatal("warm result bypassed access", err) - } - if mode == "changed" { - // Missing result bytes invalidate that publication; its stale decision - // must not suppress a fresh transformation. - err = filepath.WalkDir(filepath.Join(resultRoot, "blobs"), func(name string, entry os.DirEntry, err error) error { - if err != nil { - return err - } - if !entry.IsDir() { - return os.Remove(name) - } - return nil - }) - if err != nil { - t.Fatal(err) - } - recovered, err := read() - if err != nil || recovered != first { - t.Fatal("result eviction recovery", recovered, err) - } - if s.pool.Stats()["workerStarts"].(uint64) != cold+1 { - t.Fatal("missing result did not rerun worker") - } - if err := s.resetContentCache(ctx, r); err != nil { - t.Fatal(err) - } - if _, err := read(); err == nil || err.Error() != "repository_changed" { - t.Fatal("old result scope survived reset", err) - } - r, err = s.Store.one(ctx, collection("repo"), M{"_id": r["_id"]}) - if err != nil { - t.Fatal(err) - } - resetOutput, err := read() - if err != nil || resetOutput != first { - t.Fatal("reset changed transformed bytes", resetOutput, err) - } - if s.pool.Stats()["workerStarts"].(uint64) != cold+2 { - t.Fatal("reset reused stale decision") - } - - } - }) - } - }) -} diff --git a/backend/internal/server/shared_result_test.go b/backend/internal/server/shared_result_test.go deleted file mode 100644 index f93071d..0000000 --- a/backend/internal/server/shared_result_test.go +++ /dev/null @@ -1,30 +0,0 @@ -package server - -import ( - "encoding/json" - "github.com/tdurieux/anonymous_github/backend/internal/anonymize" - "os" - "testing" -) - -func TestSharedResultKeyContracts(t *testing.T) { - raw, err := os.ReadFile("testdata/shared-result-key.json") - if err != nil { - t.Fatal(err) - } - var fixtures []struct { - Record, Row M - Options anonymize.Options - Digest, Mask, Hostname, Expected string - } - if err = json.Unmarshal(raw, &fixtures); err != nil { - t.Fatal(err) - } - for _, f := range fixtures { - s := &Server{Config: Config{Mask: f.Mask, Hostname: f.Hostname}} - key, err := s.sharedResultKey(f.Record, f.Row, f.Digest, f.Options) - if err != nil || key != f.Expected { - t.Fatal(key, f.Expected, err) - } - } -} diff --git a/backend/internal/server/source.go b/backend/internal/server/source.go deleted file mode 100644 index 09979fb..0000000 --- a/backend/internal/server/source.go +++ /dev/null @@ -1,128 +0,0 @@ -package server - -import ( - "strconv" - "strings" -) - -func (s *Server) embeddedSource(kind string) handler { - return func(q *request) (any, error) { - id := q.Params["provider"] - if id == "" { - id = "github" - } - source := M{"provider": id, "gistId": q.Params["id"]} - if kind == "pr" { - name := q.R.URL.Query().Get("name") - if q.Params["provider"] == "" { - name = q.Params["owner"] + "/" + q.Params["repository"] - } - n, e := strconv.ParseInt(q.Params["id"], 10, 64) - if e != nil || n < 1 { - return nil, fail("pull_request_not_found", 400) - } - source = M{"provider": id, "repositoryFullName": name, "pullRequestId": n} - } - // Source previews use the same server-owned access binding as creation. - if q.Body == nil { - q.Body = M{} - } - choice, err := previewConnectionChoice(parseExtendedQuery(q.R.URL.RawQuery).object["connection"], id) - if err != nil { - return nil, err - } - q.Body["connection"] = choice - source, binding, e := s.saveDocumentSource(q, kind, nil, source, q.User["_id"]) - if e != nil { - return nil, e - } - record := M{"source": source, "owner": q.User["_id"]} - if id == "github" { - record["githubAccess"] = binding - } else { - record["providerAccess"] = binding - } - - payload, e := s.downloadEmbedded(q.ctx(), kind, record) - if e != nil { - return nil, e - } - field := "gist" - if kind == "pr" { - field = "pullRequest" - } - record[field] = payload - out := resourceJSON(kind, record) - if kind == "pr" { - out["connection"] = binding["kind"] - } else { - out["isPublic"] = payload["isPublic"] - } - return out, nil - } -} - -func (s *Server) claim(q *request) (any, error) { - id := str(q.Body["repoId"]) - if id == "" { - return nil, fail("repoId_not_defined", 400) - } - name := strings.TrimSuffix(strings.TrimPrefix(str(q.Body["repoUrl"]), "https://github.com/"), ".git") - if !safeRepositoryName(name) { - return nil, fail("repo_not_found", 404) - } - r, e := s.Store.one(q.ctx(), collection("repo"), resourceFilter("repo", id)) - if e != nil { - return nil, e - } - if r == nil { - return nil, fail("repo_not_found", 404) - } - idProvider, e := sourceProvider(obj(r["source"])) - if e != nil { - return nil, e - } - if idProvider != "github" { - return nil, fail("provider_capability_not_supported", 400) - } - token, binding, e := s.selectAccess(q.ctx(), q.User["_id"], name, str(q.Body["connection"])) - if e != nil { - return nil, e - } - upstream, e := s.githubObject(q.ctx(), "GET", "/repos/"+name, token, nil) - if e != nil { - return nil, e - } - // Public read access alone is not proof of repository ownership. - userToken, e := s.userToken(q.ctx(), q.User["_id"]) - if e != nil { - return nil, e - } - permissions, e := s.githubObject(q.ctx(), "GET", "/repos/"+name, userToken, nil) - if e != nil { - return nil, e - } - if !boolean(obj(permissions["permissions"])["admin"]) && !q.Identity.Owns(str(r["owner"])) { - return nil, fail("repository_admin_required", 403) - } - source := obj(r["source"]) - cachedID, e := oid(str(source["repositoryId"])) - if e != nil { - return nil, fail("repo_not_found", 404) - } - cached, e := s.Store.one(q.ctx(), "repositories", M{"_id": cachedID}) - if e != nil { - return nil, e - } - if str(cached["externalId"]) != "gh_"+str(upstream["id"]) { - return nil, fail("repo_not_found", 404) - } - ok, e := s.Store.update(q.ctx(), collection("repo"), revisionFilter(r), M{"$set": M{"owner": q.User["_id"], "githubAccess": binding}}) - if e != nil { - return nil, e - } - if !ok { - return nil, fail("connection_changed", 409) - } - return q.text("Ok"), nil -} diff --git a/backend/internal/server/source_connection_test.go b/backend/internal/server/source_connection_test.go deleted file mode 100644 index 6770621..0000000 --- a/backend/internal/server/source_connection_test.go +++ /dev/null @@ -1,54 +0,0 @@ -package server - -import ( - "context" - "net/http/httptest" - "testing" - - "github.com/tdurieux/anonymous_github/backend/internal/provider" -) - -type documentConnectionProbe struct { - *fixtureProvider - choices []string -} - -func (p *documentConnectionProbe) ConnectDocument(ctx context.Context, q provider.DocumentRequest, choice string) (provider.Access, error) { - p.choices = append(p.choices, choice) - return p.fixtureProvider.ConnectDocument(ctx, q, choice) -} - -func TestEmbeddedSourceConnectionQuery(t *testing.T) { - for _, kind := range []string{"gist", "pr"} { - for _, raw := range []string{"connection=oauth&connection=github-app", "connection[]=oauth", "connection[kind]=oauth"} { - t.Run(kind+"/"+raw, func(t *testing.T) { - // No provider or database is needed to reject an ambiguous credential choice. - s := &Server{} - q := &request{Server: s, R: httptest.NewRequest("GET", "/?"+raw, nil), Params: map[string]string{"owner": "team", "repository": "project", "id": "1"}, User: M{"_id": "owner"}} - _, err := s.embeddedSource(kind)(q) - if err == nil || err.Error() != "invalid_connection" { - t.Fatalf("ambiguous connection accepted: %v", err) - } - }) - } - for _, raw := range []string{"", "connection=custom-grant"} { - t.Run(kind+"/fixture/"+raw, func(t *testing.T) { - p := &documentConnectionProbe{fixtureProvider: &fixtureProvider{name: "team/project", commit: "opaque"}} - registry, err := provider.New(p) - if err != nil { - t.Fatal(err) - } - s := &Server{providers: registry} - q := &request{Server: s, R: httptest.NewRequest("GET", "/?name=team/project&"+raw, nil), Params: map[string]string{"provider": "fixture", "id": "1"}, User: M{"_id": "owner"}} - _, err = s.embeddedSource(kind)(q) - expected := "" - if raw != "" { - expected = "custom-grant" - } - if err != nil || len(p.choices) != 1 || p.choices[0] != expected { - t.Fatalf("provider choice lost: %v %v", p.choices, err) - } - }) - } - } -} diff --git a/backend/internal/server/stage_metrics.go b/backend/internal/server/stage_metrics.go deleted file mode 100644 index 5445b46..0000000 --- a/backend/internal/server/stage_metrics.go +++ /dev/null @@ -1,81 +0,0 @@ -package server - -import ( - "context" - "errors" - "io" - "sync" - "time" - - "github.com/tdurieux/anonymous_github/backend/internal/provider" -) - -type performanceContextKey struct{} - -// Only fixed operation names from HTTP work enter the bounded metrics buffer. -func (s *Server) stageObserver(ctx context.Context) func(string, time.Duration, error) { - trace := traceFrom(ctx) - if trace == nil { - return nil - } - return func(name string, elapsed time.Duration, err error) { - switch name { - case "repository", "authorization", "upstream", "cache_lookup", "cache_fill", "worker_wait", "anonymize": - default: - return - } - trace.observe(name, elapsed) - if s.requestMetrics == nil { - return - } - key := requestMetricKey{time.Now().UnixMilli() / 60000 * 60000, name, "all", "all"} - s.requestMetrics.observe(key, elapsed, 0, errors.Is(err, context.Canceled), err != nil, false) - } -} -func (s *Server) startStage(ctx context.Context, name string) func(error) { - observe := s.stageObserver(ctx) - if observe == nil { - return func(error) {} - } - started := time.Now() - var once sync.Once - return func(err error) { once.Do(func() { observe(name, time.Since(started), err) }) } -} - -// Include body consumption, not only the upstream response headers. EOF and -// Close can both occur; startStage records at most one sample. -type measuredSource struct { - io.ReadCloser - done func(error) -} - -func (r *measuredSource) Read(p []byte) (int, error) { - n, err := r.ReadCloser.Read(p) - if err == io.EOF { - r.done(nil) - } else if err != nil { - r.done(err) - } - return n, err -} -func (r *measuredSource) Close() error { - err := r.ReadCloser.Close() - r.done(err) - return err -} -func (s *Server) openMeasuredSource(ctx context.Context, p provider.Repositories, access provider.Access, entry provider.Entry) (io.ReadCloser, error) { - done := s.startStage(ctx, "upstream") - body, err := p.Open(ctx, access, entry) - if err != nil { - done(err) - return nil, err - } - return &measuredSource{ReadCloser: body, done: done}, nil -} - -func (s *Server) authorizeMeasured(ctx context.Context, p provider.Repositories, access provider.Access) error { - done := s.startStage(ctx, "authorization") - err := p.Authorize(ctx, access) - done(err) - return err -} diff --git a/backend/internal/server/stage_metrics_test.go b/backend/internal/server/stage_metrics_test.go deleted file mode 100644 index 4e73b25..0000000 --- a/backend/internal/server/stage_metrics_test.go +++ /dev/null @@ -1,50 +0,0 @@ -package server - -import ( - "context" - "io" - "strings" - "testing" - "time" -) - -func TestStageMetricsBoundedAndOnce(t *testing.T) { - s := &Server{requestMetrics: &requestMetrics{pending: map[requestMetricKey]requestSample{}}} - s.startStage(context.Background(), "repository")(nil) - ctx := context.WithValue(context.Background(), performanceContextKey{}, newRequestTrace()) - s.stageObserver(ctx)("secret-repository-name", time.Second, nil) - if len(s.requestMetrics.pending) != 0 { - t.Fatal("background or arbitrary label recorded") - } - done := s.startStage(ctx, "authorization") - done(context.Canceled) - done(nil) - for key, sample := range s.requestMetrics.pending { - if key.metric != "authorization" || key.route != "all" || sample.count != 1 || sample.aborted != 1 || sample.errors != 1 { - t.Fatalf("unexpected sample: %+v %+v", key, sample) - } - } - if len(s.requestMetrics.pending) != 1 { - t.Fatal("missing sample") - } -} -func TestStageMetricsStreamEOFAndClose(t *testing.T) { - s := &Server{requestMetrics: &requestMetrics{pending: map[requestMetricKey]requestSample{}}} - ctx := context.WithValue(context.Background(), performanceContextKey{}, newRequestTrace()) - r := &measuredSource{ReadCloser: io.NopCloser(strings.NewReader("unchanged output")), done: s.startStage(ctx, "upstream")} - data, err := io.ReadAll(r) - if err != nil || string(data) != "unchanged output" { - t.Fatal(string(data), err) - } - if err := r.Close(); err != nil { - t.Fatal(err) - } - for _, sample := range s.requestMetrics.pending { - if sample.count != 1 || sample.errors != 0 { - t.Fatal(sample) - } - } - if len(s.requestMetrics.pending) != 1 { - t.Fatal("missing stream sample") - } -} diff --git a/backend/internal/server/stats.go b/backend/internal/server/stats.go deleted file mode 100644 index 24ab0ac..0000000 --- a/backend/internal/server/stats.go +++ /dev/null @@ -1,110 +0,0 @@ -package server - -import ( - "context" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/mongo/options" - "io" - "os" - "sort" - "time" -) - -func (s *Server) computeStats(ctx context.Context) (M, error) { - repos, e := s.Store.DB.Collection(collection("repo")).CountDocuments(ctx, M{}) - if e != nil { - return nil, e - } - prs, e := s.Store.DB.Collection(collection("pr")).CountDocuments(ctx, M{}) - if e != nil { - return nil, e - } - cursor, e := s.Store.DB.Collection(collection("repo")).Aggregate(ctx, []M{{"$group": M{"_id": "$owner", "views": M{"$sum": "$pageView"}}}, {"$group": M{"_id": nil, "users": M{"$sum": 1}, "views": M{"$sum": "$views"}}}}) - if e != nil { - return nil, e - } - defer cursor.Close(ctx) - var usage M - if cursor.Next(ctx) { - if e = cursor.Decode(&usage); e != nil { - return nil, e - } - } - if e = cursor.Err(); e != nil { - return nil, e - } - return M{"nbRepositories": repos, "nbPullRequests": prs, "nbUsers": number(usage["users"]), "nbPageViews": number(usage["views"])}, nil -} -func (s *Server) stats(q *request) (any, error) { - if q.R.URL.Path == "/api/stat" { - return s.getCurrentStats(q.ctx()) - } - raw, err := extendedQueryString(q.R.URL.RawQuery, "days") - if err != nil { - return nil, err - } - return s.getStatsHistory(q.ctx(), publicStatsDays(raw), time.Now()) -} - -func mergeCurrentStats(rows []M, current M, now time.Time) []M { - today := now.UTC().Truncate(24 * time.Hour) - out := make([]M, 0, len(rows)+1) - replaced := false - for _, row := range rows { - copy := selectFields(row, "date", "nbRepositories", "nbUsers", "nbPageViews", "nbPullRequests") - copy["date"] = date(row["date"]).UTC() - if !replaced && date(row["date"]).UTC().Truncate(24*time.Hour).Equal(today) { - copy = selectFields(current, "nbRepositories", "nbUsers", "nbPageViews", "nbPullRequests") - copy["date"] = today - replaced = true - } - out = append(out, copy) - } - if !replaced { - row := selectFields(current, "nbRepositories", "nbUsers", "nbPageViews", "nbPullRequests") - row["date"] = today - out = append(out, row) - } - sort.SliceStable(out, func(i, j int) bool { return date(out[i]["date"]).Before(date(out[j]["date"])) }) - return out -} -func (s *Server) statsHistory(ctx context.Context, days int64, current M, now time.Time) ([]M, error) { - today := now.UTC().Truncate(24 * time.Hour) - // The window bounds dates, not row count. Legacy snapshots can include - // several distinct timestamps per day and must not be silently truncated. - rows, err := s.Store.list(ctx, "dailystats", M{"date": M{"$gte": today.AddDate(0, 0, -int(days)+1)}}, 0, bson.D{{Key: "date", Value: 1}}) - if err != nil { - return nil, err - } - return mergeCurrentStats(rows, current, now), nil -} - -func (s *Server) snapshotStats(ctx context.Context) error { - now := time.Now().UTC().Truncate(24 * time.Hour) - exists, e := s.Store.one(ctx, "dailystats", M{"date": now}) - if e != nil || exists != nil { - return e - } - stats, e := s.computeStats(ctx) - if e != nil { - return e - } - stats["date"] = now - _, e = s.Store.DB.Collection("dailystats").UpdateOne(ctx, M{"date": now}, M{"$setOnInsert": stats}, options.UpdateOne().SetUpsert(true)) - return e -} -func (s *Server) message(q *request) (any, error) { - f, e := os.Open("message.txt") - if os.IsNotExist(e) { - return nil, fail("not_found", 404) - } - if e != nil { - return nil, e - } - defer f.Close() - q.W.Header().Set("Content-Type", "text/plain; charset=utf-8") - if q.R.Method != "HEAD" { - _, e = io.Copy(q.W, io.LimitReader(f, 1024*1024)) - } - return written{}, e -} diff --git a/backend/internal/server/stats_cache.go b/backend/internal/server/stats_cache.go deleted file mode 100644 index 1d1a020..0000000 --- a/backend/internal/server/stats_cache.go +++ /dev/null @@ -1,272 +0,0 @@ -package server - -import ( - "context" - "encoding/json" - "errors" - "fmt" - "strings" - "sync" - "time" - "unicode" - - "github.com/google/uuid" - "github.com/redis/go-redis/v9" -) - -type statsCacheEntry struct { - done chan struct{} - value any - err error - expires time.Time - order uint64 -} -type statsCache struct { - mu sync.Mutex - entries map[string]*statsCacheEntry - sequence uint64 - now func() time.Time -} - -func (c *statsCache) clock() time.Time { - if c.now != nil { - return c.now() - } - return time.Now() -} - -// Match AsyncCache's FIFO capacity, in-flight coalescing, one-hour TTL after -// success and immediate retry after failure. Waiters can cancel independently. -func (c *statsCache) get(ctx context.Context, key string, capacity int, calculate func() (any, error)) (value any, err error) { - c.mu.Lock() - now := c.clock() - for key, entry := range c.entries { - if !entry.expires.IsZero() && !entry.expires.After(now) { - delete(c.entries, key) - } - } - if entry := c.entries[key]; entry != nil { - c.mu.Unlock() - select { - case <-ctx.Done(): - return nil, ctx.Err() - case <-entry.done: - return entry.value, entry.err - } - } - if len(c.entries) >= capacity { - var first string - var oldest *statsCacheEntry - for k, e := range c.entries { - if oldest == nil || e.order < oldest.order { - first, oldest = k, e - } - } - delete(c.entries, first) - } - if c.entries == nil { - c.entries = map[string]*statsCacheEntry{} - } - c.sequence++ - entry := &statsCacheEntry{done: make(chan struct{}), order: c.sequence} - c.entries[key] = entry - c.mu.Unlock() - err = errors.New("statistics_calculation_interrupted") - defer func() { - c.mu.Lock() - entry.value, entry.err = value, err - if err == nil { - entry.expires = c.clock().Add(time.Hour) - } else if c.entries[key] == entry { - delete(c.entries, key) - } - close(entry.done) - c.mu.Unlock() - }() - return calculate() -} - -type publicStatsState struct { - current, history statsCache - mu sync.Mutex - client *redis.Client - closed bool -} - -func (s *Server) statsRedis() *redis.Client { - state := &s.publicStats - state.mu.Lock() - defer state.mu.Unlock() - if state.closed || s.Store == nil || s.Store.Redis == nil { - return nil - } - if state.client == nil { - options := *s.Store.Redis.Options() - options.Dialer = nil // Rebuild the default dialer with the bounded cache timeout. - options.DialTimeout = 500 * time.Millisecond - options.ReadTimeout = time.Second - options.WriteTimeout = time.Second - options.PoolTimeout = time.Second - options.ContextTimeoutEnabled = true - options.MaxRetries = -1 - options.PoolSize = 2 - state.client = redis.NewClient(&options) - } - return state.client -} -func (s *Server) closeStatsCache() { - state := &s.publicStats - state.mu.Lock() - defer state.mu.Unlock() - state.closed = true - if state.client != nil { - state.client.Close() - } -} - -const publicStatsKey = "perf:home-stats:v1" -const publicStatsLease = "perf:lease:perf:home-stats:v1" -const statsLeaseRelease = `if redis.call('get',KEYS[1]) == ARGV[1] then return redis.call('del',KEYS[1]) else return 0 end` -const statsLeaseRenew = `if redis.call('get',KEYS[1]) == ARGV[1] then return redis.call('pexpire',KEYS[1],ARGV[2]) else return 0 end` - -func statsFields(value M) M { - return selectFields(value, "nbRepositories", "nbUsers", "nbPageViews", "nbPullRequests") -} -func validCachedStats(raw []byte) (M, bool) { - var value M - if json.Unmarshal(raw, &value) != nil || value == nil { - return nil, false - } - for _, key := range []string{"nbRepositories", "nbUsers", "nbPageViews", "nbPullRequests"} { - if n, ok := value[key].(float64); !ok || n < 0 { - return nil, false - } - } - return statsFields(value), true -} -func (s *Server) getCurrentStats(ctx context.Context) (M, error) { - value, err := s.publicStats.current.get(ctx, "current", 1, func() (any, error) { return s.fillCurrentStats(ctx) }) - if err != nil { - return nil, err - } - return statsFields(value.(M)), nil -} -func (s *Server) fillCurrentStats(ctx context.Context) (M, error) { - client := s.statsRedis() - produce := func() (M, error) { - value, err := s.computeStats(ctx) - if err != nil { - return nil, err - } - if client != nil { - raw, _ := json.Marshal(value) - write, cancel := context.WithTimeout(ctx, time.Second) - client.Set(write, publicStatsKey, raw, time.Hour) - cancel() - } - return value, nil - } - if client == nil { - return produce() - } - token := uuid.NewString() - deadline := time.Now().Add(120 * time.Second) - for { - if err := ctx.Err(); err != nil { - return nil, err - } - read, cancel := context.WithTimeout(ctx, time.Second) - raw, err := client.Get(read, publicStatsKey).Bytes() - cancel() - if err == nil { - if value, ok := validCachedStats(raw); ok { - return value, nil - } - } else if !errors.Is(err, redis.Nil) { - client = nil - return produce() - } - acquire, cancel := context.WithTimeout(ctx, time.Second) - owned, err := client.SetNX(acquire, publicStatsLease, token, 30*time.Second).Result() - cancel() - if err != nil { - client = nil - return produce() - } - if owned { - heartbeat, stop := context.WithCancel(ctx) - done := make(chan struct{}) - go func() { - defer close(done) - ticker := time.NewTicker(10 * time.Second) - defer ticker.Stop() - for { - select { - case <-heartbeat.Done(): - return - case <-ticker.C: - renew, cancel := context.WithTimeout(heartbeat, time.Second) - client.Eval(renew, statsLeaseRenew, []string{publicStatsLease}, token, 30000) - cancel() - } - } - }() - defer func() { - stop() - <-done - release, cancel := context.WithTimeout(context.WithoutCancel(ctx), time.Second) - defer cancel() - client.Eval(release, statsLeaseRelease, []string{publicStatsLease}, token) - }() - return produce() - } - if !time.Now().Before(deadline) { - return nil, errors.New("cache_fill_timeout") - } - timer := time.NewTimer(100 * time.Millisecond) - select { - case <-ctx.Done(): - timer.Stop() - return nil, ctx.Err() - case <-timer.C: - } - } -} -func publicStatsDays(raw string) int64 { - raw = strings.TrimLeftFunc(raw, func(r rune) bool { return unicode.IsSpace(r) && r != '\u0085' || r == '\ufeff' }) - if strings.HasPrefix(raw, "-") { - if len(raw) < 2 || raw[1] < '0' || raw[1] > '9' { - return 30 - } - n := adminPageInt(raw[1:], 0, 365) - if n > 0 { - return 1 - } - return 30 - } - return adminPageInt(raw, 30, 365) -} -func (s *Server) getStatsHistory(ctx context.Context, days int64, now time.Time) ([]M, error) { - if days == 0 { - days = 30 - } - days = min(int64(365), max(int64(1), days)) - key := fmt.Sprintf("%s:%d", now.UTC().Format("2006-01-02"), days) - value, err := s.publicStats.history.get(ctx, key, 16, func() (any, error) { - current, err := s.getCurrentStats(ctx) - if err != nil { - return nil, err - } - return s.statsHistory(ctx, days, current, now) - }) - if err != nil { - return nil, err - } - rows := value.([]M) - out := make([]M, len(rows)) - for i, row := range rows { - out[i] = statsFields(row) - out[i]["date"] = row["date"] - } - return out, nil -} diff --git a/backend/internal/server/stats_cache_test.go b/backend/internal/server/stats_cache_test.go deleted file mode 100644 index 821bbe8..0000000 --- a/backend/internal/server/stats_cache_test.go +++ /dev/null @@ -1,256 +0,0 @@ -package server - -import ( - "context" - "encoding/json" - "errors" - "net/http/httptest" - "os" - "strconv" - "strings" - "sync" - "sync/atomic" - "testing" - "time" - - "github.com/redis/go-redis/v9" - "go.mongodb.org/mongo-driver/v2/bson" -) - -func TestPublicStatsWindowContracts(t *testing.T) { - data, err := os.ReadFile("testdata/stats-window.json") - if err != nil { - t.Fatal(err) - } - var cases []struct { - Input any - Expected int64 - } - if err = json.Unmarshal(data, &cases); err != nil { - t.Fatal(err) - } - for _, row := range cases { - input := str(row.Input) - if values, ok := row.Input.([]any); ok { - parts := []string{} - for _, v := range values { - parts = append(parts, str(v)) - } - input = strings.Join(parts, ",") - } - if got := publicStatsDays(input); got != row.Expected { - t.Fatal(row, got) - } - } -} -func TestPublicStatsCacheCoalescingExpiryAndFailure(t *testing.T) { - now := time.Now() - cache := statsCache{now: func() time.Time { return now }} - var calls atomic.Int64 - start, release := make(chan struct{}), make(chan struct{}) - var group sync.WaitGroup - for i := 0; i < 16; i++ { - group.Go(func() { - value, err := cache.get(context.Background(), "one", 1, func() (any, error) { - if calls.Add(1) == 1 { - close(start) - } - <-release - return 7, nil - }) - if err != nil || value != 7 { - t.Error(value, err) - } - }) - } - <-start - canceled, cancel := context.WithCancel(context.Background()) - cancel() - if _, err := cache.get(canceled, "one", 1, func() (any, error) { t.Error("duplicate fill"); return nil, nil }); !errors.Is(err, context.Canceled) { - t.Fatal(err) - } - close(release) - group.Wait() - if calls.Load() != 1 { - t.Fatal(calls.Load()) - } - now = now.Add(time.Hour) - if _, err := cache.get(context.Background(), "one", 1, func() (any, error) { calls.Add(1); return nil, errors.New("failed") }); err == nil { - t.Fatal("failure swallowed") - } - value, err := cache.get(context.Background(), "one", 1, func() (any, error) { calls.Add(1); return 9, nil }) - if err != nil || value != 9 || calls.Load() != 3 { - t.Fatal(value, err, calls.Load()) - } - bounded := statsCache{} - for i := 0; i < 20; i++ { - bounded.get(context.Background(), strconv.Itoa(i), 16, func() (any, error) { return i, nil }) - } - if len(bounded.entries) != 16 || bounded.entries["0"] != nil || bounded.entries["19"] == nil { - t.Fatal("cache capacity/FIFO") - } -} -func TestPublicStatsCachePanicDoesNotStrandWaiters(t *testing.T) { - cache := statsCache{} - func() { - defer func() { - if recover() == nil { - t.Error("panic swallowed") - } - }() - cache.get(context.Background(), "one", 1, func() (any, error) { panic("fixture") }) - }() - value, err := cache.get(context.Background(), "one", 1, func() (any, error) { return 1, nil }) - if err != nil || value != 1 { - t.Fatal(value, err) - } -} -func runPublicStatsIntegration(t *testing.T, base *Server) { - ctx := context.Background() - db := base.Store.DB.Client().Database("stats_" + bson.NewObjectID().Hex()) - defer db.Drop(ctx) - options := *base.Store.Redis.Options() - options.DB = 15 - client := redis.NewClient(&options) - defer client.Close() - if err := client.FlushDB(ctx).Err(); err != nil { - t.Fatal(err) - } - defer client.FlushDB(ctx) - s := &Server{Store: &Store{DB: db, Redis: client}} - defer s.closeStatsCache() - zero, err := s.getCurrentStats(ctx) - if err != nil || number(zero["nbRepositories"]) != 0 { - t.Fatal(zero, err) - } - if _, err := db.Collection(collection("repo")).InsertOne(ctx, M{"repoId": "fixture", "owner": "one", "pageView": 4}); err != nil { - t.Fatal(err) - } - cached, err := s.getCurrentStats(ctx) - if err != nil || number(cached["nbRepositories"]) != 0 { - t.Fatal("zero cache not reused", cached, err) - } - cached["nbRepositories"] = 99 - cached, _ = s.getCurrentStats(ctx) - if number(cached["nbRepositories"]) != 0 { - t.Fatal("caller mutated cached totals") - } - // A second process reuses the TypeScript Redis key. - other := &Server{Store: s.Store} - defer other.closeStatsCache() - shared, err := other.getCurrentStats(ctx) - if err != nil || number(shared["nbRepositories"]) != 0 { - t.Fatal("shared cache", shared, err) - } - if ttl := client.TTL(ctx, publicStatsKey).Val(); ttl < 59*time.Minute || ttl > time.Hour { - t.Fatal(ttl) - } - // Corrupt cache entries are recomputed; a foreign lease is respected. - client.Set(ctx, publicStatsKey, "invalid", time.Hour) - fresh := &Server{Store: s.Store} - defer fresh.closeStatsCache() - value, err := fresh.getCurrentStats(ctx) - if err != nil || number(value["nbRepositories"]) != 1 || number(value["nbPageViews"]) != 4 { - t.Fatal(value, err) - } - if client.Exists(ctx, publicStatsLease).Val() != 0 { - t.Fatal("lease leaked") - } - client.Del(ctx, publicStatsKey) - client.Set(ctx, publicStatsLease, "node-owner", time.Second) - publication := make(chan struct{}) - go func() { - defer close(publication) - time.Sleep(50 * time.Millisecond) - client.Set(ctx, publicStatsKey, `{"nbRepositories":17,"nbUsers":2,"nbPageViews":40,"nbPullRequests":3}`, time.Hour) - }() - follower := &Server{Store: s.Store} - defer follower.closeStatsCache() - value, err = follower.getCurrentStats(ctx) - <-publication - if err != nil || number(value["nbRepositories"]) != 17 || client.Get(ctx, publicStatsLease).Val() != "node-owner" { - t.Fatal("foreign lease not respected", value, err) - } - client.Del(ctx, publicStatsLease, publicStatsKey) - // A Redis user can acquire the lease but cannot publish the cached totals. - username := "stats_" + bson.NewObjectID().Hex() - password := bson.NewObjectID().Hex() - if err := client.Do(ctx, "ACL", "SETUSER", username, "reset", "on", ">"+password, "+@connection", "(+@all ~perf:lease:*)", "(+get ~perf:home-stats:v1)").Err(); err != nil { - t.Fatal(err) - } - defer client.Do(ctx, "ACL", "DELUSER", username) - restrictedOptions := options - restrictedOptions.Username = username - restrictedOptions.Password = password - restricted := redis.NewClient(&restrictedOptions) - defer restricted.Close() - writeFailure := &Server{Store: &Store{DB: db, Redis: restricted}} - defer writeFailure.closeStatsCache() - value, err = writeFailure.getCurrentStats(ctx) - if err != nil || number(value["nbRepositories"]) != 1 || client.Exists(ctx, publicStatsKey).Val() != 0 { - t.Fatal("optional cache write failed request", value, err) - } - // No Redis service: database output and the local history cache still work. - offlineClient := redis.NewClient(&redis.Options{Addr: "127.0.0.1:1"}) - defer offlineClient.Close() - offline := &Server{Store: &Store{DB: db, Redis: offlineClient}} - defer offline.closeStatsCache() - start := time.Now() - value, err = offline.getCurrentStats(ctx) - if err != nil || number(value["nbRepositories"]) != 1 || time.Since(start) > 3*time.Second { - t.Fatal("Redis outage fallback", value, err, time.Since(start)) - } - now := time.Now().UTC() - today := now.Truncate(24 * time.Hour) - history, err := offline.getStatsHistory(ctx, 30, now) - if err != nil || len(history) != 1 { - t.Fatal(history, err) - } - history[0]["nbRepositories"] = 999 - db.Collection("dailystats").InsertOne(ctx, M{"date": today.AddDate(0, 0, -1), "nbRepositories": 42}) - again, err := offline.getStatsHistory(ctx, 30, now) - if err != nil || len(again) != 1 || number(again[0]["nbRepositories"]) != 1 { - t.Fatal("history cache mutation/reuse", again, err) - } - next, err := offline.getStatsHistory(ctx, 30, now.Add(24*time.Hour)) - if err != nil || len(next) != 2 { - t.Fatal("day rollover reused previous history", next, err) - } - // A unique date index permits multiple timestamps per day. The TypeScript - // query returns all matching snapshots, including future-dated imports. - if _, err := db.Collection("dailystats").DeleteMany(ctx, M{}); err != nil { - t.Fatal(err) - } - docs := make([]any, 0, 402) - for i := 0; i < 400; i++ { - docs = append(docs, M{"date": today.Add(-24 * time.Hour).Add(time.Duration(i) * time.Second), "nbRepositories": i, "nbUsers": 1, "nbPageViews": i, "nbPullRequests": 0}) - } - docs = append(docs, M{"date": today.Add(24 * time.Hour), "nbRepositories": 401}, M{"date": today.AddDate(0, 0, -31), "nbRepositories": -1}) - if _, err := db.Collection("dailystats").InsertMany(ctx, docs); err != nil { - t.Fatal(err) - } - large, err := offline.getStatsHistory(ctx, 7, now) - if err != nil || len(large) != 402 { - t.Fatalf("history truncated: rows=%d error=%v", len(large), err) - } - for i := 0; i < 400; i++ { - if number(large[i]["nbRepositories"]) != int64(i) { - t.Fatalf("snapshot %d missing or out of order: %v", i, large[i]) - } - } - if !date(large[400]["date"]).Equal(today) || number(large[400]["nbRepositories"]) != 1 || number(large[401]["nbRepositories"]) != 401 { - t.Fatal("current/future snapshots omitted", large[400:]) - } - for _, tc := range []struct { - query string - count int - }{ - {"days[]=7&days[]=30", 402}, {"days[1]=7&days[0]=1", 2}, - {"days[]=1&days=7", 2}, {"days=7&days[]=1", 402}, - } { - result, err := offline.stats(&request{R: httptest.NewRequest("GET", "/api/stat/history?"+tc.query, nil)}) - if err != nil || len(result.([]M)) != tc.count { - t.Fatalf("history query %q: %v, error=%v", tc.query, result, err) - } - } -} diff --git a/backend/internal/server/stats_history_test.go b/backend/internal/server/stats_history_test.go deleted file mode 100644 index d463b26..0000000 --- a/backend/internal/server/stats_history_test.go +++ /dev/null @@ -1,38 +0,0 @@ -package server - -import ( - "encoding/json" - "os" - "reflect" - "testing" -) - -func TestStatsHistoryTypeScriptContracts(t *testing.T) { - data, err := os.ReadFile("testdata/stats-history.json") - if err != nil { - t.Fatal(err) - } - var cases []struct { - Now string - Rows []M - Current M - Expected []M - } - if err = json.Unmarshal(data, &cases); err != nil { - t.Fatal(err) - } - for i, row := range cases { - before, _ := json.Marshal([]any{row.Rows, row.Current}) - result := mergeCurrentStats(row.Rows, row.Current, date(row.Now)) - for _, expected := range row.Expected { - expected["date"] = date(expected["date"]).UTC() - } - if !reflect.DeepEqual(result, row.Expected) { - t.Fatalf("case %d: got %+v expected %+v", i, result, row.Expected) - } - after, _ := json.Marshal([]any{row.Rows, row.Current}) - if string(before) != string(after) { - t.Fatal("history merge mutated inputs", i) - } - } -} diff --git a/backend/internal/server/store.go b/backend/internal/server/store.go deleted file mode 100644 index c620b5d..0000000 --- a/backend/internal/server/store.go +++ /dev/null @@ -1,350 +0,0 @@ -package server - -import ( - "context" - "errors" - "fmt" - "github.com/redis/go-redis/v9" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/mongo" - "go.mongodb.org/mongo-driver/v2/mongo/options" - "strings" - "time" -) - -type M = bson.M -type Store struct { - DB *mongo.Database - Redis *redis.Client -} - -func Connect(ctx context.Context, c Config) (*Store, error) { - // Prefer bounded-memory wire compression. The driver's zstd encoder pool - // retains large windows per CPU, even for small per-file queries during ZIPs. - // An explicit compressors URI option can still override this default. - client, err := mongo.Connect(options.Client().SetCompressors([]string{"snappy"}).ApplyURI(c.MongoURI).SetBSONOptions(&options.BSONOptions{DefaultDocumentM: true}).SetAppName("Anonymous GitHub Go").SetMaxPoolSize(30).SetServerSelectionTimeout(10 * time.Second)) - if err != nil { - return nil, errors.New("database_connection_failed") - } - if err = client.Ping(ctx, nil); err != nil { - client.Disconnect(ctx) - return nil, errors.New("database_connection_failed") - } - redisClient := redis.NewClient(&redis.Options{Addr: c.RedisAddress, DialTimeout: 3 * time.Second, ReadTimeout: 3 * time.Second, WriteTimeout: 3 * time.Second}) - if err = redisClient.Ping(ctx).Err(); err != nil { - client.Disconnect(ctx) - redisClient.Close() - return nil, errors.New("redis_connection_failed") - } - s := &Store{client.Database(c.Database), redisClient} - _, err = s.DB.Collection("credentials").Indexes().CreateOne(ctx, mongo.IndexModel{Keys: bson.D{{Key: "ownerId", Value: 1}, {Key: "provider", Value: 1}}, Options: options.Index().SetUnique(true)}) - if err != nil { - s.Close(ctx) - return nil, errors.New("credential_index_failed") - } - if err = s.ensureIndexes(ctx); err != nil { - s.Close(ctx) - return nil, errors.New("database_index_failed") - } - return s, nil -} -func (s *Store) Close(ctx context.Context) { s.Redis.Close(); s.DB.Client().Disconnect(ctx) } -func (s *Store) one(ctx context.Context, collection string, query M) (M, error) { - var result M - opts := options.FindOne() - if collection == "anonymizedrepositories" { - opts.SetCollation(&options.Collation{Locale: "en", Strength: 2}) - } - err := s.DB.Collection(collection).FindOne(ctx, query, opts).Decode(&result) - if errors.Is(err, mongo.ErrNoDocuments) { - return nil, nil - } - return result, err -} -func (s *Store) list(ctx context.Context, collection string, query M, limit int64, sort bson.D) ([]M, error) { - opts := options.Find().SetLimit(limit) - if len(sort) > 0 { - opts.SetSort(sort) - } - cur, err := s.DB.Collection(collection).Find(ctx, query, opts) - if err != nil { - return nil, err - } - defer cur.Close(ctx) - result := []M{} - err = cur.All(ctx, &result) - return result, err -} -func (s *Store) update(ctx context.Context, collection string, query, update M) (bool, error) { - r, e := s.DB.Collection(collection).UpdateOne(ctx, query, update) - if e != nil { - return false, e - } - return r.MatchedCount > 0, nil -} -func str(v any) string { - switch x := v.(type) { - case string: - return x - case bson.ObjectID: - return x.Hex() - case float64: - // JSON-decoded upstream IDs must use JavaScript's decimal/exponent - // thresholds, not fmt's scientific notation for ordinary large IDs. - if value, ok := termString(x); ok { - return value - } - return fmt.Sprint(x) - case nil: - return "" - default: - return fmt.Sprint(x) - } -} -func obj(v any) M { - switch x := v.(type) { - case bson.D: - m := M{} - for _, e := range x { - m[e.Key] = e.Value - } - return m - case M: - return x - case map[string]any: - return M(x) - } - return M{} -} -func arr(v any) []any { - switch x := v.(type) { - case []M: - a := make([]any, len(x)) - for i, v := range x { - a[i] = v - } - return a - case bson.A: - return []any(x) - case []any: - return x - case []string: - a := make([]any, len(x)) - for i, s := range x { - a[i] = s - } - return a - } - return []any{} -} -func stringsOf(v any) []string { - a := arr(v) - r := make([]string, 0, len(a)) - for _, x := range a { - if s, ok := x.(string); ok { - r = append(r, s) - } - } - return r -} -func boolean(v any) bool { b, _ := v.(bool); return b } -func number(v any) int64 { - switch x := v.(type) { - case int: - return int64(x) - case int32: - return int64(x) - case int64: - return x - case float64: - return int64(x) - } - return 0 -} -func date(v any) time.Time { - t, _ := storedDate(v) - return t -} - -// storedDate distinguishes a valid year-0001 timestamp from missing or invalid -// data. It parses persisted date forms, not JavaScript input coercions. -func storedDate(v any) (time.Time, bool) { - switch x := v.(type) { - case time.Time: - return x, true - case bson.DateTime: - return x.Time(), true - case string: - t, err := time.Parse(time.RFC3339Nano, x) - if err != nil { - t, err = time.Parse("2006-01-02", x) - } - return t, err == nil - } - return time.Time{}, false -} - -func latestStoredDate(values ...any) any { - var latest time.Time - found := false - for _, value := range values { - if d, valid := storedDate(value); valid && (!found || d.After(latest)) { - latest, found = d, true - } - } - if !found { - return nil - } - return latest -} -func oid(s string) (bson.ObjectID, error) { return bson.ObjectIDFromHex(s) } -func collection(kind string) string { - switch kind { - case "repo": - return "anonymizedrepositories" - case "gist": - return "anonymizedgists" - case "pr": - return "anonymizedpullrequests" - } - return "" -} -func idKey(kind string) string { - switch kind { - case "repo": - return "repoId" - case "gist": - return "gistId" - case "pr": - return "pullRequestId" - } - return "" -} -func missing(kind string) string { - if kind == "pr" { - return "pull_request_not_found" - } - return kind + "_not_found" -} -func resourceFilter(kind, id string) M { return M{idKey(kind): id} } -func activeGeneration(r M) any { - if s := str(r["treeGeneration"]); s != "" { - return s - } - return M{"$exists": false} -} -func revisionFilter(r M) M { - q := M{"_id": r["_id"], "status": r["status"]} - for _, k := range []string{"statusDate", "treeGeneration", "settingsSavedAt"} { - if v, ok := r[k]; ok { - q[k] = v - } else { - q[k] = M{"$exists": false} - } - } - field := "githubAccess" - if id, _ := sourceProvider(obj(r["source"])); id != "github" { - field = "providerAccess" - } - a := obj(r[field]) - if v, ok := a["revision"]; ok { - q[field+".revision"] = v - } else { - q[field+".revision"] = M{"$exists": false} - } - return q -} -func selectFields(m M, keys ...string) M { - out := M{} - for _, k := range keys { - if v, ok := m[k]; ok { - out[k] = v - } - } - return out -} -func resourceJSON(kind string, m M) M { - out := selectFields(m, idKey(kind), "options", "conference", "anonymizeDate", "status", "statusMessage", "lastView", "pageView") - source := obj(m["source"]) - switch kind { - case "repo": - if str(m["status"]) != "ready" { - out["size"] = M{"storage": 0, "file": 0} - } else if v, ok := m["size"]; ok { - out["size"] = v - } - authors := []M{} - for _, v := range arr(m["coauthors"]) { - authors = append(authors, selectFields(obj(v), "username", "githubId", "photo")) - } - out["coauthors"] = authors - out["source"] = selectFields(source, "type", "branch", "commit") - if v, ok := source["repositoryId"]; ok { - obj(out["source"])["repositoryID"] = v - } - if v, ok := source["repositoryName"]; ok { - obj(out["source"])["fullName"] = v - } - if id := str(source["provider"]); id != "" { - obj(out["source"])["provider"] = id - } - case "gist": - out["source"] = selectFields(source, "gistId") - if m["gist"] != nil { - g := obj(m["gist"]) - payload := selectFields(g, "description", "isPublic", "creationDate", "updatedDate", "ownerLogin") - files := []M{} - for _, v := range arr(g["files"]) { - files = append(files, selectFields(obj(v), "filename", "content", "language", "size", "type")) - } - comments := []M{} - for _, v := range arr(g["comments"]) { - comments = append(comments, selectFields(obj(v), "body", "creationDate", "updatedDate", "author")) - } - payload["files"] = files - payload["comments"] = comments - out["gist"] = payload - } - if value, ok := obj(m["gist"])["isPublic"]; ok { - out["isPublic"] = value - } - case "pr": - out["source"] = selectFields(source, "pullRequestId", "repositoryFullName") - if v, ok := m["pullRequest"]; ok { - out["pullRequest"] = v - } - for _, k := range []string{"state", "merged", "mergedDate"} { - if v, ok := obj(m["pullRequest"])[k]; ok { - out[k] = v - } - } - } - if id := str(source["provider"]); id != "" { - obj(out["source"])["provider"] = id - } - return out -} -func safeRepositoryName(name string) bool { - parts := strings.Split(name, "/") - if len(parts) != 2 { - return false - } - for _, s := range parts { - if s == "" || s == "." || s == ".." { - return false - } - for _, r := range s { - if !(r >= 'a' && r <= 'z' || r >= 'A' && r <= 'Z' || r >= '0' && r <= '9' || strings.ContainsRune("_.-", r)) { - return false - } - } - } - return true -} - -func decimal(v any) float64 { - if f, ok := v.(float64); ok { - return f - } - return float64(number(v)) -} diff --git a/backend/internal/server/stored_date_test.go b/backend/internal/server/stored_date_test.go deleted file mode 100644 index 44009a9..0000000 --- a/backend/internal/server/stored_date_test.go +++ /dev/null @@ -1,49 +0,0 @@ -package server - -import ( - "go.mongodb.org/mongo-driver/v2/bson" - "testing" - "time" -) - -func TestStoredDatePresence(t *testing.T) { - zero := time.Time{} - for _, value := range []any{zero, bson.NewDateTimeFromTime(zero), "0001-01-01T00:00:00Z", "0001-01-01"} { - parsed, valid := storedDate(value) - if !valid || !parsed.Equal(zero) { - t.Fatalf("valid zero date lost: %v %v", value, valid) - } - } - for _, value := range []any{nil, "", "invalid", false, 0, M{}} { - if _, valid := storedDate(value); valid { - t.Fatalf("invalid stored date accepted: %#v", value) - } - } - earlier := time.Date(0, 1, 1, 0, 0, 0, 0, time.UTC) - for _, values := range [][]any{{zero}, {nil, earlier, zero}, {earlier}} { - got, ok := latestStoredDate(values...).(time.Time) - want := zero - if len(values) == 1 { - want = values[0].(time.Time) - } - if !ok || !got.Equal(want) { - t.Fatalf("latest valid date lost: %v", got) - } - } - if latestStoredDate(nil, "invalid") != nil { - t.Fatal("missing dates became a timestamp") - } -} - -func TestContentGenerationDatePresence(t *testing.T) { - absent := contentPrefix(M{"treeGeneration": "generation"}) - for _, value := range []any{time.Time{}, bson.NewDateTimeFromTime(time.Time{}), "0001-01-01T00:00:00Z"} { - record := M{"treeGeneration": "generation", "anonymizeDate": value} - if got := contentGeneration(record); got != "generation:0001-01-01T00:00:00.000Z" { - t.Fatal(got) - } - if contentPrefix(record) == absent { - t.Fatal("dated and undated content share an identity") - } - } -} diff --git a/backend/internal/server/system_overview.go b/backend/internal/server/system_overview.go deleted file mode 100644 index f56f79a..0000000 --- a/backend/internal/server/system_overview.go +++ /dev/null @@ -1,19 +0,0 @@ -package server - -import ( - "runtime" - "time" -) - -func systemOverview(started time.Time) M { - var memory runtime.MemStats - runtime.ReadMemStats(&memory) - out := M{"platform": runtime.GOOS, "arch": runtime.GOARCH, "nodeVersion": runtime.Version(), "runtime": "go", "uptime": time.Since(started).Seconds(), "cpuCount": runtime.NumCPU(), "processHeapUsed": memory.HeapAlloc, "processHeapTotal": memory.HeapSys} - // Unsupported measurements are null rather than invented zero utilization. - for _, field := range []string{"cpuPercent", "loadAvg", "memTotal", "memFree", "memUsed", "memPercent", "processRss", "diskTotal", "diskUsed", "diskFree", "diskPercent"} { - out[field] = nil - } - out["diskMount"] = "/" - platformSystemOverview(out) - return out -} diff --git a/backend/internal/server/system_overview_linux.go b/backend/internal/server/system_overview_linux.go deleted file mode 100644 index 48f0e41..0000000 --- a/backend/internal/server/system_overview_linux.go +++ /dev/null @@ -1,46 +0,0 @@ -//go:build linux - -package server - -import ( - "math" - "os" - "runtime" - "strconv" - "strings" - - "golang.org/x/sys/unix" -) - -func platformSystemOverview(out M) { - var info unix.Sysinfo_t - if unix.Sysinfo(&info) == nil { - loads := []float64{float64(info.Loads[0]) / 65536, float64(info.Loads[1]) / 65536, float64(info.Loads[2]) / 65536} - out["loadAvg"] = loads - // Match the Node overview: normalized one-minute load, not CPU time. - out["cpuPercent"] = math.Round(loads[0] / float64(runtime.NumCPU()) * 100) - total, free := uint64(info.Totalram)*uint64(info.Unit), uint64(info.Freeram)*uint64(info.Unit) - if total > 0 && free <= total { - out["memTotal"], out["memFree"], out["memUsed"] = total, free, total-free - out["memPercent"] = math.Round(float64(total-free) / float64(total) * 100) - } - } - var disk unix.Statfs_t - if unix.Statfs("/", &disk) == nil && disk.Bsize > 0 && disk.Blocks >= disk.Bfree { - unit := uint64(disk.Bsize) - total, used, available := disk.Blocks*unit, (disk.Blocks-disk.Bfree)*unit, disk.Bavail*unit - out["diskTotal"], out["diskUsed"], out["diskFree"] = total, used, available - out["diskPercent"] = float64(0) - if total > 0 { - out["diskPercent"] = math.Round(float64(used) / float64(total) * 100) - } - } - if data, err := os.ReadFile("/proc/self/statm"); err == nil { - fields := strings.Fields(string(data)) - if len(fields) > 1 { - if pages, err := strconv.ParseUint(fields[1], 10, 64); err == nil { - out["processRss"] = pages * uint64(os.Getpagesize()) - } - } - } -} diff --git a/backend/internal/server/system_overview_other.go b/backend/internal/server/system_overview_other.go deleted file mode 100644 index 17865c0..0000000 --- a/backend/internal/server/system_overview_other.go +++ /dev/null @@ -1,5 +0,0 @@ -//go:build !linux - -package server - -func platformSystemOverview(M) {} diff --git a/backend/internal/server/system_overview_test.go b/backend/internal/server/system_overview_test.go deleted file mode 100644 index 1eee3d4..0000000 --- a/backend/internal/server/system_overview_test.go +++ /dev/null @@ -1,47 +0,0 @@ -package server - -import ( - "encoding/json" - "math" - "runtime" - "testing" - "time" -) - -func TestSystemOverviewBrowserContract(t *testing.T) { - raw, err := json.Marshal(systemOverview(time.Now().Add(-time.Minute))) - if err != nil { - t.Fatal(err) - } - var data map[string]any - if err := json.Unmarshal(raw, &data); err != nil { - t.Fatal(err) - } - // Fields consumed by the unchanged TypeScript admin overview template. - for _, key := range []string{"cpuCount", "cpuPercent", "loadAvg", "memTotal", "memFree", "memUsed", "memPercent", "processRss", "diskTotal", "diskUsed", "diskFree", "diskPercent", "diskMount"} { - if _, exists := data[key]; !exists { - t.Fatalf("missing browser field %s", key) - } - } - if runtime.GOOS != "linux" { - return - } - for _, key := range []string{"memTotal", "processRss", "diskTotal"} { - if n, ok := data[key].(float64); !ok || n <= 0 { - t.Fatalf("missing live measurement %s", key) - } - } - for _, prefix := range []string{"mem", "disk"} { - total, used, free := data[prefix+"Total"].(float64), data[prefix+"Used"].(float64), data[prefix+"Free"].(float64) - if used < 0 || free < 0 || used > total || free > total { - t.Fatalf("invalid %s byte measurements", prefix) - } - if data[prefix+"Percent"] != math.Round(used/total*100) { - t.Fatalf("invalid %s percent", prefix) - } - } - loads := data["loadAvg"].([]any) - if len(loads) != 3 || data["cpuPercent"] != math.Round(loads[0].(float64)/data["cpuCount"].(float64)*100) { - t.Fatal("CPU load contract mismatch") - } -} diff --git a/backend/internal/server/term_coercion_test.go b/backend/internal/server/term_coercion_test.go deleted file mode 100644 index 0a08513..0000000 --- a/backend/internal/server/term_coercion_test.go +++ /dev/null @@ -1,29 +0,0 @@ -package server - -import ( - "math" - "strings" - "testing" -) - -func TestTermCoercionRejectsUnsafeInputs(t *testing.T) { - for _, input := range []any{nil, M{}, []any{}, math.Inf(1), math.NaN(), strings.Repeat("x", 8193)} { - _, err := validatedOptions("repo", M{"terms": []any{input}, "options": M{}}) - api, ok := err.(*APIError) - if !ok || api.Code != "invalid_terms_format" { - t.Fatalf("%T: %v", input, err) - } - } - terms := make([]any, 1001) - for i := range terms { - terms[i] = true - } - _, err := validatedOptions("repo", M{"terms": terms, "options": M{}}) - api, ok := err.(*APIError) - if !ok || api.Code != "too_many_anonymization_terms" { - t.Fatal(err) - } - if got, ok := termString(math.Copysign(0, -1)); !ok || got != "0" { - t.Fatal(got, ok) - } -} diff --git a/backend/internal/server/testdata/admin-casting.json b/backend/internal/server/testdata/admin-casting.json deleted file mode 100644 index fbfdbce..0000000 --- a/backend/internal/server/testdata/admin-casting.json +++ /dev/null @@ -1,2183 +0,0 @@ -[ - { - "field": "username", - "query": "", - "present": false - }, - { - "field": "username", - "query": "username=", - "present": false - }, - { - "field": "username", - "query": "username=active", - "present": true, - "raw": { - "username": "active" - }, - "casted": { - "username": "active" - }, - "rawAfter": { - "username": "active" - } - }, - { - "field": "username", - "query": "username[]=active", - "present": true, - "raw": { - "username": [ - "active" - ] - }, - "casted": { - "username": { - "$in": [ - "active" - ] - } - }, - "rawAfter": { - "username": [ - "active" - ] - } - }, - { - "field": "username", - "query": "username=active&username=banned", - "present": true, - "raw": { - "username": [ - "active", - "banned" - ] - }, - "casted": { - "username": { - "$in": [ - "active", - "banned" - ] - } - }, - "rawAfter": { - "username": [ - "active", - "banned" - ] - } - }, - { - "field": "username", - "query": "username[1]=active", - "present": true, - "raw": { - "username": [ - "active" - ] - }, - "casted": { - "username": { - "$in": [ - "active" - ] - } - }, - "rawAfter": { - "username": [ - "active" - ] - } - }, - { - "field": "username", - "query": "username[0][0]=active", - "present": true, - "raw": { - "username": [ - [ - "active" - ] - ] - }, - "error": true - }, - { - "field": "username", - "query": "username[_id]=active", - "present": true, - "raw": { - "username": { - "_id": "active" - } - }, - "casted": { - "username": "active" - }, - "rawAfter": { - "username": { - "_id": "active" - } - } - }, - { - "field": "username", - "query": "username[a]=active", - "present": true, - "raw": { - "username": { - "a": "active" - } - }, - "error": true - }, - { - "field": "username", - "query": "username[toString]=active", - "present": true, - "raw": { - "username": { - "toString": "active" - } - }, - "error": true - }, - { - "field": "username", - "query": "username[$eq]=active", - "present": true, - "raw": { - "username": { - "$eq": "active" - } - }, - "casted": { - "username": { - "$eq": "active" - } - }, - "rawAfter": { - "username": { - "$eq": "active" - } - } - }, - { - "field": "username", - "query": "username[$ne]=banned", - "present": true, - "raw": { - "username": { - "$ne": "banned" - } - }, - "casted": { - "username": { - "$ne": "banned" - } - }, - "rawAfter": { - "username": { - "$ne": "banned" - } - } - }, - { - "field": "username", - "query": "username[$in][]=active&username[$in][]=banned", - "present": true, - "raw": { - "username": { - "$in": [ - "active", - "banned" - ] - } - }, - "casted": { - "username": { - "$in": [ - "active", - "banned" - ] - } - }, - "rawAfter": { - "username": { - "$in": [ - "active", - "banned" - ] - } - } - }, - { - "field": "username", - "query": "username[$in]=active", - "present": true, - "raw": { - "username": { - "$in": "active" - } - }, - "casted": { - "username": { - "$in": [ - "active" - ] - } - }, - "rawAfter": { - "username": { - "$in": [ - "active" - ] - } - } - }, - { - "field": "username", - "query": "username[$nin][]=banned", - "present": true, - "raw": { - "username": { - "$nin": [ - "banned" - ] - } - }, - "casted": { - "username": { - "$nin": [ - "banned" - ] - } - }, - "rawAfter": { - "username": { - "$nin": [ - "banned" - ] - } - } - }, - { - "field": "username", - "query": "username[$all][]=active", - "present": true, - "raw": { - "username": { - "$all": [ - "active" - ] - } - }, - "casted": { - "username": { - "$all": [ - "active" - ] - } - }, - "rawAfter": { - "username": { - "$all": [ - "active" - ] - } - } - }, - { - "field": "username", - "query": "username[$gt]=a", - "present": true, - "raw": { - "username": { - "$gt": "a" - } - }, - "casted": { - "username": { - "$gt": "a" - } - }, - "rawAfter": { - "username": { - "$gt": "a" - } - } - }, - { - "field": "username", - "query": "username[$gte]=a", - "present": true, - "raw": { - "username": { - "$gte": "a" - } - }, - "casted": { - "username": { - "$gte": "a" - } - }, - "rawAfter": { - "username": { - "$gte": "a" - } - } - }, - { - "field": "username", - "query": "username[$lt]=z", - "present": true, - "raw": { - "username": { - "$lt": "z" - } - }, - "casted": { - "username": { - "$lt": "z" - } - }, - "rawAfter": { - "username": { - "$lt": "z" - } - } - }, - { - "field": "username", - "query": "username[$lte]=z", - "present": true, - "raw": { - "username": { - "$lte": "z" - } - }, - "casted": { - "username": { - "$lte": "z" - } - }, - "rawAfter": { - "username": { - "$lte": "z" - } - } - }, - { - "field": "username", - "query": "username[$exists]=true", - "present": true, - "raw": { - "username": { - "$exists": "true" - } - }, - "casted": { - "username": { - "$exists": true - } - }, - "rawAfter": { - "username": { - "$exists": true - } - } - }, - { - "field": "username", - "query": "username[$exists]=false", - "present": true, - "raw": { - "username": { - "$exists": "false" - } - }, - "casted": { - "username": { - "$exists": false - } - }, - "rawAfter": { - "username": { - "$exists": false - } - } - }, - { - "field": "username", - "query": "username[$exists]=1", - "present": true, - "raw": { - "username": { - "$exists": "1" - } - }, - "casted": { - "username": { - "$exists": true - } - }, - "rawAfter": { - "username": { - "$exists": true - } - } - }, - { - "field": "username", - "query": "username[$exists]=yes", - "present": true, - "raw": { - "username": { - "$exists": "yes" - } - }, - "casted": { - "username": { - "$exists": true - } - }, - "rawAfter": { - "username": { - "$exists": true - } - } - }, - { - "field": "username", - "query": "username[$exists]=no", - "present": true, - "raw": { - "username": { - "$exists": "no" - } - }, - "casted": { - "username": { - "$exists": false - } - }, - "rawAfter": { - "username": { - "$exists": false - } - } - }, - { - "field": "username", - "query": "username[$exists]=bad", - "present": true, - "raw": { - "username": { - "$exists": "bad" - } - }, - "error": true - }, - { - "field": "username", - "query": "username[$exists][]=true", - "present": true, - "raw": { - "username": { - "$exists": [ - "true" - ] - } - }, - "error": true - }, - { - "field": "username", - "query": "username[$type]=string", - "present": true, - "raw": { - "username": { - "$type": "string" - } - }, - "casted": { - "username": { - "$type": "string" - } - }, - "rawAfter": { - "username": { - "$type": "string" - } - } - }, - { - "field": "username", - "query": "username[$type][]=string&username[$type][]=2", - "present": true, - "raw": { - "username": { - "$type": [ - "string", - "2" - ] - } - }, - "casted": { - "username": { - "$type": [ - "string", - "2" - ] - } - }, - "rawAfter": { - "username": { - "$type": [ - "string", - "2" - ] - } - } - }, - { - "field": "username", - "query": "username[$type][a]=x", - "present": true, - "raw": { - "username": { - "$type": { - "a": "x" - } - } - }, - "error": true - }, - { - "field": "username", - "query": "username[$regex]=act.*&username[$options]=i", - "present": true, - "raw": { - "username": { - "$regex": "act.*", - "$options": "i" - } - }, - "casted": { - "username": { - "$regex": "act.*", - "$options": "i" - } - }, - "rawAfter": { - "username": { - "$regex": "act.*", - "$options": "i" - } - } - }, - { - "field": "username", - "query": "username[$not][$eq]=active", - "present": true, - "raw": { - "username": { - "$not": { - "$eq": "active" - } - } - }, - "casted": { - "username": { - "$not": { - "$eq": "active" - } - } - }, - "rawAfter": { - "username": { - "$not": { - "$eq": "active" - } - } - } - }, - { - "field": "username", - "query": "username[$not]=active", - "present": true, - "raw": { - "username": { - "$not": "active" - } - }, - "casted": { - "username": { - "$not": "active" - } - }, - "rawAfter": { - "username": { - "$not": "active" - } - } - }, - { - "field": "username", - "query": "username[$not][$not][$eq]=active", - "present": true, - "raw": { - "username": { - "$not": { - "$not": { - "$eq": "active" - } - } - } - }, - "error": true - }, - { - "field": "username", - "query": "username[$unknown]=x", - "present": true, - "raw": { - "username": { - "$unknown": "x" - } - }, - "error": true - }, - { - "field": "username", - "query": "username[$eq][]=active", - "present": true, - "raw": { - "username": { - "$eq": [ - "active" - ] - } - }, - "error": true - }, - { - "field": "username", - "query": "username[$eq][_id]=active", - "present": true, - "raw": { - "username": { - "$eq": { - "_id": "active" - } - } - }, - "casted": { - "username": { - "$eq": "active" - } - }, - "rawAfter": { - "username": { - "$eq": "active" - } - } - }, - { - "field": "username", - "query": "username[$in][0][_id]=active", - "present": true, - "raw": { - "username": { - "$in": [ - { - "_id": "active" - } - ] - } - }, - "casted": { - "username": { - "$in": [ - "active" - ] - } - }, - "rawAfter": { - "username": { - "$in": [ - "active" - ] - } - } - }, - { - "field": "username", - "query": "username[a]=active&username[$eq]=active", - "present": true, - "raw": { - "username": { - "a": "active", - "$eq": "active" - } - }, - "error": true - }, - { - "field": "status", - "query": "", - "present": false - }, - { - "field": "status", - "query": "status=", - "present": false - }, - { - "field": "status", - "query": "status=active", - "present": true, - "raw": { - "status": "active" - }, - "casted": { - "status": "active" - }, - "rawAfter": { - "status": "active" - } - }, - { - "field": "status", - "query": "status[]=active", - "present": true, - "raw": { - "status": [ - "active" - ] - }, - "casted": { - "status": { - "$in": [ - "active" - ] - } - }, - "rawAfter": { - "status": [ - "active" - ] - } - }, - { - "field": "status", - "query": "status=active&status=banned", - "present": true, - "raw": { - "status": [ - "active", - "banned" - ] - }, - "casted": { - "status": { - "$in": [ - "active", - "banned" - ] - } - }, - "rawAfter": { - "status": [ - "active", - "banned" - ] - } - }, - { - "field": "status", - "query": "status[1]=active", - "present": true, - "raw": { - "status": [ - "active" - ] - }, - "casted": { - "status": { - "$in": [ - "active" - ] - } - }, - "rawAfter": { - "status": [ - "active" - ] - } - }, - { - "field": "status", - "query": "status[0][0]=active", - "present": true, - "raw": { - "status": [ - [ - "active" - ] - ] - }, - "error": true - }, - { - "field": "status", - "query": "status[_id]=active", - "present": true, - "raw": { - "status": { - "_id": "active" - } - }, - "casted": { - "status": "active" - }, - "rawAfter": { - "status": { - "_id": "active" - } - } - }, - { - "field": "status", - "query": "status[a]=active", - "present": true, - "raw": { - "status": { - "a": "active" - } - }, - "error": true - }, - { - "field": "status", - "query": "status[toString]=active", - "present": true, - "raw": { - "status": { - "toString": "active" - } - }, - "error": true - }, - { - "field": "status", - "query": "status[$eq]=active", - "present": true, - "raw": { - "status": { - "$eq": "active" - } - }, - "casted": { - "status": { - "$eq": "active" - } - }, - "rawAfter": { - "status": { - "$eq": "active" - } - } - }, - { - "field": "status", - "query": "status[$ne]=banned", - "present": true, - "raw": { - "status": { - "$ne": "banned" - } - }, - "casted": { - "status": { - "$ne": "banned" - } - }, - "rawAfter": { - "status": { - "$ne": "banned" - } - } - }, - { - "field": "status", - "query": "status[$in][]=active&status[$in][]=banned", - "present": true, - "raw": { - "status": { - "$in": [ - "active", - "banned" - ] - } - }, - "casted": { - "status": { - "$in": [ - "active", - "banned" - ] - } - }, - "rawAfter": { - "status": { - "$in": [ - "active", - "banned" - ] - } - } - }, - { - "field": "status", - "query": "status[$in]=active", - "present": true, - "raw": { - "status": { - "$in": "active" - } - }, - "casted": { - "status": { - "$in": [ - "active" - ] - } - }, - "rawAfter": { - "status": { - "$in": [ - "active" - ] - } - } - }, - { - "field": "status", - "query": "status[$nin][]=banned", - "present": true, - "raw": { - "status": { - "$nin": [ - "banned" - ] - } - }, - "casted": { - "status": { - "$nin": [ - "banned" - ] - } - }, - "rawAfter": { - "status": { - "$nin": [ - "banned" - ] - } - } - }, - { - "field": "status", - "query": "status[$all][]=active", - "present": true, - "raw": { - "status": { - "$all": [ - "active" - ] - } - }, - "casted": { - "status": { - "$all": [ - "active" - ] - } - }, - "rawAfter": { - "status": { - "$all": [ - "active" - ] - } - } - }, - { - "field": "status", - "query": "status[$gt]=a", - "present": true, - "raw": { - "status": { - "$gt": "a" - } - }, - "casted": { - "status": { - "$gt": "a" - } - }, - "rawAfter": { - "status": { - "$gt": "a" - } - } - }, - { - "field": "status", - "query": "status[$gte]=a", - "present": true, - "raw": { - "status": { - "$gte": "a" - } - }, - "casted": { - "status": { - "$gte": "a" - } - }, - "rawAfter": { - "status": { - "$gte": "a" - } - } - }, - { - "field": "status", - "query": "status[$lt]=z", - "present": true, - "raw": { - "status": { - "$lt": "z" - } - }, - "casted": { - "status": { - "$lt": "z" - } - }, - "rawAfter": { - "status": { - "$lt": "z" - } - } - }, - { - "field": "status", - "query": "status[$lte]=z", - "present": true, - "raw": { - "status": { - "$lte": "z" - } - }, - "casted": { - "status": { - "$lte": "z" - } - }, - "rawAfter": { - "status": { - "$lte": "z" - } - } - }, - { - "field": "status", - "query": "status[$exists]=true", - "present": true, - "raw": { - "status": { - "$exists": "true" - } - }, - "casted": { - "status": { - "$exists": true - } - }, - "rawAfter": { - "status": { - "$exists": true - } - } - }, - { - "field": "status", - "query": "status[$exists]=false", - "present": true, - "raw": { - "status": { - "$exists": "false" - } - }, - "casted": { - "status": { - "$exists": false - } - }, - "rawAfter": { - "status": { - "$exists": false - } - } - }, - { - "field": "status", - "query": "status[$exists]=1", - "present": true, - "raw": { - "status": { - "$exists": "1" - } - }, - "casted": { - "status": { - "$exists": true - } - }, - "rawAfter": { - "status": { - "$exists": true - } - } - }, - { - "field": "status", - "query": "status[$exists]=yes", - "present": true, - "raw": { - "status": { - "$exists": "yes" - } - }, - "casted": { - "status": { - "$exists": true - } - }, - "rawAfter": { - "status": { - "$exists": true - } - } - }, - { - "field": "status", - "query": "status[$exists]=no", - "present": true, - "raw": { - "status": { - "$exists": "no" - } - }, - "casted": { - "status": { - "$exists": false - } - }, - "rawAfter": { - "status": { - "$exists": false - } - } - }, - { - "field": "status", - "query": "status[$exists]=bad", - "present": true, - "raw": { - "status": { - "$exists": "bad" - } - }, - "error": true - }, - { - "field": "status", - "query": "status[$exists][]=true", - "present": true, - "raw": { - "status": { - "$exists": [ - "true" - ] - } - }, - "error": true - }, - { - "field": "status", - "query": "status[$type]=string", - "present": true, - "raw": { - "status": { - "$type": "string" - } - }, - "casted": { - "status": { - "$type": "string" - } - }, - "rawAfter": { - "status": { - "$type": "string" - } - } - }, - { - "field": "status", - "query": "status[$type][]=string&status[$type][]=2", - "present": true, - "raw": { - "status": { - "$type": [ - "string", - "2" - ] - } - }, - "casted": { - "status": { - "$type": [ - "string", - "2" - ] - } - }, - "rawAfter": { - "status": { - "$type": [ - "string", - "2" - ] - } - } - }, - { - "field": "status", - "query": "status[$type][a]=x", - "present": true, - "raw": { - "status": { - "$type": { - "a": "x" - } - } - }, - "error": true - }, - { - "field": "status", - "query": "status[$regex]=act.*&status[$options]=i", - "present": true, - "raw": { - "status": { - "$regex": "act.*", - "$options": "i" - } - }, - "casted": { - "status": { - "$regex": "act.*", - "$options": "i" - } - }, - "rawAfter": { - "status": { - "$regex": "act.*", - "$options": "i" - } - } - }, - { - "field": "status", - "query": "status[$not][$eq]=active", - "present": true, - "raw": { - "status": { - "$not": { - "$eq": "active" - } - } - }, - "casted": { - "status": { - "$not": { - "$eq": "active" - } - } - }, - "rawAfter": { - "status": { - "$not": { - "$eq": "active" - } - } - } - }, - { - "field": "status", - "query": "status[$not]=active", - "present": true, - "raw": { - "status": { - "$not": "active" - } - }, - "casted": { - "status": { - "$not": "active" - } - }, - "rawAfter": { - "status": { - "$not": "active" - } - } - }, - { - "field": "status", - "query": "status[$not][$not][$eq]=active", - "present": true, - "raw": { - "status": { - "$not": { - "$not": { - "$eq": "active" - } - } - } - }, - "error": true - }, - { - "field": "status", - "query": "status[$unknown]=x", - "present": true, - "raw": { - "status": { - "$unknown": "x" - } - }, - "error": true - }, - { - "field": "status", - "query": "status[$eq][]=active", - "present": true, - "raw": { - "status": { - "$eq": [ - "active" - ] - } - }, - "error": true - }, - { - "field": "status", - "query": "status[$eq][_id]=active", - "present": true, - "raw": { - "status": { - "$eq": { - "_id": "active" - } - } - }, - "casted": { - "status": { - "$eq": "active" - } - }, - "rawAfter": { - "status": { - "$eq": "active" - } - } - }, - { - "field": "status", - "query": "status[$in][0][_id]=active", - "present": true, - "raw": { - "status": { - "$in": [ - { - "_id": "active" - } - ] - } - }, - "casted": { - "status": { - "$in": [ - "active" - ] - } - }, - "rawAfter": { - "status": { - "$in": [ - "active" - ] - } - } - }, - { - "field": "status", - "query": "status[a]=active&status[$eq]=active", - "present": true, - "raw": { - "status": { - "a": "active", - "$eq": "active" - } - }, - "error": true - }, - { - "field": "conference", - "query": "", - "present": false - }, - { - "field": "conference", - "query": "conference=", - "present": false - }, - { - "field": "conference", - "query": "conference=active", - "present": true, - "raw": { - "conference": "active" - }, - "casted": { - "conference": "active" - }, - "rawAfter": { - "conference": "active" - } - }, - { - "field": "conference", - "query": "conference[]=active", - "present": true, - "raw": { - "conference": [ - "active" - ] - }, - "casted": { - "conference": { - "$in": [ - "active" - ] - } - }, - "rawAfter": { - "conference": [ - "active" - ] - } - }, - { - "field": "conference", - "query": "conference=active&conference=banned", - "present": true, - "raw": { - "conference": [ - "active", - "banned" - ] - }, - "casted": { - "conference": { - "$in": [ - "active", - "banned" - ] - } - }, - "rawAfter": { - "conference": [ - "active", - "banned" - ] - } - }, - { - "field": "conference", - "query": "conference[1]=active", - "present": true, - "raw": { - "conference": [ - "active" - ] - }, - "casted": { - "conference": { - "$in": [ - "active" - ] - } - }, - "rawAfter": { - "conference": [ - "active" - ] - } - }, - { - "field": "conference", - "query": "conference[0][0]=active", - "present": true, - "raw": { - "conference": [ - [ - "active" - ] - ] - }, - "error": true - }, - { - "field": "conference", - "query": "conference[_id]=active", - "present": true, - "raw": { - "conference": { - "_id": "active" - } - }, - "casted": { - "conference": "active" - }, - "rawAfter": { - "conference": { - "_id": "active" - } - } - }, - { - "field": "conference", - "query": "conference[a]=active", - "present": true, - "raw": { - "conference": { - "a": "active" - } - }, - "error": true - }, - { - "field": "conference", - "query": "conference[toString]=active", - "present": true, - "raw": { - "conference": { - "toString": "active" - } - }, - "error": true - }, - { - "field": "conference", - "query": "conference[$eq]=active", - "present": true, - "raw": { - "conference": { - "$eq": "active" - } - }, - "casted": { - "conference": { - "$eq": "active" - } - }, - "rawAfter": { - "conference": { - "$eq": "active" - } - } - }, - { - "field": "conference", - "query": "conference[$ne]=banned", - "present": true, - "raw": { - "conference": { - "$ne": "banned" - } - }, - "casted": { - "conference": { - "$ne": "banned" - } - }, - "rawAfter": { - "conference": { - "$ne": "banned" - } - } - }, - { - "field": "conference", - "query": "conference[$in][]=active&conference[$in][]=banned", - "present": true, - "raw": { - "conference": { - "$in": [ - "active", - "banned" - ] - } - }, - "casted": { - "conference": { - "$in": [ - "active", - "banned" - ] - } - }, - "rawAfter": { - "conference": { - "$in": [ - "active", - "banned" - ] - } - } - }, - { - "field": "conference", - "query": "conference[$in]=active", - "present": true, - "raw": { - "conference": { - "$in": "active" - } - }, - "casted": { - "conference": { - "$in": [ - "active" - ] - } - }, - "rawAfter": { - "conference": { - "$in": [ - "active" - ] - } - } - }, - { - "field": "conference", - "query": "conference[$nin][]=banned", - "present": true, - "raw": { - "conference": { - "$nin": [ - "banned" - ] - } - }, - "casted": { - "conference": { - "$nin": [ - "banned" - ] - } - }, - "rawAfter": { - "conference": { - "$nin": [ - "banned" - ] - } - } - }, - { - "field": "conference", - "query": "conference[$all][]=active", - "present": true, - "raw": { - "conference": { - "$all": [ - "active" - ] - } - }, - "casted": { - "conference": { - "$all": [ - "active" - ] - } - }, - "rawAfter": { - "conference": { - "$all": [ - "active" - ] - } - } - }, - { - "field": "conference", - "query": "conference[$gt]=a", - "present": true, - "raw": { - "conference": { - "$gt": "a" - } - }, - "casted": { - "conference": { - "$gt": "a" - } - }, - "rawAfter": { - "conference": { - "$gt": "a" - } - } - }, - { - "field": "conference", - "query": "conference[$gte]=a", - "present": true, - "raw": { - "conference": { - "$gte": "a" - } - }, - "casted": { - "conference": { - "$gte": "a" - } - }, - "rawAfter": { - "conference": { - "$gte": "a" - } - } - }, - { - "field": "conference", - "query": "conference[$lt]=z", - "present": true, - "raw": { - "conference": { - "$lt": "z" - } - }, - "casted": { - "conference": { - "$lt": "z" - } - }, - "rawAfter": { - "conference": { - "$lt": "z" - } - } - }, - { - "field": "conference", - "query": "conference[$lte]=z", - "present": true, - "raw": { - "conference": { - "$lte": "z" - } - }, - "casted": { - "conference": { - "$lte": "z" - } - }, - "rawAfter": { - "conference": { - "$lte": "z" - } - } - }, - { - "field": "conference", - "query": "conference[$exists]=true", - "present": true, - "raw": { - "conference": { - "$exists": "true" - } - }, - "casted": { - "conference": { - "$exists": true - } - }, - "rawAfter": { - "conference": { - "$exists": true - } - } - }, - { - "field": "conference", - "query": "conference[$exists]=false", - "present": true, - "raw": { - "conference": { - "$exists": "false" - } - }, - "casted": { - "conference": { - "$exists": false - } - }, - "rawAfter": { - "conference": { - "$exists": false - } - } - }, - { - "field": "conference", - "query": "conference[$exists]=1", - "present": true, - "raw": { - "conference": { - "$exists": "1" - } - }, - "casted": { - "conference": { - "$exists": true - } - }, - "rawAfter": { - "conference": { - "$exists": true - } - } - }, - { - "field": "conference", - "query": "conference[$exists]=yes", - "present": true, - "raw": { - "conference": { - "$exists": "yes" - } - }, - "casted": { - "conference": { - "$exists": true - } - }, - "rawAfter": { - "conference": { - "$exists": true - } - } - }, - { - "field": "conference", - "query": "conference[$exists]=no", - "present": true, - "raw": { - "conference": { - "$exists": "no" - } - }, - "casted": { - "conference": { - "$exists": false - } - }, - "rawAfter": { - "conference": { - "$exists": false - } - } - }, - { - "field": "conference", - "query": "conference[$exists]=bad", - "present": true, - "raw": { - "conference": { - "$exists": "bad" - } - }, - "error": true - }, - { - "field": "conference", - "query": "conference[$exists][]=true", - "present": true, - "raw": { - "conference": { - "$exists": [ - "true" - ] - } - }, - "error": true - }, - { - "field": "conference", - "query": "conference[$type]=string", - "present": true, - "raw": { - "conference": { - "$type": "string" - } - }, - "casted": { - "conference": { - "$type": "string" - } - }, - "rawAfter": { - "conference": { - "$type": "string" - } - } - }, - { - "field": "conference", - "query": "conference[$type][]=string&conference[$type][]=2", - "present": true, - "raw": { - "conference": { - "$type": [ - "string", - "2" - ] - } - }, - "casted": { - "conference": { - "$type": [ - "string", - "2" - ] - } - }, - "rawAfter": { - "conference": { - "$type": [ - "string", - "2" - ] - } - } - }, - { - "field": "conference", - "query": "conference[$type][a]=x", - "present": true, - "raw": { - "conference": { - "$type": { - "a": "x" - } - } - }, - "error": true - }, - { - "field": "conference", - "query": "conference[$regex]=act.*&conference[$options]=i", - "present": true, - "raw": { - "conference": { - "$regex": "act.*", - "$options": "i" - } - }, - "casted": { - "conference": { - "$regex": "act.*", - "$options": "i" - } - }, - "rawAfter": { - "conference": { - "$regex": "act.*", - "$options": "i" - } - } - }, - { - "field": "conference", - "query": "conference[$not][$eq]=active", - "present": true, - "raw": { - "conference": { - "$not": { - "$eq": "active" - } - } - }, - "casted": { - "conference": { - "$not": { - "$eq": "active" - } - } - }, - "rawAfter": { - "conference": { - "$not": { - "$eq": "active" - } - } - } - }, - { - "field": "conference", - "query": "conference[$not]=active", - "present": true, - "raw": { - "conference": { - "$not": "active" - } - }, - "casted": { - "conference": { - "$not": "active" - } - }, - "rawAfter": { - "conference": { - "$not": "active" - } - } - }, - { - "field": "conference", - "query": "conference[$not][$not][$eq]=active", - "present": true, - "raw": { - "conference": { - "$not": { - "$not": { - "$eq": "active" - } - } - } - }, - "error": true - }, - { - "field": "conference", - "query": "conference[$unknown]=x", - "present": true, - "raw": { - "conference": { - "$unknown": "x" - } - }, - "error": true - }, - { - "field": "conference", - "query": "conference[$eq][]=active", - "present": true, - "raw": { - "conference": { - "$eq": [ - "active" - ] - } - }, - "error": true - }, - { - "field": "conference", - "query": "conference[$eq][_id]=active", - "present": true, - "raw": { - "conference": { - "$eq": { - "_id": "active" - } - } - }, - "casted": { - "conference": { - "$eq": "active" - } - }, - "rawAfter": { - "conference": { - "$eq": "active" - } - } - }, - { - "field": "conference", - "query": "conference[$in][0][_id]=active", - "present": true, - "raw": { - "conference": { - "$in": [ - { - "_id": "active" - } - ] - } - }, - "casted": { - "conference": { - "$in": [ - "active" - ] - } - }, - "rawAfter": { - "conference": { - "$in": [ - "active" - ] - } - } - }, - { - "field": "conference", - "query": "conference[a]=active&conference[$eq]=active", - "present": true, - "raw": { - "conference": { - "a": "active", - "$eq": "active" - } - }, - "error": true - } -] diff --git a/backend/internal/server/testdata/admin-csv.json b/backend/internal/server/testdata/admin-csv.json deleted file mode 100644 index 8ae3f7a..0000000 --- a/backend/internal/server/testdata/admin-csv.json +++ /dev/null @@ -1,2600 +0,0 @@ -[ - { - "name": "repos/empty", - "kind": "repos", - "rows": [], - "expected": "repoId", - "headers": { - "Content-Type": "text/csv; charset=utf-8", - "Content-Disposition": "attachment; filename=\"repositories-2030-01-02.csv\"" - } - }, - { - "name": "repos/minimal", - "kind": "repos", - "rows": [ - {} - ], - "expected": "repoId,status,statusMessage,anonymizeDate,lastView,pageView,sourceRepository,sourceBranch,sourceCommit,conference,storage,terms\n,,,,,0,,,,,0,0", - "headers": { - "Content-Type": "text/csv; charset=utf-8", - "Content-Disposition": "attachment; filename=\"repositories-2030-01-02.csv\"" - } - }, - { - "name": "repos/rich", - "kind": "repos", - "rows": [ - { - "repoId": "sample", - "username": "sample", - "conferenceID": "sample", - "name": "Conference", - "status": "ready", - "statusMessage": "Message", - "anonymizeDate": "2029-04-03T01:02:03.456Z", - "lastView": "2029-05-01T00:00:00.000Z", - "dateOfEntry": "2028-01-01T00:00:00.000Z", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "pageView": 1.5, - "size": { - "storage": 2.5 - }, - "source": { - "repositoryName": "team/subgroup/project", - "branch": "main", - "commit": "opaque:revision", - "accessToken": "synthetic-secret" - }, - "options": { - "terms": [ - "one", - "two" - ] - }, - "emails": [ - { - "email": "chair@example.test" - } - ], - "isAdmin": true, - "price": 0.125, - "repositories": [ - { - "id": "one" - }, - { - "id": "two" - } - ], - "conference": "Conference", - "apiTokens": [ - { - "tokenHash": "synthetic-secret" - } - ] - } - ], - "expected": "repoId,status,statusMessage,anonymizeDate,lastView,pageView,sourceRepository,sourceBranch,sourceCommit,conference,storage,terms\nsample,ready,Message,2029-04-03T01:02:03.456Z,2029-05-01T00:00:00.000Z,1.5,team/subgroup/project,main,opaque:revision,Conference,2.5,2", - "headers": { - "Content-Type": "text/csv; charset=utf-8", - "Content-Disposition": "attachment; filename=\"repositories-2030-01-02.csv\"" - } - }, - { - "name": "repos/text/\" leading\"", - "kind": "repos", - "rows": [ - { - "repoId": " leading", - "username": " leading", - "conferenceID": "sample", - "name": " leading", - "status": "ready", - "statusMessage": " leading", - "anonymizeDate": "2029-04-03T01:02:03.456Z", - "lastView": "2029-05-01T00:00:00.000Z", - "dateOfEntry": "2028-01-01T00:00:00.000Z", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "pageView": 1.5, - "size": { - "storage": 2.5 - }, - "source": { - "repositoryName": "team/subgroup/project", - "branch": "main", - "commit": "opaque:revision", - "accessToken": "synthetic-secret" - }, - "options": { - "terms": [ - "one", - "two" - ] - }, - "emails": [ - { - "email": "chair@example.test" - } - ], - "isAdmin": true, - "price": 0.125, - "repositories": [ - { - "id": "one" - }, - { - "id": "two" - } - ], - "conference": "Conference", - "apiTokens": [ - { - "tokenHash": "synthetic-secret" - } - ] - } - ], - "expected": "repoId,status,statusMessage,anonymizeDate,lastView,pageView,sourceRepository,sourceBranch,sourceCommit,conference,storage,terms\n leading,ready, leading,2029-04-03T01:02:03.456Z,2029-05-01T00:00:00.000Z,1.5,team/subgroup/project,main,opaque:revision,Conference,2.5,2", - "headers": { - "Content-Type": "text/csv; charset=utf-8", - "Content-Disposition": "attachment; filename=\"repositories-2030-01-02.csv\"" - } - }, - { - "name": "repos/text/\"trailing \"", - "kind": "repos", - "rows": [ - { - "repoId": "trailing ", - "username": "trailing ", - "conferenceID": "sample", - "name": "trailing ", - "status": "ready", - "statusMessage": "trailing ", - "anonymizeDate": "2029-04-03T01:02:03.456Z", - "lastView": "2029-05-01T00:00:00.000Z", - "dateOfEntry": "2028-01-01T00:00:00.000Z", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "pageView": 1.5, - "size": { - "storage": 2.5 - }, - "source": { - "repositoryName": "team/subgroup/project", - "branch": "main", - "commit": "opaque:revision", - "accessToken": "synthetic-secret" - }, - "options": { - "terms": [ - "one", - "two" - ] - }, - "emails": [ - { - "email": "chair@example.test" - } - ], - "isAdmin": true, - "price": 0.125, - "repositories": [ - { - "id": "one" - }, - { - "id": "two" - } - ], - "conference": "Conference", - "apiTokens": [ - { - "tokenHash": "synthetic-secret" - } - ] - } - ], - "expected": "repoId,status,statusMessage,anonymizeDate,lastView,pageView,sourceRepository,sourceBranch,sourceCommit,conference,storage,terms\ntrailing ,ready,trailing ,2029-04-03T01:02:03.456Z,2029-05-01T00:00:00.000Z,1.5,team/subgroup/project,main,opaque:revision,Conference,2.5,2", - "headers": { - "Content-Type": "text/csv; charset=utf-8", - "Content-Disposition": "attachment; filename=\"repositories-2030-01-02.csv\"" - } - }, - { - "name": "repos/text/\"a,b\"", - "kind": "repos", - "rows": [ - { - "repoId": "a,b", - "username": "a,b", - "conferenceID": "sample", - "name": "a,b", - "status": "ready", - "statusMessage": "a,b", - "anonymizeDate": "2029-04-03T01:02:03.456Z", - "lastView": "2029-05-01T00:00:00.000Z", - "dateOfEntry": "2028-01-01T00:00:00.000Z", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "pageView": 1.5, - "size": { - "storage": 2.5 - }, - "source": { - "repositoryName": "team/subgroup/project", - "branch": "main", - "commit": "opaque:revision", - "accessToken": "synthetic-secret" - }, - "options": { - "terms": [ - "one", - "two" - ] - }, - "emails": [ - { - "email": "chair@example.test" - } - ], - "isAdmin": true, - "price": 0.125, - "repositories": [ - { - "id": "one" - }, - { - "id": "two" - } - ], - "conference": "Conference", - "apiTokens": [ - { - "tokenHash": "synthetic-secret" - } - ] - } - ], - "expected": "repoId,status,statusMessage,anonymizeDate,lastView,pageView,sourceRepository,sourceBranch,sourceCommit,conference,storage,terms\n\"a,b\",ready,\"a,b\",2029-04-03T01:02:03.456Z,2029-05-01T00:00:00.000Z,1.5,team/subgroup/project,main,opaque:revision,Conference,2.5,2", - "headers": { - "Content-Type": "text/csv; charset=utf-8", - "Content-Disposition": "attachment; filename=\"repositories-2030-01-02.csv\"" - } - }, - { - "name": "repos/text/\"say \\\"hi\\\"\"", - "kind": "repos", - "rows": [ - { - "repoId": "say \"hi\"", - "username": "say \"hi\"", - "conferenceID": "sample", - "name": "say \"hi\"", - "status": "ready", - "statusMessage": "say \"hi\"", - "anonymizeDate": "2029-04-03T01:02:03.456Z", - "lastView": "2029-05-01T00:00:00.000Z", - "dateOfEntry": "2028-01-01T00:00:00.000Z", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "pageView": 1.5, - "size": { - "storage": 2.5 - }, - "source": { - "repositoryName": "team/subgroup/project", - "branch": "main", - "commit": "opaque:revision", - "accessToken": "synthetic-secret" - }, - "options": { - "terms": [ - "one", - "two" - ] - }, - "emails": [ - { - "email": "chair@example.test" - } - ], - "isAdmin": true, - "price": 0.125, - "repositories": [ - { - "id": "one" - }, - { - "id": "two" - } - ], - "conference": "Conference", - "apiTokens": [ - { - "tokenHash": "synthetic-secret" - } - ] - } - ], - "expected": "repoId,status,statusMessage,anonymizeDate,lastView,pageView,sourceRepository,sourceBranch,sourceCommit,conference,storage,terms\n\"say \"\"hi\"\"\",ready,\"say \"\"hi\"\"\",2029-04-03T01:02:03.456Z,2029-05-01T00:00:00.000Z,1.5,team/subgroup/project,main,opaque:revision,Conference,2.5,2", - "headers": { - "Content-Type": "text/csv; charset=utf-8", - "Content-Disposition": "attachment; filename=\"repositories-2030-01-02.csv\"" - } - }, - { - "name": "repos/text/\"line\\nnext\"", - "kind": "repos", - "rows": [ - { - "repoId": "line\nnext", - "username": "line\nnext", - "conferenceID": "sample", - "name": "line\nnext", - "status": "ready", - "statusMessage": "line\nnext", - "anonymizeDate": "2029-04-03T01:02:03.456Z", - "lastView": "2029-05-01T00:00:00.000Z", - "dateOfEntry": "2028-01-01T00:00:00.000Z", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "pageView": 1.5, - "size": { - "storage": 2.5 - }, - "source": { - "repositoryName": "team/subgroup/project", - "branch": "main", - "commit": "opaque:revision", - "accessToken": "synthetic-secret" - }, - "options": { - "terms": [ - "one", - "two" - ] - }, - "emails": [ - { - "email": "chair@example.test" - } - ], - "isAdmin": true, - "price": 0.125, - "repositories": [ - { - "id": "one" - }, - { - "id": "two" - } - ], - "conference": "Conference", - "apiTokens": [ - { - "tokenHash": "synthetic-secret" - } - ] - } - ], - "expected": "repoId,status,statusMessage,anonymizeDate,lastView,pageView,sourceRepository,sourceBranch,sourceCommit,conference,storage,terms\n\"line\nnext\",ready,\"line\nnext\",2029-04-03T01:02:03.456Z,2029-05-01T00:00:00.000Z,1.5,team/subgroup/project,main,opaque:revision,Conference,2.5,2", - "headers": { - "Content-Type": "text/csv; charset=utf-8", - "Content-Disposition": "attachment; filename=\"repositories-2030-01-02.csv\"" - } - }, - { - "name": "repos/text/\"line\\rnext\"", - "kind": "repos", - "rows": [ - { - "repoId": "line\rnext", - "username": "line\rnext", - "conferenceID": "sample", - "name": "line\rnext", - "status": "ready", - "statusMessage": "line\rnext", - "anonymizeDate": "2029-04-03T01:02:03.456Z", - "lastView": "2029-05-01T00:00:00.000Z", - "dateOfEntry": "2028-01-01T00:00:00.000Z", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "pageView": 1.5, - "size": { - "storage": 2.5 - }, - "source": { - "repositoryName": "team/subgroup/project", - "branch": "main", - "commit": "opaque:revision", - "accessToken": "synthetic-secret" - }, - "options": { - "terms": [ - "one", - "two" - ] - }, - "emails": [ - { - "email": "chair@example.test" - } - ], - "isAdmin": true, - "price": 0.125, - "repositories": [ - { - "id": "one" - }, - { - "id": "two" - } - ], - "conference": "Conference", - "apiTokens": [ - { - "tokenHash": "synthetic-secret" - } - ] - } - ], - "expected": "repoId,status,statusMessage,anonymizeDate,lastView,pageView,sourceRepository,sourceBranch,sourceCommit,conference,storage,terms\n\"line\rnext\",ready,\"line\rnext\",2029-04-03T01:02:03.456Z,2029-05-01T00:00:00.000Z,1.5,team/subgroup/project,main,opaque:revision,Conference,2.5,2", - "headers": { - "Content-Type": "text/csv; charset=utf-8", - "Content-Disposition": "attachment; filename=\"repositories-2030-01-02.csv\"" - } - }, - { - "name": "repos/text/\"back\\\\slash\"", - "kind": "repos", - "rows": [ - { - "repoId": "back\\slash", - "username": "back\\slash", - "conferenceID": "sample", - "name": "back\\slash", - "status": "ready", - "statusMessage": "back\\slash", - "anonymizeDate": "2029-04-03T01:02:03.456Z", - "lastView": "2029-05-01T00:00:00.000Z", - "dateOfEntry": "2028-01-01T00:00:00.000Z", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "pageView": 1.5, - "size": { - "storage": 2.5 - }, - "source": { - "repositoryName": "team/subgroup/project", - "branch": "main", - "commit": "opaque:revision", - "accessToken": "synthetic-secret" - }, - "options": { - "terms": [ - "one", - "two" - ] - }, - "emails": [ - { - "email": "chair@example.test" - } - ], - "isAdmin": true, - "price": 0.125, - "repositories": [ - { - "id": "one" - }, - { - "id": "two" - } - ], - "conference": "Conference", - "apiTokens": [ - { - "tokenHash": "synthetic-secret" - } - ] - } - ], - "expected": "repoId,status,statusMessage,anonymizeDate,lastView,pageView,sourceRepository,sourceBranch,sourceCommit,conference,storage,terms\nback\\slash,ready,back\\slash,2029-04-03T01:02:03.456Z,2029-05-01T00:00:00.000Z,1.5,team/subgroup/project,main,opaque:revision,Conference,2.5,2", - "headers": { - "Content-Type": "text/csv; charset=utf-8", - "Content-Disposition": "attachment; filename=\"repositories-2030-01-02.csv\"" - } - }, - { - "name": "repos/text/\"é😀\"", - "kind": "repos", - "rows": [ - { - "repoId": "é😀", - "username": "é😀", - "conferenceID": "sample", - "name": "é😀", - "status": "ready", - "statusMessage": "é😀", - "anonymizeDate": "2029-04-03T01:02:03.456Z", - "lastView": "2029-05-01T00:00:00.000Z", - "dateOfEntry": "2028-01-01T00:00:00.000Z", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "pageView": 1.5, - "size": { - "storage": 2.5 - }, - "source": { - "repositoryName": "team/subgroup/project", - "branch": "main", - "commit": "opaque:revision", - "accessToken": "synthetic-secret" - }, - "options": { - "terms": [ - "one", - "two" - ] - }, - "emails": [ - { - "email": "chair@example.test" - } - ], - "isAdmin": true, - "price": 0.125, - "repositories": [ - { - "id": "one" - }, - { - "id": "two" - } - ], - "conference": "Conference", - "apiTokens": [ - { - "tokenHash": "synthetic-secret" - } - ] - } - ], - "expected": "repoId,status,statusMessage,anonymizeDate,lastView,pageView,sourceRepository,sourceBranch,sourceCommit,conference,storage,terms\né😀,ready,é😀,2029-04-03T01:02:03.456Z,2029-05-01T00:00:00.000Z,1.5,team/subgroup/project,main,opaque:revision,Conference,2.5,2", - "headers": { - "Content-Type": "text/csv; charset=utf-8", - "Content-Disposition": "attachment; filename=\"repositories-2030-01-02.csv\"" - } - }, - { - "name": "repos/date/0001-01-01T00:00:00.000Z", - "kind": "repos", - "rows": [ - { - "repoId": "sample", - "username": "sample", - "conferenceID": "sample", - "name": "Conference", - "status": "ready", - "statusMessage": "Message", - "anonymizeDate": "0001-01-01T00:00:00.000Z", - "lastView": "0001-01-01T00:00:00.000Z", - "dateOfEntry": "0001-01-01T00:00:00.000Z", - "startDate": "0001-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "pageView": 1.5, - "size": { - "storage": 2.5 - }, - "source": { - "repositoryName": "team/subgroup/project", - "branch": "main", - "commit": "opaque:revision", - "accessToken": "synthetic-secret" - }, - "options": { - "terms": [ - "one", - "two" - ] - }, - "emails": [ - { - "email": "chair@example.test" - } - ], - "isAdmin": true, - "price": 0.125, - "repositories": [ - { - "id": "one" - }, - { - "id": "two" - } - ], - "conference": "Conference", - "apiTokens": [ - { - "tokenHash": "synthetic-secret" - } - ] - } - ], - "expected": "repoId,status,statusMessage,anonymizeDate,lastView,pageView,sourceRepository,sourceBranch,sourceCommit,conference,storage,terms\nsample,ready,Message,0001-01-01T00:00:00.000Z,0001-01-01T00:00:00.000Z,1.5,team/subgroup/project,main,opaque:revision,Conference,2.5,2", - "headers": { - "Content-Type": "text/csv; charset=utf-8", - "Content-Disposition": "attachment; filename=\"repositories-2030-01-02.csv\"" - } - }, - { - "name": "repos/date/2029-01-01T01:00:00+01:00", - "kind": "repos", - "rows": [ - { - "repoId": "sample", - "username": "sample", - "conferenceID": "sample", - "name": "Conference", - "status": "ready", - "statusMessage": "Message", - "anonymizeDate": "2029-01-01T01:00:00+01:00", - "lastView": "2029-01-01T01:00:00+01:00", - "dateOfEntry": "2029-01-01T01:00:00+01:00", - "startDate": "2029-01-01T01:00:00+01:00", - "endDate": "2029-01-01T01:00:00+01:00", - "pageView": 1.5, - "size": { - "storage": 2.5 - }, - "source": { - "repositoryName": "team/subgroup/project", - "branch": "main", - "commit": "opaque:revision", - "accessToken": "synthetic-secret" - }, - "options": { - "terms": [ - "one", - "two" - ] - }, - "emails": [ - { - "email": "chair@example.test" - } - ], - "isAdmin": true, - "price": 0.125, - "repositories": [ - { - "id": "one" - }, - { - "id": "two" - } - ], - "conference": "Conference", - "apiTokens": [ - { - "tokenHash": "synthetic-secret" - } - ] - } - ], - "expected": "repoId,status,statusMessage,anonymizeDate,lastView,pageView,sourceRepository,sourceBranch,sourceCommit,conference,storage,terms\nsample,ready,Message,2029-01-01T00:00:00.000Z,2029-01-01T00:00:00.000Z,1.5,team/subgroup/project,main,opaque:revision,Conference,2.5,2", - "headers": { - "Content-Type": "text/csv; charset=utf-8", - "Content-Disposition": "attachment; filename=\"repositories-2030-01-02.csv\"" - } - }, - { - "name": "repos/date/null", - "kind": "repos", - "rows": [ - { - "repoId": "sample", - "username": "sample", - "conferenceID": "sample", - "name": "Conference", - "status": "ready", - "statusMessage": "Message", - "anonymizeDate": null, - "lastView": null, - "dateOfEntry": null, - "startDate": null, - "endDate": null, - "pageView": 1.5, - "size": { - "storage": 2.5 - }, - "source": { - "repositoryName": "team/subgroup/project", - "branch": "main", - "commit": "opaque:revision", - "accessToken": "synthetic-secret" - }, - "options": { - "terms": [ - "one", - "two" - ] - }, - "emails": [ - { - "email": "chair@example.test" - } - ], - "isAdmin": true, - "price": 0.125, - "repositories": [ - { - "id": "one" - }, - { - "id": "two" - } - ], - "conference": "Conference", - "apiTokens": [ - { - "tokenHash": "synthetic-secret" - } - ] - } - ], - "expected": "repoId,status,statusMessage,anonymizeDate,lastView,pageView,sourceRepository,sourceBranch,sourceCommit,conference,storage,terms\nsample,ready,Message,,,1.5,team/subgroup/project,main,opaque:revision,Conference,2.5,2", - "headers": { - "Content-Type": "text/csv; charset=utf-8", - "Content-Disposition": "attachment; filename=\"repositories-2030-01-02.csv\"" - } - }, - { - "name": "repos/multiple", - "kind": "repos", - "rows": [ - { - "repoId": "sample", - "username": "sample", - "conferenceID": "sample", - "name": "Conference", - "status": "ready", - "statusMessage": "Message", - "anonymizeDate": "2029-04-03T01:02:03.456Z", - "lastView": "2029-05-01T00:00:00.000Z", - "dateOfEntry": "2028-01-01T00:00:00.000Z", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "pageView": 1.5, - "size": { - "storage": 2.5 - }, - "source": { - "repositoryName": "team/subgroup/project", - "branch": "main", - "commit": "opaque:revision", - "accessToken": "synthetic-secret" - }, - "options": { - "terms": [ - "one", - "two" - ] - }, - "emails": [ - { - "email": "chair@example.test" - } - ], - "isAdmin": true, - "price": 0.125, - "repositories": [ - { - "id": "one" - }, - { - "id": "two" - } - ], - "conference": "Conference", - "apiTokens": [ - { - "tokenHash": "synthetic-secret" - } - ] - }, - {}, - { - "repoId": "sample", - "username": "sample", - "conferenceID": "sample", - "name": "Conference", - "status": "ready", - "statusMessage": "Message", - "anonymizeDate": "2029-04-03T01:02:03.456Z", - "lastView": "2029-05-01T00:00:00.000Z", - "dateOfEntry": "2028-01-01T00:00:00.000Z", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "pageView": 1e+21, - "size": { - "storage": 100000000000000000000 - }, - "source": { - "repositoryName": "team/subgroup/project", - "branch": "main", - "commit": "opaque:revision", - "accessToken": "synthetic-secret" - }, - "options": { - "terms": [ - "one", - "two" - ] - }, - "emails": [ - { - "email": "chair@example.test" - } - ], - "isAdmin": true, - "price": 1e-7, - "repositories": [ - { - "id": "one" - }, - { - "id": "two" - } - ], - "conference": "Conference", - "apiTokens": [ - { - "tokenHash": "synthetic-secret" - } - ] - } - ], - "expected": "repoId,status,statusMessage,anonymizeDate,lastView,pageView,sourceRepository,sourceBranch,sourceCommit,conference,storage,terms\nsample,ready,Message,2029-04-03T01:02:03.456Z,2029-05-01T00:00:00.000Z,1.5,team/subgroup/project,main,opaque:revision,Conference,2.5,2\n,,,,,0,,,,,0,0\nsample,ready,Message,2029-04-03T01:02:03.456Z,2029-05-01T00:00:00.000Z,1e+21,team/subgroup/project,main,opaque:revision,Conference,100000000000000000000,2", - "headers": { - "Content-Type": "text/csv; charset=utf-8", - "Content-Disposition": "attachment; filename=\"repositories-2030-01-02.csv\"" - } - }, - { - "name": "users/empty", - "kind": "users", - "rows": [], - "expected": "username,email,status,isAdmin,repoCount,dateOfEntry", - "headers": { - "Content-Type": "text/csv; charset=utf-8", - "Content-Disposition": "attachment; filename=\"users-2030-01-02.csv\"" - } - }, - { - "name": "users/minimal", - "kind": "users", - "rows": [ - {} - ], - "expected": "username,email,status,isAdmin,repoCount,dateOfEntry\n,,,false,0,", - "headers": { - "Content-Type": "text/csv; charset=utf-8", - "Content-Disposition": "attachment; filename=\"users-2030-01-02.csv\"" - } - }, - { - "name": "users/rich", - "kind": "users", - "rows": [ - { - "repoId": "sample", - "username": "sample", - "conferenceID": "sample", - "name": "Conference", - "status": "ready", - "statusMessage": "Message", - "anonymizeDate": "2029-04-03T01:02:03.456Z", - "lastView": "2029-05-01T00:00:00.000Z", - "dateOfEntry": "2028-01-01T00:00:00.000Z", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "pageView": 1.5, - "size": { - "storage": 2.5 - }, - "source": { - "repositoryName": "team/subgroup/project", - "branch": "main", - "commit": "opaque:revision", - "accessToken": "synthetic-secret" - }, - "options": { - "terms": [ - "one", - "two" - ] - }, - "emails": [ - { - "email": "chair@example.test" - } - ], - "isAdmin": true, - "price": 0.125, - "repositories": [ - { - "id": "one" - }, - { - "id": "two" - } - ], - "conference": "Conference", - "apiTokens": [ - { - "tokenHash": "synthetic-secret" - } - ] - } - ], - "expected": "username,email,status,isAdmin,repoCount,dateOfEntry\nsample,chair@example.test,ready,true,2,2028-01-01T00:00:00.000Z", - "headers": { - "Content-Type": "text/csv; charset=utf-8", - "Content-Disposition": "attachment; filename=\"users-2030-01-02.csv\"" - } - }, - { - "name": "users/text/\" leading\"", - "kind": "users", - "rows": [ - { - "repoId": " leading", - "username": " leading", - "conferenceID": "sample", - "name": " leading", - "status": "ready", - "statusMessage": " leading", - "anonymizeDate": "2029-04-03T01:02:03.456Z", - "lastView": "2029-05-01T00:00:00.000Z", - "dateOfEntry": "2028-01-01T00:00:00.000Z", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "pageView": 1.5, - "size": { - "storage": 2.5 - }, - "source": { - "repositoryName": "team/subgroup/project", - "branch": "main", - "commit": "opaque:revision", - "accessToken": "synthetic-secret" - }, - "options": { - "terms": [ - "one", - "two" - ] - }, - "emails": [ - { - "email": "chair@example.test" - } - ], - "isAdmin": true, - "price": 0.125, - "repositories": [ - { - "id": "one" - }, - { - "id": "two" - } - ], - "conference": "Conference", - "apiTokens": [ - { - "tokenHash": "synthetic-secret" - } - ] - } - ], - "expected": "username,email,status,isAdmin,repoCount,dateOfEntry\n leading,chair@example.test,ready,true,2,2028-01-01T00:00:00.000Z", - "headers": { - "Content-Type": "text/csv; charset=utf-8", - "Content-Disposition": "attachment; filename=\"users-2030-01-02.csv\"" - } - }, - { - "name": "users/text/\"trailing \"", - "kind": "users", - "rows": [ - { - "repoId": "trailing ", - "username": "trailing ", - "conferenceID": "sample", - "name": "trailing ", - "status": "ready", - "statusMessage": "trailing ", - "anonymizeDate": "2029-04-03T01:02:03.456Z", - "lastView": "2029-05-01T00:00:00.000Z", - "dateOfEntry": "2028-01-01T00:00:00.000Z", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "pageView": 1.5, - "size": { - "storage": 2.5 - }, - "source": { - "repositoryName": "team/subgroup/project", - "branch": "main", - "commit": "opaque:revision", - "accessToken": "synthetic-secret" - }, - "options": { - "terms": [ - "one", - "two" - ] - }, - "emails": [ - { - "email": "chair@example.test" - } - ], - "isAdmin": true, - "price": 0.125, - "repositories": [ - { - "id": "one" - }, - { - "id": "two" - } - ], - "conference": "Conference", - "apiTokens": [ - { - "tokenHash": "synthetic-secret" - } - ] - } - ], - "expected": "username,email,status,isAdmin,repoCount,dateOfEntry\ntrailing ,chair@example.test,ready,true,2,2028-01-01T00:00:00.000Z", - "headers": { - "Content-Type": "text/csv; charset=utf-8", - "Content-Disposition": "attachment; filename=\"users-2030-01-02.csv\"" - } - }, - { - "name": "users/text/\"a,b\"", - "kind": "users", - "rows": [ - { - "repoId": "a,b", - "username": "a,b", - "conferenceID": "sample", - "name": "a,b", - "status": "ready", - "statusMessage": "a,b", - "anonymizeDate": "2029-04-03T01:02:03.456Z", - "lastView": "2029-05-01T00:00:00.000Z", - "dateOfEntry": "2028-01-01T00:00:00.000Z", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "pageView": 1.5, - "size": { - "storage": 2.5 - }, - "source": { - "repositoryName": "team/subgroup/project", - "branch": "main", - "commit": "opaque:revision", - "accessToken": "synthetic-secret" - }, - "options": { - "terms": [ - "one", - "two" - ] - }, - "emails": [ - { - "email": "chair@example.test" - } - ], - "isAdmin": true, - "price": 0.125, - "repositories": [ - { - "id": "one" - }, - { - "id": "two" - } - ], - "conference": "Conference", - "apiTokens": [ - { - "tokenHash": "synthetic-secret" - } - ] - } - ], - "expected": "username,email,status,isAdmin,repoCount,dateOfEntry\n\"a,b\",chair@example.test,ready,true,2,2028-01-01T00:00:00.000Z", - "headers": { - "Content-Type": "text/csv; charset=utf-8", - "Content-Disposition": "attachment; filename=\"users-2030-01-02.csv\"" - } - }, - { - "name": "users/text/\"say \\\"hi\\\"\"", - "kind": "users", - "rows": [ - { - "repoId": "say \"hi\"", - "username": "say \"hi\"", - "conferenceID": "sample", - "name": "say \"hi\"", - "status": "ready", - "statusMessage": "say \"hi\"", - "anonymizeDate": "2029-04-03T01:02:03.456Z", - "lastView": "2029-05-01T00:00:00.000Z", - "dateOfEntry": "2028-01-01T00:00:00.000Z", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "pageView": 1.5, - "size": { - "storage": 2.5 - }, - "source": { - "repositoryName": "team/subgroup/project", - "branch": "main", - "commit": "opaque:revision", - "accessToken": "synthetic-secret" - }, - "options": { - "terms": [ - "one", - "two" - ] - }, - "emails": [ - { - "email": "chair@example.test" - } - ], - "isAdmin": true, - "price": 0.125, - "repositories": [ - { - "id": "one" - }, - { - "id": "two" - } - ], - "conference": "Conference", - "apiTokens": [ - { - "tokenHash": "synthetic-secret" - } - ] - } - ], - "expected": "username,email,status,isAdmin,repoCount,dateOfEntry\n\"say \"\"hi\"\"\",chair@example.test,ready,true,2,2028-01-01T00:00:00.000Z", - "headers": { - "Content-Type": "text/csv; charset=utf-8", - "Content-Disposition": "attachment; filename=\"users-2030-01-02.csv\"" - } - }, - { - "name": "users/text/\"line\\nnext\"", - "kind": "users", - "rows": [ - { - "repoId": "line\nnext", - "username": "line\nnext", - "conferenceID": "sample", - "name": "line\nnext", - "status": "ready", - "statusMessage": "line\nnext", - "anonymizeDate": "2029-04-03T01:02:03.456Z", - "lastView": "2029-05-01T00:00:00.000Z", - "dateOfEntry": "2028-01-01T00:00:00.000Z", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "pageView": 1.5, - "size": { - "storage": 2.5 - }, - "source": { - "repositoryName": "team/subgroup/project", - "branch": "main", - "commit": "opaque:revision", - "accessToken": "synthetic-secret" - }, - "options": { - "terms": [ - "one", - "two" - ] - }, - "emails": [ - { - "email": "chair@example.test" - } - ], - "isAdmin": true, - "price": 0.125, - "repositories": [ - { - "id": "one" - }, - { - "id": "two" - } - ], - "conference": "Conference", - "apiTokens": [ - { - "tokenHash": "synthetic-secret" - } - ] - } - ], - "expected": "username,email,status,isAdmin,repoCount,dateOfEntry\n\"line\nnext\",chair@example.test,ready,true,2,2028-01-01T00:00:00.000Z", - "headers": { - "Content-Type": "text/csv; charset=utf-8", - "Content-Disposition": "attachment; filename=\"users-2030-01-02.csv\"" - } - }, - { - "name": "users/text/\"line\\rnext\"", - "kind": "users", - "rows": [ - { - "repoId": "line\rnext", - "username": "line\rnext", - "conferenceID": "sample", - "name": "line\rnext", - "status": "ready", - "statusMessage": "line\rnext", - "anonymizeDate": "2029-04-03T01:02:03.456Z", - "lastView": "2029-05-01T00:00:00.000Z", - "dateOfEntry": "2028-01-01T00:00:00.000Z", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "pageView": 1.5, - "size": { - "storage": 2.5 - }, - "source": { - "repositoryName": "team/subgroup/project", - "branch": "main", - "commit": "opaque:revision", - "accessToken": "synthetic-secret" - }, - "options": { - "terms": [ - "one", - "two" - ] - }, - "emails": [ - { - "email": "chair@example.test" - } - ], - "isAdmin": true, - "price": 0.125, - "repositories": [ - { - "id": "one" - }, - { - "id": "two" - } - ], - "conference": "Conference", - "apiTokens": [ - { - "tokenHash": "synthetic-secret" - } - ] - } - ], - "expected": "username,email,status,isAdmin,repoCount,dateOfEntry\n\"line\rnext\",chair@example.test,ready,true,2,2028-01-01T00:00:00.000Z", - "headers": { - "Content-Type": "text/csv; charset=utf-8", - "Content-Disposition": "attachment; filename=\"users-2030-01-02.csv\"" - } - }, - { - "name": "users/text/\"back\\\\slash\"", - "kind": "users", - "rows": [ - { - "repoId": "back\\slash", - "username": "back\\slash", - "conferenceID": "sample", - "name": "back\\slash", - "status": "ready", - "statusMessage": "back\\slash", - "anonymizeDate": "2029-04-03T01:02:03.456Z", - "lastView": "2029-05-01T00:00:00.000Z", - "dateOfEntry": "2028-01-01T00:00:00.000Z", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "pageView": 1.5, - "size": { - "storage": 2.5 - }, - "source": { - "repositoryName": "team/subgroup/project", - "branch": "main", - "commit": "opaque:revision", - "accessToken": "synthetic-secret" - }, - "options": { - "terms": [ - "one", - "two" - ] - }, - "emails": [ - { - "email": "chair@example.test" - } - ], - "isAdmin": true, - "price": 0.125, - "repositories": [ - { - "id": "one" - }, - { - "id": "two" - } - ], - "conference": "Conference", - "apiTokens": [ - { - "tokenHash": "synthetic-secret" - } - ] - } - ], - "expected": "username,email,status,isAdmin,repoCount,dateOfEntry\nback\\slash,chair@example.test,ready,true,2,2028-01-01T00:00:00.000Z", - "headers": { - "Content-Type": "text/csv; charset=utf-8", - "Content-Disposition": "attachment; filename=\"users-2030-01-02.csv\"" - } - }, - { - "name": "users/text/\"é😀\"", - "kind": "users", - "rows": [ - { - "repoId": "é😀", - "username": "é😀", - "conferenceID": "sample", - "name": "é😀", - "status": "ready", - "statusMessage": "é😀", - "anonymizeDate": "2029-04-03T01:02:03.456Z", - "lastView": "2029-05-01T00:00:00.000Z", - "dateOfEntry": "2028-01-01T00:00:00.000Z", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "pageView": 1.5, - "size": { - "storage": 2.5 - }, - "source": { - "repositoryName": "team/subgroup/project", - "branch": "main", - "commit": "opaque:revision", - "accessToken": "synthetic-secret" - }, - "options": { - "terms": [ - "one", - "two" - ] - }, - "emails": [ - { - "email": "chair@example.test" - } - ], - "isAdmin": true, - "price": 0.125, - "repositories": [ - { - "id": "one" - }, - { - "id": "two" - } - ], - "conference": "Conference", - "apiTokens": [ - { - "tokenHash": "synthetic-secret" - } - ] - } - ], - "expected": "username,email,status,isAdmin,repoCount,dateOfEntry\né😀,chair@example.test,ready,true,2,2028-01-01T00:00:00.000Z", - "headers": { - "Content-Type": "text/csv; charset=utf-8", - "Content-Disposition": "attachment; filename=\"users-2030-01-02.csv\"" - } - }, - { - "name": "users/date/0001-01-01T00:00:00.000Z", - "kind": "users", - "rows": [ - { - "repoId": "sample", - "username": "sample", - "conferenceID": "sample", - "name": "Conference", - "status": "ready", - "statusMessage": "Message", - "anonymizeDate": "0001-01-01T00:00:00.000Z", - "lastView": "0001-01-01T00:00:00.000Z", - "dateOfEntry": "0001-01-01T00:00:00.000Z", - "startDate": "0001-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "pageView": 1.5, - "size": { - "storage": 2.5 - }, - "source": { - "repositoryName": "team/subgroup/project", - "branch": "main", - "commit": "opaque:revision", - "accessToken": "synthetic-secret" - }, - "options": { - "terms": [ - "one", - "two" - ] - }, - "emails": [ - { - "email": "chair@example.test" - } - ], - "isAdmin": true, - "price": 0.125, - "repositories": [ - { - "id": "one" - }, - { - "id": "two" - } - ], - "conference": "Conference", - "apiTokens": [ - { - "tokenHash": "synthetic-secret" - } - ] - } - ], - "expected": "username,email,status,isAdmin,repoCount,dateOfEntry\nsample,chair@example.test,ready,true,2,0001-01-01T00:00:00.000Z", - "headers": { - "Content-Type": "text/csv; charset=utf-8", - "Content-Disposition": "attachment; filename=\"users-2030-01-02.csv\"" - } - }, - { - "name": "users/date/2029-01-01T01:00:00+01:00", - "kind": "users", - "rows": [ - { - "repoId": "sample", - "username": "sample", - "conferenceID": "sample", - "name": "Conference", - "status": "ready", - "statusMessage": "Message", - "anonymizeDate": "2029-01-01T01:00:00+01:00", - "lastView": "2029-01-01T01:00:00+01:00", - "dateOfEntry": "2029-01-01T01:00:00+01:00", - "startDate": "2029-01-01T01:00:00+01:00", - "endDate": "2029-01-01T01:00:00+01:00", - "pageView": 1.5, - "size": { - "storage": 2.5 - }, - "source": { - "repositoryName": "team/subgroup/project", - "branch": "main", - "commit": "opaque:revision", - "accessToken": "synthetic-secret" - }, - "options": { - "terms": [ - "one", - "two" - ] - }, - "emails": [ - { - "email": "chair@example.test" - } - ], - "isAdmin": true, - "price": 0.125, - "repositories": [ - { - "id": "one" - }, - { - "id": "two" - } - ], - "conference": "Conference", - "apiTokens": [ - { - "tokenHash": "synthetic-secret" - } - ] - } - ], - "expected": "username,email,status,isAdmin,repoCount,dateOfEntry\nsample,chair@example.test,ready,true,2,2029-01-01T00:00:00.000Z", - "headers": { - "Content-Type": "text/csv; charset=utf-8", - "Content-Disposition": "attachment; filename=\"users-2030-01-02.csv\"" - } - }, - { - "name": "users/date/null", - "kind": "users", - "rows": [ - { - "repoId": "sample", - "username": "sample", - "conferenceID": "sample", - "name": "Conference", - "status": "ready", - "statusMessage": "Message", - "anonymizeDate": null, - "lastView": null, - "dateOfEntry": null, - "startDate": null, - "endDate": null, - "pageView": 1.5, - "size": { - "storage": 2.5 - }, - "source": { - "repositoryName": "team/subgroup/project", - "branch": "main", - "commit": "opaque:revision", - "accessToken": "synthetic-secret" - }, - "options": { - "terms": [ - "one", - "two" - ] - }, - "emails": [ - { - "email": "chair@example.test" - } - ], - "isAdmin": true, - "price": 0.125, - "repositories": [ - { - "id": "one" - }, - { - "id": "two" - } - ], - "conference": "Conference", - "apiTokens": [ - { - "tokenHash": "synthetic-secret" - } - ] - } - ], - "expected": "username,email,status,isAdmin,repoCount,dateOfEntry\nsample,chair@example.test,ready,true,2,", - "headers": { - "Content-Type": "text/csv; charset=utf-8", - "Content-Disposition": "attachment; filename=\"users-2030-01-02.csv\"" - } - }, - { - "name": "users/multiple", - "kind": "users", - "rows": [ - { - "repoId": "sample", - "username": "sample", - "conferenceID": "sample", - "name": "Conference", - "status": "ready", - "statusMessage": "Message", - "anonymizeDate": "2029-04-03T01:02:03.456Z", - "lastView": "2029-05-01T00:00:00.000Z", - "dateOfEntry": "2028-01-01T00:00:00.000Z", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "pageView": 1.5, - "size": { - "storage": 2.5 - }, - "source": { - "repositoryName": "team/subgroup/project", - "branch": "main", - "commit": "opaque:revision", - "accessToken": "synthetic-secret" - }, - "options": { - "terms": [ - "one", - "two" - ] - }, - "emails": [ - { - "email": "chair@example.test" - } - ], - "isAdmin": true, - "price": 0.125, - "repositories": [ - { - "id": "one" - }, - { - "id": "two" - } - ], - "conference": "Conference", - "apiTokens": [ - { - "tokenHash": "synthetic-secret" - } - ] - }, - {}, - { - "repoId": "sample", - "username": "sample", - "conferenceID": "sample", - "name": "Conference", - "status": "ready", - "statusMessage": "Message", - "anonymizeDate": "2029-04-03T01:02:03.456Z", - "lastView": "2029-05-01T00:00:00.000Z", - "dateOfEntry": "2028-01-01T00:00:00.000Z", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "pageView": 1e+21, - "size": { - "storage": 100000000000000000000 - }, - "source": { - "repositoryName": "team/subgroup/project", - "branch": "main", - "commit": "opaque:revision", - "accessToken": "synthetic-secret" - }, - "options": { - "terms": [ - "one", - "two" - ] - }, - "emails": [ - { - "email": "chair@example.test" - } - ], - "isAdmin": true, - "price": 1e-7, - "repositories": [ - { - "id": "one" - }, - { - "id": "two" - } - ], - "conference": "Conference", - "apiTokens": [ - { - "tokenHash": "synthetic-secret" - } - ] - } - ], - "expected": "username,email,status,isAdmin,repoCount,dateOfEntry\nsample,chair@example.test,ready,true,2,2028-01-01T00:00:00.000Z\n,,,false,0,\nsample,chair@example.test,ready,true,2,2028-01-01T00:00:00.000Z", - "headers": { - "Content-Type": "text/csv; charset=utf-8", - "Content-Disposition": "attachment; filename=\"users-2030-01-02.csv\"" - } - }, - { - "name": "conferences/empty", - "kind": "conferences", - "rows": [], - "expected": "conferenceID,name,status,price,repoCount,startDate,endDate", - "headers": { - "Content-Type": "text/csv; charset=utf-8", - "Content-Disposition": "attachment; filename=\"conferences-2030-01-02.csv\"" - } - }, - { - "name": "conferences/minimal", - "kind": "conferences", - "rows": [ - {} - ], - "expected": "conferenceID,name,status,price,repoCount,startDate,endDate\n,,,0,0,,", - "headers": { - "Content-Type": "text/csv; charset=utf-8", - "Content-Disposition": "attachment; filename=\"conferences-2030-01-02.csv\"" - } - }, - { - "name": "conferences/rich", - "kind": "conferences", - "rows": [ - { - "repoId": "sample", - "username": "sample", - "conferenceID": "sample", - "name": "Conference", - "status": "ready", - "statusMessage": "Message", - "anonymizeDate": "2029-04-03T01:02:03.456Z", - "lastView": "2029-05-01T00:00:00.000Z", - "dateOfEntry": "2028-01-01T00:00:00.000Z", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "pageView": 1.5, - "size": { - "storage": 2.5 - }, - "source": { - "repositoryName": "team/subgroup/project", - "branch": "main", - "commit": "opaque:revision", - "accessToken": "synthetic-secret" - }, - "options": { - "terms": [ - "one", - "two" - ] - }, - "emails": [ - { - "email": "chair@example.test" - } - ], - "isAdmin": true, - "price": 0.125, - "repositories": [ - { - "id": "one" - }, - { - "id": "two" - } - ], - "conference": "Conference", - "apiTokens": [ - { - "tokenHash": "synthetic-secret" - } - ] - } - ], - "expected": "conferenceID,name,status,price,repoCount,startDate,endDate\nsample,Conference,ready,0.125,2,2029-01-01T00:00:00.000Z,2031-01-01T00:00:00.000Z", - "headers": { - "Content-Type": "text/csv; charset=utf-8", - "Content-Disposition": "attachment; filename=\"conferences-2030-01-02.csv\"" - } - }, - { - "name": "conferences/text/\" leading\"", - "kind": "conferences", - "rows": [ - { - "repoId": " leading", - "username": " leading", - "conferenceID": "sample", - "name": " leading", - "status": "ready", - "statusMessage": " leading", - "anonymizeDate": "2029-04-03T01:02:03.456Z", - "lastView": "2029-05-01T00:00:00.000Z", - "dateOfEntry": "2028-01-01T00:00:00.000Z", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "pageView": 1.5, - "size": { - "storage": 2.5 - }, - "source": { - "repositoryName": "team/subgroup/project", - "branch": "main", - "commit": "opaque:revision", - "accessToken": "synthetic-secret" - }, - "options": { - "terms": [ - "one", - "two" - ] - }, - "emails": [ - { - "email": "chair@example.test" - } - ], - "isAdmin": true, - "price": 0.125, - "repositories": [ - { - "id": "one" - }, - { - "id": "two" - } - ], - "conference": "Conference", - "apiTokens": [ - { - "tokenHash": "synthetic-secret" - } - ] - } - ], - "expected": "conferenceID,name,status,price,repoCount,startDate,endDate\nsample, leading,ready,0.125,2,2029-01-01T00:00:00.000Z,2031-01-01T00:00:00.000Z", - "headers": { - "Content-Type": "text/csv; charset=utf-8", - "Content-Disposition": "attachment; filename=\"conferences-2030-01-02.csv\"" - } - }, - { - "name": "conferences/text/\"trailing \"", - "kind": "conferences", - "rows": [ - { - "repoId": "trailing ", - "username": "trailing ", - "conferenceID": "sample", - "name": "trailing ", - "status": "ready", - "statusMessage": "trailing ", - "anonymizeDate": "2029-04-03T01:02:03.456Z", - "lastView": "2029-05-01T00:00:00.000Z", - "dateOfEntry": "2028-01-01T00:00:00.000Z", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "pageView": 1.5, - "size": { - "storage": 2.5 - }, - "source": { - "repositoryName": "team/subgroup/project", - "branch": "main", - "commit": "opaque:revision", - "accessToken": "synthetic-secret" - }, - "options": { - "terms": [ - "one", - "two" - ] - }, - "emails": [ - { - "email": "chair@example.test" - } - ], - "isAdmin": true, - "price": 0.125, - "repositories": [ - { - "id": "one" - }, - { - "id": "two" - } - ], - "conference": "Conference", - "apiTokens": [ - { - "tokenHash": "synthetic-secret" - } - ] - } - ], - "expected": "conferenceID,name,status,price,repoCount,startDate,endDate\nsample,trailing ,ready,0.125,2,2029-01-01T00:00:00.000Z,2031-01-01T00:00:00.000Z", - "headers": { - "Content-Type": "text/csv; charset=utf-8", - "Content-Disposition": "attachment; filename=\"conferences-2030-01-02.csv\"" - } - }, - { - "name": "conferences/text/\"a,b\"", - "kind": "conferences", - "rows": [ - { - "repoId": "a,b", - "username": "a,b", - "conferenceID": "sample", - "name": "a,b", - "status": "ready", - "statusMessage": "a,b", - "anonymizeDate": "2029-04-03T01:02:03.456Z", - "lastView": "2029-05-01T00:00:00.000Z", - "dateOfEntry": "2028-01-01T00:00:00.000Z", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "pageView": 1.5, - "size": { - "storage": 2.5 - }, - "source": { - "repositoryName": "team/subgroup/project", - "branch": "main", - "commit": "opaque:revision", - "accessToken": "synthetic-secret" - }, - "options": { - "terms": [ - "one", - "two" - ] - }, - "emails": [ - { - "email": "chair@example.test" - } - ], - "isAdmin": true, - "price": 0.125, - "repositories": [ - { - "id": "one" - }, - { - "id": "two" - } - ], - "conference": "Conference", - "apiTokens": [ - { - "tokenHash": "synthetic-secret" - } - ] - } - ], - "expected": "conferenceID,name,status,price,repoCount,startDate,endDate\nsample,\"a,b\",ready,0.125,2,2029-01-01T00:00:00.000Z,2031-01-01T00:00:00.000Z", - "headers": { - "Content-Type": "text/csv; charset=utf-8", - "Content-Disposition": "attachment; filename=\"conferences-2030-01-02.csv\"" - } - }, - { - "name": "conferences/text/\"say \\\"hi\\\"\"", - "kind": "conferences", - "rows": [ - { - "repoId": "say \"hi\"", - "username": "say \"hi\"", - "conferenceID": "sample", - "name": "say \"hi\"", - "status": "ready", - "statusMessage": "say \"hi\"", - "anonymizeDate": "2029-04-03T01:02:03.456Z", - "lastView": "2029-05-01T00:00:00.000Z", - "dateOfEntry": "2028-01-01T00:00:00.000Z", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "pageView": 1.5, - "size": { - "storage": 2.5 - }, - "source": { - "repositoryName": "team/subgroup/project", - "branch": "main", - "commit": "opaque:revision", - "accessToken": "synthetic-secret" - }, - "options": { - "terms": [ - "one", - "two" - ] - }, - "emails": [ - { - "email": "chair@example.test" - } - ], - "isAdmin": true, - "price": 0.125, - "repositories": [ - { - "id": "one" - }, - { - "id": "two" - } - ], - "conference": "Conference", - "apiTokens": [ - { - "tokenHash": "synthetic-secret" - } - ] - } - ], - "expected": "conferenceID,name,status,price,repoCount,startDate,endDate\nsample,\"say \"\"hi\"\"\",ready,0.125,2,2029-01-01T00:00:00.000Z,2031-01-01T00:00:00.000Z", - "headers": { - "Content-Type": "text/csv; charset=utf-8", - "Content-Disposition": "attachment; filename=\"conferences-2030-01-02.csv\"" - } - }, - { - "name": "conferences/text/\"line\\nnext\"", - "kind": "conferences", - "rows": [ - { - "repoId": "line\nnext", - "username": "line\nnext", - "conferenceID": "sample", - "name": "line\nnext", - "status": "ready", - "statusMessage": "line\nnext", - "anonymizeDate": "2029-04-03T01:02:03.456Z", - "lastView": "2029-05-01T00:00:00.000Z", - "dateOfEntry": "2028-01-01T00:00:00.000Z", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "pageView": 1.5, - "size": { - "storage": 2.5 - }, - "source": { - "repositoryName": "team/subgroup/project", - "branch": "main", - "commit": "opaque:revision", - "accessToken": "synthetic-secret" - }, - "options": { - "terms": [ - "one", - "two" - ] - }, - "emails": [ - { - "email": "chair@example.test" - } - ], - "isAdmin": true, - "price": 0.125, - "repositories": [ - { - "id": "one" - }, - { - "id": "two" - } - ], - "conference": "Conference", - "apiTokens": [ - { - "tokenHash": "synthetic-secret" - } - ] - } - ], - "expected": "conferenceID,name,status,price,repoCount,startDate,endDate\nsample,\"line\nnext\",ready,0.125,2,2029-01-01T00:00:00.000Z,2031-01-01T00:00:00.000Z", - "headers": { - "Content-Type": "text/csv; charset=utf-8", - "Content-Disposition": "attachment; filename=\"conferences-2030-01-02.csv\"" - } - }, - { - "name": "conferences/text/\"line\\rnext\"", - "kind": "conferences", - "rows": [ - { - "repoId": "line\rnext", - "username": "line\rnext", - "conferenceID": "sample", - "name": "line\rnext", - "status": "ready", - "statusMessage": "line\rnext", - "anonymizeDate": "2029-04-03T01:02:03.456Z", - "lastView": "2029-05-01T00:00:00.000Z", - "dateOfEntry": "2028-01-01T00:00:00.000Z", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "pageView": 1.5, - "size": { - "storage": 2.5 - }, - "source": { - "repositoryName": "team/subgroup/project", - "branch": "main", - "commit": "opaque:revision", - "accessToken": "synthetic-secret" - }, - "options": { - "terms": [ - "one", - "two" - ] - }, - "emails": [ - { - "email": "chair@example.test" - } - ], - "isAdmin": true, - "price": 0.125, - "repositories": [ - { - "id": "one" - }, - { - "id": "two" - } - ], - "conference": "Conference", - "apiTokens": [ - { - "tokenHash": "synthetic-secret" - } - ] - } - ], - "expected": "conferenceID,name,status,price,repoCount,startDate,endDate\nsample,\"line\rnext\",ready,0.125,2,2029-01-01T00:00:00.000Z,2031-01-01T00:00:00.000Z", - "headers": { - "Content-Type": "text/csv; charset=utf-8", - "Content-Disposition": "attachment; filename=\"conferences-2030-01-02.csv\"" - } - }, - { - "name": "conferences/text/\"back\\\\slash\"", - "kind": "conferences", - "rows": [ - { - "repoId": "back\\slash", - "username": "back\\slash", - "conferenceID": "sample", - "name": "back\\slash", - "status": "ready", - "statusMessage": "back\\slash", - "anonymizeDate": "2029-04-03T01:02:03.456Z", - "lastView": "2029-05-01T00:00:00.000Z", - "dateOfEntry": "2028-01-01T00:00:00.000Z", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "pageView": 1.5, - "size": { - "storage": 2.5 - }, - "source": { - "repositoryName": "team/subgroup/project", - "branch": "main", - "commit": "opaque:revision", - "accessToken": "synthetic-secret" - }, - "options": { - "terms": [ - "one", - "two" - ] - }, - "emails": [ - { - "email": "chair@example.test" - } - ], - "isAdmin": true, - "price": 0.125, - "repositories": [ - { - "id": "one" - }, - { - "id": "two" - } - ], - "conference": "Conference", - "apiTokens": [ - { - "tokenHash": "synthetic-secret" - } - ] - } - ], - "expected": "conferenceID,name,status,price,repoCount,startDate,endDate\nsample,back\\slash,ready,0.125,2,2029-01-01T00:00:00.000Z,2031-01-01T00:00:00.000Z", - "headers": { - "Content-Type": "text/csv; charset=utf-8", - "Content-Disposition": "attachment; filename=\"conferences-2030-01-02.csv\"" - } - }, - { - "name": "conferences/text/\"é😀\"", - "kind": "conferences", - "rows": [ - { - "repoId": "é😀", - "username": "é😀", - "conferenceID": "sample", - "name": "é😀", - "status": "ready", - "statusMessage": "é😀", - "anonymizeDate": "2029-04-03T01:02:03.456Z", - "lastView": "2029-05-01T00:00:00.000Z", - "dateOfEntry": "2028-01-01T00:00:00.000Z", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "pageView": 1.5, - "size": { - "storage": 2.5 - }, - "source": { - "repositoryName": "team/subgroup/project", - "branch": "main", - "commit": "opaque:revision", - "accessToken": "synthetic-secret" - }, - "options": { - "terms": [ - "one", - "two" - ] - }, - "emails": [ - { - "email": "chair@example.test" - } - ], - "isAdmin": true, - "price": 0.125, - "repositories": [ - { - "id": "one" - }, - { - "id": "two" - } - ], - "conference": "Conference", - "apiTokens": [ - { - "tokenHash": "synthetic-secret" - } - ] - } - ], - "expected": "conferenceID,name,status,price,repoCount,startDate,endDate\nsample,é😀,ready,0.125,2,2029-01-01T00:00:00.000Z,2031-01-01T00:00:00.000Z", - "headers": { - "Content-Type": "text/csv; charset=utf-8", - "Content-Disposition": "attachment; filename=\"conferences-2030-01-02.csv\"" - } - }, - { - "name": "conferences/date/0001-01-01T00:00:00.000Z", - "kind": "conferences", - "rows": [ - { - "repoId": "sample", - "username": "sample", - "conferenceID": "sample", - "name": "Conference", - "status": "ready", - "statusMessage": "Message", - "anonymizeDate": "0001-01-01T00:00:00.000Z", - "lastView": "0001-01-01T00:00:00.000Z", - "dateOfEntry": "0001-01-01T00:00:00.000Z", - "startDate": "0001-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "pageView": 1.5, - "size": { - "storage": 2.5 - }, - "source": { - "repositoryName": "team/subgroup/project", - "branch": "main", - "commit": "opaque:revision", - "accessToken": "synthetic-secret" - }, - "options": { - "terms": [ - "one", - "two" - ] - }, - "emails": [ - { - "email": "chair@example.test" - } - ], - "isAdmin": true, - "price": 0.125, - "repositories": [ - { - "id": "one" - }, - { - "id": "two" - } - ], - "conference": "Conference", - "apiTokens": [ - { - "tokenHash": "synthetic-secret" - } - ] - } - ], - "expected": "conferenceID,name,status,price,repoCount,startDate,endDate\nsample,Conference,ready,0.125,2,0001-01-01T00:00:00.000Z,0001-01-01T00:00:00.000Z", - "headers": { - "Content-Type": "text/csv; charset=utf-8", - "Content-Disposition": "attachment; filename=\"conferences-2030-01-02.csv\"" - } - }, - { - "name": "conferences/date/2029-01-01T01:00:00+01:00", - "kind": "conferences", - "rows": [ - { - "repoId": "sample", - "username": "sample", - "conferenceID": "sample", - "name": "Conference", - "status": "ready", - "statusMessage": "Message", - "anonymizeDate": "2029-01-01T01:00:00+01:00", - "lastView": "2029-01-01T01:00:00+01:00", - "dateOfEntry": "2029-01-01T01:00:00+01:00", - "startDate": "2029-01-01T01:00:00+01:00", - "endDate": "2029-01-01T01:00:00+01:00", - "pageView": 1.5, - "size": { - "storage": 2.5 - }, - "source": { - "repositoryName": "team/subgroup/project", - "branch": "main", - "commit": "opaque:revision", - "accessToken": "synthetic-secret" - }, - "options": { - "terms": [ - "one", - "two" - ] - }, - "emails": [ - { - "email": "chair@example.test" - } - ], - "isAdmin": true, - "price": 0.125, - "repositories": [ - { - "id": "one" - }, - { - "id": "two" - } - ], - "conference": "Conference", - "apiTokens": [ - { - "tokenHash": "synthetic-secret" - } - ] - } - ], - "expected": "conferenceID,name,status,price,repoCount,startDate,endDate\nsample,Conference,ready,0.125,2,2029-01-01T00:00:00.000Z,2029-01-01T00:00:00.000Z", - "headers": { - "Content-Type": "text/csv; charset=utf-8", - "Content-Disposition": "attachment; filename=\"conferences-2030-01-02.csv\"" - } - }, - { - "name": "conferences/date/null", - "kind": "conferences", - "rows": [ - { - "repoId": "sample", - "username": "sample", - "conferenceID": "sample", - "name": "Conference", - "status": "ready", - "statusMessage": "Message", - "anonymizeDate": null, - "lastView": null, - "dateOfEntry": null, - "startDate": null, - "endDate": null, - "pageView": 1.5, - "size": { - "storage": 2.5 - }, - "source": { - "repositoryName": "team/subgroup/project", - "branch": "main", - "commit": "opaque:revision", - "accessToken": "synthetic-secret" - }, - "options": { - "terms": [ - "one", - "two" - ] - }, - "emails": [ - { - "email": "chair@example.test" - } - ], - "isAdmin": true, - "price": 0.125, - "repositories": [ - { - "id": "one" - }, - { - "id": "two" - } - ], - "conference": "Conference", - "apiTokens": [ - { - "tokenHash": "synthetic-secret" - } - ] - } - ], - "expected": "conferenceID,name,status,price,repoCount,startDate,endDate\nsample,Conference,ready,0.125,2,,", - "headers": { - "Content-Type": "text/csv; charset=utf-8", - "Content-Disposition": "attachment; filename=\"conferences-2030-01-02.csv\"" - } - }, - { - "name": "conferences/multiple", - "kind": "conferences", - "rows": [ - { - "repoId": "sample", - "username": "sample", - "conferenceID": "sample", - "name": "Conference", - "status": "ready", - "statusMessage": "Message", - "anonymizeDate": "2029-04-03T01:02:03.456Z", - "lastView": "2029-05-01T00:00:00.000Z", - "dateOfEntry": "2028-01-01T00:00:00.000Z", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "pageView": 1.5, - "size": { - "storage": 2.5 - }, - "source": { - "repositoryName": "team/subgroup/project", - "branch": "main", - "commit": "opaque:revision", - "accessToken": "synthetic-secret" - }, - "options": { - "terms": [ - "one", - "two" - ] - }, - "emails": [ - { - "email": "chair@example.test" - } - ], - "isAdmin": true, - "price": 0.125, - "repositories": [ - { - "id": "one" - }, - { - "id": "two" - } - ], - "conference": "Conference", - "apiTokens": [ - { - "tokenHash": "synthetic-secret" - } - ] - }, - {}, - { - "repoId": "sample", - "username": "sample", - "conferenceID": "sample", - "name": "Conference", - "status": "ready", - "statusMessage": "Message", - "anonymizeDate": "2029-04-03T01:02:03.456Z", - "lastView": "2029-05-01T00:00:00.000Z", - "dateOfEntry": "2028-01-01T00:00:00.000Z", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "pageView": 1e+21, - "size": { - "storage": 100000000000000000000 - }, - "source": { - "repositoryName": "team/subgroup/project", - "branch": "main", - "commit": "opaque:revision", - "accessToken": "synthetic-secret" - }, - "options": { - "terms": [ - "one", - "two" - ] - }, - "emails": [ - { - "email": "chair@example.test" - } - ], - "isAdmin": true, - "price": 1e-7, - "repositories": [ - { - "id": "one" - }, - { - "id": "two" - } - ], - "conference": "Conference", - "apiTokens": [ - { - "tokenHash": "synthetic-secret" - } - ] - } - ], - "expected": "conferenceID,name,status,price,repoCount,startDate,endDate\nsample,Conference,ready,0.125,2,2029-01-01T00:00:00.000Z,2031-01-01T00:00:00.000Z\n,,,0,0,,\nsample,Conference,ready,1e-7,2,2029-01-01T00:00:00.000Z,2031-01-01T00:00:00.000Z", - "headers": { - "Content-Type": "text/csv; charset=utf-8", - "Content-Disposition": "attachment; filename=\"conferences-2030-01-02.csv\"" - } - } -] diff --git a/backend/internal/server/testdata/admin-dates.json b/backend/internal/server/testdata/admin-dates.json deleted file mode 100644 index 9217496..0000000 --- a/backend/internal/server/testdata/admin-dates.json +++ /dev/null @@ -1,4538 +0,0 @@ -[ - { - "query": "", - "expected": null - }, - { - "query": "dateFrom=", - "expected": null - }, - { - "query": "dateFrom=invalid", - "expected": null - }, - { - "query": "dateFrom=0000", - "expected": { - "date": { - "$gte": "0000-01-01T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=0001-01-01", - "expected": { - "date": { - "$gte": "0001-01-01T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2024", - "expected": { - "date": { - "$gte": "2024-01-01T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2024-02", - "expected": { - "date": { - "$gte": "2024-02-01T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2023-02-29", - "expected": { - "date": { - "$gte": "2023-03-01T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2024-02-30", - "expected": { - "date": { - "$gte": "2024-03-01T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2024-02-31", - "expected": { - "date": { - "$gte": "2024-03-02T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2024-02-32", - "expected": null - }, - { - "query": "dateFrom=2024-00-01", - "expected": null - }, - { - "query": "dateFrom=2024-13-01", - "expected": null - }, - { - "query": "dateFrom=2024-01-00", - "expected": null - }, - { - "query": "dateFrom=2024-01-01", - "expected": { - "date": { - "$gte": "2024-01-01T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2024T00%3A00", - "expected": { - "date": { - "$gte": "2024-01-01T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2024-02T00%3A00", - "expected": { - "date": { - "$gte": "2024-02-01T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2024-01-01t00%3A00z", - "expected": { - "date": { - "$gte": "2024-01-01T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=%202024-01-01%20", - "expected": { - "date": { - "$gte": "2024-01-01T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2024-01-01T00%3A00Z%20", - "expected": null - }, - { - "query": "dateFrom=2024-01-01T00%3A00Z%00ignored", - "expected": { - "date": { - "$gte": "2024-01-01T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=%2B010000-01-01", - "expected": { - "date": { - "$gte": "+010000-01-01T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=-000001-01-01", - "expected": { - "date": { - "$gte": "-000001-01-01T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=-000000-01-01", - "expected": { - "date": { - "$gte": "2001-01-01T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=%2B275760-09-13", - "expected": { - "date": { - "$gte": "+275760-09-13T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=%2B275760-09-14", - "expected": null - }, - { - "query": "dateFrom=-271821-04-20", - "expected": { - "date": { - "$gte": "-271821-04-20T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=-271821-04-19", - "expected": null - }, - { - "query": "dateFrom=2024-02-29T00%3A00Z", - "expected": { - "date": { - "$gte": "2024-02-29T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2024-02-29T00%3A00%2B02%3A30", - "expected": { - "date": { - "$gte": "2024-02-28T21:30:00.000Z" - } - } - }, - { - "query": "dateFrom=2024-02-29T00%3A00-0330", - "expected": { - "date": { - "$gte": "2024-02-29T03:30:00.000Z" - } - } - }, - { - "query": "dateFrom=2024-02-29T00%3A00", - "expected": { - "date": { - "$gte": "2024-02-29T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2024-02-29T12%3A34%3A56Z", - "expected": { - "date": { - "$gte": "2024-02-29T12:34:56.000Z" - } - } - }, - { - "query": "dateFrom=2024-02-29T12%3A34%3A56%2B02%3A30", - "expected": { - "date": { - "$gte": "2024-02-29T10:04:56.000Z" - } - } - }, - { - "query": "dateFrom=2024-02-29T12%3A34%3A56-0330", - "expected": { - "date": { - "$gte": "2024-02-29T16:04:56.000Z" - } - } - }, - { - "query": "dateFrom=2024-02-29T12%3A34%3A56", - "expected": { - "date": { - "$gte": "2024-02-29T12:34:56.000Z" - } - } - }, - { - "query": "dateFrom=2024-02-29T12%3A34%3A56.1Z", - "expected": { - "date": { - "$gte": "2024-02-29T12:34:56.100Z" - } - } - }, - { - "query": "dateFrom=2024-02-29T12%3A34%3A56.1%2B02%3A30", - "expected": { - "date": { - "$gte": "2024-02-29T10:04:56.100Z" - } - } - }, - { - "query": "dateFrom=2024-02-29T12%3A34%3A56.1-0330", - "expected": { - "date": { - "$gte": "2024-02-29T16:04:56.100Z" - } - } - }, - { - "query": "dateFrom=2024-02-29T12%3A34%3A56.1", - "expected": { - "date": { - "$gte": "2024-02-29T12:34:56.100Z" - } - } - }, - { - "query": "dateFrom=2024-02-29T12%3A34%3A56.123456789Z", - "expected": { - "date": { - "$gte": "2024-02-29T12:34:56.123Z" - } - } - }, - { - "query": "dateFrom=2024-02-29T12%3A34%3A56.123456789%2B02%3A30", - "expected": { - "date": { - "$gte": "2024-02-29T10:04:56.123Z" - } - } - }, - { - "query": "dateFrom=2024-02-29T12%3A34%3A56.123456789-0330", - "expected": { - "date": { - "$gte": "2024-02-29T16:04:56.123Z" - } - } - }, - { - "query": "dateFrom=2024-02-29T12%3A34%3A56.123456789", - "expected": { - "date": { - "$gte": "2024-02-29T12:34:56.123Z" - } - } - }, - { - "query": "dateFrom=2024-02-29T24%3A00Z", - "expected": { - "date": { - "$gte": "2024-03-01T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2024-02-29T24%3A00%2B02%3A30", - "expected": { - "date": { - "$gte": "2024-02-29T21:30:00.000Z" - } - } - }, - { - "query": "dateFrom=2024-02-29T24%3A00-0330", - "expected": { - "date": { - "$gte": "2024-03-01T03:30:00.000Z" - } - } - }, - { - "query": "dateFrom=2024-02-29T24%3A00", - "expected": { - "date": { - "$gte": "2024-03-01T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2024-02-29T24%3A00%3A00.001Z", - "expected": null - }, - { - "query": "dateFrom=2024-02-29T24%3A00%3A00.001%2B02%3A30", - "expected": null - }, - { - "query": "dateFrom=2024-02-29T24%3A00%3A00.001-0330", - "expected": null - }, - { - "query": "dateFrom=2024-02-29T24%3A00%3A00.001", - "expected": null - }, - { - "query": "dateFrom=2024-02-29T25%3A00Z", - "expected": null - }, - { - "query": "dateFrom=2024-02-29T25%3A00%2B02%3A30", - "expected": null - }, - { - "query": "dateFrom=2024-02-29T25%3A00-0330", - "expected": null - }, - { - "query": "dateFrom=2024-02-29T25%3A00", - "expected": null - }, - { - "query": "dateFrom=2024-02-29T12%3A60Z", - "expected": null - }, - { - "query": "dateFrom=2024-02-29T12%3A60%2B02%3A30", - "expected": null - }, - { - "query": "dateFrom=2024-02-29T12%3A60-0330", - "expected": null - }, - { - "query": "dateFrom=2024-02-29T12%3A60", - "expected": null - }, - { - "query": "dateFrom=2024-02-29T12%3A34%3A60Z", - "expected": null - }, - { - "query": "dateFrom=2024-02-29T12%3A34%3A60%2B02%3A30", - "expected": null - }, - { - "query": "dateFrom=2024-02-29T12%3A34%3A60-0330", - "expected": null - }, - { - "query": "dateFrom=2024-02-29T12%3A34%3A60", - "expected": null - }, - { - "query": "dateFrom=2023-02-29T00%3A00Z", - "expected": { - "date": { - "$gte": "2023-03-01T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2023-02-29T00%3A00%2B02%3A30", - "expected": { - "date": { - "$gte": "2023-02-28T21:30:00.000Z" - } - } - }, - { - "query": "dateFrom=2023-02-29T00%3A00-0330", - "expected": { - "date": { - "$gte": "2023-03-01T03:30:00.000Z" - } - } - }, - { - "query": "dateFrom=2023-02-29T00%3A00", - "expected": { - "date": { - "$gte": "2023-03-01T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2023-02-29T12%3A34%3A56Z", - "expected": { - "date": { - "$gte": "2023-03-01T12:34:56.000Z" - } - } - }, - { - "query": "dateFrom=2023-02-29T12%3A34%3A56%2B02%3A30", - "expected": { - "date": { - "$gte": "2023-03-01T10:04:56.000Z" - } - } - }, - { - "query": "dateFrom=2023-02-29T12%3A34%3A56-0330", - "expected": { - "date": { - "$gte": "2023-03-01T16:04:56.000Z" - } - } - }, - { - "query": "dateFrom=2023-02-29T12%3A34%3A56", - "expected": { - "date": { - "$gte": "2023-03-01T12:34:56.000Z" - } - } - }, - { - "query": "dateFrom=2023-02-29T12%3A34%3A56.1Z", - "expected": { - "date": { - "$gte": "2023-03-01T12:34:56.100Z" - } - } - }, - { - "query": "dateFrom=2023-02-29T12%3A34%3A56.1%2B02%3A30", - "expected": { - "date": { - "$gte": "2023-03-01T10:04:56.100Z" - } - } - }, - { - "query": "dateFrom=2023-02-29T12%3A34%3A56.1-0330", - "expected": { - "date": { - "$gte": "2023-03-01T16:04:56.100Z" - } - } - }, - { - "query": "dateFrom=2023-02-29T12%3A34%3A56.1", - "expected": { - "date": { - "$gte": "2023-03-01T12:34:56.100Z" - } - } - }, - { - "query": "dateFrom=2023-02-29T12%3A34%3A56.123456789Z", - "expected": { - "date": { - "$gte": "2023-03-01T12:34:56.123Z" - } - } - }, - { - "query": "dateFrom=2023-02-29T12%3A34%3A56.123456789%2B02%3A30", - "expected": { - "date": { - "$gte": "2023-03-01T10:04:56.123Z" - } - } - }, - { - "query": "dateFrom=2023-02-29T12%3A34%3A56.123456789-0330", - "expected": { - "date": { - "$gte": "2023-03-01T16:04:56.123Z" - } - } - }, - { - "query": "dateFrom=2023-02-29T12%3A34%3A56.123456789", - "expected": { - "date": { - "$gte": "2023-03-01T12:34:56.123Z" - } - } - }, - { - "query": "dateFrom=2023-02-29T24%3A00Z", - "expected": { - "date": { - "$gte": "2023-03-02T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2023-02-29T24%3A00%2B02%3A30", - "expected": { - "date": { - "$gte": "2023-03-01T21:30:00.000Z" - } - } - }, - { - "query": "dateFrom=2023-02-29T24%3A00-0330", - "expected": { - "date": { - "$gte": "2023-03-02T03:30:00.000Z" - } - } - }, - { - "query": "dateFrom=2023-02-29T24%3A00", - "expected": { - "date": { - "$gte": "2023-03-02T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2023-02-29T24%3A00%3A00.001Z", - "expected": null - }, - { - "query": "dateFrom=2023-02-29T24%3A00%3A00.001%2B02%3A30", - "expected": null - }, - { - "query": "dateFrom=2023-02-29T24%3A00%3A00.001-0330", - "expected": null - }, - { - "query": "dateFrom=2023-02-29T24%3A00%3A00.001", - "expected": null - }, - { - "query": "dateFrom=2023-02-29T25%3A00Z", - "expected": null - }, - { - "query": "dateFrom=2023-02-29T25%3A00%2B02%3A30", - "expected": null - }, - { - "query": "dateFrom=2023-02-29T25%3A00-0330", - "expected": null - }, - { - "query": "dateFrom=2023-02-29T25%3A00", - "expected": null - }, - { - "query": "dateFrom=2023-02-29T12%3A60Z", - "expected": null - }, - { - "query": "dateFrom=2023-02-29T12%3A60%2B02%3A30", - "expected": null - }, - { - "query": "dateFrom=2023-02-29T12%3A60-0330", - "expected": null - }, - { - "query": "dateFrom=2023-02-29T12%3A60", - "expected": null - }, - { - "query": "dateFrom=2023-02-29T12%3A34%3A60Z", - "expected": null - }, - { - "query": "dateFrom=2023-02-29T12%3A34%3A60%2B02%3A30", - "expected": null - }, - { - "query": "dateFrom=2023-02-29T12%3A34%3A60-0330", - "expected": null - }, - { - "query": "dateFrom=2023-02-29T12%3A34%3A60", - "expected": null - }, - { - "query": "dateFrom=2024-02-30T00%3A00Z", - "expected": { - "date": { - "$gte": "2024-03-01T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2024-02-30T00%3A00%2B02%3A30", - "expected": { - "date": { - "$gte": "2024-02-29T21:30:00.000Z" - } - } - }, - { - "query": "dateFrom=2024-02-30T00%3A00-0330", - "expected": { - "date": { - "$gte": "2024-03-01T03:30:00.000Z" - } - } - }, - { - "query": "dateFrom=2024-02-30T00%3A00", - "expected": { - "date": { - "$gte": "2024-03-01T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2024-02-30T12%3A34%3A56Z", - "expected": { - "date": { - "$gte": "2024-03-01T12:34:56.000Z" - } - } - }, - { - "query": "dateFrom=2024-02-30T12%3A34%3A56%2B02%3A30", - "expected": { - "date": { - "$gte": "2024-03-01T10:04:56.000Z" - } - } - }, - { - "query": "dateFrom=2024-02-30T12%3A34%3A56-0330", - "expected": { - "date": { - "$gte": "2024-03-01T16:04:56.000Z" - } - } - }, - { - "query": "dateFrom=2024-02-30T12%3A34%3A56", - "expected": { - "date": { - "$gte": "2024-03-01T12:34:56.000Z" - } - } - }, - { - "query": "dateFrom=2024-02-30T12%3A34%3A56.1Z", - "expected": { - "date": { - "$gte": "2024-03-01T12:34:56.100Z" - } - } - }, - { - "query": "dateFrom=2024-02-30T12%3A34%3A56.1%2B02%3A30", - "expected": { - "date": { - "$gte": "2024-03-01T10:04:56.100Z" - } - } - }, - { - "query": "dateFrom=2024-02-30T12%3A34%3A56.1-0330", - "expected": { - "date": { - "$gte": "2024-03-01T16:04:56.100Z" - } - } - }, - { - "query": "dateFrom=2024-02-30T12%3A34%3A56.1", - "expected": { - "date": { - "$gte": "2024-03-01T12:34:56.100Z" - } - } - }, - { - "query": "dateFrom=2024-02-30T12%3A34%3A56.123456789Z", - "expected": { - "date": { - "$gte": "2024-03-01T12:34:56.123Z" - } - } - }, - { - "query": "dateFrom=2024-02-30T12%3A34%3A56.123456789%2B02%3A30", - "expected": { - "date": { - "$gte": "2024-03-01T10:04:56.123Z" - } - } - }, - { - "query": "dateFrom=2024-02-30T12%3A34%3A56.123456789-0330", - "expected": { - "date": { - "$gte": "2024-03-01T16:04:56.123Z" - } - } - }, - { - "query": "dateFrom=2024-02-30T12%3A34%3A56.123456789", - "expected": { - "date": { - "$gte": "2024-03-01T12:34:56.123Z" - } - } - }, - { - "query": "dateFrom=2024-02-30T24%3A00Z", - "expected": { - "date": { - "$gte": "2024-03-02T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2024-02-30T24%3A00%2B02%3A30", - "expected": { - "date": { - "$gte": "2024-03-01T21:30:00.000Z" - } - } - }, - { - "query": "dateFrom=2024-02-30T24%3A00-0330", - "expected": { - "date": { - "$gte": "2024-03-02T03:30:00.000Z" - } - } - }, - { - "query": "dateFrom=2024-02-30T24%3A00", - "expected": { - "date": { - "$gte": "2024-03-02T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2024-02-30T24%3A00%3A00.001Z", - "expected": null - }, - { - "query": "dateFrom=2024-02-30T24%3A00%3A00.001%2B02%3A30", - "expected": null - }, - { - "query": "dateFrom=2024-02-30T24%3A00%3A00.001-0330", - "expected": null - }, - { - "query": "dateFrom=2024-02-30T24%3A00%3A00.001", - "expected": null - }, - { - "query": "dateFrom=2024-02-30T25%3A00Z", - "expected": null - }, - { - "query": "dateFrom=2024-02-30T25%3A00%2B02%3A30", - "expected": null - }, - { - "query": "dateFrom=2024-02-30T25%3A00-0330", - "expected": null - }, - { - "query": "dateFrom=2024-02-30T25%3A00", - "expected": null - }, - { - "query": "dateFrom=2024-02-30T12%3A60Z", - "expected": null - }, - { - "query": "dateFrom=2024-02-30T12%3A60%2B02%3A30", - "expected": null - }, - { - "query": "dateFrom=2024-02-30T12%3A60-0330", - "expected": null - }, - { - "query": "dateFrom=2024-02-30T12%3A60", - "expected": null - }, - { - "query": "dateFrom=2024-02-30T12%3A34%3A60Z", - "expected": null - }, - { - "query": "dateFrom=2024-02-30T12%3A34%3A60%2B02%3A30", - "expected": null - }, - { - "query": "dateFrom=2024-02-30T12%3A34%3A60-0330", - "expected": null - }, - { - "query": "dateFrom=2024-02-30T12%3A34%3A60", - "expected": null - }, - { - "query": "dateFrom=0", - "expected": { - "date": { - "$gte": "2000-01-01T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=1", - "expected": { - "date": { - "$gte": "2001-01-01T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=12", - "expected": { - "date": { - "$gte": "2001-12-01T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=13", - "expected": null - }, - { - "query": "dateFrom=31", - "expected": null - }, - { - "query": "dateFrom=32", - "expected": { - "date": { - "$gte": "2032-01-01T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=49", - "expected": { - "date": { - "$gte": "2049-01-01T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=50", - "expected": { - "date": { - "$gte": "1950-01-01T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=99", - "expected": { - "date": { - "$gte": "1999-01-01T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=100", - "expected": { - "date": { - "$gte": "0100-01-01T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=000000-01-01", - "expected": { - "date": { - "$gte": "2000-01-01T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=-000000-02-03", - "expected": { - "date": { - "$gte": "2001-02-03T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=-000000-01-01T00%3A00Z", - "expected": null - }, - { - "query": "dateFrom=1%2F2%2F03", - "expected": { - "date": { - "$gte": "2003-01-02T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2024%2F02%2F30", - "expected": { - "date": { - "$gte": "2024-03-01T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2024.02.29", - "expected": { - "date": { - "$gte": "2024-02-29T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=Jan%205", - "expected": { - "date": { - "$gte": "2001-01-05T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=5%20January%202024", - "expected": { - "date": { - "$gte": "2024-01-05T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=Tue%2C%2005%20Mar%202024%2012%3A34%3A56%20GMT", - "expected": { - "date": { - "$gte": "2024-03-05T12:34:56.000Z" - } - } - }, - { - "query": "dateFrom=March%205%2C%202024%2012%3A30%20PM", - "expected": { - "date": { - "$gte": "2024-03-05T12:30:00.000Z" - } - } - }, - { - "query": "dateFrom=2024-01-01%2012%3A34%3A56", - "expected": { - "date": { - "$gte": "2024-01-01T12:34:56.000Z" - } - } - }, - { - "query": "dateFrom=2024-01-01%2012%3A34%3A56.1234%20GMT%2B0200", - "expected": { - "date": { - "$gte": "2024-01-01T10:34:56.123Z" - } - } - }, - { - "query": "dateFrom=2024-01-01%20(comment)", - "expected": { - "date": { - "$gte": "2024-01-01T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=(comment)%202024-01-01", - "expected": { - "date": { - "$gte": "2024-01-01T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=garbage%202024-01-01", - "expected": { - "date": { - "$gte": "2024-01-01T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=garbage2024-01-01", - "expected": null - }, - { - "query": "dateFrom=2024-01-01%20garbage", - "expected": null - }, - { - "query": "dateFrom=2024-01-01%20GMT-8", - "expected": { - "date": { - "$gte": "2024-01-01T08:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2024-01-01%2012%3A%3A30", - "expected": { - "date": { - "$gte": "2024-01-01T12:00:30.000Z" - } - } - }, - { - "query": "dateFrom=2024-01-01%2012%3A30%3A40%20EST", - "expected": { - "date": { - "$gte": "2024-01-01T17:30:40.000Z" - } - } - }, - { - "query": "dateFrom=999999999999999999999999", - "expected": null - }, - { - "query": "dateFrom=2024-02-29", - "expected": { - "date": { - "$gte": "2024-02-29T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2024-02-29%20GMT", - "expected": { - "date": { - "$gte": "2024-02-29T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2024-02-29%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2024-02-28T22:30:00.000Z" - } - } - }, - { - "query": "dateFrom=2024-02-29%20EST", - "expected": { - "date": { - "$gte": "2024-02-29T05:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2024-02-29%20%2B0130", - "expected": null - }, - { - "query": "dateFrom=2024-02-29%2012%3A34", - "expected": { - "date": { - "$gte": "2024-02-29T12:34:00.000Z" - } - } - }, - { - "query": "dateFrom=2024-02-29%2012%3A34%20GMT", - "expected": { - "date": { - "$gte": "2024-02-29T12:34:00.000Z" - } - } - }, - { - "query": "dateFrom=2024-02-29%2012%3A34%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2024-02-29T11:04:00.000Z" - } - } - }, - { - "query": "dateFrom=2024-02-29%2012%3A34%20EST", - "expected": { - "date": { - "$gte": "2024-02-29T17:34:00.000Z" - } - } - }, - { - "query": "dateFrom=2024-02-29%2012%3A34%20%2B0130", - "expected": { - "date": { - "$gte": "2024-02-29T11:04:00.000Z" - } - } - }, - { - "query": "dateFrom=2024-02-29%2012%3A34%3A56.000123", - "expected": { - "date": { - "$gte": "2024-02-29T12:34:56.000Z" - } - } - }, - { - "query": "dateFrom=2024-02-29%2012%3A34%3A56.000123%20GMT", - "expected": { - "date": { - "$gte": "2024-02-29T12:34:56.000Z" - } - } - }, - { - "query": "dateFrom=2024-02-29%2012%3A34%3A56.000123%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2024-02-29T11:04:56.000Z" - } - } - }, - { - "query": "dateFrom=2024-02-29%2012%3A34%3A56.000123%20EST", - "expected": { - "date": { - "$gte": "2024-02-29T17:34:56.000Z" - } - } - }, - { - "query": "dateFrom=2024-02-29%2012%3A34%3A56.000123%20%2B0130", - "expected": { - "date": { - "$gte": "2024-02-29T11:04:56.000Z" - } - } - }, - { - "query": "dateFrom=2024-02-29%2012%3A34%3A56.999999999999", - "expected": { - "date": { - "$gte": "2024-02-29T12:34:56.999Z" - } - } - }, - { - "query": "dateFrom=2024-02-29%2012%3A34%3A56.999999999999%20GMT", - "expected": { - "date": { - "$gte": "2024-02-29T12:34:56.999Z" - } - } - }, - { - "query": "dateFrom=2024-02-29%2012%3A34%3A56.999999999999%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2024-02-29T11:04:56.999Z" - } - } - }, - { - "query": "dateFrom=2024-02-29%2012%3A34%3A56.999999999999%20EST", - "expected": { - "date": { - "$gte": "2024-02-29T17:34:56.999Z" - } - } - }, - { - "query": "dateFrom=2024-02-29%2012%3A34%3A56.999999999999%20%2B0130", - "expected": { - "date": { - "$gte": "2024-02-29T11:04:56.999Z" - } - } - }, - { - "query": "dateFrom=2024-02-29%2024%3A00", - "expected": { - "date": { - "$gte": "2024-03-01T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2024-02-29%2024%3A00%20GMT", - "expected": { - "date": { - "$gte": "2024-03-01T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2024-02-29%2024%3A00%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2024-02-29T22:30:00.000Z" - } - } - }, - { - "query": "dateFrom=2024-02-29%2024%3A00%20EST", - "expected": { - "date": { - "$gte": "2024-03-01T05:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2024-02-29%2024%3A00%20%2B0130", - "expected": { - "date": { - "$gte": "2024-02-29T22:30:00.000Z" - } - } - }, - { - "query": "dateFrom=2024-02-29%2012%3A00%20AM", - "expected": { - "date": { - "$gte": "2024-02-29T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2024-02-29%2012%3A00%20AM%20GMT", - "expected": { - "date": { - "$gte": "2024-02-29T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2024-02-29%2012%3A00%20AM%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2024-02-28T22:30:00.000Z" - } - } - }, - { - "query": "dateFrom=2024-02-29%2012%3A00%20AM%20EST", - "expected": { - "date": { - "$gte": "2024-02-29T05:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2024-02-29%2012%3A00%20AM%20%2B0130", - "expected": { - "date": { - "$gte": "2024-02-28T22:30:00.000Z" - } - } - }, - { - "query": "dateFrom=2024-02-29%2012%3A00%20PM", - "expected": { - "date": { - "$gte": "2024-02-29T12:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2024-02-29%2012%3A00%20PM%20GMT", - "expected": { - "date": { - "$gte": "2024-02-29T12:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2024-02-29%2012%3A00%20PM%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2024-02-29T10:30:00.000Z" - } - } - }, - { - "query": "dateFrom=2024-02-29%2012%3A00%20PM%20EST", - "expected": { - "date": { - "$gte": "2024-02-29T17:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2024-02-29%2012%3A00%20PM%20%2B0130", - "expected": { - "date": { - "$gte": "2024-02-29T10:30:00.000Z" - } - } - }, - { - "query": "dateFrom=2024-02-29%200%3A00%20PM", - "expected": { - "date": { - "$gte": "2024-02-29T12:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2024-02-29%200%3A00%20PM%20GMT", - "expected": { - "date": { - "$gte": "2024-02-29T12:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2024-02-29%200%3A00%20PM%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2024-02-29T10:30:00.000Z" - } - } - }, - { - "query": "dateFrom=2024-02-29%200%3A00%20PM%20EST", - "expected": { - "date": { - "$gte": "2024-02-29T17:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2024-02-29%200%3A00%20PM%20%2B0130", - "expected": { - "date": { - "$gte": "2024-02-29T10:30:00.000Z" - } - } - }, - { - "query": "dateFrom=2024-02-29%2013%3A00%20PM", - "expected": null - }, - { - "query": "dateFrom=2024-02-29%2013%3A00%20PM%20GMT", - "expected": null - }, - { - "query": "dateFrom=2024-02-29%2013%3A00%20PM%20UTC%2B01%3A30", - "expected": null - }, - { - "query": "dateFrom=2024-02-29%2013%3A00%20PM%20EST", - "expected": null - }, - { - "query": "dateFrom=2024-02-29%2013%3A00%20PM%20%2B0130", - "expected": null - }, - { - "query": "dateFrom=2023-02-30", - "expected": { - "date": { - "$gte": "2023-03-02T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2023-02-30%20GMT", - "expected": { - "date": { - "$gte": "2023-03-02T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2023-02-30%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2023-03-01T22:30:00.000Z" - } - } - }, - { - "query": "dateFrom=2023-02-30%20EST", - "expected": { - "date": { - "$gte": "2023-03-02T05:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2023-02-30%20%2B0130", - "expected": null - }, - { - "query": "dateFrom=2023-02-30%2012%3A34", - "expected": { - "date": { - "$gte": "2023-03-02T12:34:00.000Z" - } - } - }, - { - "query": "dateFrom=2023-02-30%2012%3A34%20GMT", - "expected": { - "date": { - "$gte": "2023-03-02T12:34:00.000Z" - } - } - }, - { - "query": "dateFrom=2023-02-30%2012%3A34%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2023-03-02T11:04:00.000Z" - } - } - }, - { - "query": "dateFrom=2023-02-30%2012%3A34%20EST", - "expected": { - "date": { - "$gte": "2023-03-02T17:34:00.000Z" - } - } - }, - { - "query": "dateFrom=2023-02-30%2012%3A34%20%2B0130", - "expected": { - "date": { - "$gte": "2023-03-02T11:04:00.000Z" - } - } - }, - { - "query": "dateFrom=2023-02-30%2012%3A34%3A56.000123", - "expected": { - "date": { - "$gte": "2023-03-02T12:34:56.000Z" - } - } - }, - { - "query": "dateFrom=2023-02-30%2012%3A34%3A56.000123%20GMT", - "expected": { - "date": { - "$gte": "2023-03-02T12:34:56.000Z" - } - } - }, - { - "query": "dateFrom=2023-02-30%2012%3A34%3A56.000123%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2023-03-02T11:04:56.000Z" - } - } - }, - { - "query": "dateFrom=2023-02-30%2012%3A34%3A56.000123%20EST", - "expected": { - "date": { - "$gte": "2023-03-02T17:34:56.000Z" - } - } - }, - { - "query": "dateFrom=2023-02-30%2012%3A34%3A56.000123%20%2B0130", - "expected": { - "date": { - "$gte": "2023-03-02T11:04:56.000Z" - } - } - }, - { - "query": "dateFrom=2023-02-30%2012%3A34%3A56.999999999999", - "expected": { - "date": { - "$gte": "2023-03-02T12:34:56.999Z" - } - } - }, - { - "query": "dateFrom=2023-02-30%2012%3A34%3A56.999999999999%20GMT", - "expected": { - "date": { - "$gte": "2023-03-02T12:34:56.999Z" - } - } - }, - { - "query": "dateFrom=2023-02-30%2012%3A34%3A56.999999999999%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2023-03-02T11:04:56.999Z" - } - } - }, - { - "query": "dateFrom=2023-02-30%2012%3A34%3A56.999999999999%20EST", - "expected": { - "date": { - "$gte": "2023-03-02T17:34:56.999Z" - } - } - }, - { - "query": "dateFrom=2023-02-30%2012%3A34%3A56.999999999999%20%2B0130", - "expected": { - "date": { - "$gte": "2023-03-02T11:04:56.999Z" - } - } - }, - { - "query": "dateFrom=2023-02-30%2024%3A00", - "expected": { - "date": { - "$gte": "2023-03-03T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2023-02-30%2024%3A00%20GMT", - "expected": { - "date": { - "$gte": "2023-03-03T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2023-02-30%2024%3A00%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2023-03-02T22:30:00.000Z" - } - } - }, - { - "query": "dateFrom=2023-02-30%2024%3A00%20EST", - "expected": { - "date": { - "$gte": "2023-03-03T05:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2023-02-30%2024%3A00%20%2B0130", - "expected": { - "date": { - "$gte": "2023-03-02T22:30:00.000Z" - } - } - }, - { - "query": "dateFrom=2023-02-30%2012%3A00%20AM", - "expected": { - "date": { - "$gte": "2023-03-02T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2023-02-30%2012%3A00%20AM%20GMT", - "expected": { - "date": { - "$gte": "2023-03-02T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2023-02-30%2012%3A00%20AM%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2023-03-01T22:30:00.000Z" - } - } - }, - { - "query": "dateFrom=2023-02-30%2012%3A00%20AM%20EST", - "expected": { - "date": { - "$gte": "2023-03-02T05:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2023-02-30%2012%3A00%20AM%20%2B0130", - "expected": { - "date": { - "$gte": "2023-03-01T22:30:00.000Z" - } - } - }, - { - "query": "dateFrom=2023-02-30%2012%3A00%20PM", - "expected": { - "date": { - "$gte": "2023-03-02T12:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2023-02-30%2012%3A00%20PM%20GMT", - "expected": { - "date": { - "$gte": "2023-03-02T12:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2023-02-30%2012%3A00%20PM%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2023-03-02T10:30:00.000Z" - } - } - }, - { - "query": "dateFrom=2023-02-30%2012%3A00%20PM%20EST", - "expected": { - "date": { - "$gte": "2023-03-02T17:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2023-02-30%2012%3A00%20PM%20%2B0130", - "expected": { - "date": { - "$gte": "2023-03-02T10:30:00.000Z" - } - } - }, - { - "query": "dateFrom=2023-02-30%200%3A00%20PM", - "expected": { - "date": { - "$gte": "2023-03-02T12:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2023-02-30%200%3A00%20PM%20GMT", - "expected": { - "date": { - "$gte": "2023-03-02T12:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2023-02-30%200%3A00%20PM%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2023-03-02T10:30:00.000Z" - } - } - }, - { - "query": "dateFrom=2023-02-30%200%3A00%20PM%20EST", - "expected": { - "date": { - "$gte": "2023-03-02T17:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2023-02-30%200%3A00%20PM%20%2B0130", - "expected": { - "date": { - "$gte": "2023-03-02T10:30:00.000Z" - } - } - }, - { - "query": "dateFrom=2023-02-30%2013%3A00%20PM", - "expected": null - }, - { - "query": "dateFrom=2023-02-30%2013%3A00%20PM%20GMT", - "expected": null - }, - { - "query": "dateFrom=2023-02-30%2013%3A00%20PM%20UTC%2B01%3A30", - "expected": null - }, - { - "query": "dateFrom=2023-02-30%2013%3A00%20PM%20EST", - "expected": null - }, - { - "query": "dateFrom=2023-02-30%2013%3A00%20PM%20%2B0130", - "expected": null - }, - { - "query": "dateFrom=0001-01-01", - "expected": { - "date": { - "$gte": "0001-01-01T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=0001-01-01%20GMT", - "expected": { - "date": { - "$gte": "2001-01-01T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=0001-01-01%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2000-12-31T22:30:00.000Z" - } - } - }, - { - "query": "dateFrom=0001-01-01%20EST", - "expected": { - "date": { - "$gte": "2001-01-01T05:00:00.000Z" - } - } - }, - { - "query": "dateFrom=0001-01-01%20%2B0130", - "expected": null - }, - { - "query": "dateFrom=0001-01-01%2012%3A34", - "expected": { - "date": { - "$gte": "2001-01-01T12:34:00.000Z" - } - } - }, - { - "query": "dateFrom=0001-01-01%2012%3A34%20GMT", - "expected": { - "date": { - "$gte": "2001-01-01T12:34:00.000Z" - } - } - }, - { - "query": "dateFrom=0001-01-01%2012%3A34%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2001-01-01T11:04:00.000Z" - } - } - }, - { - "query": "dateFrom=0001-01-01%2012%3A34%20EST", - "expected": { - "date": { - "$gte": "2001-01-01T17:34:00.000Z" - } - } - }, - { - "query": "dateFrom=0001-01-01%2012%3A34%20%2B0130", - "expected": { - "date": { - "$gte": "2001-01-01T11:04:00.000Z" - } - } - }, - { - "query": "dateFrom=0001-01-01%2012%3A34%3A56.000123", - "expected": { - "date": { - "$gte": "2001-01-01T12:34:56.000Z" - } - } - }, - { - "query": "dateFrom=0001-01-01%2012%3A34%3A56.000123%20GMT", - "expected": { - "date": { - "$gte": "2001-01-01T12:34:56.000Z" - } - } - }, - { - "query": "dateFrom=0001-01-01%2012%3A34%3A56.000123%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2001-01-01T11:04:56.000Z" - } - } - }, - { - "query": "dateFrom=0001-01-01%2012%3A34%3A56.000123%20EST", - "expected": { - "date": { - "$gte": "2001-01-01T17:34:56.000Z" - } - } - }, - { - "query": "dateFrom=0001-01-01%2012%3A34%3A56.000123%20%2B0130", - "expected": { - "date": { - "$gte": "2001-01-01T11:04:56.000Z" - } - } - }, - { - "query": "dateFrom=0001-01-01%2012%3A34%3A56.999999999999", - "expected": { - "date": { - "$gte": "2001-01-01T12:34:56.999Z" - } - } - }, - { - "query": "dateFrom=0001-01-01%2012%3A34%3A56.999999999999%20GMT", - "expected": { - "date": { - "$gte": "2001-01-01T12:34:56.999Z" - } - } - }, - { - "query": "dateFrom=0001-01-01%2012%3A34%3A56.999999999999%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2001-01-01T11:04:56.999Z" - } - } - }, - { - "query": "dateFrom=0001-01-01%2012%3A34%3A56.999999999999%20EST", - "expected": { - "date": { - "$gte": "2001-01-01T17:34:56.999Z" - } - } - }, - { - "query": "dateFrom=0001-01-01%2012%3A34%3A56.999999999999%20%2B0130", - "expected": { - "date": { - "$gte": "2001-01-01T11:04:56.999Z" - } - } - }, - { - "query": "dateFrom=0001-01-01%2024%3A00", - "expected": { - "date": { - "$gte": "2001-01-02T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=0001-01-01%2024%3A00%20GMT", - "expected": { - "date": { - "$gte": "2001-01-02T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=0001-01-01%2024%3A00%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2001-01-01T22:30:00.000Z" - } - } - }, - { - "query": "dateFrom=0001-01-01%2024%3A00%20EST", - "expected": { - "date": { - "$gte": "2001-01-02T05:00:00.000Z" - } - } - }, - { - "query": "dateFrom=0001-01-01%2024%3A00%20%2B0130", - "expected": { - "date": { - "$gte": "2001-01-01T22:30:00.000Z" - } - } - }, - { - "query": "dateFrom=0001-01-01%2012%3A00%20AM", - "expected": { - "date": { - "$gte": "2001-01-01T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=0001-01-01%2012%3A00%20AM%20GMT", - "expected": { - "date": { - "$gte": "2001-01-01T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=0001-01-01%2012%3A00%20AM%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2000-12-31T22:30:00.000Z" - } - } - }, - { - "query": "dateFrom=0001-01-01%2012%3A00%20AM%20EST", - "expected": { - "date": { - "$gte": "2001-01-01T05:00:00.000Z" - } - } - }, - { - "query": "dateFrom=0001-01-01%2012%3A00%20AM%20%2B0130", - "expected": { - "date": { - "$gte": "2000-12-31T22:30:00.000Z" - } - } - }, - { - "query": "dateFrom=0001-01-01%2012%3A00%20PM", - "expected": { - "date": { - "$gte": "2001-01-01T12:00:00.000Z" - } - } - }, - { - "query": "dateFrom=0001-01-01%2012%3A00%20PM%20GMT", - "expected": { - "date": { - "$gte": "2001-01-01T12:00:00.000Z" - } - } - }, - { - "query": "dateFrom=0001-01-01%2012%3A00%20PM%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2001-01-01T10:30:00.000Z" - } - } - }, - { - "query": "dateFrom=0001-01-01%2012%3A00%20PM%20EST", - "expected": { - "date": { - "$gte": "2001-01-01T17:00:00.000Z" - } - } - }, - { - "query": "dateFrom=0001-01-01%2012%3A00%20PM%20%2B0130", - "expected": { - "date": { - "$gte": "2001-01-01T10:30:00.000Z" - } - } - }, - { - "query": "dateFrom=0001-01-01%200%3A00%20PM", - "expected": { - "date": { - "$gte": "2001-01-01T12:00:00.000Z" - } - } - }, - { - "query": "dateFrom=0001-01-01%200%3A00%20PM%20GMT", - "expected": { - "date": { - "$gte": "2001-01-01T12:00:00.000Z" - } - } - }, - { - "query": "dateFrom=0001-01-01%200%3A00%20PM%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2001-01-01T10:30:00.000Z" - } - } - }, - { - "query": "dateFrom=0001-01-01%200%3A00%20PM%20EST", - "expected": { - "date": { - "$gte": "2001-01-01T17:00:00.000Z" - } - } - }, - { - "query": "dateFrom=0001-01-01%200%3A00%20PM%20%2B0130", - "expected": { - "date": { - "$gte": "2001-01-01T10:30:00.000Z" - } - } - }, - { - "query": "dateFrom=0001-01-01%2013%3A00%20PM", - "expected": null - }, - { - "query": "dateFrom=0001-01-01%2013%3A00%20PM%20GMT", - "expected": null - }, - { - "query": "dateFrom=0001-01-01%2013%3A00%20PM%20UTC%2B01%3A30", - "expected": null - }, - { - "query": "dateFrom=0001-01-01%2013%3A00%20PM%20EST", - "expected": null - }, - { - "query": "dateFrom=0001-01-01%2013%3A00%20PM%20%2B0130", - "expected": null - }, - { - "query": "dateFrom=-000000-02-03", - "expected": { - "date": { - "$gte": "2001-02-03T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=-000000-02-03%20GMT", - "expected": { - "date": { - "$gte": "2001-02-03T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=-000000-02-03%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2001-02-02T22:30:00.000Z" - } - } - }, - { - "query": "dateFrom=-000000-02-03%20EST", - "expected": { - "date": { - "$gte": "2001-02-03T05:00:00.000Z" - } - } - }, - { - "query": "dateFrom=-000000-02-03%20%2B0130", - "expected": null - }, - { - "query": "dateFrom=-000000-02-03%2012%3A34", - "expected": { - "date": { - "$gte": "2001-02-03T12:34:00.000Z" - } - } - }, - { - "query": "dateFrom=-000000-02-03%2012%3A34%20GMT", - "expected": { - "date": { - "$gte": "2001-02-03T12:34:00.000Z" - } - } - }, - { - "query": "dateFrom=-000000-02-03%2012%3A34%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2001-02-03T11:04:00.000Z" - } - } - }, - { - "query": "dateFrom=-000000-02-03%2012%3A34%20EST", - "expected": { - "date": { - "$gte": "2001-02-03T17:34:00.000Z" - } - } - }, - { - "query": "dateFrom=-000000-02-03%2012%3A34%20%2B0130", - "expected": { - "date": { - "$gte": "2001-02-03T11:04:00.000Z" - } - } - }, - { - "query": "dateFrom=-000000-02-03%2012%3A34%3A56.000123", - "expected": { - "date": { - "$gte": "2001-02-03T12:34:56.000Z" - } - } - }, - { - "query": "dateFrom=-000000-02-03%2012%3A34%3A56.000123%20GMT", - "expected": { - "date": { - "$gte": "2001-02-03T12:34:56.000Z" - } - } - }, - { - "query": "dateFrom=-000000-02-03%2012%3A34%3A56.000123%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2001-02-03T11:04:56.000Z" - } - } - }, - { - "query": "dateFrom=-000000-02-03%2012%3A34%3A56.000123%20EST", - "expected": { - "date": { - "$gte": "2001-02-03T17:34:56.000Z" - } - } - }, - { - "query": "dateFrom=-000000-02-03%2012%3A34%3A56.000123%20%2B0130", - "expected": { - "date": { - "$gte": "2001-02-03T11:04:56.000Z" - } - } - }, - { - "query": "dateFrom=-000000-02-03%2012%3A34%3A56.999999999999", - "expected": { - "date": { - "$gte": "2001-02-03T12:34:56.999Z" - } - } - }, - { - "query": "dateFrom=-000000-02-03%2012%3A34%3A56.999999999999%20GMT", - "expected": { - "date": { - "$gte": "2001-02-03T12:34:56.999Z" - } - } - }, - { - "query": "dateFrom=-000000-02-03%2012%3A34%3A56.999999999999%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2001-02-03T11:04:56.999Z" - } - } - }, - { - "query": "dateFrom=-000000-02-03%2012%3A34%3A56.999999999999%20EST", - "expected": { - "date": { - "$gte": "2001-02-03T17:34:56.999Z" - } - } - }, - { - "query": "dateFrom=-000000-02-03%2012%3A34%3A56.999999999999%20%2B0130", - "expected": { - "date": { - "$gte": "2001-02-03T11:04:56.999Z" - } - } - }, - { - "query": "dateFrom=-000000-02-03%2024%3A00", - "expected": { - "date": { - "$gte": "2001-02-04T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=-000000-02-03%2024%3A00%20GMT", - "expected": { - "date": { - "$gte": "2001-02-04T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=-000000-02-03%2024%3A00%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2001-02-03T22:30:00.000Z" - } - } - }, - { - "query": "dateFrom=-000000-02-03%2024%3A00%20EST", - "expected": { - "date": { - "$gte": "2001-02-04T05:00:00.000Z" - } - } - }, - { - "query": "dateFrom=-000000-02-03%2024%3A00%20%2B0130", - "expected": { - "date": { - "$gte": "2001-02-03T22:30:00.000Z" - } - } - }, - { - "query": "dateFrom=-000000-02-03%2012%3A00%20AM", - "expected": { - "date": { - "$gte": "2001-02-03T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=-000000-02-03%2012%3A00%20AM%20GMT", - "expected": { - "date": { - "$gte": "2001-02-03T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=-000000-02-03%2012%3A00%20AM%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2001-02-02T22:30:00.000Z" - } - } - }, - { - "query": "dateFrom=-000000-02-03%2012%3A00%20AM%20EST", - "expected": { - "date": { - "$gte": "2001-02-03T05:00:00.000Z" - } - } - }, - { - "query": "dateFrom=-000000-02-03%2012%3A00%20AM%20%2B0130", - "expected": { - "date": { - "$gte": "2001-02-02T22:30:00.000Z" - } - } - }, - { - "query": "dateFrom=-000000-02-03%2012%3A00%20PM", - "expected": { - "date": { - "$gte": "2001-02-03T12:00:00.000Z" - } - } - }, - { - "query": "dateFrom=-000000-02-03%2012%3A00%20PM%20GMT", - "expected": { - "date": { - "$gte": "2001-02-03T12:00:00.000Z" - } - } - }, - { - "query": "dateFrom=-000000-02-03%2012%3A00%20PM%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2001-02-03T10:30:00.000Z" - } - } - }, - { - "query": "dateFrom=-000000-02-03%2012%3A00%20PM%20EST", - "expected": { - "date": { - "$gte": "2001-02-03T17:00:00.000Z" - } - } - }, - { - "query": "dateFrom=-000000-02-03%2012%3A00%20PM%20%2B0130", - "expected": { - "date": { - "$gte": "2001-02-03T10:30:00.000Z" - } - } - }, - { - "query": "dateFrom=-000000-02-03%200%3A00%20PM", - "expected": { - "date": { - "$gte": "2001-02-03T12:00:00.000Z" - } - } - }, - { - "query": "dateFrom=-000000-02-03%200%3A00%20PM%20GMT", - "expected": { - "date": { - "$gte": "2001-02-03T12:00:00.000Z" - } - } - }, - { - "query": "dateFrom=-000000-02-03%200%3A00%20PM%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2001-02-03T10:30:00.000Z" - } - } - }, - { - "query": "dateFrom=-000000-02-03%200%3A00%20PM%20EST", - "expected": { - "date": { - "$gte": "2001-02-03T17:00:00.000Z" - } - } - }, - { - "query": "dateFrom=-000000-02-03%200%3A00%20PM%20%2B0130", - "expected": { - "date": { - "$gte": "2001-02-03T10:30:00.000Z" - } - } - }, - { - "query": "dateFrom=-000000-02-03%2013%3A00%20PM", - "expected": null - }, - { - "query": "dateFrom=-000000-02-03%2013%3A00%20PM%20GMT", - "expected": null - }, - { - "query": "dateFrom=-000000-02-03%2013%3A00%20PM%20UTC%2B01%3A30", - "expected": null - }, - { - "query": "dateFrom=-000000-02-03%2013%3A00%20PM%20EST", - "expected": null - }, - { - "query": "dateFrom=-000000-02-03%2013%3A00%20PM%20%2B0130", - "expected": null - }, - { - "query": "dateFrom=01%2F02%2F03", - "expected": { - "date": { - "$gte": "2003-01-02T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=01%2F02%2F03%20GMT", - "expected": { - "date": { - "$gte": "2003-01-02T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=01%2F02%2F03%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2003-01-01T22:30:00.000Z" - } - } - }, - { - "query": "dateFrom=01%2F02%2F03%20EST", - "expected": { - "date": { - "$gte": "2003-01-02T05:00:00.000Z" - } - } - }, - { - "query": "dateFrom=01%2F02%2F03%20%2B0130", - "expected": null - }, - { - "query": "dateFrom=01%2F02%2F03%2012%3A34", - "expected": { - "date": { - "$gte": "2003-01-02T12:34:00.000Z" - } - } - }, - { - "query": "dateFrom=01%2F02%2F03%2012%3A34%20GMT", - "expected": { - "date": { - "$gte": "2003-01-02T12:34:00.000Z" - } - } - }, - { - "query": "dateFrom=01%2F02%2F03%2012%3A34%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2003-01-02T11:04:00.000Z" - } - } - }, - { - "query": "dateFrom=01%2F02%2F03%2012%3A34%20EST", - "expected": { - "date": { - "$gte": "2003-01-02T17:34:00.000Z" - } - } - }, - { - "query": "dateFrom=01%2F02%2F03%2012%3A34%20%2B0130", - "expected": { - "date": { - "$gte": "2003-01-02T11:04:00.000Z" - } - } - }, - { - "query": "dateFrom=01%2F02%2F03%2012%3A34%3A56.000123", - "expected": { - "date": { - "$gte": "2003-01-02T12:34:56.000Z" - } - } - }, - { - "query": "dateFrom=01%2F02%2F03%2012%3A34%3A56.000123%20GMT", - "expected": { - "date": { - "$gte": "2003-01-02T12:34:56.000Z" - } - } - }, - { - "query": "dateFrom=01%2F02%2F03%2012%3A34%3A56.000123%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2003-01-02T11:04:56.000Z" - } - } - }, - { - "query": "dateFrom=01%2F02%2F03%2012%3A34%3A56.000123%20EST", - "expected": { - "date": { - "$gte": "2003-01-02T17:34:56.000Z" - } - } - }, - { - "query": "dateFrom=01%2F02%2F03%2012%3A34%3A56.000123%20%2B0130", - "expected": { - "date": { - "$gte": "2003-01-02T11:04:56.000Z" - } - } - }, - { - "query": "dateFrom=01%2F02%2F03%2012%3A34%3A56.999999999999", - "expected": { - "date": { - "$gte": "2003-01-02T12:34:56.999Z" - } - } - }, - { - "query": "dateFrom=01%2F02%2F03%2012%3A34%3A56.999999999999%20GMT", - "expected": { - "date": { - "$gte": "2003-01-02T12:34:56.999Z" - } - } - }, - { - "query": "dateFrom=01%2F02%2F03%2012%3A34%3A56.999999999999%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2003-01-02T11:04:56.999Z" - } - } - }, - { - "query": "dateFrom=01%2F02%2F03%2012%3A34%3A56.999999999999%20EST", - "expected": { - "date": { - "$gte": "2003-01-02T17:34:56.999Z" - } - } - }, - { - "query": "dateFrom=01%2F02%2F03%2012%3A34%3A56.999999999999%20%2B0130", - "expected": { - "date": { - "$gte": "2003-01-02T11:04:56.999Z" - } - } - }, - { - "query": "dateFrom=01%2F02%2F03%2024%3A00", - "expected": { - "date": { - "$gte": "2003-01-03T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=01%2F02%2F03%2024%3A00%20GMT", - "expected": { - "date": { - "$gte": "2003-01-03T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=01%2F02%2F03%2024%3A00%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2003-01-02T22:30:00.000Z" - } - } - }, - { - "query": "dateFrom=01%2F02%2F03%2024%3A00%20EST", - "expected": { - "date": { - "$gte": "2003-01-03T05:00:00.000Z" - } - } - }, - { - "query": "dateFrom=01%2F02%2F03%2024%3A00%20%2B0130", - "expected": { - "date": { - "$gte": "2003-01-02T22:30:00.000Z" - } - } - }, - { - "query": "dateFrom=01%2F02%2F03%2012%3A00%20AM", - "expected": { - "date": { - "$gte": "2003-01-02T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=01%2F02%2F03%2012%3A00%20AM%20GMT", - "expected": { - "date": { - "$gte": "2003-01-02T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=01%2F02%2F03%2012%3A00%20AM%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2003-01-01T22:30:00.000Z" - } - } - }, - { - "query": "dateFrom=01%2F02%2F03%2012%3A00%20AM%20EST", - "expected": { - "date": { - "$gte": "2003-01-02T05:00:00.000Z" - } - } - }, - { - "query": "dateFrom=01%2F02%2F03%2012%3A00%20AM%20%2B0130", - "expected": { - "date": { - "$gte": "2003-01-01T22:30:00.000Z" - } - } - }, - { - "query": "dateFrom=01%2F02%2F03%2012%3A00%20PM", - "expected": { - "date": { - "$gte": "2003-01-02T12:00:00.000Z" - } - } - }, - { - "query": "dateFrom=01%2F02%2F03%2012%3A00%20PM%20GMT", - "expected": { - "date": { - "$gte": "2003-01-02T12:00:00.000Z" - } - } - }, - { - "query": "dateFrom=01%2F02%2F03%2012%3A00%20PM%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2003-01-02T10:30:00.000Z" - } - } - }, - { - "query": "dateFrom=01%2F02%2F03%2012%3A00%20PM%20EST", - "expected": { - "date": { - "$gte": "2003-01-02T17:00:00.000Z" - } - } - }, - { - "query": "dateFrom=01%2F02%2F03%2012%3A00%20PM%20%2B0130", - "expected": { - "date": { - "$gte": "2003-01-02T10:30:00.000Z" - } - } - }, - { - "query": "dateFrom=01%2F02%2F03%200%3A00%20PM", - "expected": { - "date": { - "$gte": "2003-01-02T12:00:00.000Z" - } - } - }, - { - "query": "dateFrom=01%2F02%2F03%200%3A00%20PM%20GMT", - "expected": { - "date": { - "$gte": "2003-01-02T12:00:00.000Z" - } - } - }, - { - "query": "dateFrom=01%2F02%2F03%200%3A00%20PM%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2003-01-02T10:30:00.000Z" - } - } - }, - { - "query": "dateFrom=01%2F02%2F03%200%3A00%20PM%20EST", - "expected": { - "date": { - "$gte": "2003-01-02T17:00:00.000Z" - } - } - }, - { - "query": "dateFrom=01%2F02%2F03%200%3A00%20PM%20%2B0130", - "expected": { - "date": { - "$gte": "2003-01-02T10:30:00.000Z" - } - } - }, - { - "query": "dateFrom=01%2F02%2F03%2013%3A00%20PM", - "expected": null - }, - { - "query": "dateFrom=01%2F02%2F03%2013%3A00%20PM%20GMT", - "expected": null - }, - { - "query": "dateFrom=01%2F02%2F03%2013%3A00%20PM%20UTC%2B01%3A30", - "expected": null - }, - { - "query": "dateFrom=01%2F02%2F03%2013%3A00%20PM%20EST", - "expected": null - }, - { - "query": "dateFrom=01%2F02%2F03%2013%3A00%20PM%20%2B0130", - "expected": null - }, - { - "query": "dateFrom=32%2F01%2F02", - "expected": { - "date": { - "$gte": "2032-01-02T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=32%2F01%2F02%20GMT", - "expected": { - "date": { - "$gte": "2032-01-02T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=32%2F01%2F02%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2032-01-01T22:30:00.000Z" - } - } - }, - { - "query": "dateFrom=32%2F01%2F02%20EST", - "expected": { - "date": { - "$gte": "2032-01-02T05:00:00.000Z" - } - } - }, - { - "query": "dateFrom=32%2F01%2F02%20%2B0130", - "expected": null - }, - { - "query": "dateFrom=32%2F01%2F02%2012%3A34", - "expected": { - "date": { - "$gte": "2032-01-02T12:34:00.000Z" - } - } - }, - { - "query": "dateFrom=32%2F01%2F02%2012%3A34%20GMT", - "expected": { - "date": { - "$gte": "2032-01-02T12:34:00.000Z" - } - } - }, - { - "query": "dateFrom=32%2F01%2F02%2012%3A34%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2032-01-02T11:04:00.000Z" - } - } - }, - { - "query": "dateFrom=32%2F01%2F02%2012%3A34%20EST", - "expected": { - "date": { - "$gte": "2032-01-02T17:34:00.000Z" - } - } - }, - { - "query": "dateFrom=32%2F01%2F02%2012%3A34%20%2B0130", - "expected": { - "date": { - "$gte": "2032-01-02T11:04:00.000Z" - } - } - }, - { - "query": "dateFrom=32%2F01%2F02%2012%3A34%3A56.000123", - "expected": { - "date": { - "$gte": "2032-01-02T12:34:56.000Z" - } - } - }, - { - "query": "dateFrom=32%2F01%2F02%2012%3A34%3A56.000123%20GMT", - "expected": { - "date": { - "$gte": "2032-01-02T12:34:56.000Z" - } - } - }, - { - "query": "dateFrom=32%2F01%2F02%2012%3A34%3A56.000123%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2032-01-02T11:04:56.000Z" - } - } - }, - { - "query": "dateFrom=32%2F01%2F02%2012%3A34%3A56.000123%20EST", - "expected": { - "date": { - "$gte": "2032-01-02T17:34:56.000Z" - } - } - }, - { - "query": "dateFrom=32%2F01%2F02%2012%3A34%3A56.000123%20%2B0130", - "expected": { - "date": { - "$gte": "2032-01-02T11:04:56.000Z" - } - } - }, - { - "query": "dateFrom=32%2F01%2F02%2012%3A34%3A56.999999999999", - "expected": { - "date": { - "$gte": "2032-01-02T12:34:56.999Z" - } - } - }, - { - "query": "dateFrom=32%2F01%2F02%2012%3A34%3A56.999999999999%20GMT", - "expected": { - "date": { - "$gte": "2032-01-02T12:34:56.999Z" - } - } - }, - { - "query": "dateFrom=32%2F01%2F02%2012%3A34%3A56.999999999999%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2032-01-02T11:04:56.999Z" - } - } - }, - { - "query": "dateFrom=32%2F01%2F02%2012%3A34%3A56.999999999999%20EST", - "expected": { - "date": { - "$gte": "2032-01-02T17:34:56.999Z" - } - } - }, - { - "query": "dateFrom=32%2F01%2F02%2012%3A34%3A56.999999999999%20%2B0130", - "expected": { - "date": { - "$gte": "2032-01-02T11:04:56.999Z" - } - } - }, - { - "query": "dateFrom=32%2F01%2F02%2024%3A00", - "expected": { - "date": { - "$gte": "2032-01-03T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=32%2F01%2F02%2024%3A00%20GMT", - "expected": { - "date": { - "$gte": "2032-01-03T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=32%2F01%2F02%2024%3A00%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2032-01-02T22:30:00.000Z" - } - } - }, - { - "query": "dateFrom=32%2F01%2F02%2024%3A00%20EST", - "expected": { - "date": { - "$gte": "2032-01-03T05:00:00.000Z" - } - } - }, - { - "query": "dateFrom=32%2F01%2F02%2024%3A00%20%2B0130", - "expected": { - "date": { - "$gte": "2032-01-02T22:30:00.000Z" - } - } - }, - { - "query": "dateFrom=32%2F01%2F02%2012%3A00%20AM", - "expected": { - "date": { - "$gte": "2032-01-02T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=32%2F01%2F02%2012%3A00%20AM%20GMT", - "expected": { - "date": { - "$gte": "2032-01-02T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=32%2F01%2F02%2012%3A00%20AM%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2032-01-01T22:30:00.000Z" - } - } - }, - { - "query": "dateFrom=32%2F01%2F02%2012%3A00%20AM%20EST", - "expected": { - "date": { - "$gte": "2032-01-02T05:00:00.000Z" - } - } - }, - { - "query": "dateFrom=32%2F01%2F02%2012%3A00%20AM%20%2B0130", - "expected": { - "date": { - "$gte": "2032-01-01T22:30:00.000Z" - } - } - }, - { - "query": "dateFrom=32%2F01%2F02%2012%3A00%20PM", - "expected": { - "date": { - "$gte": "2032-01-02T12:00:00.000Z" - } - } - }, - { - "query": "dateFrom=32%2F01%2F02%2012%3A00%20PM%20GMT", - "expected": { - "date": { - "$gte": "2032-01-02T12:00:00.000Z" - } - } - }, - { - "query": "dateFrom=32%2F01%2F02%2012%3A00%20PM%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2032-01-02T10:30:00.000Z" - } - } - }, - { - "query": "dateFrom=32%2F01%2F02%2012%3A00%20PM%20EST", - "expected": { - "date": { - "$gte": "2032-01-02T17:00:00.000Z" - } - } - }, - { - "query": "dateFrom=32%2F01%2F02%2012%3A00%20PM%20%2B0130", - "expected": { - "date": { - "$gte": "2032-01-02T10:30:00.000Z" - } - } - }, - { - "query": "dateFrom=32%2F01%2F02%200%3A00%20PM", - "expected": { - "date": { - "$gte": "2032-01-02T12:00:00.000Z" - } - } - }, - { - "query": "dateFrom=32%2F01%2F02%200%3A00%20PM%20GMT", - "expected": { - "date": { - "$gte": "2032-01-02T12:00:00.000Z" - } - } - }, - { - "query": "dateFrom=32%2F01%2F02%200%3A00%20PM%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2032-01-02T10:30:00.000Z" - } - } - }, - { - "query": "dateFrom=32%2F01%2F02%200%3A00%20PM%20EST", - "expected": { - "date": { - "$gte": "2032-01-02T17:00:00.000Z" - } - } - }, - { - "query": "dateFrom=32%2F01%2F02%200%3A00%20PM%20%2B0130", - "expected": { - "date": { - "$gte": "2032-01-02T10:30:00.000Z" - } - } - }, - { - "query": "dateFrom=32%2F01%2F02%2013%3A00%20PM", - "expected": null - }, - { - "query": "dateFrom=32%2F01%2F02%2013%3A00%20PM%20GMT", - "expected": null - }, - { - "query": "dateFrom=32%2F01%2F02%2013%3A00%20PM%20UTC%2B01%3A30", - "expected": null - }, - { - "query": "dateFrom=32%2F01%2F02%2013%3A00%20PM%20EST", - "expected": null - }, - { - "query": "dateFrom=32%2F01%2F02%2013%3A00%20PM%20%2B0130", - "expected": null - }, - { - "query": "dateFrom=Jan%205", - "expected": { - "date": { - "$gte": "2001-01-05T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=Jan%205%20GMT", - "expected": { - "date": { - "$gte": "2001-01-05T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=Jan%205%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2001-01-04T22:30:00.000Z" - } - } - }, - { - "query": "dateFrom=Jan%205%20EST", - "expected": { - "date": { - "$gte": "2001-01-05T05:00:00.000Z" - } - } - }, - { - "query": "dateFrom=Jan%205%20%2B0130", - "expected": null - }, - { - "query": "dateFrom=Jan%205%2012%3A34", - "expected": { - "date": { - "$gte": "2001-01-05T12:34:00.000Z" - } - } - }, - { - "query": "dateFrom=Jan%205%2012%3A34%20GMT", - "expected": { - "date": { - "$gte": "2001-01-05T12:34:00.000Z" - } - } - }, - { - "query": "dateFrom=Jan%205%2012%3A34%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2001-01-05T11:04:00.000Z" - } - } - }, - { - "query": "dateFrom=Jan%205%2012%3A34%20EST", - "expected": { - "date": { - "$gte": "2001-01-05T17:34:00.000Z" - } - } - }, - { - "query": "dateFrom=Jan%205%2012%3A34%20%2B0130", - "expected": { - "date": { - "$gte": "2001-01-05T11:04:00.000Z" - } - } - }, - { - "query": "dateFrom=Jan%205%2012%3A34%3A56.000123", - "expected": { - "date": { - "$gte": "2001-01-05T12:34:56.000Z" - } - } - }, - { - "query": "dateFrom=Jan%205%2012%3A34%3A56.000123%20GMT", - "expected": { - "date": { - "$gte": "2001-01-05T12:34:56.000Z" - } - } - }, - { - "query": "dateFrom=Jan%205%2012%3A34%3A56.000123%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2001-01-05T11:04:56.000Z" - } - } - }, - { - "query": "dateFrom=Jan%205%2012%3A34%3A56.000123%20EST", - "expected": { - "date": { - "$gte": "2001-01-05T17:34:56.000Z" - } - } - }, - { - "query": "dateFrom=Jan%205%2012%3A34%3A56.000123%20%2B0130", - "expected": { - "date": { - "$gte": "2001-01-05T11:04:56.000Z" - } - } - }, - { - "query": "dateFrom=Jan%205%2012%3A34%3A56.999999999999", - "expected": { - "date": { - "$gte": "2001-01-05T12:34:56.999Z" - } - } - }, - { - "query": "dateFrom=Jan%205%2012%3A34%3A56.999999999999%20GMT", - "expected": { - "date": { - "$gte": "2001-01-05T12:34:56.999Z" - } - } - }, - { - "query": "dateFrom=Jan%205%2012%3A34%3A56.999999999999%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2001-01-05T11:04:56.999Z" - } - } - }, - { - "query": "dateFrom=Jan%205%2012%3A34%3A56.999999999999%20EST", - "expected": { - "date": { - "$gte": "2001-01-05T17:34:56.999Z" - } - } - }, - { - "query": "dateFrom=Jan%205%2012%3A34%3A56.999999999999%20%2B0130", - "expected": { - "date": { - "$gte": "2001-01-05T11:04:56.999Z" - } - } - }, - { - "query": "dateFrom=Jan%205%2024%3A00", - "expected": { - "date": { - "$gte": "2001-01-06T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=Jan%205%2024%3A00%20GMT", - "expected": { - "date": { - "$gte": "2001-01-06T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=Jan%205%2024%3A00%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2001-01-05T22:30:00.000Z" - } - } - }, - { - "query": "dateFrom=Jan%205%2024%3A00%20EST", - "expected": { - "date": { - "$gte": "2001-01-06T05:00:00.000Z" - } - } - }, - { - "query": "dateFrom=Jan%205%2024%3A00%20%2B0130", - "expected": { - "date": { - "$gte": "2001-01-05T22:30:00.000Z" - } - } - }, - { - "query": "dateFrom=Jan%205%2012%3A00%20AM", - "expected": { - "date": { - "$gte": "2001-01-05T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=Jan%205%2012%3A00%20AM%20GMT", - "expected": { - "date": { - "$gte": "2001-01-05T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=Jan%205%2012%3A00%20AM%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2001-01-04T22:30:00.000Z" - } - } - }, - { - "query": "dateFrom=Jan%205%2012%3A00%20AM%20EST", - "expected": { - "date": { - "$gte": "2001-01-05T05:00:00.000Z" - } - } - }, - { - "query": "dateFrom=Jan%205%2012%3A00%20AM%20%2B0130", - "expected": { - "date": { - "$gte": "2001-01-04T22:30:00.000Z" - } - } - }, - { - "query": "dateFrom=Jan%205%2012%3A00%20PM", - "expected": { - "date": { - "$gte": "2001-01-05T12:00:00.000Z" - } - } - }, - { - "query": "dateFrom=Jan%205%2012%3A00%20PM%20GMT", - "expected": { - "date": { - "$gte": "2001-01-05T12:00:00.000Z" - } - } - }, - { - "query": "dateFrom=Jan%205%2012%3A00%20PM%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2001-01-05T10:30:00.000Z" - } - } - }, - { - "query": "dateFrom=Jan%205%2012%3A00%20PM%20EST", - "expected": { - "date": { - "$gte": "2001-01-05T17:00:00.000Z" - } - } - }, - { - "query": "dateFrom=Jan%205%2012%3A00%20PM%20%2B0130", - "expected": { - "date": { - "$gte": "2001-01-05T10:30:00.000Z" - } - } - }, - { - "query": "dateFrom=Jan%205%200%3A00%20PM", - "expected": { - "date": { - "$gte": "2001-01-05T12:00:00.000Z" - } - } - }, - { - "query": "dateFrom=Jan%205%200%3A00%20PM%20GMT", - "expected": { - "date": { - "$gte": "2001-01-05T12:00:00.000Z" - } - } - }, - { - "query": "dateFrom=Jan%205%200%3A00%20PM%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2001-01-05T10:30:00.000Z" - } - } - }, - { - "query": "dateFrom=Jan%205%200%3A00%20PM%20EST", - "expected": { - "date": { - "$gte": "2001-01-05T17:00:00.000Z" - } - } - }, - { - "query": "dateFrom=Jan%205%200%3A00%20PM%20%2B0130", - "expected": { - "date": { - "$gte": "2001-01-05T10:30:00.000Z" - } - } - }, - { - "query": "dateFrom=Jan%205%2013%3A00%20PM", - "expected": null - }, - { - "query": "dateFrom=Jan%205%2013%3A00%20PM%20GMT", - "expected": null - }, - { - "query": "dateFrom=Jan%205%2013%3A00%20PM%20UTC%2B01%3A30", - "expected": null - }, - { - "query": "dateFrom=Jan%205%2013%3A00%20PM%20EST", - "expected": null - }, - { - "query": "dateFrom=Jan%205%2013%3A00%20PM%20%2B0130", - "expected": null - }, - { - "query": "dateFrom=5%20March%2049", - "expected": { - "date": { - "$gte": "2049-03-05T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=5%20March%2049%20GMT", - "expected": { - "date": { - "$gte": "2049-03-05T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=5%20March%2049%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2049-03-04T22:30:00.000Z" - } - } - }, - { - "query": "dateFrom=5%20March%2049%20EST", - "expected": { - "date": { - "$gte": "2049-03-05T05:00:00.000Z" - } - } - }, - { - "query": "dateFrom=5%20March%2049%20%2B0130", - "expected": null - }, - { - "query": "dateFrom=5%20March%2049%2012%3A34", - "expected": { - "date": { - "$gte": "2049-03-05T12:34:00.000Z" - } - } - }, - { - "query": "dateFrom=5%20March%2049%2012%3A34%20GMT", - "expected": { - "date": { - "$gte": "2049-03-05T12:34:00.000Z" - } - } - }, - { - "query": "dateFrom=5%20March%2049%2012%3A34%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2049-03-05T11:04:00.000Z" - } - } - }, - { - "query": "dateFrom=5%20March%2049%2012%3A34%20EST", - "expected": { - "date": { - "$gte": "2049-03-05T17:34:00.000Z" - } - } - }, - { - "query": "dateFrom=5%20March%2049%2012%3A34%20%2B0130", - "expected": { - "date": { - "$gte": "2049-03-05T11:04:00.000Z" - } - } - }, - { - "query": "dateFrom=5%20March%2049%2012%3A34%3A56.000123", - "expected": { - "date": { - "$gte": "2049-03-05T12:34:56.000Z" - } - } - }, - { - "query": "dateFrom=5%20March%2049%2012%3A34%3A56.000123%20GMT", - "expected": { - "date": { - "$gte": "2049-03-05T12:34:56.000Z" - } - } - }, - { - "query": "dateFrom=5%20March%2049%2012%3A34%3A56.000123%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2049-03-05T11:04:56.000Z" - } - } - }, - { - "query": "dateFrom=5%20March%2049%2012%3A34%3A56.000123%20EST", - "expected": { - "date": { - "$gte": "2049-03-05T17:34:56.000Z" - } - } - }, - { - "query": "dateFrom=5%20March%2049%2012%3A34%3A56.000123%20%2B0130", - "expected": { - "date": { - "$gte": "2049-03-05T11:04:56.000Z" - } - } - }, - { - "query": "dateFrom=5%20March%2049%2012%3A34%3A56.999999999999", - "expected": { - "date": { - "$gte": "2049-03-05T12:34:56.999Z" - } - } - }, - { - "query": "dateFrom=5%20March%2049%2012%3A34%3A56.999999999999%20GMT", - "expected": { - "date": { - "$gte": "2049-03-05T12:34:56.999Z" - } - } - }, - { - "query": "dateFrom=5%20March%2049%2012%3A34%3A56.999999999999%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2049-03-05T11:04:56.999Z" - } - } - }, - { - "query": "dateFrom=5%20March%2049%2012%3A34%3A56.999999999999%20EST", - "expected": { - "date": { - "$gte": "2049-03-05T17:34:56.999Z" - } - } - }, - { - "query": "dateFrom=5%20March%2049%2012%3A34%3A56.999999999999%20%2B0130", - "expected": { - "date": { - "$gte": "2049-03-05T11:04:56.999Z" - } - } - }, - { - "query": "dateFrom=5%20March%2049%2024%3A00", - "expected": { - "date": { - "$gte": "2049-03-06T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=5%20March%2049%2024%3A00%20GMT", - "expected": { - "date": { - "$gte": "2049-03-06T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=5%20March%2049%2024%3A00%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2049-03-05T22:30:00.000Z" - } - } - }, - { - "query": "dateFrom=5%20March%2049%2024%3A00%20EST", - "expected": { - "date": { - "$gte": "2049-03-06T05:00:00.000Z" - } - } - }, - { - "query": "dateFrom=5%20March%2049%2024%3A00%20%2B0130", - "expected": { - "date": { - "$gte": "2049-03-05T22:30:00.000Z" - } - } - }, - { - "query": "dateFrom=5%20March%2049%2012%3A00%20AM", - "expected": { - "date": { - "$gte": "2049-03-05T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=5%20March%2049%2012%3A00%20AM%20GMT", - "expected": { - "date": { - "$gte": "2049-03-05T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=5%20March%2049%2012%3A00%20AM%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2049-03-04T22:30:00.000Z" - } - } - }, - { - "query": "dateFrom=5%20March%2049%2012%3A00%20AM%20EST", - "expected": { - "date": { - "$gte": "2049-03-05T05:00:00.000Z" - } - } - }, - { - "query": "dateFrom=5%20March%2049%2012%3A00%20AM%20%2B0130", - "expected": { - "date": { - "$gte": "2049-03-04T22:30:00.000Z" - } - } - }, - { - "query": "dateFrom=5%20March%2049%2012%3A00%20PM", - "expected": { - "date": { - "$gte": "2049-03-05T12:00:00.000Z" - } - } - }, - { - "query": "dateFrom=5%20March%2049%2012%3A00%20PM%20GMT", - "expected": { - "date": { - "$gte": "2049-03-05T12:00:00.000Z" - } - } - }, - { - "query": "dateFrom=5%20March%2049%2012%3A00%20PM%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2049-03-05T10:30:00.000Z" - } - } - }, - { - "query": "dateFrom=5%20March%2049%2012%3A00%20PM%20EST", - "expected": { - "date": { - "$gte": "2049-03-05T17:00:00.000Z" - } - } - }, - { - "query": "dateFrom=5%20March%2049%2012%3A00%20PM%20%2B0130", - "expected": { - "date": { - "$gte": "2049-03-05T10:30:00.000Z" - } - } - }, - { - "query": "dateFrom=5%20March%2049%200%3A00%20PM", - "expected": { - "date": { - "$gte": "2049-03-05T12:00:00.000Z" - } - } - }, - { - "query": "dateFrom=5%20March%2049%200%3A00%20PM%20GMT", - "expected": { - "date": { - "$gte": "2049-03-05T12:00:00.000Z" - } - } - }, - { - "query": "dateFrom=5%20March%2049%200%3A00%20PM%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2049-03-05T10:30:00.000Z" - } - } - }, - { - "query": "dateFrom=5%20March%2049%200%3A00%20PM%20EST", - "expected": { - "date": { - "$gte": "2049-03-05T17:00:00.000Z" - } - } - }, - { - "query": "dateFrom=5%20March%2049%200%3A00%20PM%20%2B0130", - "expected": { - "date": { - "$gte": "2049-03-05T10:30:00.000Z" - } - } - }, - { - "query": "dateFrom=5%20March%2049%2013%3A00%20PM", - "expected": null - }, - { - "query": "dateFrom=5%20March%2049%2013%3A00%20PM%20GMT", - "expected": null - }, - { - "query": "dateFrom=5%20March%2049%2013%3A00%20PM%20UTC%2B01%3A30", - "expected": null - }, - { - "query": "dateFrom=5%20March%2049%2013%3A00%20PM%20EST", - "expected": null - }, - { - "query": "dateFrom=5%20March%2049%2013%3A00%20PM%20%2B0130", - "expected": null - }, - { - "query": "dateFrom=December%2031%2099", - "expected": { - "date": { - "$gte": "1999-12-31T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=December%2031%2099%20GMT", - "expected": { - "date": { - "$gte": "1999-12-31T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=December%2031%2099%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "1999-12-30T22:30:00.000Z" - } - } - }, - { - "query": "dateFrom=December%2031%2099%20EST", - "expected": { - "date": { - "$gte": "1999-12-31T05:00:00.000Z" - } - } - }, - { - "query": "dateFrom=December%2031%2099%20%2B0130", - "expected": null - }, - { - "query": "dateFrom=December%2031%2099%2012%3A34", - "expected": { - "date": { - "$gte": "1999-12-31T12:34:00.000Z" - } - } - }, - { - "query": "dateFrom=December%2031%2099%2012%3A34%20GMT", - "expected": { - "date": { - "$gte": "1999-12-31T12:34:00.000Z" - } - } - }, - { - "query": "dateFrom=December%2031%2099%2012%3A34%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "1999-12-31T11:04:00.000Z" - } - } - }, - { - "query": "dateFrom=December%2031%2099%2012%3A34%20EST", - "expected": { - "date": { - "$gte": "1999-12-31T17:34:00.000Z" - } - } - }, - { - "query": "dateFrom=December%2031%2099%2012%3A34%20%2B0130", - "expected": { - "date": { - "$gte": "1999-12-31T11:04:00.000Z" - } - } - }, - { - "query": "dateFrom=December%2031%2099%2012%3A34%3A56.000123", - "expected": { - "date": { - "$gte": "1999-12-31T12:34:56.000Z" - } - } - }, - { - "query": "dateFrom=December%2031%2099%2012%3A34%3A56.000123%20GMT", - "expected": { - "date": { - "$gte": "1999-12-31T12:34:56.000Z" - } - } - }, - { - "query": "dateFrom=December%2031%2099%2012%3A34%3A56.000123%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "1999-12-31T11:04:56.000Z" - } - } - }, - { - "query": "dateFrom=December%2031%2099%2012%3A34%3A56.000123%20EST", - "expected": { - "date": { - "$gte": "1999-12-31T17:34:56.000Z" - } - } - }, - { - "query": "dateFrom=December%2031%2099%2012%3A34%3A56.000123%20%2B0130", - "expected": { - "date": { - "$gte": "1999-12-31T11:04:56.000Z" - } - } - }, - { - "query": "dateFrom=December%2031%2099%2012%3A34%3A56.999999999999", - "expected": { - "date": { - "$gte": "1999-12-31T12:34:56.999Z" - } - } - }, - { - "query": "dateFrom=December%2031%2099%2012%3A34%3A56.999999999999%20GMT", - "expected": { - "date": { - "$gte": "1999-12-31T12:34:56.999Z" - } - } - }, - { - "query": "dateFrom=December%2031%2099%2012%3A34%3A56.999999999999%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "1999-12-31T11:04:56.999Z" - } - } - }, - { - "query": "dateFrom=December%2031%2099%2012%3A34%3A56.999999999999%20EST", - "expected": { - "date": { - "$gte": "1999-12-31T17:34:56.999Z" - } - } - }, - { - "query": "dateFrom=December%2031%2099%2012%3A34%3A56.999999999999%20%2B0130", - "expected": { - "date": { - "$gte": "1999-12-31T11:04:56.999Z" - } - } - }, - { - "query": "dateFrom=December%2031%2099%2024%3A00", - "expected": { - "date": { - "$gte": "2000-01-01T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=December%2031%2099%2024%3A00%20GMT", - "expected": { - "date": { - "$gte": "2000-01-01T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=December%2031%2099%2024%3A00%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "1999-12-31T22:30:00.000Z" - } - } - }, - { - "query": "dateFrom=December%2031%2099%2024%3A00%20EST", - "expected": { - "date": { - "$gte": "2000-01-01T05:00:00.000Z" - } - } - }, - { - "query": "dateFrom=December%2031%2099%2024%3A00%20%2B0130", - "expected": { - "date": { - "$gte": "1999-12-31T22:30:00.000Z" - } - } - }, - { - "query": "dateFrom=December%2031%2099%2012%3A00%20AM", - "expected": { - "date": { - "$gte": "1999-12-31T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=December%2031%2099%2012%3A00%20AM%20GMT", - "expected": { - "date": { - "$gte": "1999-12-31T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=December%2031%2099%2012%3A00%20AM%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "1999-12-30T22:30:00.000Z" - } - } - }, - { - "query": "dateFrom=December%2031%2099%2012%3A00%20AM%20EST", - "expected": { - "date": { - "$gte": "1999-12-31T05:00:00.000Z" - } - } - }, - { - "query": "dateFrom=December%2031%2099%2012%3A00%20AM%20%2B0130", - "expected": { - "date": { - "$gte": "1999-12-30T22:30:00.000Z" - } - } - }, - { - "query": "dateFrom=December%2031%2099%2012%3A00%20PM", - "expected": { - "date": { - "$gte": "1999-12-31T12:00:00.000Z" - } - } - }, - { - "query": "dateFrom=December%2031%2099%2012%3A00%20PM%20GMT", - "expected": { - "date": { - "$gte": "1999-12-31T12:00:00.000Z" - } - } - }, - { - "query": "dateFrom=December%2031%2099%2012%3A00%20PM%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "1999-12-31T10:30:00.000Z" - } - } - }, - { - "query": "dateFrom=December%2031%2099%2012%3A00%20PM%20EST", - "expected": { - "date": { - "$gte": "1999-12-31T17:00:00.000Z" - } - } - }, - { - "query": "dateFrom=December%2031%2099%2012%3A00%20PM%20%2B0130", - "expected": { - "date": { - "$gte": "1999-12-31T10:30:00.000Z" - } - } - }, - { - "query": "dateFrom=December%2031%2099%200%3A00%20PM", - "expected": { - "date": { - "$gte": "1999-12-31T12:00:00.000Z" - } - } - }, - { - "query": "dateFrom=December%2031%2099%200%3A00%20PM%20GMT", - "expected": { - "date": { - "$gte": "1999-12-31T12:00:00.000Z" - } - } - }, - { - "query": "dateFrom=December%2031%2099%200%3A00%20PM%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "1999-12-31T10:30:00.000Z" - } - } - }, - { - "query": "dateFrom=December%2031%2099%200%3A00%20PM%20EST", - "expected": { - "date": { - "$gte": "1999-12-31T17:00:00.000Z" - } - } - }, - { - "query": "dateFrom=December%2031%2099%200%3A00%20PM%20%2B0130", - "expected": { - "date": { - "$gte": "1999-12-31T10:30:00.000Z" - } - } - }, - { - "query": "dateFrom=December%2031%2099%2013%3A00%20PM", - "expected": null - }, - { - "query": "dateFrom=December%2031%2099%2013%3A00%20PM%20GMT", - "expected": null - }, - { - "query": "dateFrom=December%2031%2099%2013%3A00%20PM%20UTC%2B01%3A30", - "expected": null - }, - { - "query": "dateFrom=December%2031%2099%2013%3A00%20PM%20EST", - "expected": null - }, - { - "query": "dateFrom=December%2031%2099%2013%3A00%20PM%20%2B0130", - "expected": null - }, - { - "query": "dateFrom=2024%2C1%2C2", - "expected": { - "date": { - "$gte": "2024-01-02T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2024%2C1%2C2%20GMT", - "expected": { - "date": { - "$gte": "2024-01-02T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2024%2C1%2C2%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2024-01-01T22:30:00.000Z" - } - } - }, - { - "query": "dateFrom=2024%2C1%2C2%20EST", - "expected": { - "date": { - "$gte": "2024-01-02T05:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2024%2C1%2C2%20%2B0130", - "expected": null - }, - { - "query": "dateFrom=2024%2C1%2C2%2012%3A34", - "expected": { - "date": { - "$gte": "2024-01-02T12:34:00.000Z" - } - } - }, - { - "query": "dateFrom=2024%2C1%2C2%2012%3A34%20GMT", - "expected": { - "date": { - "$gte": "2024-01-02T12:34:00.000Z" - } - } - }, - { - "query": "dateFrom=2024%2C1%2C2%2012%3A34%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2024-01-02T11:04:00.000Z" - } - } - }, - { - "query": "dateFrom=2024%2C1%2C2%2012%3A34%20EST", - "expected": { - "date": { - "$gte": "2024-01-02T17:34:00.000Z" - } - } - }, - { - "query": "dateFrom=2024%2C1%2C2%2012%3A34%20%2B0130", - "expected": { - "date": { - "$gte": "2024-01-02T11:04:00.000Z" - } - } - }, - { - "query": "dateFrom=2024%2C1%2C2%2012%3A34%3A56.000123", - "expected": { - "date": { - "$gte": "2024-01-02T12:34:56.000Z" - } - } - }, - { - "query": "dateFrom=2024%2C1%2C2%2012%3A34%3A56.000123%20GMT", - "expected": { - "date": { - "$gte": "2024-01-02T12:34:56.000Z" - } - } - }, - { - "query": "dateFrom=2024%2C1%2C2%2012%3A34%3A56.000123%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2024-01-02T11:04:56.000Z" - } - } - }, - { - "query": "dateFrom=2024%2C1%2C2%2012%3A34%3A56.000123%20EST", - "expected": { - "date": { - "$gte": "2024-01-02T17:34:56.000Z" - } - } - }, - { - "query": "dateFrom=2024%2C1%2C2%2012%3A34%3A56.000123%20%2B0130", - "expected": { - "date": { - "$gte": "2024-01-02T11:04:56.000Z" - } - } - }, - { - "query": "dateFrom=2024%2C1%2C2%2012%3A34%3A56.999999999999", - "expected": { - "date": { - "$gte": "2024-01-02T12:34:56.999Z" - } - } - }, - { - "query": "dateFrom=2024%2C1%2C2%2012%3A34%3A56.999999999999%20GMT", - "expected": { - "date": { - "$gte": "2024-01-02T12:34:56.999Z" - } - } - }, - { - "query": "dateFrom=2024%2C1%2C2%2012%3A34%3A56.999999999999%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2024-01-02T11:04:56.999Z" - } - } - }, - { - "query": "dateFrom=2024%2C1%2C2%2012%3A34%3A56.999999999999%20EST", - "expected": { - "date": { - "$gte": "2024-01-02T17:34:56.999Z" - } - } - }, - { - "query": "dateFrom=2024%2C1%2C2%2012%3A34%3A56.999999999999%20%2B0130", - "expected": { - "date": { - "$gte": "2024-01-02T11:04:56.999Z" - } - } - }, - { - "query": "dateFrom=2024%2C1%2C2%2024%3A00", - "expected": { - "date": { - "$gte": "2024-01-03T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2024%2C1%2C2%2024%3A00%20GMT", - "expected": { - "date": { - "$gte": "2024-01-03T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2024%2C1%2C2%2024%3A00%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2024-01-02T22:30:00.000Z" - } - } - }, - { - "query": "dateFrom=2024%2C1%2C2%2024%3A00%20EST", - "expected": { - "date": { - "$gte": "2024-01-03T05:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2024%2C1%2C2%2024%3A00%20%2B0130", - "expected": { - "date": { - "$gte": "2024-01-02T22:30:00.000Z" - } - } - }, - { - "query": "dateFrom=2024%2C1%2C2%2012%3A00%20AM", - "expected": { - "date": { - "$gte": "2024-01-02T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2024%2C1%2C2%2012%3A00%20AM%20GMT", - "expected": { - "date": { - "$gte": "2024-01-02T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2024%2C1%2C2%2012%3A00%20AM%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2024-01-01T22:30:00.000Z" - } - } - }, - { - "query": "dateFrom=2024%2C1%2C2%2012%3A00%20AM%20EST", - "expected": { - "date": { - "$gte": "2024-01-02T05:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2024%2C1%2C2%2012%3A00%20AM%20%2B0130", - "expected": { - "date": { - "$gte": "2024-01-01T22:30:00.000Z" - } - } - }, - { - "query": "dateFrom=2024%2C1%2C2%2012%3A00%20PM", - "expected": { - "date": { - "$gte": "2024-01-02T12:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2024%2C1%2C2%2012%3A00%20PM%20GMT", - "expected": { - "date": { - "$gte": "2024-01-02T12:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2024%2C1%2C2%2012%3A00%20PM%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2024-01-02T10:30:00.000Z" - } - } - }, - { - "query": "dateFrom=2024%2C1%2C2%2012%3A00%20PM%20EST", - "expected": { - "date": { - "$gte": "2024-01-02T17:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2024%2C1%2C2%2012%3A00%20PM%20%2B0130", - "expected": { - "date": { - "$gte": "2024-01-02T10:30:00.000Z" - } - } - }, - { - "query": "dateFrom=2024%2C1%2C2%200%3A00%20PM", - "expected": { - "date": { - "$gte": "2024-01-02T12:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2024%2C1%2C2%200%3A00%20PM%20GMT", - "expected": { - "date": { - "$gte": "2024-01-02T12:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2024%2C1%2C2%200%3A00%20PM%20UTC%2B01%3A30", - "expected": { - "date": { - "$gte": "2024-01-02T10:30:00.000Z" - } - } - }, - { - "query": "dateFrom=2024%2C1%2C2%200%3A00%20PM%20EST", - "expected": { - "date": { - "$gte": "2024-01-02T17:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2024%2C1%2C2%200%3A00%20PM%20%2B0130", - "expected": { - "date": { - "$gte": "2024-01-02T10:30:00.000Z" - } - } - }, - { - "query": "dateFrom=2024%2C1%2C2%2013%3A00%20PM", - "expected": null - }, - { - "query": "dateFrom=2024%2C1%2C2%2013%3A00%20PM%20GMT", - "expected": null - }, - { - "query": "dateFrom=2024%2C1%2C2%2013%3A00%20PM%20UTC%2B01%3A30", - "expected": null - }, - { - "query": "dateFrom=2024%2C1%2C2%2013%3A00%20PM%20EST", - "expected": null - }, - { - "query": "dateFrom=2024%2C1%2C2%2013%3A00%20PM%20%2B0130", - "expected": null - }, - { - "query": "dateFrom=2024-01-01%20", - "expected": { - "date": { - "$gte": "2024-01-01T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2024-01-01%09", - "expected": { - "date": { - "$gte": "2024-01-01T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2024-01-01%0A", - "expected": { - "date": { - "$gte": "2024-01-01T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2024-01-01%EF%BB%BF", - "expected": { - "date": { - "$gte": "2024-01-01T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2024-01-01%20(ignored)", - "expected": { - "date": { - "$gte": "2024-01-01T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2024-01-01%20garbage", - "expected": null - }, - { - "query": "dateFrom=2024-01-01%00ignored", - "expected": { - "date": { - "$gte": "2024-01-01T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom[]=2024-02-29", - "expected": { - "date": { - "$gte": "2024-02-29T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom[0]=2024-02-29", - "expected": { - "date": { - "$gte": "2024-02-29T00:00:00.000Z" - } - } - }, - { - "query": "dateFrom=2024-02-29&dateFrom=2024-03-01", - "expected": null - }, - { - "query": "dateFrom[]=", - "expected": null - }, - { - "query": "dateFrom[x]=x", - "expected": null - }, - { - "query": "dateFrom[toString]=x", - "error": true - }, - { - "query": "dateFrom=invalid&dateTo[]=2024-03-01", - "expected": { - "date": { - "$lte": "2024-03-01T00:00:00.000Z" - } - } - }, - { - "query": "dateTo[toString]=x", - "error": true - } -] diff --git a/backend/internal/server/testdata/admin-filters.json b/backend/internal/server/testdata/admin-filters.json deleted file mode 100644 index 87db8ce..0000000 --- a/backend/internal/server/testdata/admin-filters.json +++ /dev/null @@ -1,1863 +0,0 @@ -[ - { - "kind": "repos", - "query": {}, - "expected": {}, - "missingOwner": false - }, - { - "kind": "repos", - "query": { - "ready": "true" - }, - "expected": { - "$and": [ - { - "$or": [ - { - "status": "ready" - } - ] - } - ] - }, - "missingOwner": false - }, - { - "kind": "repos", - "query": { - "error": "true" - }, - "expected": { - "$and": [ - { - "$or": [ - { - "status": "error" - } - ] - } - ] - }, - "missingOwner": false - }, - { - "kind": "repos", - "query": { - "expired": "true" - }, - "expected": { - "$and": [ - { - "$or": [ - { - "status": "expiring" - }, - { - "status": "expired" - } - ] - } - ] - }, - "missingOwner": false - }, - { - "kind": "repos", - "query": { - "removed": "true" - }, - "expected": { - "$and": [ - { - "$or": [ - { - "status": "removing" - }, - { - "status": "removed" - } - ] - } - ] - }, - "missingOwner": false - }, - { - "kind": "repos", - "query": { - "preparing": "true" - }, - "expected": { - "$and": [ - { - "$or": [ - { - "status": "preparing" - }, - { - "status": "download" - } - ] - } - ] - }, - "missingOwner": false - }, - { - "kind": "repos", - "query": { - "ready": "true", - "preparing": "true", - "expired": "true", - "removed": "true", - "error": "true" - }, - "expected": { - "$and": [ - { - "$or": [ - { - "status": "ready" - }, - { - "status": "error" - }, - { - "status": "expiring" - }, - { - "status": "expired" - }, - { - "status": "removing" - }, - { - "status": "removed" - }, - { - "status": "preparing" - }, - { - "status": "download" - } - ] - } - ] - }, - "missingOwner": false - }, - { - "kind": "repos", - "query": { - "ready": "false", - "status": "archived" - }, - "expected": {}, - "missingOwner": false - }, - { - "kind": "repos", - "query": { - "owner": "exists" - }, - "expected": { - "$and": [ - { - "owner": "owner-id" - } - ] - }, - "missingOwner": false - }, - { - "kind": "repos", - "query": { - "owner": "missing" - }, - "expected": { - "$and": [] - }, - "missingOwner": true - }, - { - "kind": "repos", - "query": { - "owner": "missing", - "search": "private", - "conference": "ignored", - "ready": "true" - }, - "expected": { - "$and": [ - { - "$or": [ - { - "repoId": { - "$regex": "private", - "$options": "i" - } - }, - { - "source.repositoryName": { - "$regex": "private", - "$options": "i" - } - }, - { - "statusMessage": { - "$regex": "private", - "$options": "i" - } - }, - { - "conference": { - "$regex": "private", - "$options": "i" - } - } - ] - } - ] - }, - "missingOwner": true - }, - { - "kind": "repos", - "query": { - "conference": "conf" - }, - "expected": { - "$and": [ - { - "conference": "conf" - } - ] - }, - "missingOwner": false - }, - { - "kind": "repos", - "query": { - "search": "Alice" - }, - "expected": { - "$and": [ - { - "$or": [ - { - "repoId": { - "$regex": "Alice", - "$options": "i" - } - }, - { - "source.repositoryName": { - "$regex": "Alice", - "$options": "i" - } - }, - { - "statusMessage": { - "$regex": "Alice", - "$options": "i" - } - }, - { - "conference": { - "$regex": "Alice", - "$options": "i" - } - } - ] - } - ] - }, - "missingOwner": false - }, - { - "kind": "repos", - "query": { - "search": "a-b, c# [x].*" - }, - "expected": { - "$and": [ - { - "$or": [ - { - "repoId": { - "$regex": "a\\-b\\,\\ c\\#\\ \\[x\\]\\.\\*", - "$options": "i" - } - }, - { - "source.repositoryName": { - "$regex": "a\\-b\\,\\ c\\#\\ \\[x\\]\\.\\*", - "$options": "i" - } - }, - { - "statusMessage": { - "$regex": "a\\-b\\,\\ c\\#\\ \\[x\\]\\.\\*", - "$options": "i" - } - }, - { - "conference": { - "$regex": "a\\-b\\,\\ c\\#\\ \\[x\\]\\.\\*", - "$options": "i" - } - } - ] - } - ] - }, - "missingOwner": false - }, - { - "kind": "repos", - "query": { - "search": "line\n\t…" - }, - "expected": { - "$and": [ - { - "$or": [ - { - "repoId": { - "$regex": "line\\\n\\\t\\…", - "$options": "i" - } - }, - { - "source.repositoryName": { - "$regex": "line\\\n\\\t\\…", - "$options": "i" - } - }, - { - "statusMessage": { - "$regex": "line\\\n\\\t\\…", - "$options": "i" - } - }, - { - "conference": { - "$regex": "line\\\n\\\t\\…", - "$options": "i" - } - } - ] - } - ] - }, - "missingOwner": false - }, - { - "kind": "repos", - "query": { - "dateFrom": "2030-01-01", - "dateTo": "2031-01-01" - }, - "expected": { - "$and": [ - { - "anonymizeDate": { - "$gte": "2030-01-01T00:00:00.000Z", - "$lte": "2031-01-01T00:00:00.000Z" - } - } - ] - }, - "missingOwner": false - }, - { - "kind": "repos", - "query": { - "dateFrom": "invalid", - "dateTo": "2030-02-03T01:02:03.456Z" - }, - "expected": { - "$and": [ - { - "anonymizeDate": { - "$lte": "2030-02-03T01:02:03.456Z" - } - } - ] - }, - "missingOwner": false - }, - { - "kind": "repos", - "query": { - "role": "admin", - "status": "active" - }, - "expected": {}, - "missingOwner": false - }, - { - "kind": "repos", - "query": { - "search": "test", - "owner": "exists", - "conference": "conf", - "ready": "true", - "error": "true", - "dateFrom": "2029-01-01" - }, - "expected": { - "$and": [ - { - "$or": [ - { - "repoId": { - "$regex": "test", - "$options": "i" - } - }, - { - "source.repositoryName": { - "$regex": "test", - "$options": "i" - } - }, - { - "statusMessage": { - "$regex": "test", - "$options": "i" - } - }, - { - "conference": { - "$regex": "test", - "$options": "i" - } - } - ] - }, - { - "owner": "owner-id" - }, - { - "conference": "conf" - }, - { - "anonymizeDate": { - "$gte": "2029-01-01T00:00:00.000Z" - } - }, - { - "$or": [ - { - "status": "ready" - }, - { - "status": "error" - } - ] - } - ] - }, - "missingOwner": false - }, - { - "kind": "repos", - "rawQuery": "ready[]=true", - "query": { - "ready": [ - "true" - ] - }, - "expected": { - "$and": [ - { - "$or": [ - { - "status": "ready" - } - ] - } - ] - }, - "missingOwner": false - }, - { - "kind": "repos", - "rawQuery": "ready=true&ready=false", - "query": { - "ready": [ - "true", - "false" - ] - }, - "expected": {}, - "missingOwner": false - }, - { - "kind": "repos", - "rawQuery": "ready[0]=true", - "query": { - "ready": [ - "true" - ] - }, - "expected": { - "$and": [ - { - "$or": [ - { - "status": "ready" - } - ] - } - ] - }, - "missingOwner": false - }, - { - "kind": "repos", - "rawQuery": "ready[x]=true", - "query": { - "ready": { - "x": "true" - } - }, - "expected": {}, - "missingOwner": false - }, - { - "kind": "repos", - "rawQuery": "ready[toString]=true", - "query": { - "ready": { - "toString": "true" - } - }, - "error": true - }, - { - "kind": "repos", - "rawQuery": "error[]=true&preparing[]=true&removed[]=true&expired[]=true", - "query": { - "error": [ - "true" - ], - "preparing": [ - "true" - ], - "removed": [ - "true" - ], - "expired": [ - "true" - ] - }, - "expected": { - "$and": [ - { - "$or": [ - { - "status": "error" - }, - { - "status": "expiring" - }, - { - "status": "expired" - }, - { - "status": "removing" - }, - { - "status": "removed" - }, - { - "status": "preparing" - }, - { - "status": "download" - } - ] - } - ] - }, - "missingOwner": false - }, - { - "kind": "repos", - "rawQuery": "search[]=Alice", - "query": { - "search": [ - "Alice" - ] - }, - "error": true - }, - { - "kind": "repos", - "rawQuery": "search=Alice&search=Bob", - "query": { - "search": [ - "Alice", - "Bob" - ] - }, - "error": true - }, - { - "kind": "repos", - "rawQuery": "search[x]=Alice", - "query": { - "search": { - "x": "Alice" - } - }, - "error": true - }, - { - "kind": "repos", - "rawQuery": "search[toString]=Alice", - "query": { - "search": { - "toString": "Alice" - } - }, - "error": true - }, - { - "kind": "repos", - "rawQuery": "search=", - "query": { - "search": "" - }, - "expected": {}, - "missingOwner": false - }, - { - "kind": "repos", - "rawQuery": "search=%F0%9F%98%80", - "query": { - "search": "😀" - }, - "expected": { - "$and": [ - { - "$or": [ - { - "repoId": { - "$regex": "😀", - "$options": "i" - } - }, - { - "source.repositoryName": { - "$regex": "😀", - "$options": "i" - } - }, - { - "statusMessage": { - "$regex": "😀", - "$options": "i" - } - }, - { - "conference": { - "$regex": "😀", - "$options": "i" - } - } - ] - } - ] - }, - "missingOwner": false - }, - { - "kind": "repos", - "rawQuery": "role[]=admin", - "query": { - "role": [ - "admin" - ] - }, - "expected": {}, - "missingOwner": false - }, - { - "kind": "repos", - "rawQuery": "role=admin&role=user", - "query": { - "role": [ - "admin", - "user" - ] - }, - "expected": {}, - "missingOwner": false - }, - { - "kind": "repos", - "rawQuery": "role[x]=admin", - "query": { - "role": { - "x": "admin" - } - }, - "expected": {}, - "missingOwner": false - }, - { - "kind": "repos", - "rawQuery": "role=admin", - "query": { - "role": "admin" - }, - "expected": {}, - "missingOwner": false - }, - { - "kind": "repos", - "rawQuery": "search[]=x&owner=missing", - "query": { - "search": [ - "x" - ], - "owner": "missing" - }, - "error": true - }, - { - "kind": "repos", - "rawQuery": "search=x&ready[toString]=true", - "query": { - "search": "x", - "ready": { - "toString": "true" - } - }, - "error": true - }, - { - "kind": "users", - "query": {}, - "expected": {}, - "missingOwner": false - }, - { - "kind": "users", - "query": { - "ready": "true" - }, - "expected": {}, - "missingOwner": false - }, - { - "kind": "users", - "query": { - "error": "true" - }, - "expected": {}, - "missingOwner": false - }, - { - "kind": "users", - "query": { - "expired": "true" - }, - "expected": {}, - "missingOwner": false - }, - { - "kind": "users", - "query": { - "removed": "true" - }, - "expected": {}, - "missingOwner": false - }, - { - "kind": "users", - "query": { - "preparing": "true" - }, - "expected": {}, - "missingOwner": false - }, - { - "kind": "users", - "query": { - "ready": "true", - "preparing": "true", - "expired": "true", - "removed": "true", - "error": "true" - }, - "expected": {}, - "missingOwner": false - }, - { - "kind": "users", - "query": { - "ready": "false", - "status": "archived" - }, - "expected": { - "status": "archived" - }, - "missingOwner": false - }, - { - "kind": "users", - "query": { - "owner": "exists" - }, - "expected": {}, - "missingOwner": false - }, - { - "kind": "users", - "query": { - "owner": "missing" - }, - "expected": {}, - "missingOwner": false - }, - { - "kind": "users", - "query": { - "owner": "missing", - "search": "private", - "conference": "ignored", - "ready": "true" - }, - "expected": { - "$or": [ - { - "username": { - "$regex": "private", - "$options": "i" - } - }, - { - "emails.email": { - "$regex": "private", - "$options": "i" - } - } - ] - }, - "missingOwner": false - }, - { - "kind": "users", - "query": { - "conference": "conf" - }, - "expected": {}, - "missingOwner": false - }, - { - "kind": "users", - "query": { - "search": "Alice" - }, - "expected": { - "$or": [ - { - "username": { - "$regex": "Alice", - "$options": "i" - } - }, - { - "emails.email": { - "$regex": "Alice", - "$options": "i" - } - } - ] - }, - "missingOwner": false - }, - { - "kind": "users", - "query": { - "search": "a-b, c# [x].*" - }, - "expected": { - "$or": [ - { - "username": { - "$regex": "a\\-b\\,\\ c\\#\\ \\[x\\]\\.\\*", - "$options": "i" - } - }, - { - "emails.email": { - "$regex": "a\\-b\\,\\ c\\#\\ \\[x\\]\\.\\*", - "$options": "i" - } - } - ] - }, - "missingOwner": false - }, - { - "kind": "users", - "query": { - "search": "line\n\t…" - }, - "expected": { - "$or": [ - { - "username": { - "$regex": "line\\\n\\\t\\…", - "$options": "i" - } - }, - { - "emails.email": { - "$regex": "line\\\n\\\t\\…", - "$options": "i" - } - } - ] - }, - "missingOwner": false - }, - { - "kind": "users", - "query": { - "dateFrom": "2030-01-01", - "dateTo": "2031-01-01" - }, - "expected": { - "dateOfEntry": { - "$gte": "2030-01-01T00:00:00.000Z", - "$lte": "2031-01-01T00:00:00.000Z" - } - }, - "missingOwner": false - }, - { - "kind": "users", - "query": { - "dateFrom": "invalid", - "dateTo": "2030-02-03T01:02:03.456Z" - }, - "expected": { - "dateOfEntry": { - "$lte": "2030-02-03T01:02:03.456Z" - } - }, - "missingOwner": false - }, - { - "kind": "users", - "query": { - "role": "admin", - "status": "active" - }, - "expected": { - "status": "active", - "isAdmin": true - }, - "missingOwner": false - }, - { - "kind": "users", - "query": { - "search": "test", - "owner": "exists", - "conference": "conf", - "ready": "true", - "error": "true", - "dateFrom": "2029-01-01" - }, - "expected": { - "$or": [ - { - "username": { - "$regex": "test", - "$options": "i" - } - }, - { - "emails.email": { - "$regex": "test", - "$options": "i" - } - } - ], - "dateOfEntry": { - "$gte": "2029-01-01T00:00:00.000Z" - } - }, - "missingOwner": false - }, - { - "kind": "users", - "rawQuery": "ready[]=true", - "query": { - "ready": [ - "true" - ] - }, - "expected": {}, - "missingOwner": false - }, - { - "kind": "users", - "rawQuery": "ready=true&ready=false", - "query": { - "ready": [ - "true", - "false" - ] - }, - "expected": {}, - "missingOwner": false - }, - { - "kind": "users", - "rawQuery": "ready[0]=true", - "query": { - "ready": [ - "true" - ] - }, - "expected": {}, - "missingOwner": false - }, - { - "kind": "users", - "rawQuery": "ready[x]=true", - "query": { - "ready": { - "x": "true" - } - }, - "expected": {}, - "missingOwner": false - }, - { - "kind": "users", - "rawQuery": "ready[toString]=true", - "query": { - "ready": { - "toString": "true" - } - }, - "expected": {}, - "missingOwner": false - }, - { - "kind": "users", - "rawQuery": "error[]=true&preparing[]=true&removed[]=true&expired[]=true", - "query": { - "error": [ - "true" - ], - "preparing": [ - "true" - ], - "removed": [ - "true" - ], - "expired": [ - "true" - ] - }, - "expected": {}, - "missingOwner": false - }, - { - "kind": "users", - "rawQuery": "search[]=Alice", - "query": { - "search": [ - "Alice" - ] - }, - "error": true - }, - { - "kind": "users", - "rawQuery": "search=Alice&search=Bob", - "query": { - "search": [ - "Alice", - "Bob" - ] - }, - "error": true - }, - { - "kind": "users", - "rawQuery": "search[x]=Alice", - "query": { - "search": { - "x": "Alice" - } - }, - "error": true - }, - { - "kind": "users", - "rawQuery": "search[toString]=Alice", - "query": { - "search": { - "toString": "Alice" - } - }, - "error": true - }, - { - "kind": "users", - "rawQuery": "search=", - "query": { - "search": "" - }, - "expected": {}, - "missingOwner": false - }, - { - "kind": "users", - "rawQuery": "search=%F0%9F%98%80", - "query": { - "search": "😀" - }, - "expected": { - "$or": [ - { - "username": { - "$regex": "😀", - "$options": "i" - } - }, - { - "emails.email": { - "$regex": "😀", - "$options": "i" - } - } - ] - }, - "missingOwner": false - }, - { - "kind": "users", - "rawQuery": "role[]=admin", - "query": { - "role": [ - "admin" - ] - }, - "expected": {}, - "missingOwner": false - }, - { - "kind": "users", - "rawQuery": "role=admin&role=user", - "query": { - "role": [ - "admin", - "user" - ] - }, - "expected": {}, - "missingOwner": false - }, - { - "kind": "users", - "rawQuery": "role[x]=admin", - "query": { - "role": { - "x": "admin" - } - }, - "expected": {}, - "missingOwner": false - }, - { - "kind": "users", - "rawQuery": "role=admin", - "query": { - "role": "admin" - }, - "expected": { - "isAdmin": true - }, - "missingOwner": false - }, - { - "kind": "users", - "rawQuery": "search[]=x&owner=missing", - "query": { - "search": [ - "x" - ], - "owner": "missing" - }, - "error": true - }, - { - "kind": "users", - "rawQuery": "search=x&ready[toString]=true", - "query": { - "search": "x", - "ready": { - "toString": "true" - } - }, - "expected": { - "$or": [ - { - "username": { - "$regex": "x", - "$options": "i" - } - }, - { - "emails.email": { - "$regex": "x", - "$options": "i" - } - } - ] - }, - "missingOwner": false - }, - { - "kind": "conferences", - "query": {}, - "expected": {}, - "missingOwner": false - }, - { - "kind": "conferences", - "query": { - "ready": "true" - }, - "expected": { - "$and": [ - { - "$or": [ - { - "status": "ready" - } - ] - } - ] - }, - "missingOwner": false - }, - { - "kind": "conferences", - "query": { - "error": "true" - }, - "expected": { - "$and": [ - { - "$or": [ - { - "status": "error" - } - ] - } - ] - }, - "missingOwner": false - }, - { - "kind": "conferences", - "query": { - "expired": "true" - }, - "expected": { - "$and": [ - { - "$or": [ - { - "status": "expired" - } - ] - } - ] - }, - "missingOwner": false - }, - { - "kind": "conferences", - "query": { - "removed": "true" - }, - "expected": { - "$and": [ - { - "$or": [ - { - "status": "removed" - } - ] - } - ] - }, - "missingOwner": false - }, - { - "kind": "conferences", - "query": { - "preparing": "true" - }, - "expected": { - "$and": [ - { - "$or": [ - { - "status": "preparing" - } - ] - } - ] - }, - "missingOwner": false - }, - { - "kind": "conferences", - "query": { - "ready": "true", - "preparing": "true", - "expired": "true", - "removed": "true", - "error": "true" - }, - "expected": { - "$and": [ - { - "$or": [ - { - "status": "ready" - }, - { - "status": "error" - }, - { - "status": "preparing" - }, - { - "status": "expired" - }, - { - "status": "removed" - } - ] - } - ] - }, - "missingOwner": false - }, - { - "kind": "conferences", - "query": { - "ready": "false", - "status": "archived" - }, - "expected": {}, - "missingOwner": false - }, - { - "kind": "conferences", - "query": { - "owner": "exists" - }, - "expected": {}, - "missingOwner": false - }, - { - "kind": "conferences", - "query": { - "owner": "missing" - }, - "expected": {}, - "missingOwner": false - }, - { - "kind": "conferences", - "query": { - "owner": "missing", - "search": "private", - "conference": "ignored", - "ready": "true" - }, - "expected": { - "$and": [ - { - "$or": [ - { - "name": { - "$regex": "private", - "$options": "i" - } - }, - { - "conferenceID": { - "$regex": "private", - "$options": "i" - } - } - ] - }, - { - "$or": [ - { - "status": "ready" - } - ] - } - ] - }, - "missingOwner": false - }, - { - "kind": "conferences", - "query": { - "conference": "conf" - }, - "expected": {}, - "missingOwner": false - }, - { - "kind": "conferences", - "query": { - "search": "Alice" - }, - "expected": { - "$and": [ - { - "$or": [ - { - "name": { - "$regex": "Alice", - "$options": "i" - } - }, - { - "conferenceID": { - "$regex": "Alice", - "$options": "i" - } - } - ] - } - ] - }, - "missingOwner": false - }, - { - "kind": "conferences", - "query": { - "search": "a-b, c# [x].*" - }, - "expected": { - "$and": [ - { - "$or": [ - { - "name": { - "$regex": "a\\-b\\,\\ c\\#\\ \\[x\\]\\.\\*", - "$options": "i" - } - }, - { - "conferenceID": { - "$regex": "a\\-b\\,\\ c\\#\\ \\[x\\]\\.\\*", - "$options": "i" - } - } - ] - } - ] - }, - "missingOwner": false - }, - { - "kind": "conferences", - "query": { - "search": "line\n\t…" - }, - "expected": { - "$and": [ - { - "$or": [ - { - "name": { - "$regex": "line\\\n\\\t\\…", - "$options": "i" - } - }, - { - "conferenceID": { - "$regex": "line\\\n\\\t\\…", - "$options": "i" - } - } - ] - } - ] - }, - "missingOwner": false - }, - { - "kind": "conferences", - "query": { - "dateFrom": "2030-01-01", - "dateTo": "2031-01-01" - }, - "expected": { - "$and": [ - { - "startDate": { - "$gte": "2030-01-01T00:00:00.000Z", - "$lte": "2031-01-01T00:00:00.000Z" - } - } - ] - }, - "missingOwner": false - }, - { - "kind": "conferences", - "query": { - "dateFrom": "invalid", - "dateTo": "2030-02-03T01:02:03.456Z" - }, - "expected": { - "$and": [ - { - "startDate": { - "$lte": "2030-02-03T01:02:03.456Z" - } - } - ] - }, - "missingOwner": false - }, - { - "kind": "conferences", - "query": { - "role": "admin", - "status": "active" - }, - "expected": {}, - "missingOwner": false - }, - { - "kind": "conferences", - "query": { - "search": "test", - "owner": "exists", - "conference": "conf", - "ready": "true", - "error": "true", - "dateFrom": "2029-01-01" - }, - "expected": { - "$and": [ - { - "$or": [ - { - "name": { - "$regex": "test", - "$options": "i" - } - }, - { - "conferenceID": { - "$regex": "test", - "$options": "i" - } - } - ] - }, - { - "startDate": { - "$gte": "2029-01-01T00:00:00.000Z" - } - }, - { - "$or": [ - { - "status": "ready" - }, - { - "status": "error" - } - ] - } - ] - }, - "missingOwner": false - }, - { - "kind": "conferences", - "rawQuery": "ready[]=true", - "query": { - "ready": [ - "true" - ] - }, - "expected": { - "$and": [ - { - "$or": [ - { - "status": "ready" - } - ] - } - ] - }, - "missingOwner": false - }, - { - "kind": "conferences", - "rawQuery": "ready=true&ready=false", - "query": { - "ready": [ - "true", - "false" - ] - }, - "expected": {}, - "missingOwner": false - }, - { - "kind": "conferences", - "rawQuery": "ready[0]=true", - "query": { - "ready": [ - "true" - ] - }, - "expected": { - "$and": [ - { - "$or": [ - { - "status": "ready" - } - ] - } - ] - }, - "missingOwner": false - }, - { - "kind": "conferences", - "rawQuery": "ready[x]=true", - "query": { - "ready": { - "x": "true" - } - }, - "expected": {}, - "missingOwner": false - }, - { - "kind": "conferences", - "rawQuery": "ready[toString]=true", - "query": { - "ready": { - "toString": "true" - } - }, - "error": true - }, - { - "kind": "conferences", - "rawQuery": "error[]=true&preparing[]=true&removed[]=true&expired[]=true", - "query": { - "error": [ - "true" - ], - "preparing": [ - "true" - ], - "removed": [ - "true" - ], - "expired": [ - "true" - ] - }, - "expected": { - "$and": [ - { - "$or": [ - { - "status": "error" - }, - { - "status": "preparing" - }, - { - "status": "expired" - }, - { - "status": "removed" - } - ] - } - ] - }, - "missingOwner": false - }, - { - "kind": "conferences", - "rawQuery": "search[]=Alice", - "query": { - "search": [ - "Alice" - ] - }, - "error": true - }, - { - "kind": "conferences", - "rawQuery": "search=Alice&search=Bob", - "query": { - "search": [ - "Alice", - "Bob" - ] - }, - "error": true - }, - { - "kind": "conferences", - "rawQuery": "search[x]=Alice", - "query": { - "search": { - "x": "Alice" - } - }, - "error": true - }, - { - "kind": "conferences", - "rawQuery": "search[toString]=Alice", - "query": { - "search": { - "toString": "Alice" - } - }, - "error": true - }, - { - "kind": "conferences", - "rawQuery": "search=", - "query": { - "search": "" - }, - "expected": {}, - "missingOwner": false - }, - { - "kind": "conferences", - "rawQuery": "search=%F0%9F%98%80", - "query": { - "search": "😀" - }, - "expected": { - "$and": [ - { - "$or": [ - { - "name": { - "$regex": "😀", - "$options": "i" - } - }, - { - "conferenceID": { - "$regex": "😀", - "$options": "i" - } - } - ] - } - ] - }, - "missingOwner": false - }, - { - "kind": "conferences", - "rawQuery": "role[]=admin", - "query": { - "role": [ - "admin" - ] - }, - "expected": {}, - "missingOwner": false - }, - { - "kind": "conferences", - "rawQuery": "role=admin&role=user", - "query": { - "role": [ - "admin", - "user" - ] - }, - "expected": {}, - "missingOwner": false - }, - { - "kind": "conferences", - "rawQuery": "role[x]=admin", - "query": { - "role": { - "x": "admin" - } - }, - "expected": {}, - "missingOwner": false - }, - { - "kind": "conferences", - "rawQuery": "role=admin", - "query": { - "role": "admin" - }, - "expected": {}, - "missingOwner": false - }, - { - "kind": "conferences", - "rawQuery": "search[]=x&owner=missing", - "query": { - "search": [ - "x" - ], - "owner": "missing" - }, - "error": true - }, - { - "kind": "conferences", - "rawQuery": "search=x&ready[toString]=true", - "query": { - "search": "x", - "ready": { - "toString": "true" - } - }, - "error": true - } -] diff --git a/backend/internal/server/testdata/admin-pagination.json b/backend/internal/server/testdata/admin-pagination.json deleted file mode 100644 index e2a56bc..0000000 --- a/backend/internal/server/testdata/admin-pagination.json +++ /dev/null @@ -1,1835 +0,0 @@ -[ - { - "kind": "repos", - "query": {}, - "expected": { - "page": 1, - "limit": 10, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "repos", - "query": { - "page": "", - "limit": "" - }, - "expected": { - "page": 1, - "limit": 10, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "repos", - "query": { - "page": "0", - "limit": "0" - }, - "expected": { - "page": 1, - "limit": 10, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "repos", - "query": { - "page": "-1", - "limit": "-1" - }, - "expected": { - "page": -1, - "limit": -1, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "repos", - "query": { - "page": "-20suffix", - "limit": "-20suffix" - }, - "expected": { - "page": -20, - "limit": -20, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "repos", - "query": { - "page": "-0x10", - "limit": "-0x10" - }, - "expected": { - "page": -16, - "limit": -16, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "repos", - "query": { - "page": "2", - "limit": "2" - }, - "expected": { - "page": 2, - "limit": 2, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "repos", - "query": { - "page": "2.9", - "limit": "2.9" - }, - "expected": { - "page": 2, - "limit": 2, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "repos", - "query": { - "page": "2e3", - "limit": "2e3" - }, - "expected": { - "page": 2, - "limit": 2, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "repos", - "query": { - "page": "+12suffix", - "limit": "+12suffix" - }, - "expected": { - "page": 12, - "limit": 12, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "repos", - "query": { - "page": " 17 ", - "limit": " 17 " - }, - "expected": { - "page": 17, - "limit": 17, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "repos", - "query": { - "page": "0x10", - "limit": "0x10" - }, - "expected": { - "page": 16, - "limit": 16, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "repos", - "query": { - "page": "0Xff", - "limit": "0Xff" - }, - "expected": { - "page": 255, - "limit": 255, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "repos", - "query": { - "page": "0b10", - "limit": "0b10" - }, - "expected": { - "page": 1, - "limit": 10, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "repos", - "query": { - "page": "0007", - "limit": "0007" - }, - "expected": { - "page": 7, - "limit": 7, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "repos", - "query": { - "page": "0xg", - "limit": "0xg" - }, - "expected": { - "page": 1, - "limit": 10, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "repos", - "query": { - "page": "junk", - "limit": "junk" - }, - "expected": { - "page": 1, - "limit": 10, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "repos", - "query": { - "page": "12", - "limit": "12" - }, - "expected": { - "page": 12, - "limit": 12, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "repos", - "query": { - "page": "…12", - "limit": "…12" - }, - "expected": { - "page": 1, - "limit": 10, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "repos", - "query": { - "page": "10000", - "limit": "10000" - }, - "expected": { - "page": 10000, - "limit": 1000, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "repos", - "query": { - "page": "999999999999999999999999999999", - "limit": "999999999999999999999999999999" - }, - "expected": { - "page": 1e+30, - "limit": 1000, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "repos", - "query": { - "sort": "_id", - "direction": "asc" - }, - "expected": { - "page": 1, - "limit": 10, - "sort": { - "_id": 1 - } - } - }, - { - "kind": "repos", - "query": { - "sort": "repoId", - "direction": "asc" - }, - "expected": { - "page": 1, - "limit": 10, - "sort": { - "repoId": 1 - } - } - }, - { - "kind": "repos", - "query": { - "sort": "size.storage", - "direction": "asc" - }, - "expected": { - "page": 1, - "limit": 10, - "sort": { - "size.storage": 1 - } - } - }, - { - "kind": "repos", - "query": { - "sort": "status", - "direction": "asc" - }, - "expected": { - "page": 1, - "limit": 10, - "sort": { - "status": 1 - } - } - }, - { - "kind": "repos", - "query": { - "sort": "$where", - "direction": "asc" - }, - "expected": { - "page": 1, - "limit": 10, - "sort": { - "_id": 1 - } - } - }, - { - "kind": "repos", - "query": { - "sort": "a b", - "direction": "asc" - }, - "expected": { - "page": 1, - "limit": 10, - "sort": { - "_id": 1 - } - } - }, - { - "kind": "repos", - "query": { - "sort": "a/b", - "direction": "asc" - }, - "expected": { - "page": 1, - "limit": 10, - "sort": { - "_id": 1 - } - } - }, - { - "kind": "repos", - "query": { - "sort": "a;drop", - "direction": "asc" - }, - "expected": { - "page": 1, - "limit": 10, - "sort": { - "_id": 1 - } - } - }, - { - "kind": "repos", - "query": { - "sort": "status\n", - "direction": "asc" - }, - "expected": { - "page": 1, - "limit": 10, - "sort": { - "_id": 1 - } - } - }, - { - "kind": "repos", - "query": { - "sort": "status\r\n", - "direction": "asc" - }, - "expected": { - "page": 1, - "limit": 10, - "sort": { - "_id": 1 - } - } - }, - { - "kind": "repos", - "query": { - "sort": "", - "direction": "asc" - }, - "expected": { - "page": 1, - "limit": 10, - "sort": { - "_id": 1 - } - } - }, - { - "kind": "repos", - "query": { - "sort": [ - "status", - "_id" - ], - "direction": "asc" - }, - "expected": { - "page": 1, - "limit": 10, - "sort": { - "_id": 1 - } - } - }, - { - "kind": "repos", - "query": { - "sort": "status", - "direction": [ - "asc", - "desc" - ] - }, - "expected": { - "page": 1, - "limit": 10, - "sort": { - "status": -1 - } - } - }, - { - "kind": "repos", - "query": { - "sort": "status", - "direction": "ASC" - }, - "expected": { - "page": 1, - "limit": 10, - "sort": { - "status": -1 - } - } - }, - { - "kind": "repos", - "query": { - "page": [ - "3", - "4" - ], - "limit": [ - "2", - "3" - ] - }, - "expected": { - "page": 3, - "limit": 2, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "repos", - "rawQuery": "page[]=3&limit[]=2", - "expected": { - "page": 3, - "limit": 2, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "repos", - "rawQuery": "page[1]=3&page[0]=2", - "expected": { - "page": 2, - "limit": 10, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "repos", - "rawQuery": "page[x]=2", - "expected": { - "page": 1, - "limit": 10, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "repos", - "rawQuery": "page[toString]=x", - "error": true - }, - { - "kind": "repos", - "rawQuery": "limit[toString]=x", - "error": true - }, - { - "kind": "repos", - "rawQuery": "sort[]=status&direction[]=asc", - "expected": { - "page": 1, - "limit": 10, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "repos", - "rawQuery": "sort=status&sort[x]=foo", - "expected": { - "page": 1, - "limit": 10, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "repos", - "rawQuery": "format[]=csv", - "expected": { - "page": 1, - "limit": 10, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "repos", - "rawQuery": "format=csv", - "expected": { - "page": 1, - "limit": 10, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "repos", - "rawQuery": "direction=asc&direction=desc", - "expected": { - "page": 1, - "limit": 10, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "users", - "query": {}, - "expected": { - "page": 1, - "limit": 10, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "users", - "query": { - "page": "", - "limit": "" - }, - "expected": { - "page": 1, - "limit": 10, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "users", - "query": { - "page": "0", - "limit": "0" - }, - "expected": { - "page": 1, - "limit": 10, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "users", - "query": { - "page": "-1", - "limit": "-1" - }, - "expected": { - "page": -1, - "limit": -1, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "users", - "query": { - "page": "-20suffix", - "limit": "-20suffix" - }, - "expected": { - "page": -20, - "limit": -20, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "users", - "query": { - "page": "-0x10", - "limit": "-0x10" - }, - "expected": { - "page": -16, - "limit": -16, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "users", - "query": { - "page": "2", - "limit": "2" - }, - "expected": { - "page": 2, - "limit": 2, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "users", - "query": { - "page": "2.9", - "limit": "2.9" - }, - "expected": { - "page": 2, - "limit": 2, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "users", - "query": { - "page": "2e3", - "limit": "2e3" - }, - "expected": { - "page": 2, - "limit": 2, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "users", - "query": { - "page": "+12suffix", - "limit": "+12suffix" - }, - "expected": { - "page": 12, - "limit": 12, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "users", - "query": { - "page": " 17 ", - "limit": " 17 " - }, - "expected": { - "page": 17, - "limit": 17, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "users", - "query": { - "page": "0x10", - "limit": "0x10" - }, - "expected": { - "page": 16, - "limit": 16, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "users", - "query": { - "page": "0Xff", - "limit": "0Xff" - }, - "expected": { - "page": 255, - "limit": 255, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "users", - "query": { - "page": "0b10", - "limit": "0b10" - }, - "expected": { - "page": 1, - "limit": 10, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "users", - "query": { - "page": "0007", - "limit": "0007" - }, - "expected": { - "page": 7, - "limit": 7, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "users", - "query": { - "page": "0xg", - "limit": "0xg" - }, - "expected": { - "page": 1, - "limit": 10, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "users", - "query": { - "page": "junk", - "limit": "junk" - }, - "expected": { - "page": 1, - "limit": 10, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "users", - "query": { - "page": "12", - "limit": "12" - }, - "expected": { - "page": 12, - "limit": 12, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "users", - "query": { - "page": "…12", - "limit": "…12" - }, - "expected": { - "page": 1, - "limit": 10, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "users", - "query": { - "page": "10000", - "limit": "10000" - }, - "expected": { - "page": 10000, - "limit": 1000, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "users", - "query": { - "page": "999999999999999999999999999999", - "limit": "999999999999999999999999999999" - }, - "expected": { - "page": 1e+30, - "limit": 1000, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "users", - "query": { - "sort": "_id", - "direction": "asc" - }, - "expected": { - "page": 1, - "limit": 10, - "sort": { - "_id": 1 - } - } - }, - { - "kind": "users", - "query": { - "sort": "repoId", - "direction": "asc" - }, - "expected": { - "page": 1, - "limit": 10, - "sort": { - "repoId": 1 - } - } - }, - { - "kind": "users", - "query": { - "sort": "size.storage", - "direction": "asc" - }, - "expected": { - "page": 1, - "limit": 10, - "sort": { - "size.storage": 1 - } - } - }, - { - "kind": "users", - "query": { - "sort": "status", - "direction": "asc" - }, - "expected": { - "page": 1, - "limit": 10, - "sort": { - "status": 1 - } - } - }, - { - "kind": "users", - "query": { - "sort": "$where", - "direction": "asc" - }, - "expected": { - "page": 1, - "limit": 10, - "sort": { - "_id": 1 - } - } - }, - { - "kind": "users", - "query": { - "sort": "a b", - "direction": "asc" - }, - "expected": { - "page": 1, - "limit": 10, - "sort": { - "_id": 1 - } - } - }, - { - "kind": "users", - "query": { - "sort": "a/b", - "direction": "asc" - }, - "expected": { - "page": 1, - "limit": 10, - "sort": { - "_id": 1 - } - } - }, - { - "kind": "users", - "query": { - "sort": "a;drop", - "direction": "asc" - }, - "expected": { - "page": 1, - "limit": 10, - "sort": { - "_id": 1 - } - } - }, - { - "kind": "users", - "query": { - "sort": "status\n", - "direction": "asc" - }, - "expected": { - "page": 1, - "limit": 10, - "sort": { - "_id": 1 - } - } - }, - { - "kind": "users", - "query": { - "sort": "status\r\n", - "direction": "asc" - }, - "expected": { - "page": 1, - "limit": 10, - "sort": { - "_id": 1 - } - } - }, - { - "kind": "users", - "query": { - "sort": "", - "direction": "asc" - }, - "expected": { - "page": 1, - "limit": 10, - "sort": { - "_id": 1 - } - } - }, - { - "kind": "users", - "query": { - "sort": [ - "status", - "_id" - ], - "direction": "asc" - }, - "expected": { - "page": 1, - "limit": 10, - "sort": { - "_id": 1 - } - } - }, - { - "kind": "users", - "query": { - "sort": "status", - "direction": [ - "asc", - "desc" - ] - }, - "expected": { - "page": 1, - "limit": 10, - "sort": { - "status": -1 - } - } - }, - { - "kind": "users", - "query": { - "sort": "status", - "direction": "ASC" - }, - "expected": { - "page": 1, - "limit": 10, - "sort": { - "status": -1 - } - } - }, - { - "kind": "users", - "query": { - "page": [ - "3", - "4" - ], - "limit": [ - "2", - "3" - ] - }, - "expected": { - "page": 3, - "limit": 2, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "users", - "rawQuery": "page[]=3&limit[]=2", - "expected": { - "page": 3, - "limit": 2, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "users", - "rawQuery": "page[1]=3&page[0]=2", - "expected": { - "page": 2, - "limit": 10, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "users", - "rawQuery": "page[x]=2", - "expected": { - "page": 1, - "limit": 10, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "users", - "rawQuery": "page[toString]=x", - "error": true - }, - { - "kind": "users", - "rawQuery": "limit[toString]=x", - "error": true - }, - { - "kind": "users", - "rawQuery": "sort[]=status&direction[]=asc", - "expected": { - "page": 1, - "limit": 10, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "users", - "rawQuery": "sort=status&sort[x]=foo", - "expected": { - "page": 1, - "limit": 10, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "users", - "rawQuery": "format[]=csv", - "expected": { - "page": 1, - "limit": 10, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "users", - "rawQuery": "format=csv", - "expected": { - "page": 1, - "limit": 10, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "users", - "rawQuery": "direction=asc&direction=desc", - "expected": { - "page": 1, - "limit": 10, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "conferences", - "query": {}, - "expected": { - "page": 1, - "limit": 10, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "conferences", - "query": { - "page": "", - "limit": "" - }, - "expected": { - "page": 1, - "limit": 10, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "conferences", - "query": { - "page": "0", - "limit": "0" - }, - "expected": { - "page": 1, - "limit": 10, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "conferences", - "query": { - "page": "-1", - "limit": "-1" - }, - "expected": { - "page": -1, - "limit": -1, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "conferences", - "query": { - "page": "-20suffix", - "limit": "-20suffix" - }, - "expected": { - "page": -20, - "limit": -20, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "conferences", - "query": { - "page": "-0x10", - "limit": "-0x10" - }, - "expected": { - "page": -16, - "limit": -16, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "conferences", - "query": { - "page": "2", - "limit": "2" - }, - "expected": { - "page": 2, - "limit": 2, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "conferences", - "query": { - "page": "2.9", - "limit": "2.9" - }, - "expected": { - "page": 2, - "limit": 2, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "conferences", - "query": { - "page": "2e3", - "limit": "2e3" - }, - "expected": { - "page": 2, - "limit": 2, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "conferences", - "query": { - "page": "+12suffix", - "limit": "+12suffix" - }, - "expected": { - "page": 12, - "limit": 12, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "conferences", - "query": { - "page": " 17 ", - "limit": " 17 " - }, - "expected": { - "page": 17, - "limit": 17, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "conferences", - "query": { - "page": "0x10", - "limit": "0x10" - }, - "expected": { - "page": 16, - "limit": 16, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "conferences", - "query": { - "page": "0Xff", - "limit": "0Xff" - }, - "expected": { - "page": 255, - "limit": 255, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "conferences", - "query": { - "page": "0b10", - "limit": "0b10" - }, - "expected": { - "page": 1, - "limit": 10, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "conferences", - "query": { - "page": "0007", - "limit": "0007" - }, - "expected": { - "page": 7, - "limit": 7, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "conferences", - "query": { - "page": "0xg", - "limit": "0xg" - }, - "expected": { - "page": 1, - "limit": 10, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "conferences", - "query": { - "page": "junk", - "limit": "junk" - }, - "expected": { - "page": 1, - "limit": 10, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "conferences", - "query": { - "page": "12", - "limit": "12" - }, - "expected": { - "page": 12, - "limit": 12, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "conferences", - "query": { - "page": "…12", - "limit": "…12" - }, - "expected": { - "page": 1, - "limit": 10, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "conferences", - "query": { - "page": "10000", - "limit": "10000" - }, - "expected": { - "page": 10000, - "limit": 1000, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "conferences", - "query": { - "page": "999999999999999999999999999999", - "limit": "999999999999999999999999999999" - }, - "expected": { - "page": 1e+30, - "limit": 1000, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "conferences", - "query": { - "sort": "_id", - "direction": "asc" - }, - "expected": { - "page": 1, - "limit": 10, - "sort": { - "_id": 1 - } - } - }, - { - "kind": "conferences", - "query": { - "sort": "repoId", - "direction": "asc" - }, - "expected": { - "page": 1, - "limit": 10, - "sort": { - "repoId": 1 - } - } - }, - { - "kind": "conferences", - "query": { - "sort": "size.storage", - "direction": "asc" - }, - "expected": { - "page": 1, - "limit": 10, - "sort": { - "size.storage": 1 - } - } - }, - { - "kind": "conferences", - "query": { - "sort": "status", - "direction": "asc" - }, - "expected": { - "page": 1, - "limit": 10, - "sort": { - "status": 1 - } - } - }, - { - "kind": "conferences", - "query": { - "sort": "$where", - "direction": "asc" - }, - "expected": { - "page": 1, - "limit": 10, - "sort": { - "_id": 1 - } - } - }, - { - "kind": "conferences", - "query": { - "sort": "a b", - "direction": "asc" - }, - "expected": { - "page": 1, - "limit": 10, - "sort": { - "_id": 1 - } - } - }, - { - "kind": "conferences", - "query": { - "sort": "a/b", - "direction": "asc" - }, - "expected": { - "page": 1, - "limit": 10, - "sort": { - "_id": 1 - } - } - }, - { - "kind": "conferences", - "query": { - "sort": "a;drop", - "direction": "asc" - }, - "expected": { - "page": 1, - "limit": 10, - "sort": { - "_id": 1 - } - } - }, - { - "kind": "conferences", - "query": { - "sort": "status\n", - "direction": "asc" - }, - "expected": { - "page": 1, - "limit": 10, - "sort": { - "_id": 1 - } - } - }, - { - "kind": "conferences", - "query": { - "sort": "status\r\n", - "direction": "asc" - }, - "expected": { - "page": 1, - "limit": 10, - "sort": { - "_id": 1 - } - } - }, - { - "kind": "conferences", - "query": { - "sort": "", - "direction": "asc" - }, - "expected": { - "page": 1, - "limit": 10, - "sort": { - "_id": 1 - } - } - }, - { - "kind": "conferences", - "query": { - "sort": [ - "status", - "_id" - ], - "direction": "asc" - }, - "expected": { - "page": 1, - "limit": 10, - "sort": { - "_id": 1 - } - } - }, - { - "kind": "conferences", - "query": { - "sort": "status", - "direction": [ - "asc", - "desc" - ] - }, - "expected": { - "page": 1, - "limit": 10, - "sort": { - "status": -1 - } - } - }, - { - "kind": "conferences", - "query": { - "sort": "status", - "direction": "ASC" - }, - "expected": { - "page": 1, - "limit": 10, - "sort": { - "status": -1 - } - } - }, - { - "kind": "conferences", - "query": { - "page": [ - "3", - "4" - ], - "limit": [ - "2", - "3" - ] - }, - "expected": { - "page": 3, - "limit": 2, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "conferences", - "rawQuery": "page[]=3&limit[]=2", - "expected": { - "page": 3, - "limit": 2, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "conferences", - "rawQuery": "page[1]=3&page[0]=2", - "expected": { - "page": 2, - "limit": 10, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "conferences", - "rawQuery": "page[x]=2", - "expected": { - "page": 1, - "limit": 10, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "conferences", - "rawQuery": "page[toString]=x", - "error": true - }, - { - "kind": "conferences", - "rawQuery": "limit[toString]=x", - "error": true - }, - { - "kind": "conferences", - "rawQuery": "sort[]=status&direction[]=asc", - "expected": { - "page": 1, - "limit": 10, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "conferences", - "rawQuery": "sort=status&sort[x]=foo", - "expected": { - "page": 1, - "limit": 10, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "conferences", - "rawQuery": "format[]=csv", - "expected": { - "page": 1, - "limit": 10, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "conferences", - "rawQuery": "format=csv", - "expected": { - "page": 1, - "limit": 10, - "sort": { - "_id": -1 - } - } - }, - { - "kind": "conferences", - "rawQuery": "direction=asc&direction=desc", - "expected": { - "page": 1, - "limit": 10, - "sort": { - "_id": -1 - } - } - } -] diff --git a/backend/internal/server/testdata/admin-query.json b/backend/internal/server/testdata/admin-query.json deleted file mode 100644 index 022168f..0000000 --- a/backend/internal/server/testdata/admin-query.json +++ /dev/null @@ -1,155 +0,0 @@ -{ - "queue": [ - { - "query": "", - "queue": "download", - "range": "1h", - "minutes": 60 - }, - { - "query": "queue[]=cache", - "queue": "cache", - "range": "1h", - "minutes": 60 - }, - { - "query": "queue[]=", - "error": "queue_not_found" - }, - { - "query": "queue=cache&queue=remove", - "error": "queue_not_found" - }, - { - "query": "queue[x]=cache", - "error": "queue_not_found" - }, - { - "query": "queue=unknown&range[toString]=x", - "error": "queue_not_found" - }, - { - "query": "range[]=", - "queue": "download", - "range": "", - "minutes": 60 - }, - { - "query": "range[]=24h", - "queue": "download", - "range": "24h", - "minutes": 1440 - }, - { - "query": "range[1]=7d&range[0]=1h", - "queue": "download", - "range": "1h,7d", - "minutes": 60 - }, - { - "query": "range[x]=24h", - "queue": "download", - "range": "[object Object]", - "minutes": 60 - }, - { - "query": "range[toString]=x", - "error": "invalid_query_value" - }, - { - "query": "queue[toString]=x", - "error": "invalid_query_value" - }, - { - "query": "range=toString", - "queue": "download", - "range": "toString", - "minutes": 0 - }, - { - "query": "range=constructor", - "queue": "download", - "range": "constructor", - "minutes": 0 - }, - { - "query": "range=__proto__", - "queue": "download", - "range": "__proto__", - "minutes": 0 - }, - { - "query": "range=hasOwnProperty", - "queue": "download", - "range": "hasOwnProperty", - "minutes": 0 - }, - { - "query": "range=valueOf", - "queue": "download", - "range": "valueOf", - "minutes": 0 - }, - { - "query": "range=toLocaleString", - "queue": "download", - "range": "toLocaleString", - "minutes": 0 - } - ], - "errors": [ - { - "query": "", - "offset": 0, - "limit": 250 - }, - { - "query": "offset[]=2&limit[]=7", - "offset": 2, - "limit": 7 - }, - { - "query": "offset[1]=2&offset[0]=7", - "offset": 7, - "limit": 250 - }, - { - "query": "offset[x]=3", - "offset": 0, - "limit": 250 - }, - { - "query": "limit[x]=3", - "offset": 0, - "limit": 250 - }, - { - "query": "offset=&offset=2&limit=7&limit=9", - "offset": 0, - "limit": 7 - }, - { - "query": "offset[]=&limit[]=", - "offset": 0, - "limit": 250 - }, - { - "query": "offset[toString]=3", - "error": "invalid_query_value" - }, - { - "query": "limit[toString]=3", - "error": "invalid_query_value" - }, - { - "query": "offset=-2&limit=-2", - "offset": 0, - "limit": 1 - }, - { - "query": "offset=0x10&limit=0x10", - "offset": 0, - "limit": 250 - } - ] -} diff --git a/backend/internal/server/testdata/admin-user.json b/backend/internal/server/testdata/admin-user.json deleted file mode 100644 index 3e8f846..0000000 --- a/backend/internal/server/testdata/admin-user.json +++ /dev/null @@ -1,441 +0,0 @@ -{ - "now": "2030-01-01T12:00:00.000Z", - "cases": [ - { - "name": "minimal", - "user": { - "_id": "111111111111111111111111", - "username": "sample", - "dateOfEntry": "2030-01-01T12:00:00.000Z" - }, - "repositories": [], - "expected": { - "default": { - "terms": [] - }, - "isAdmin": false, - "repositories": [], - "status": "active", - "_id": "111111111111111111111111", - "username": "sample", - "dateOfEntry": "2030-01-01T12:00:00.000Z", - "emails": [] - } - }, - { - "name": "defaults", - "user": { - "_id": "111111111111111111111111", - "username": "sample" - }, - "repositories": [], - "expected": { - "default": { - "terms": [] - }, - "isAdmin": false, - "repositories": [], - "status": "active", - "_id": "111111111111111111111111", - "username": "sample", - "emails": [], - "dateOfEntry": "2030-01-01T12:00:00.000Z" - } - }, - { - "name": "rich", - "user": { - "_id": "111111111111111111111111", - "username": "sample", - "dateOfEntry": "2030-01-01T12:00:00.000Z", - "photo": "https://avatar.test", - "isAdmin": true, - "status": "banned", - "externalIDs": { - "github": "123" - }, - "accessTokenDates": { - "github": "2030-01-01T12:00:00.000Z" - }, - "emails": [ - { - "_id": "666666666666666666666666", - "email": "owner@example.test", - "default": true - } - ], - "projectNames": { - "repo:example": "Project" - }, - "default": { - "terms": [ - "Alice" - ], - "options": { - "expirationMode": "never", - "image": false, - "page": "docs" - } - }, - "__v": 2, - "accessTokens": { - "github": "synthetic-secret" - }, - "apiTokens": [ - { - "tokenHash": "synthetic-secret" - } - ] - }, - "repositories": [], - "expected": { - "accessTokenDates": { - "github": "2030-01-01T12:00:00.000Z" - }, - "externalIDs": { - "github": "123" - }, - "default": { - "options": { - "expirationMode": "never", - "image": false, - "page": "docs" - }, - "terms": [ - "Alice" - ] - }, - "repositories": [], - "_id": "111111111111111111111111", - "username": "sample", - "dateOfEntry": "2030-01-01T12:00:00.000Z", - "photo": "https://avatar.test", - "isAdmin": true, - "status": "banned", - "emails": [ - { - "_id": "666666666666666666666666", - "email": "owner@example.test", - "default": true - } - ], - "projectNames": { - "repo:example": "Project" - }, - "__v": 2 - } - }, - { - "name": "populated", - "user": { - "_id": "111111111111111111111111", - "username": "sample", - "dateOfEntry": "2030-01-01T12:00:00.000Z", - "repositories": [ - "222222222222222222222222", - "333333333333333333333333" - ] - }, - "repositories": [ - { - "_id": "222222222222222222222222", - "externalId": "forge:opaque-id", - "name": "team/subgroup/project", - "source": "fixture", - "url": "https://forge.test/team/subgroup/project", - "dateOfEntry": "2030-01-01T12:00:00.000Z", - "size": 123, - "defaultBranch": "main", - "pageSource": { - "branch": "docs", - "path": "/" - }, - "branches": [ - { - "_id": "555555555555555555555555", - "name": "main", - "commit": "opaque:revision", - "readme": "Readme" - } - ] - }, - { - "_id": "333333333333333333333333", - "name": "minimal" - } - ], - "expected": { - "default": { - "terms": [] - }, - "isAdmin": false, - "status": "active", - "_id": "111111111111111111111111", - "username": "sample", - "dateOfEntry": "2030-01-01T12:00:00.000Z", - "repositories": [ - { - "pageSource": { - "branch": "docs", - "path": "/" - }, - "hasPage": false, - "status": "ready", - "_id": "222222222222222222222222", - "externalId": "forge:opaque-id", - "name": "team/subgroup/project", - "source": "fixture", - "url": "https://forge.test/team/subgroup/project", - "dateOfEntry": "2030-01-01T12:00:00.000Z", - "size": 123, - "defaultBranch": "main", - "branches": [ - { - "_id": "555555555555555555555555", - "name": "main", - "commit": "opaque:revision", - "readme": "Readme" - } - ] - }, - { - "source": "github", - "hasPage": false, - "status": "ready", - "_id": "333333333333333333333333", - "name": "minimal", - "branches": [], - "dateOfEntry": "2030-01-01T12:00:00.000Z" - } - ], - "emails": [] - } - }, - { - "name": "missing-reference", - "user": { - "_id": "111111111111111111111111", - "username": "sample", - "dateOfEntry": "2030-01-01T12:00:00.000Z", - "repositories": [ - "444444444444444444444444", - "222222222222222222222222" - ] - }, - "repositories": [ - { - "_id": "222222222222222222222222", - "externalId": "forge:opaque-id", - "name": "team/subgroup/project", - "source": "fixture", - "url": "https://forge.test/team/subgroup/project", - "dateOfEntry": "2030-01-01T12:00:00.000Z", - "size": 123, - "defaultBranch": "main", - "pageSource": { - "branch": "docs", - "path": "/" - }, - "branches": [ - { - "_id": "555555555555555555555555", - "name": "main", - "commit": "opaque:revision", - "readme": "Readme" - } - ] - } - ], - "expected": { - "default": { - "terms": [] - }, - "isAdmin": false, - "status": "active", - "_id": "111111111111111111111111", - "username": "sample", - "dateOfEntry": "2030-01-01T12:00:00.000Z", - "repositories": [ - { - "pageSource": { - "branch": "docs", - "path": "/" - }, - "hasPage": false, - "status": "ready", - "_id": "222222222222222222222222", - "externalId": "forge:opaque-id", - "name": "team/subgroup/project", - "source": "fixture", - "url": "https://forge.test/team/subgroup/project", - "dateOfEntry": "2030-01-01T12:00:00.000Z", - "size": 123, - "defaultBranch": "main", - "branches": [ - { - "_id": "555555555555555555555555", - "name": "main", - "commit": "opaque:revision", - "readme": "Readme" - } - ] - } - ], - "emails": [] - } - }, - { - "name": "duplicate-references", - "user": { - "_id": "111111111111111111111111", - "username": "sample", - "dateOfEntry": "2030-01-01T12:00:00.000Z", - "repositories": [ - "222222222222222222222222", - "222222222222222222222222" - ] - }, - "repositories": [ - { - "_id": "222222222222222222222222", - "externalId": "forge:opaque-id", - "name": "team/subgroup/project", - "source": "fixture", - "url": "https://forge.test/team/subgroup/project", - "dateOfEntry": "2030-01-01T12:00:00.000Z", - "size": 123, - "defaultBranch": "main", - "pageSource": { - "branch": "docs", - "path": "/" - }, - "branches": [ - { - "_id": "555555555555555555555555", - "name": "main", - "commit": "opaque:revision", - "readme": "Readme" - } - ] - } - ], - "expected": { - "default": { - "terms": [] - }, - "isAdmin": false, - "status": "active", - "_id": "111111111111111111111111", - "username": "sample", - "dateOfEntry": "2030-01-01T12:00:00.000Z", - "repositories": [ - { - "pageSource": { - "branch": "docs", - "path": "/" - }, - "hasPage": false, - "status": "ready", - "_id": "222222222222222222222222", - "externalId": "forge:opaque-id", - "name": "team/subgroup/project", - "source": "fixture", - "url": "https://forge.test/team/subgroup/project", - "dateOfEntry": "2030-01-01T12:00:00.000Z", - "size": 123, - "defaultBranch": "main", - "branches": [ - { - "_id": "555555555555555555555555", - "name": "main", - "commit": "opaque:revision", - "readme": "Readme" - } - ] - }, - { - "pageSource": { - "branch": "docs", - "path": "/" - }, - "hasPage": false, - "status": "ready", - "_id": "222222222222222222222222", - "externalId": "forge:opaque-id", - "name": "team/subgroup/project", - "source": "fixture", - "url": "https://forge.test/team/subgroup/project", - "dateOfEntry": "2030-01-01T12:00:00.000Z", - "size": 123, - "defaultBranch": "main", - "branches": [ - { - "_id": "555555555555555555555555", - "name": "main", - "commit": "opaque:revision", - "readme": "Readme" - } - ] - } - ], - "emails": [] - } - }, - { - "name": "null-fields", - "user": { - "_id": "111111111111111111111111", - "username": "sample", - "dateOfEntry": "2030-01-01T12:00:00.000Z", - "isAdmin": null, - "status": null, - "default": null, - "emails": null, - "externalIDs": null, - "projectNames": null, - "repositories": null - }, - "repositories": [], - "expected": { - "externalIDs": null, - "default": null, - "_id": "111111111111111111111111", - "username": "sample", - "dateOfEntry": "2030-01-01T12:00:00.000Z", - "isAdmin": null, - "status": null, - "emails": null, - "projectNames": null, - "repositories": null - } - }, - { - "name": "empty-maps", - "user": { - "_id": "111111111111111111111111", - "username": "sample", - "dateOfEntry": "2030-01-01T12:00:00.000Z", - "externalIDs": {}, - "accessTokenDates": {}, - "projectNames": {}, - "default": { - "options": {} - } - }, - "repositories": [], - "expected": { - "default": { - "terms": [] - }, - "isAdmin": false, - "repositories": [], - "status": "active", - "_id": "111111111111111111111111", - "username": "sample", - "dateOfEntry": "2030-01-01T12:00:00.000Z", - "projectNames": {}, - "emails": [] - } - } - ] -} diff --git a/backend/internal/server/testdata/cache-metrics.json b/backend/internal/server/testdata/cache-metrics.json deleted file mode 100644 index 36fd3c6..0000000 --- a/backend/internal/server/testdata/cache-metrics.json +++ /dev/null @@ -1,217 +0,0 @@ -[ - { - "input": null, - "windowMinutes": 60, - "period": 60000, - "cutoff": 1799996400000, - "buckets": [ - 0.1, - 1, - 10, - 100, - 1000, - 10000 - ] - }, - { - "input": "", - "windowMinutes": 60, - "period": 60000, - "cutoff": 1799996400000, - "buckets": [ - 0.1, - 1, - 10, - 100, - 1000, - 10000 - ] - }, - { - "input": "15", - "windowMinutes": 15, - "period": 60000, - "cutoff": 1799999100000, - "buckets": [ - 0.1, - 1, - 10, - 100, - 1000, - 10000 - ] - }, - { - "input": "60", - "windowMinutes": 60, - "period": 60000, - "cutoff": 1799996400000, - "buckets": [ - 0.1, - 1, - 10, - 100, - 1000, - 10000 - ] - }, - { - "input": "1440", - "windowMinutes": 1440, - "period": 60000, - "cutoff": 1799913600000, - "buckets": [ - 0.1, - 1, - 10, - 100, - 1000, - 10000 - ] - }, - { - "input": "10080", - "windowMinutes": 10080, - "period": 3600000, - "cutoff": 1799395200000, - "buckets": [ - 0.1, - 1, - 10, - 100, - 1000, - 10000 - ] - }, - { - "input": "30", - "windowMinutes": 60, - "period": 60000, - "cutoff": 1799996400000, - "buckets": [ - 0.1, - 1, - 10, - 100, - 1000, - 10000 - ] - }, - { - "input": " 15 ", - "windowMinutes": 15, - "period": 60000, - "cutoff": 1799999100000, - "buckets": [ - 0.1, - 1, - 10, - 100, - 1000, - 10000 - ] - }, - { - "input": "1.5e1", - "windowMinutes": 15, - "period": 60000, - "cutoff": 1799999100000, - "buckets": [ - 0.1, - 1, - 10, - 100, - 1000, - 10000 - ] - }, - { - "input": "0xf", - "windowMinutes": 15, - "period": 60000, - "cutoff": 1799999100000, - "buckets": [ - 0.1, - 1, - 10, - 100, - 1000, - 10000 - ] - }, - { - "input": "0b1111", - "windowMinutes": 15, - "period": 60000, - "cutoff": 1799999100000, - "buckets": [ - 0.1, - 1, - 10, - 100, - 1000, - 10000 - ] - }, - { - "input": "15.0", - "windowMinutes": 15, - "period": 60000, - "cutoff": 1799999100000, - "buckets": [ - 0.1, - 1, - 10, - 100, - 1000, - 10000 - ] - }, - { - "input": "15x", - "windowMinutes": 60, - "period": 60000, - "cutoff": 1799996400000, - "buckets": [ - 0.1, - 1, - 10, - 100, - 1000, - 10000 - ] - }, - { - "input": [ - "15" - ], - "windowMinutes": 15, - "period": 60000, - "cutoff": 1799999100000, - "buckets": [ - 0.1, - 1, - 10, - 100, - 1000, - 10000 - ] - }, - { - "input": [ - "15", - "60" - ], - "windowMinutes": 60, - "period": 60000, - "cutoff": 1799996400000, - "buckets": [ - 0.1, - 1, - 10, - 100, - 1000, - 10000 - ] - } -] diff --git a/backend/internal/server/testdata/cache-report-state.json b/backend/internal/server/testdata/cache-report-state.json deleted file mode 100644 index a69aaf4..0000000 --- a/backend/internal/server/testdata/cache-report-state.json +++ /dev/null @@ -1,149 +0,0 @@ -[ - { - "input": { - "name": "disabled", - "enabled": false, - "storage": "filesystem" - }, - "expected": { - "available": false, - "reason": "Monitoring is disabled", - "rows": [], - "enabled": false, - "filesystemSupported": true, - "source": null, - "results": null - }, - "headers": { - "Cache-Control": "no-store" - } - }, - { - "input": { - "name": "source only", - "enabled": true, - "storage": "filesystem", - "source": true - }, - "expected": { - "available": false, - "reason": "Monitoring is disabled", - "rows": [], - "enabled": true, - "filesystemSupported": true, - "source": { - "blobs": 0, - "originalBytes": 0, - "storedBytes": 0, - "allocatedBytes": 0, - "activeReaders": 0, - "decisions": 0, - "reservedBytes": 0, - "budgetBytes": 65536, - "maxObjectBytes": 4096, - "oldestAccess": null - }, - "results": null - }, - "headers": { - "Cache-Control": "no-store" - } - }, - { - "input": { - "name": "source and results", - "enabled": true, - "storage": "filesystem", - "source": true, - "results": true - }, - "expected": { - "available": false, - "reason": "Monitoring is disabled", - "rows": [], - "enabled": true, - "filesystemSupported": true, - "source": { - "blobs": 0, - "originalBytes": 0, - "storedBytes": 0, - "allocatedBytes": 0, - "activeReaders": 0, - "decisions": 0, - "reservedBytes": 0, - "budgetBytes": 65536, - "maxObjectBytes": 4096, - "oldestAccess": null - }, - "results": { - "blobs": 0, - "originalBytes": 0, - "storedBytes": 0, - "allocatedBytes": 0, - "activeReaders": 0, - "decisions": 0, - "reservedBytes": 0, - "budgetBytes": 65536, - "maxObjectBytes": 4096, - "oldestAccess": null - } - }, - "headers": { - "Cache-Control": "no-store" - } - }, - { - "input": { - "name": "s3", - "enabled": true, - "storage": "s3" - }, - "expected": { - "available": false, - "reason": "Monitoring is disabled", - "rows": [], - "enabled": true, - "filesystemSupported": false, - "source": null, - "results": null - }, - "headers": { - "Cache-Control": "no-store" - } - }, - { - "input": { - "name": "source unavailable", - "enabled": true, - "storage": "filesystem", - "source": true, - "sourceError": true - }, - "expected": { - "available": false, - "reason": "The cache index is unavailable", - "rows": [] - }, - "headers": { - "Cache-Control": "no-store" - } - }, - { - "input": { - "name": "results unavailable", - "enabled": true, - "storage": "filesystem", - "source": true, - "results": true, - "resultError": true - }, - "expected": { - "available": false, - "reason": "The cache index is unavailable", - "rows": [] - }, - "headers": { - "Cache-Control": "no-store" - } - } -] diff --git a/backend/internal/server/testdata/compression.json b/backend/internal/server/testdata/compression.json deleted file mode 100644 index 6fcbe89..0000000 --- a/backend/internal/server/testdata/compression.json +++ /dev/null @@ -1,1895 +0,0 @@ -[ - { - "name": "compression-0", - "path": "/api/example", - "method": "GET", - "type": "application/json", - "size": 2048, - "accept": "", - "expected": { - "status": 200, - "encoding": "", - "vary": "Accept-Encoding", - "length": "2048", - "bodyBytes": 2048, - "sha256": "1d1801f753ccd9fa57966c46f360585caf83337a394a5f238d4e4e7d6005788d" - } - }, - { - "name": "compression-1", - "path": "/api/example", - "method": "GET", - "type": "application/json", - "size": 2048, - "accept": "gzip", - "expected": { - "status": 200, - "encoding": "gzip", - "vary": "Accept-Encoding", - "length": "", - "bodyBytes": 2048, - "sha256": "1d1801f753ccd9fa57966c46f360585caf83337a394a5f238d4e4e7d6005788d" - } - }, - { - "name": "compression-2", - "path": "/api/example", - "method": "GET", - "type": "application/json", - "size": 2048, - "accept": "br", - "expected": { - "status": 200, - "encoding": "br", - "vary": "Accept-Encoding", - "length": "", - "bodyBytes": 2048, - "sha256": "1d1801f753ccd9fa57966c46f360585caf83337a394a5f238d4e4e7d6005788d" - } - }, - { - "name": "compression-3", - "path": "/api/example", - "method": "GET", - "type": "application/json", - "size": 2048, - "accept": "deflate", - "expected": { - "status": 200, - "encoding": "deflate", - "vary": "Accept-Encoding", - "length": "", - "bodyBytes": 2048, - "sha256": "1d1801f753ccd9fa57966c46f360585caf83337a394a5f238d4e4e7d6005788d" - } - }, - { - "name": "compression-4", - "path": "/api/example", - "method": "GET", - "type": "application/json", - "size": 2048, - "accept": "identity", - "expected": { - "status": 200, - "encoding": "", - "vary": "Accept-Encoding", - "length": "2048", - "bodyBytes": 2048, - "sha256": "1d1801f753ccd9fa57966c46f360585caf83337a394a5f238d4e4e7d6005788d" - } - }, - { - "name": "compression-5", - "path": "/api/example", - "method": "GET", - "type": "application/json", - "size": 2048, - "accept": "*", - "expected": { - "status": 200, - "encoding": "br", - "vary": "Accept-Encoding", - "length": "", - "bodyBytes": 2048, - "sha256": "1d1801f753ccd9fa57966c46f360585caf83337a394a5f238d4e4e7d6005788d" - } - }, - { - "name": "compression-6", - "path": "/api/example", - "method": "GET", - "type": "application/json", - "size": 2048, - "accept": "gzip, br", - "expected": { - "status": 200, - "encoding": "br", - "vary": "Accept-Encoding", - "length": "", - "bodyBytes": 2048, - "sha256": "1d1801f753ccd9fa57966c46f360585caf83337a394a5f238d4e4e7d6005788d" - } - }, - { - "name": "compression-7", - "path": "/api/example", - "method": "GET", - "type": "application/json", - "size": 2048, - "accept": "deflate, gzip", - "expected": { - "status": 200, - "encoding": "gzip", - "vary": "Accept-Encoding", - "length": "", - "bodyBytes": 2048, - "sha256": "1d1801f753ccd9fa57966c46f360585caf83337a394a5f238d4e4e7d6005788d" - } - }, - { - "name": "compression-8", - "path": "/api/example", - "method": "GET", - "type": "application/json", - "size": 2048, - "accept": "identity, gzip", - "expected": { - "status": 200, - "encoding": "gzip", - "vary": "Accept-Encoding", - "length": "", - "bodyBytes": 2048, - "sha256": "1d1801f753ccd9fa57966c46f360585caf83337a394a5f238d4e4e7d6005788d" - } - }, - { - "name": "compression-9", - "path": "/api/example", - "method": "GET", - "type": "application/json", - "size": 2048, - "accept": "GZIP", - "expected": { - "status": 200, - "encoding": "gzip", - "vary": "Accept-Encoding", - "length": "", - "bodyBytes": 2048, - "sha256": "1d1801f753ccd9fa57966c46f360585caf83337a394a5f238d4e4e7d6005788d" - } - }, - { - "name": "compression-10", - "path": "/api/example", - "method": "GET", - "type": "application/json", - "size": 2048, - "accept": "gzip;q=0", - "expected": { - "status": 200, - "encoding": "", - "vary": "Accept-Encoding", - "length": "2048", - "bodyBytes": 2048, - "sha256": "1d1801f753ccd9fa57966c46f360585caf83337a394a5f238d4e4e7d6005788d" - } - }, - { - "name": "compression-11", - "path": "/api/example", - "method": "GET", - "type": "application/json", - "size": 2048, - "accept": "*;q=0", - "expected": { - "status": 200, - "encoding": "", - "vary": "Accept-Encoding", - "length": "2048", - "bodyBytes": 2048, - "sha256": "1d1801f753ccd9fa57966c46f360585caf83337a394a5f238d4e4e7d6005788d" - } - }, - { - "name": "compression-12", - "path": "/api/example", - "method": "GET", - "type": "application/json", - "size": 2048, - "accept": "gzip;q=0,*", - "expected": { - "status": 200, - "encoding": "br", - "vary": "Accept-Encoding", - "length": "", - "bodyBytes": 2048, - "sha256": "1d1801f753ccd9fa57966c46f360585caf83337a394a5f238d4e4e7d6005788d" - } - }, - { - "name": "compression-13", - "path": "/api/example", - "method": "GET", - "type": "application/json", - "size": 2048, - "accept": "gzip;q=0.5,identity;q=1", - "expected": { - "status": 200, - "encoding": "", - "vary": "Accept-Encoding", - "length": "2048", - "bodyBytes": 2048, - "sha256": "1d1801f753ccd9fa57966c46f360585caf83337a394a5f238d4e4e7d6005788d" - } - }, - { - "name": "compression-14", - "path": "/api/example", - "method": "GET", - "type": "application/json", - "size": 2048, - "accept": "gzip;q=1,br;q=.5", - "expected": { - "status": 200, - "encoding": "gzip", - "vary": "Accept-Encoding", - "length": "", - "bodyBytes": 2048, - "sha256": "1d1801f753ccd9fa57966c46f360585caf83337a394a5f238d4e4e7d6005788d" - } - }, - { - "name": "compression-15", - "path": "/api/example", - "method": "GET", - "type": "application/json", - "size": 2048, - "accept": "deflate;q=.5,gzip;q=.5", - "expected": { - "status": 200, - "encoding": "gzip", - "vary": "Accept-Encoding", - "length": "", - "bodyBytes": 2048, - "sha256": "1d1801f753ccd9fa57966c46f360585caf83337a394a5f238d4e4e7d6005788d" - } - }, - { - "name": "compression-16", - "path": "/api/example", - "method": "GET", - "type": "application/json", - "size": 2048, - "accept": "deflate;q=1,identity;q=1", - "expected": { - "status": 200, - "encoding": "deflate", - "vary": "Accept-Encoding", - "length": "", - "bodyBytes": 2048, - "sha256": "1d1801f753ccd9fa57966c46f360585caf83337a394a5f238d4e4e7d6005788d" - } - }, - { - "name": "compression-17", - "path": "/api/example", - "method": "GET", - "type": "application/json", - "size": 2048, - "accept": "unknown", - "expected": { - "status": 200, - "encoding": "", - "vary": "Accept-Encoding", - "length": "2048", - "bodyBytes": 2048, - "sha256": "1d1801f753ccd9fa57966c46f360585caf83337a394a5f238d4e4e7d6005788d" - } - }, - { - "name": "compression-18", - "path": "/api/example", - "method": "GET", - "type": "application/json", - "size": 2048, - "accept": "gzip;q=NaN", - "expected": { - "status": 200, - "encoding": "", - "vary": "Accept-Encoding", - "length": "2048", - "bodyBytes": 2048, - "sha256": "1d1801f753ccd9fa57966c46f360585caf83337a394a5f238d4e4e7d6005788d" - } - }, - { - "name": "compression-19", - "path": "/api/example", - "method": "GET", - "type": "application/json", - "size": 2048, - "accept": "gzip;q=1junk", - "expected": { - "status": 200, - "encoding": "gzip", - "vary": "Accept-Encoding", - "length": "", - "bodyBytes": 2048, - "sha256": "1d1801f753ccd9fa57966c46f360585caf83337a394a5f238d4e4e7d6005788d" - } - }, - { - "name": "compression-20", - "path": "/api/example", - "method": "GET", - "type": "application/json", - "size": 2048, - "accept": "gzip;q=-1", - "expected": { - "status": 200, - "encoding": "", - "vary": "Accept-Encoding", - "length": "2048", - "bodyBytes": 2048, - "sha256": "1d1801f753ccd9fa57966c46f360585caf83337a394a5f238d4e4e7d6005788d" - } - }, - { - "name": "compression-21", - "path": "/api/example", - "method": "GET", - "type": "application/json", - "size": 2048, - "accept": "gzip;q=2", - "expected": { - "status": 200, - "encoding": "gzip", - "vary": "Accept-Encoding", - "length": "", - "bodyBytes": 2048, - "sha256": "1d1801f753ccd9fa57966c46f360585caf83337a394a5f238d4e4e7d6005788d" - } - }, - { - "name": "compression-22", - "path": "/api/example", - "method": "GET", - "type": "application/json", - "size": 2048, - "accept": "gzip;Q=0", - "expected": { - "status": 200, - "encoding": "gzip", - "vary": "Accept-Encoding", - "length": "", - "bodyBytes": 2048, - "sha256": "1d1801f753ccd9fa57966c46f360585caf83337a394a5f238d4e4e7d6005788d" - } - }, - { - "name": "compression-23", - "path": "/api/example", - "method": "GET", - "type": "application/json", - "size": 2048, - "accept": "gzip;q =0", - "expected": { - "status": 200, - "encoding": "gzip", - "vary": "Accept-Encoding", - "length": "", - "bodyBytes": 2048, - "sha256": "1d1801f753ccd9fa57966c46f360585caf83337a394a5f238d4e4e7d6005788d" - } - }, - { - "name": "compression-24", - "path": "/api/example", - "method": "GET", - "type": "application/json", - "size": 2048, - "accept": "gzip;q=0,gzip;q=1", - "expected": { - "status": 200, - "encoding": "gzip", - "vary": "Accept-Encoding", - "length": "", - "bodyBytes": 2048, - "sha256": "1d1801f753ccd9fa57966c46f360585caf83337a394a5f238d4e4e7d6005788d" - } - }, - { - "name": "compression-25", - "path": "/api/example", - "method": "GET", - "type": "application/json", - "size": 2048, - "accept": "gzip;q=1,gzip;q=0", - "expected": { - "status": 200, - "encoding": "gzip", - "vary": "Accept-Encoding", - "length": "", - "bodyBytes": 2048, - "sha256": "1d1801f753ccd9fa57966c46f360585caf83337a394a5f238d4e4e7d6005788d" - } - }, - { - "name": "compression-26", - "path": "/api/example", - "method": "GET", - "type": "application/json", - "size": 2048, - "accept": "br;q=0,*;q=.5", - "expected": { - "status": 200, - "encoding": "gzip", - "vary": "Accept-Encoding", - "length": "", - "bodyBytes": 2048, - "sha256": "1d1801f753ccd9fa57966c46f360585caf83337a394a5f238d4e4e7d6005788d" - } - }, - { - "name": "compression-27", - "path": "/api/example", - "method": "GET", - "type": "application/json", - "size": 2048, - "accept": "gzip;q=Infinity", - "expected": { - "status": 200, - "encoding": "gzip", - "vary": "Accept-Encoding", - "length": "", - "bodyBytes": 2048, - "sha256": "1d1801f753ccd9fa57966c46f360585caf83337a394a5f238d4e4e7d6005788d" - } - }, - { - "name": "compression-28", - "path": "/api/example", - "method": "GET", - "type": "application/json", - "size": 2048, - "accept": "gzip;q=0.1; q=1", - "expected": { - "status": 200, - "encoding": "gzip", - "vary": "Accept-Encoding", - "length": "", - "bodyBytes": 2048, - "sha256": "1d1801f753ccd9fa57966c46f360585caf83337a394a5f238d4e4e7d6005788d" - } - }, - { - "name": "compression-29", - "path": "/api/example", - "method": "GET", - "type": "", - "size": 0, - "accept": "gzip", - "expected": { - "status": 200, - "encoding": "", - "vary": "", - "length": "0", - "bodyBytes": 0, - "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - } - }, - { - "name": "compression-30", - "path": "/api/example", - "method": "GET", - "type": "", - "size": 10, - "accept": "gzip", - "expected": { - "status": 200, - "encoding": "", - "vary": "", - "length": "10", - "bodyBytes": 10, - "sha256": "fc11d6f28e59d3cc33c0b14ceb644bf0902ebd63d61218dffe9e7dac7c254542" - } - }, - { - "name": "compression-31", - "path": "/api/example", - "method": "GET", - "type": "", - "size": 1023, - "accept": "gzip", - "expected": { - "status": 200, - "encoding": "", - "vary": "", - "length": "1023", - "bodyBytes": 1023, - "sha256": "97c9d367e67d0cff2f99f4c97ddff45250552d880b0d2c57caf78b1483da8c56" - } - }, - { - "name": "compression-32", - "path": "/api/example", - "method": "GET", - "type": "", - "size": 1024, - "accept": "gzip", - "expected": { - "status": 200, - "encoding": "", - "vary": "", - "length": "1024", - "bodyBytes": 1024, - "sha256": "49abd65bbf7f7e40c7055093ed2e3fd75f2f602f2c5fcf955c213e3135eb03f7" - } - }, - { - "name": "compression-33", - "path": "/api/example", - "method": "GET", - "type": "text/plain", - "size": 0, - "accept": "gzip", - "expected": { - "status": 200, - "encoding": "", - "vary": "Accept-Encoding", - "length": "0", - "bodyBytes": 0, - "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - } - }, - { - "name": "compression-34", - "path": "/api/example", - "method": "GET", - "type": "text/plain", - "size": 10, - "accept": "gzip", - "expected": { - "status": 200, - "encoding": "", - "vary": "Accept-Encoding", - "length": "10", - "bodyBytes": 10, - "sha256": "fc11d6f28e59d3cc33c0b14ceb644bf0902ebd63d61218dffe9e7dac7c254542" - } - }, - { - "name": "compression-35", - "path": "/api/example", - "method": "GET", - "type": "text/plain", - "size": 1023, - "accept": "gzip", - "expected": { - "status": 200, - "encoding": "", - "vary": "Accept-Encoding", - "length": "1023", - "bodyBytes": 1023, - "sha256": "97c9d367e67d0cff2f99f4c97ddff45250552d880b0d2c57caf78b1483da8c56" - } - }, - { - "name": "compression-36", - "path": "/api/example", - "method": "GET", - "type": "text/plain", - "size": 1024, - "accept": "gzip", - "expected": { - "status": 200, - "encoding": "gzip", - "vary": "Accept-Encoding", - "length": "", - "bodyBytes": 1024, - "sha256": "49abd65bbf7f7e40c7055093ed2e3fd75f2f602f2c5fcf955c213e3135eb03f7" - } - }, - { - "name": "compression-37", - "path": "/api/example", - "method": "GET", - "type": "Text/HTML; charset=UTF-8", - "size": 0, - "accept": "gzip", - "expected": { - "status": 200, - "encoding": "", - "vary": "Accept-Encoding", - "length": "0", - "bodyBytes": 0, - "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - } - }, - { - "name": "compression-38", - "path": "/api/example", - "method": "GET", - "type": "Text/HTML; charset=UTF-8", - "size": 10, - "accept": "gzip", - "expected": { - "status": 200, - "encoding": "", - "vary": "Accept-Encoding", - "length": "10", - "bodyBytes": 10, - "sha256": "fc11d6f28e59d3cc33c0b14ceb644bf0902ebd63d61218dffe9e7dac7c254542" - } - }, - { - "name": "compression-39", - "path": "/api/example", - "method": "GET", - "type": "Text/HTML; charset=UTF-8", - "size": 1023, - "accept": "gzip", - "expected": { - "status": 200, - "encoding": "", - "vary": "Accept-Encoding", - "length": "1023", - "bodyBytes": 1023, - "sha256": "97c9d367e67d0cff2f99f4c97ddff45250552d880b0d2c57caf78b1483da8c56" - } - }, - { - "name": "compression-40", - "path": "/api/example", - "method": "GET", - "type": "Text/HTML; charset=UTF-8", - "size": 1024, - "accept": "gzip", - "expected": { - "status": 200, - "encoding": "gzip", - "vary": "Accept-Encoding", - "length": "", - "bodyBytes": 1024, - "sha256": "49abd65bbf7f7e40c7055093ed2e3fd75f2f602f2c5fcf955c213e3135eb03f7" - } - }, - { - "name": "compression-41", - "path": "/api/example", - "method": "GET", - "type": "application/json", - "size": 0, - "accept": "gzip", - "expected": { - "status": 200, - "encoding": "", - "vary": "Accept-Encoding", - "length": "0", - "bodyBytes": 0, - "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - } - }, - { - "name": "compression-42", - "path": "/api/example", - "method": "GET", - "type": "application/json", - "size": 10, - "accept": "gzip", - "expected": { - "status": 200, - "encoding": "", - "vary": "Accept-Encoding", - "length": "10", - "bodyBytes": 10, - "sha256": "fc11d6f28e59d3cc33c0b14ceb644bf0902ebd63d61218dffe9e7dac7c254542" - } - }, - { - "name": "compression-43", - "path": "/api/example", - "method": "GET", - "type": "application/json", - "size": 1023, - "accept": "gzip", - "expected": { - "status": 200, - "encoding": "", - "vary": "Accept-Encoding", - "length": "1023", - "bodyBytes": 1023, - "sha256": "97c9d367e67d0cff2f99f4c97ddff45250552d880b0d2c57caf78b1483da8c56" - } - }, - { - "name": "compression-44", - "path": "/api/example", - "method": "GET", - "type": "application/json", - "size": 1024, - "accept": "gzip", - "expected": { - "status": 200, - "encoding": "gzip", - "vary": "Accept-Encoding", - "length": "", - "bodyBytes": 1024, - "sha256": "49abd65bbf7f7e40c7055093ed2e3fd75f2f602f2c5fcf955c213e3135eb03f7" - } - }, - { - "name": "compression-45", - "path": "/api/example", - "method": "GET", - "type": "application/problem+json", - "size": 0, - "accept": "gzip", - "expected": { - "status": 200, - "encoding": "", - "vary": "Accept-Encoding", - "length": "0", - "bodyBytes": 0, - "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - } - }, - { - "name": "compression-46", - "path": "/api/example", - "method": "GET", - "type": "application/problem+json", - "size": 10, - "accept": "gzip", - "expected": { - "status": 200, - "encoding": "", - "vary": "Accept-Encoding", - "length": "10", - "bodyBytes": 10, - "sha256": "fc11d6f28e59d3cc33c0b14ceb644bf0902ebd63d61218dffe9e7dac7c254542" - } - }, - { - "name": "compression-47", - "path": "/api/example", - "method": "GET", - "type": "application/problem+json", - "size": 1023, - "accept": "gzip", - "expected": { - "status": 200, - "encoding": "", - "vary": "Accept-Encoding", - "length": "1023", - "bodyBytes": 1023, - "sha256": "97c9d367e67d0cff2f99f4c97ddff45250552d880b0d2c57caf78b1483da8c56" - } - }, - { - "name": "compression-48", - "path": "/api/example", - "method": "GET", - "type": "application/problem+json", - "size": 1024, - "accept": "gzip", - "expected": { - "status": 200, - "encoding": "gzip", - "vary": "Accept-Encoding", - "length": "", - "bodyBytes": 1024, - "sha256": "49abd65bbf7f7e40c7055093ed2e3fd75f2f602f2c5fcf955c213e3135eb03f7" - } - }, - { - "name": "compression-49", - "path": "/api/example", - "method": "GET", - "type": "application/javascript", - "size": 0, - "accept": "gzip", - "expected": { - "status": 200, - "encoding": "", - "vary": "Accept-Encoding", - "length": "0", - "bodyBytes": 0, - "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - } - }, - { - "name": "compression-50", - "path": "/api/example", - "method": "GET", - "type": "application/javascript", - "size": 10, - "accept": "gzip", - "expected": { - "status": 200, - "encoding": "", - "vary": "Accept-Encoding", - "length": "10", - "bodyBytes": 10, - "sha256": "fc11d6f28e59d3cc33c0b14ceb644bf0902ebd63d61218dffe9e7dac7c254542" - } - }, - { - "name": "compression-51", - "path": "/api/example", - "method": "GET", - "type": "application/javascript", - "size": 1023, - "accept": "gzip", - "expected": { - "status": 200, - "encoding": "", - "vary": "Accept-Encoding", - "length": "1023", - "bodyBytes": 1023, - "sha256": "97c9d367e67d0cff2f99f4c97ddff45250552d880b0d2c57caf78b1483da8c56" - } - }, - { - "name": "compression-52", - "path": "/api/example", - "method": "GET", - "type": "application/javascript", - "size": 1024, - "accept": "gzip", - "expected": { - "status": 200, - "encoding": "gzip", - "vary": "Accept-Encoding", - "length": "", - "bodyBytes": 1024, - "sha256": "49abd65bbf7f7e40c7055093ed2e3fd75f2f602f2c5fcf955c213e3135eb03f7" - } - }, - { - "name": "compression-53", - "path": "/api/example", - "method": "GET", - "type": "application/octet-stream", - "size": 0, - "accept": "gzip", - "expected": { - "status": 200, - "encoding": "", - "vary": "Accept-Encoding", - "length": "0", - "bodyBytes": 0, - "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - } - }, - { - "name": "compression-54", - "path": "/api/example", - "method": "GET", - "type": "application/octet-stream", - "size": 10, - "accept": "gzip", - "expected": { - "status": 200, - "encoding": "", - "vary": "Accept-Encoding", - "length": "10", - "bodyBytes": 10, - "sha256": "fc11d6f28e59d3cc33c0b14ceb644bf0902ebd63d61218dffe9e7dac7c254542" - } - }, - { - "name": "compression-55", - "path": "/api/example", - "method": "GET", - "type": "application/octet-stream", - "size": 1023, - "accept": "gzip", - "expected": { - "status": 200, - "encoding": "", - "vary": "Accept-Encoding", - "length": "1023", - "bodyBytes": 1023, - "sha256": "97c9d367e67d0cff2f99f4c97ddff45250552d880b0d2c57caf78b1483da8c56" - } - }, - { - "name": "compression-56", - "path": "/api/example", - "method": "GET", - "type": "application/octet-stream", - "size": 1024, - "accept": "gzip", - "expected": { - "status": 200, - "encoding": "gzip", - "vary": "Accept-Encoding", - "length": "", - "bodyBytes": 1024, - "sha256": "49abd65bbf7f7e40c7055093ed2e3fd75f2f602f2c5fcf955c213e3135eb03f7" - } - }, - { - "name": "compression-57", - "path": "/api/example", - "method": "GET", - "type": "application/pdf", - "size": 0, - "accept": "gzip", - "expected": { - "status": 200, - "encoding": "", - "vary": "", - "length": "0", - "bodyBytes": 0, - "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - } - }, - { - "name": "compression-58", - "path": "/api/example", - "method": "GET", - "type": "application/pdf", - "size": 10, - "accept": "gzip", - "expected": { - "status": 200, - "encoding": "", - "vary": "", - "length": "10", - "bodyBytes": 10, - "sha256": "fc11d6f28e59d3cc33c0b14ceb644bf0902ebd63d61218dffe9e7dac7c254542" - } - }, - { - "name": "compression-59", - "path": "/api/example", - "method": "GET", - "type": "application/pdf", - "size": 1023, - "accept": "gzip", - "expected": { - "status": 200, - "encoding": "", - "vary": "", - "length": "1023", - "bodyBytes": 1023, - "sha256": "97c9d367e67d0cff2f99f4c97ddff45250552d880b0d2c57caf78b1483da8c56" - } - }, - { - "name": "compression-60", - "path": "/api/example", - "method": "GET", - "type": "application/pdf", - "size": 1024, - "accept": "gzip", - "expected": { - "status": 200, - "encoding": "", - "vary": "", - "length": "1024", - "bodyBytes": 1024, - "sha256": "49abd65bbf7f7e40c7055093ed2e3fd75f2f602f2c5fcf955c213e3135eb03f7" - } - }, - { - "name": "compression-61", - "path": "/api/example", - "method": "GET", - "type": "image/png", - "size": 0, - "accept": "gzip", - "expected": { - "status": 200, - "encoding": "", - "vary": "", - "length": "0", - "bodyBytes": 0, - "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - } - }, - { - "name": "compression-62", - "path": "/api/example", - "method": "GET", - "type": "image/png", - "size": 10, - "accept": "gzip", - "expected": { - "status": 200, - "encoding": "", - "vary": "", - "length": "10", - "bodyBytes": 10, - "sha256": "fc11d6f28e59d3cc33c0b14ceb644bf0902ebd63d61218dffe9e7dac7c254542" - } - }, - { - "name": "compression-63", - "path": "/api/example", - "method": "GET", - "type": "image/png", - "size": 1023, - "accept": "gzip", - "expected": { - "status": 200, - "encoding": "", - "vary": "", - "length": "1023", - "bodyBytes": 1023, - "sha256": "97c9d367e67d0cff2f99f4c97ddff45250552d880b0d2c57caf78b1483da8c56" - } - }, - { - "name": "compression-64", - "path": "/api/example", - "method": "GET", - "type": "image/png", - "size": 1024, - "accept": "gzip", - "expected": { - "status": 200, - "encoding": "", - "vary": "", - "length": "1024", - "bodyBytes": 1024, - "sha256": "49abd65bbf7f7e40c7055093ed2e3fd75f2f602f2c5fcf955c213e3135eb03f7" - } - }, - { - "name": "compression-65", - "path": "/api/example", - "method": "GET", - "type": "image/svg+xml", - "size": 0, - "accept": "gzip", - "expected": { - "status": 200, - "encoding": "", - "vary": "Accept-Encoding", - "length": "0", - "bodyBytes": 0, - "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - } - }, - { - "name": "compression-66", - "path": "/api/example", - "method": "GET", - "type": "image/svg+xml", - "size": 10, - "accept": "gzip", - "expected": { - "status": 200, - "encoding": "", - "vary": "Accept-Encoding", - "length": "10", - "bodyBytes": 10, - "sha256": "fc11d6f28e59d3cc33c0b14ceb644bf0902ebd63d61218dffe9e7dac7c254542" - } - }, - { - "name": "compression-67", - "path": "/api/example", - "method": "GET", - "type": "image/svg+xml", - "size": 1023, - "accept": "gzip", - "expected": { - "status": 200, - "encoding": "", - "vary": "Accept-Encoding", - "length": "1023", - "bodyBytes": 1023, - "sha256": "97c9d367e67d0cff2f99f4c97ddff45250552d880b0d2c57caf78b1483da8c56" - } - }, - { - "name": "compression-68", - "path": "/api/example", - "method": "GET", - "type": "image/svg+xml", - "size": 1024, - "accept": "gzip", - "expected": { - "status": 200, - "encoding": "gzip", - "vary": "Accept-Encoding", - "length": "", - "bodyBytes": 1024, - "sha256": "49abd65bbf7f7e40c7055093ed2e3fd75f2f602f2c5fcf955c213e3135eb03f7" - } - }, - { - "name": "compression-69", - "path": "/api/example", - "method": "GET", - "type": "font/woff2", - "size": 0, - "accept": "gzip", - "expected": { - "status": 200, - "encoding": "", - "vary": "", - "length": "0", - "bodyBytes": 0, - "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - } - }, - { - "name": "compression-70", - "path": "/api/example", - "method": "GET", - "type": "font/woff2", - "size": 10, - "accept": "gzip", - "expected": { - "status": 200, - "encoding": "", - "vary": "", - "length": "10", - "bodyBytes": 10, - "sha256": "fc11d6f28e59d3cc33c0b14ceb644bf0902ebd63d61218dffe9e7dac7c254542" - } - }, - { - "name": "compression-71", - "path": "/api/example", - "method": "GET", - "type": "font/woff2", - "size": 1023, - "accept": "gzip", - "expected": { - "status": 200, - "encoding": "", - "vary": "", - "length": "1023", - "bodyBytes": 1023, - "sha256": "97c9d367e67d0cff2f99f4c97ddff45250552d880b0d2c57caf78b1483da8c56" - } - }, - { - "name": "compression-72", - "path": "/api/example", - "method": "GET", - "type": "font/woff2", - "size": 1024, - "accept": "gzip", - "expected": { - "status": 200, - "encoding": "", - "vary": "", - "length": "1024", - "bodyBytes": 1024, - "sha256": "49abd65bbf7f7e40c7055093ed2e3fd75f2f602f2c5fcf955c213e3135eb03f7" - } - }, - { - "name": "compression-73", - "path": "/api/example", - "method": "GET", - "type": "text/event-stream", - "size": 0, - "accept": "gzip", - "expected": { - "status": 200, - "encoding": "", - "vary": "Accept-Encoding", - "length": "0", - "bodyBytes": 0, - "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - } - }, - { - "name": "compression-74", - "path": "/api/example", - "method": "GET", - "type": "text/event-stream", - "size": 10, - "accept": "gzip", - "expected": { - "status": 200, - "encoding": "", - "vary": "Accept-Encoding", - "length": "10", - "bodyBytes": 10, - "sha256": "fc11d6f28e59d3cc33c0b14ceb644bf0902ebd63d61218dffe9e7dac7c254542" - } - }, - { - "name": "compression-75", - "path": "/api/example", - "method": "GET", - "type": "text/event-stream", - "size": 1023, - "accept": "gzip", - "expected": { - "status": 200, - "encoding": "", - "vary": "Accept-Encoding", - "length": "1023", - "bodyBytes": 1023, - "sha256": "97c9d367e67d0cff2f99f4c97ddff45250552d880b0d2c57caf78b1483da8c56" - } - }, - { - "name": "compression-76", - "path": "/api/example", - "method": "GET", - "type": "text/event-stream", - "size": 1024, - "accept": "gzip", - "expected": { - "status": 200, - "encoding": "gzip", - "vary": "Accept-Encoding", - "length": "", - "bodyBytes": 1024, - "sha256": "49abd65bbf7f7e40c7055093ed2e3fd75f2f602f2c5fcf955c213e3135eb03f7" - } - }, - { - "name": "compression-77", - "path": "/api/example", - "method": "GET", - "type": "application/unknown", - "size": 0, - "accept": "gzip", - "expected": { - "status": 200, - "encoding": "", - "vary": "", - "length": "0", - "bodyBytes": 0, - "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - } - }, - { - "name": "compression-78", - "path": "/api/example", - "method": "GET", - "type": "application/unknown", - "size": 10, - "accept": "gzip", - "expected": { - "status": 200, - "encoding": "", - "vary": "", - "length": "10", - "bodyBytes": 10, - "sha256": "fc11d6f28e59d3cc33c0b14ceb644bf0902ebd63d61218dffe9e7dac7c254542" - } - }, - { - "name": "compression-79", - "path": "/api/example", - "method": "GET", - "type": "application/unknown", - "size": 1023, - "accept": "gzip", - "expected": { - "status": 200, - "encoding": "", - "vary": "", - "length": "1023", - "bodyBytes": 1023, - "sha256": "97c9d367e67d0cff2f99f4c97ddff45250552d880b0d2c57caf78b1483da8c56" - } - }, - { - "name": "compression-80", - "path": "/api/example", - "method": "GET", - "type": "application/unknown", - "size": 1024, - "accept": "gzip", - "expected": { - "status": 200, - "encoding": "", - "vary": "", - "length": "1024", - "bodyBytes": 1024, - "sha256": "49abd65bbf7f7e40c7055093ed2e3fd75f2f602f2c5fcf955c213e3135eb03f7" - } - }, - { - "name": "compression-81", - "path": "/api/example", - "method": "GET", - "type": "application/example+xml", - "size": 0, - "accept": "gzip", - "expected": { - "status": 200, - "encoding": "", - "vary": "Accept-Encoding", - "length": "0", - "bodyBytes": 0, - "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - } - }, - { - "name": "compression-82", - "path": "/api/example", - "method": "GET", - "type": "application/example+xml", - "size": 10, - "accept": "gzip", - "expected": { - "status": 200, - "encoding": "", - "vary": "Accept-Encoding", - "length": "10", - "bodyBytes": 10, - "sha256": "fc11d6f28e59d3cc33c0b14ceb644bf0902ebd63d61218dffe9e7dac7c254542" - } - }, - { - "name": "compression-83", - "path": "/api/example", - "method": "GET", - "type": "application/example+xml", - "size": 1023, - "accept": "gzip", - "expected": { - "status": 200, - "encoding": "", - "vary": "Accept-Encoding", - "length": "1023", - "bodyBytes": 1023, - "sha256": "97c9d367e67d0cff2f99f4c97ddff45250552d880b0d2c57caf78b1483da8c56" - } - }, - { - "name": "compression-84", - "path": "/api/example", - "method": "GET", - "type": "application/example+xml", - "size": 1024, - "accept": "gzip", - "expected": { - "status": 200, - "encoding": "gzip", - "vary": "Accept-Encoding", - "length": "", - "bodyBytes": 1024, - "sha256": "49abd65bbf7f7e40c7055093ed2e3fd75f2f602f2c5fcf955c213e3135eb03f7" - } - }, - { - "name": "compression-85", - "path": "/api/example", - "method": "GET", - "type": "text/x-unknown", - "size": 0, - "accept": "gzip", - "expected": { - "status": 200, - "encoding": "", - "vary": "Accept-Encoding", - "length": "0", - "bodyBytes": 0, - "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - } - }, - { - "name": "compression-86", - "path": "/api/example", - "method": "GET", - "type": "text/x-unknown", - "size": 10, - "accept": "gzip", - "expected": { - "status": 200, - "encoding": "", - "vary": "Accept-Encoding", - "length": "10", - "bodyBytes": 10, - "sha256": "fc11d6f28e59d3cc33c0b14ceb644bf0902ebd63d61218dffe9e7dac7c254542" - } - }, - { - "name": "compression-87", - "path": "/api/example", - "method": "GET", - "type": "text/x-unknown", - "size": 1023, - "accept": "gzip", - "expected": { - "status": 200, - "encoding": "", - "vary": "Accept-Encoding", - "length": "1023", - "bodyBytes": 1023, - "sha256": "97c9d367e67d0cff2f99f4c97ddff45250552d880b0d2c57caf78b1483da8c56" - } - }, - { - "name": "compression-88", - "path": "/api/example", - "method": "GET", - "type": "text/x-unknown", - "size": 1024, - "accept": "gzip", - "expected": { - "status": 200, - "encoding": "gzip", - "vary": "Accept-Encoding", - "length": "", - "bodyBytes": 1024, - "sha256": "49abd65bbf7f7e40c7055093ed2e3fd75f2f602f2c5fcf955c213e3135eb03f7" - } - }, - { - "name": "compression-89", - "path": "/api/example", - "method": "GET", - "type": "application/json", - "size": 2048, - "accept": "gzip", - "control": "no-transform", - "expected": { - "status": 200, - "encoding": "", - "vary": "", - "length": "2048", - "bodyBytes": 2048, - "sha256": "1d1801f753ccd9fa57966c46f360585caf83337a394a5f238d4e4e7d6005788d" - } - }, - { - "name": "compression-90", - "path": "/api/example", - "method": "GET", - "type": "application/json", - "size": 2048, - "accept": "gzip", - "control": "public, no-transform", - "expected": { - "status": 200, - "encoding": "", - "vary": "", - "length": "2048", - "bodyBytes": 2048, - "sha256": "1d1801f753ccd9fa57966c46f360585caf83337a394a5f238d4e4e7d6005788d" - } - }, - { - "name": "compression-91", - "path": "/api/example", - "method": "GET", - "type": "application/json", - "size": 2048, - "accept": "gzip", - "control": "NO-TRANSFORM", - "expected": { - "status": 200, - "encoding": "", - "vary": "", - "length": "2048", - "bodyBytes": 2048, - "sha256": "1d1801f753ccd9fa57966c46f360585caf83337a394a5f238d4e4e7d6005788d" - } - }, - { - "name": "compression-92", - "path": "/api/example", - "method": "GET", - "type": "application/json", - "size": 2048, - "accept": "gzip", - "control": "no-transform=1", - "expected": { - "status": 200, - "encoding": "gzip", - "vary": "Accept-Encoding", - "length": "", - "bodyBytes": 2048, - "sha256": "1d1801f753ccd9fa57966c46f360585caf83337a394a5f238d4e4e7d6005788d" - } - }, - { - "name": "compression-93", - "path": "/api/example", - "method": "GET", - "type": "application/json", - "size": 2048, - "accept": "gzip", - "control": "x-no-transform", - "expected": { - "status": 200, - "encoding": "gzip", - "vary": "Accept-Encoding", - "length": "", - "bodyBytes": 2048, - "sha256": "1d1801f753ccd9fa57966c46f360585caf83337a394a5f238d4e4e7d6005788d" - } - }, - { - "name": "compression-94", - "path": "/api/example", - "method": "GET", - "type": "application/json", - "size": 2048, - "accept": "gzip", - "control": "public, no-transform , max-age=60", - "expected": { - "status": 200, - "encoding": "", - "vary": "", - "length": "2048", - "bodyBytes": 2048, - "sha256": "1d1801f753ccd9fa57966c46f360585caf83337a394a5f238d4e4e7d6005788d" - } - }, - { - "name": "compression-95", - "path": "/api/repo/x/file/a", - "method": "GET", - "type": "application/json", - "size": 2048, - "accept": "gzip", - "expected": { - "status": 200, - "encoding": "", - "vary": "", - "length": "2048", - "bodyBytes": 2048, - "sha256": "1d1801f753ccd9fa57966c46f360585caf83337a394a5f238d4e4e7d6005788d" - } - }, - { - "name": "compression-96", - "path": "/api/repo/x/y/file/a", - "method": "GET", - "type": "application/json", - "size": 2048, - "accept": "gzip", - "expected": { - "status": 200, - "encoding": "", - "vary": "", - "length": "2048", - "bodyBytes": 2048, - "sha256": "1d1801f753ccd9fa57966c46f360585caf83337a394a5f238d4e4e7d6005788d" - } - }, - { - "name": "compression-97", - "path": "/api/repo/x/files", - "method": "GET", - "type": "application/json", - "size": 2048, - "accept": "gzip", - "expected": { - "status": 200, - "encoding": "gzip", - "vary": "Accept-Encoding", - "length": "", - "bodyBytes": 2048, - "sha256": "1d1801f753ccd9fa57966c46f360585caf83337a394a5f238d4e4e7d6005788d" - } - }, - { - "name": "compression-98", - "path": "/api/repo/x/file", - "method": "GET", - "type": "application/json", - "size": 2048, - "accept": "gzip", - "expected": { - "status": 200, - "encoding": "gzip", - "vary": "Accept-Encoding", - "length": "", - "bodyBytes": 2048, - "sha256": "1d1801f753ccd9fa57966c46f360585caf83337a394a5f238d4e4e7d6005788d" - } - }, - { - "name": "compression-99", - "path": "/w/x/index.html", - "method": "GET", - "type": "application/json", - "size": 2048, - "accept": "gzip", - "expected": { - "status": 200, - "encoding": "gzip", - "vary": "Accept-Encoding", - "length": "", - "bodyBytes": 2048, - "sha256": "1d1801f753ccd9fa57966c46f360585caf83337a394a5f238d4e4e7d6005788d" - } - }, - { - "name": "compression-100", - "path": "/api/example", - "method": "GET", - "type": "application/json", - "size": 0, - "accept": "gzip", - "stream": true, - "expected": { - "status": 200, - "encoding": "gzip", - "vary": "Accept-Encoding", - "length": "", - "bodyBytes": 0, - "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - } - }, - { - "name": "compression-101", - "path": "/api/example", - "method": "GET", - "type": "application/json", - "size": 10, - "accept": "gzip", - "stream": true, - "expected": { - "status": 200, - "encoding": "gzip", - "vary": "Accept-Encoding", - "length": "", - "bodyBytes": 10, - "sha256": "fc11d6f28e59d3cc33c0b14ceb644bf0902ebd63d61218dffe9e7dac7c254542" - } - }, - { - "name": "compression-102", - "path": "/api/example", - "method": "GET", - "type": "application/json", - "size": 2048, - "accept": "gzip", - "stream": true, - "expected": { - "status": 200, - "encoding": "gzip", - "vary": "Accept-Encoding", - "length": "", - "bodyBytes": 2048, - "sha256": "1d1801f753ccd9fa57966c46f360585caf83337a394a5f238d4e4e7d6005788d" - } - }, - { - "name": "compression-103", - "path": "/api/example", - "method": "GET", - "type": "application/json", - "size": 0, - "accept": "gzip", - "stream": false, - "expected": { - "status": 200, - "encoding": "", - "vary": "Accept-Encoding", - "length": "0", - "bodyBytes": 0, - "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - } - }, - { - "name": "compression-104", - "path": "/api/example", - "method": "GET", - "type": "application/json", - "size": 10, - "accept": "gzip", - "stream": false, - "expected": { - "status": 200, - "encoding": "", - "vary": "Accept-Encoding", - "length": "10", - "bodyBytes": 10, - "sha256": "fc11d6f28e59d3cc33c0b14ceb644bf0902ebd63d61218dffe9e7dac7c254542" - } - }, - { - "name": "compression-105", - "path": "/api/example", - "method": "GET", - "type": "application/json", - "size": 2048, - "accept": "gzip", - "stream": false, - "expected": { - "status": 200, - "encoding": "gzip", - "vary": "Accept-Encoding", - "length": "", - "bodyBytes": 2048, - "sha256": "1d1801f753ccd9fa57966c46f360585caf83337a394a5f238d4e4e7d6005788d" - } - }, - { - "name": "compression-106", - "path": "/api/example", - "method": "GET", - "type": "application/json", - "size": 2048, - "accept": "gzip", - "vary": "Origin", - "expected": { - "status": 200, - "encoding": "gzip", - "vary": "Origin, Accept-Encoding", - "length": "", - "bodyBytes": 2048, - "sha256": "1d1801f753ccd9fa57966c46f360585caf83337a394a5f238d4e4e7d6005788d" - } - }, - { - "name": "compression-107", - "path": "/api/example", - "method": "GET", - "type": "application/json", - "size": 2048, - "accept": "gzip", - "vary": "accept-encoding", - "expected": { - "status": 200, - "encoding": "gzip", - "vary": "accept-encoding", - "length": "", - "bodyBytes": 2048, - "sha256": "1d1801f753ccd9fa57966c46f360585caf83337a394a5f238d4e4e7d6005788d" - } - }, - { - "name": "compression-108", - "path": "/api/example", - "method": "GET", - "type": "application/json", - "size": 2048, - "accept": "gzip", - "vary": "*", - "expected": { - "status": 200, - "encoding": "gzip", - "vary": "*", - "length": "", - "bodyBytes": 2048, - "sha256": "1d1801f753ccd9fa57966c46f360585caf83337a394a5f238d4e4e7d6005788d" - } - }, - { - "name": "compression-109", - "path": "/api/example", - "method": "GET", - "type": "application/json", - "size": 2048, - "accept": "gzip", - "vary": "Origin, Accept-Language", - "expected": { - "status": 200, - "encoding": "gzip", - "vary": "Origin, Accept-Language, Accept-Encoding", - "length": "", - "bodyBytes": 2048, - "sha256": "1d1801f753ccd9fa57966c46f360585caf83337a394a5f238d4e4e7d6005788d" - } - }, - { - "name": "compression-110", - "path": "/api/example", - "method": "GET", - "type": "application/json", - "size": 2048, - "accept": "gzip", - "preset": "identity", - "expected": { - "status": 200, - "encoding": "gzip", - "vary": "Accept-Encoding", - "length": "", - "bodyBytes": 2048, - "sha256": "1d1801f753ccd9fa57966c46f360585caf83337a394a5f238d4e4e7d6005788d" - } - }, - { - "name": "compression-111", - "path": "/api/example", - "method": "GET", - "type": "application/json", - "size": 2048, - "accept": "gzip", - "preset": "custom", - "expected": { - "status": 200, - "encoding": "custom", - "vary": "Accept-Encoding", - "length": "2048", - "bodyBytes": 2048, - "sha256": "1d1801f753ccd9fa57966c46f360585caf83337a394a5f238d4e4e7d6005788d" - } - }, - { - "name": "compression-112", - "path": "/api/example", - "method": "GET", - "type": "application/json", - "size": 2048, - "accept": "gzip", - "preset": "gzip", - "expected": { - "status": 200, - "encoding": "gzip", - "vary": "Accept-Encoding", - "length": "2048", - "bodyBytes": 2048, - "sha256": "1d1801f753ccd9fa57966c46f360585caf83337a394a5f238d4e4e7d6005788d" - } - }, - { - "name": "compression-113", - "path": "/api/example", - "method": "HEAD", - "type": "application/json", - "size": 10, - "accept": "gzip", - "expected": { - "status": 200, - "encoding": "", - "vary": "Accept-Encoding", - "length": "10", - "bodyBytes": 0, - "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - } - }, - { - "name": "compression-114", - "path": "/api/example", - "method": "HEAD", - "type": "application/json", - "size": 2048, - "accept": "gzip", - "expected": { - "status": 200, - "encoding": "", - "vary": "Accept-Encoding", - "length": "2048", - "bodyBytes": 0, - "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - } - }, - { - "name": "compression-115", - "path": "/api/example", - "method": "GET", - "type": "application/json", - "size": 2048, - "accept": "gzip", - "status": 204, - "expected": { - "status": 204, - "encoding": "gzip", - "vary": "Accept-Encoding", - "length": "", - "bodyBytes": 0, - "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - } - }, - { - "name": "compression-116", - "path": "/api/example", - "method": "GET", - "type": "application/json", - "size": 2048, - "accept": "gzip", - "status": 304, - "expected": { - "status": 304, - "encoding": "gzip", - "vary": "Accept-Encoding", - "length": "", - "bodyBytes": 0, - "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - } - } -] diff --git a/backend/internal/server/testdata/conference-dates.json b/backend/internal/server/testdata/conference-dates.json deleted file mode 100644 index e5bf463..0000000 --- a/backend/internal/server/testdata/conference-dates.json +++ /dev/null @@ -1,566 +0,0 @@ -[ - { - "body": { - "name": "Conference", - "startDate": "March 1 2031", - "endDate": "2032-01-01" - }, - "expected": { - "startDate": "2031-03-01T00:00:00.000Z", - "endDate": "2032-01-01T00:00:00.000Z" - } - }, - { - "body": { - "name": "Conference", - "startDate": "2031-02-30", - "endDate": "2032-01-01" - }, - "expected": { - "startDate": "2031-03-02T00:00:00.000Z", - "endDate": "2032-01-01T00:00:00.000Z" - } - }, - { - "body": { - "name": "Conference", - "startDate": "0001-01-01", - "endDate": "2032-01-01" - }, - "expected": { - "startDate": "0001-01-01T00:00:00.000Z", - "endDate": "2032-01-01T00:00:00.000Z" - } - }, - { - "body": { - "name": "Conference", - "startDate": "0000-01-01", - "endDate": "2032-01-01" - }, - "expected": { - "startDate": "0000-01-01T00:00:00.000Z", - "endDate": "2032-01-01T00:00:00.000Z" - } - }, - { - "body": { - "name": "Conference", - "startDate": "-000001-01-01", - "endDate": "2032-01-01" - }, - "expected": { - "startDate": "-000001-01-01T00:00:00.000Z", - "endDate": "2032-01-01T00:00:00.000Z" - } - }, - { - "body": { - "name": "Conference", - "startDate": "+010000-01-01", - "endDate": "2032-01-01" - }, - "expected": { - "startDate": "+010000-01-01T00:00:00.000Z", - "endDate": "2032-01-01T00:00:00.000Z" - } - }, - { - "body": { - "name": "Conference", - "startDate": "2031-01-01T24:00:00Z", - "endDate": "2032-01-01" - }, - "expected": { - "startDate": "2031-01-02T00:00:00.000Z", - "endDate": "2032-01-01T00:00:00.000Z" - } - }, - { - "body": { - "name": "Conference", - "startDate": "2031-01-01T01:00:00+02:00", - "endDate": "2032-01-01" - }, - "expected": { - "startDate": "2030-12-31T23:00:00.000Z", - "endDate": "2032-01-01T00:00:00.000Z" - } - }, - { - "body": { - "name": "Conference", - "startDate": "invalid", - "endDate": "2032-01-01" - }, - "error": true - }, - { - "body": { - "name": "Conference", - "startDate": "", - "endDate": "2032-01-01" - }, - "error": true - }, - { - "body": { - "name": "Conference", - "startDate": null, - "endDate": "2032-01-01" - }, - "expected": { - "startDate": "1970-01-01T00:00:00.000Z", - "endDate": "2032-01-01T00:00:00.000Z" - } - }, - { - "body": { - "name": "Conference", - "startDate": false, - "endDate": "2032-01-01" - }, - "expected": { - "startDate": "1970-01-01T00:00:00.000Z", - "endDate": "2032-01-01T00:00:00.000Z" - } - }, - { - "body": { - "name": "Conference", - "startDate": true, - "endDate": "2032-01-01" - }, - "expected": { - "startDate": "1970-01-01T00:00:00.001Z", - "endDate": "2032-01-01T00:00:00.000Z" - } - }, - { - "body": { - "name": "Conference", - "startDate": 0, - "endDate": "2032-01-01" - }, - "expected": { - "startDate": "1970-01-01T00:00:00.000Z", - "endDate": "2032-01-01T00:00:00.000Z" - } - }, - { - "body": { - "name": "Conference", - "startDate": 1, - "endDate": "2032-01-01" - }, - "expected": { - "startDate": "1970-01-01T00:00:00.001Z", - "endDate": "2032-01-01T00:00:00.000Z" - } - }, - { - "body": { - "name": "Conference", - "startDate": 1.5, - "endDate": "2032-01-01" - }, - "expected": { - "startDate": "1970-01-01T00:00:00.001Z", - "endDate": "2032-01-01T00:00:00.000Z" - } - }, - { - "body": { - "name": "Conference", - "startDate": -1.5, - "endDate": "2032-01-01" - }, - "expected": { - "startDate": "1969-12-31T23:59:59.999Z", - "endDate": "2032-01-01T00:00:00.000Z" - } - }, - { - "body": { - "name": "Conference", - "startDate": 1924992000000, - "endDate": "2032-01-01" - }, - "expected": { - "startDate": "2031-01-01T00:00:00.000Z", - "endDate": "2032-01-01T00:00:00.000Z" - } - }, - { - "body": { - "name": "Conference", - "startDate": "1924992000000", - "endDate": "2032-01-01" - }, - "error": true - }, - { - "body": { - "name": "Conference", - "startDate": 8640000000000001, - "endDate": "2032-01-01" - }, - "error": true - }, - { - "body": { - "name": "Conference", - "startDate": {}, - "endDate": "2032-01-01" - }, - "error": true - }, - { - "body": { - "name": "Conference", - "startDate": { - "toString": "bad" - }, - "endDate": "2032-01-01" - }, - "error": true - }, - { - "body": { - "name": "Conference", - "startDate": { - "valueOf": 1 - }, - "endDate": "2032-01-01" - }, - "error": true - }, - { - "body": { - "name": "Conference", - "startDate": [], - "endDate": "2032-01-01" - }, - "error": true - }, - { - "body": { - "name": "Conference", - "startDate": [ - "2031", - "1", - "1" - ], - "endDate": "2032-01-01" - }, - "expected": { - "startDate": "2031-01-01T00:00:00.000Z", - "endDate": "2032-01-01T00:00:00.000Z" - } - }, - { - "body": { - "name": "Conference", - "startDate": [ - 1 - ], - "endDate": "2032-01-01" - }, - "expected": { - "startDate": "2001-01-01T00:00:00.000Z", - "endDate": "2032-01-01T00:00:00.000Z" - } - }, - { - "body": { - "name": "Conference", - "startDate": [ - null - ], - "endDate": "2032-01-01" - }, - "error": true - }, - { - "body": { - "name": "Conference", - "startDate": "2031-01-01", - "endDate": "March 1 2031" - }, - "expected": { - "startDate": "2031-01-01T00:00:00.000Z", - "endDate": "2031-03-01T00:00:00.000Z" - } - }, - { - "body": { - "name": "Conference", - "startDate": "2031-01-01", - "endDate": "2031-02-30" - }, - "expected": { - "startDate": "2031-01-01T00:00:00.000Z", - "endDate": "2031-03-02T00:00:00.000Z" - } - }, - { - "body": { - "name": "Conference", - "startDate": "2031-01-01", - "endDate": "0001-01-01" - }, - "expected": { - "startDate": "2031-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z" - } - }, - { - "body": { - "name": "Conference", - "startDate": "2031-01-01", - "endDate": "0000-01-01" - }, - "expected": { - "startDate": "2031-01-01T00:00:00.000Z", - "endDate": "0000-01-01T00:00:00.000Z" - } - }, - { - "body": { - "name": "Conference", - "startDate": "2031-01-01", - "endDate": "-000001-01-01" - }, - "expected": { - "startDate": "2031-01-01T00:00:00.000Z", - "endDate": "-000001-01-01T00:00:00.000Z" - } - }, - { - "body": { - "name": "Conference", - "startDate": "2031-01-01", - "endDate": "+010000-01-01" - }, - "expected": { - "startDate": "2031-01-01T00:00:00.000Z", - "endDate": "+010000-01-01T00:00:00.000Z" - } - }, - { - "body": { - "name": "Conference", - "startDate": "2031-01-01", - "endDate": "2031-01-01T24:00:00Z" - }, - "expected": { - "startDate": "2031-01-01T00:00:00.000Z", - "endDate": "2031-01-02T00:00:00.000Z" - } - }, - { - "body": { - "name": "Conference", - "startDate": "2031-01-01", - "endDate": "2031-01-01T01:00:00+02:00" - }, - "expected": { - "startDate": "2031-01-01T00:00:00.000Z", - "endDate": "2030-12-31T23:00:00.000Z" - } - }, - { - "body": { - "name": "Conference", - "startDate": "2031-01-01", - "endDate": "invalid" - }, - "error": true - }, - { - "body": { - "name": "Conference", - "startDate": "2031-01-01", - "endDate": "" - }, - "error": true - }, - { - "body": { - "name": "Conference", - "startDate": "2031-01-01", - "endDate": null - }, - "expected": { - "startDate": "2031-01-01T00:00:00.000Z", - "endDate": "1970-01-01T00:00:00.000Z" - } - }, - { - "body": { - "name": "Conference", - "startDate": "2031-01-01", - "endDate": false - }, - "expected": { - "startDate": "2031-01-01T00:00:00.000Z", - "endDate": "1970-01-01T00:00:00.000Z" - } - }, - { - "body": { - "name": "Conference", - "startDate": "2031-01-01", - "endDate": true - }, - "expected": { - "startDate": "2031-01-01T00:00:00.000Z", - "endDate": "1970-01-01T00:00:00.001Z" - } - }, - { - "body": { - "name": "Conference", - "startDate": "2031-01-01", - "endDate": 0 - }, - "expected": { - "startDate": "2031-01-01T00:00:00.000Z", - "endDate": "1970-01-01T00:00:00.000Z" - } - }, - { - "body": { - "name": "Conference", - "startDate": "2031-01-01", - "endDate": 1 - }, - "expected": { - "startDate": "2031-01-01T00:00:00.000Z", - "endDate": "1970-01-01T00:00:00.001Z" - } - }, - { - "body": { - "name": "Conference", - "startDate": "2031-01-01", - "endDate": 1.5 - }, - "expected": { - "startDate": "2031-01-01T00:00:00.000Z", - "endDate": "1970-01-01T00:00:00.001Z" - } - }, - { - "body": { - "name": "Conference", - "startDate": "2031-01-01", - "endDate": -1.5 - }, - "expected": { - "startDate": "2031-01-01T00:00:00.000Z", - "endDate": "1969-12-31T23:59:59.999Z" - } - }, - { - "body": { - "name": "Conference", - "startDate": "2031-01-01", - "endDate": 1924992000000 - }, - "expected": { - "startDate": "2031-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z" - } - }, - { - "body": { - "name": "Conference", - "startDate": "2031-01-01", - "endDate": "1924992000000" - }, - "error": true - }, - { - "body": { - "name": "Conference", - "startDate": "2031-01-01", - "endDate": 8640000000000001 - }, - "error": true - }, - { - "body": { - "name": "Conference", - "startDate": "2031-01-01", - "endDate": {} - }, - "error": true - }, - { - "body": { - "name": "Conference", - "startDate": "2031-01-01", - "endDate": { - "toString": "bad" - } - }, - "error": true - }, - { - "body": { - "name": "Conference", - "startDate": "2031-01-01", - "endDate": { - "valueOf": 1 - } - }, - "error": true - }, - { - "body": { - "name": "Conference", - "startDate": "2031-01-01", - "endDate": [] - }, - "error": true - }, - { - "body": { - "name": "Conference", - "startDate": "2031-01-01", - "endDate": [ - "2031", - "1", - "1" - ] - }, - "expected": { - "startDate": "2031-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z" - } - }, - { - "body": { - "name": "Conference", - "startDate": "2031-01-01", - "endDate": [ - 1 - ] - }, - "expected": { - "startDate": "2031-01-01T00:00:00.000Z", - "endDate": "2001-01-01T00:00:00.000Z" - } - }, - { - "body": { - "name": "Conference", - "startDate": "2031-01-01", - "endDate": [ - null - ] - }, - "error": true - } -] diff --git a/backend/internal/server/testdata/conference-options.json b/backend/internal/server/testdata/conference-options.json deleted file mode 100644 index 60aaaec..0000000 --- a/backend/internal/server/testdata/conference-options.json +++ /dev/null @@ -1,1027 +0,0 @@ -[ - { - "name": "absent", - "body": { - "name": "Conference", - "startDate": "2030-01-01", - "endDate": "2031-01-01" - }, - "rejected": false, - "expected": {} - }, - { - "name": "null", - "body": { - "name": "Conference", - "startDate": "2030-01-01", - "endDate": "2031-01-01", - "options": null - }, - "rejected": false, - "expected": { - "options": null - } - }, - { - "name": "empty", - "body": { - "name": "Conference", - "startDate": "2030-01-01", - "endDate": "2031-01-01", - "options": {} - }, - "rejected": false, - "expected": {} - }, - { - "name": "flags/true", - "body": { - "name": "Conference", - "startDate": "2030-01-01", - "endDate": "2031-01-01", - "options": { - "update": true, - "image": true, - "pdf": true, - "notebook": true, - "link": true, - "page": true - } - }, - "rejected": false, - "expected": { - "options": { - "update": true, - "image": true, - "pdf": true, - "notebook": true, - "link": true, - "page": true - } - } - }, - { - "name": "flags/false", - "body": { - "name": "Conference", - "startDate": "2030-01-01", - "endDate": "2031-01-01", - "options": { - "update": false, - "image": false, - "pdf": false, - "notebook": false, - "link": false, - "page": false - } - }, - "rejected": false, - "expected": { - "options": { - "update": false, - "image": false, - "pdf": false, - "notebook": false, - "link": false, - "page": false - } - } - }, - { - "name": "flags/null", - "body": { - "name": "Conference", - "startDate": "2030-01-01", - "endDate": "2031-01-01", - "options": { - "update": null, - "image": null, - "pdf": null, - "notebook": null, - "link": null, - "page": null - } - }, - "rejected": false, - "expected": { - "options": { - "update": null, - "image": null, - "pdf": null, - "notebook": null, - "link": null, - "page": null - } - } - }, - { - "name": "flags/0", - "body": { - "name": "Conference", - "startDate": "2030-01-01", - "endDate": "2031-01-01", - "options": { - "update": 0, - "image": 0, - "pdf": 0, - "notebook": 0, - "link": 0, - "page": 0 - } - }, - "rejected": false, - "expected": { - "options": { - "update": false, - "image": false, - "pdf": false, - "notebook": false, - "link": false, - "page": false - } - } - }, - { - "name": "flags/1", - "body": { - "name": "Conference", - "startDate": "2030-01-01", - "endDate": "2031-01-01", - "options": { - "update": 1, - "image": 1, - "pdf": 1, - "notebook": 1, - "link": 1, - "page": 1 - } - }, - "rejected": false, - "expected": { - "options": { - "update": true, - "image": true, - "pdf": true, - "notebook": true, - "link": true, - "page": true - } - } - }, - { - "name": "flags/\"0\"", - "body": { - "name": "Conference", - "startDate": "2030-01-01", - "endDate": "2031-01-01", - "options": { - "update": "0", - "image": "0", - "pdf": "0", - "notebook": "0", - "link": "0", - "page": "0" - } - }, - "rejected": false, - "expected": { - "options": { - "update": false, - "image": false, - "pdf": false, - "notebook": false, - "link": false, - "page": false - } - } - }, - { - "name": "flags/\"1\"", - "body": { - "name": "Conference", - "startDate": "2030-01-01", - "endDate": "2031-01-01", - "options": { - "update": "1", - "image": "1", - "pdf": "1", - "notebook": "1", - "link": "1", - "page": "1" - } - }, - "rejected": false, - "expected": { - "options": { - "update": true, - "image": true, - "pdf": true, - "notebook": true, - "link": true, - "page": true - } - } - }, - { - "name": "flags/\"true\"", - "body": { - "name": "Conference", - "startDate": "2030-01-01", - "endDate": "2031-01-01", - "options": { - "update": "true", - "image": "true", - "pdf": "true", - "notebook": "true", - "link": "true", - "page": "true" - } - }, - "rejected": false, - "expected": { - "options": { - "update": true, - "image": true, - "pdf": true, - "notebook": true, - "link": true, - "page": true - } - } - }, - { - "name": "flags/\"false\"", - "body": { - "name": "Conference", - "startDate": "2030-01-01", - "endDate": "2031-01-01", - "options": { - "update": "false", - "image": "false", - "pdf": "false", - "notebook": "false", - "link": "false", - "page": "false" - } - }, - "rejected": false, - "expected": { - "options": { - "update": false, - "image": false, - "pdf": false, - "notebook": false, - "link": false, - "page": false - } - } - }, - { - "name": "flags/\"yes\"", - "body": { - "name": "Conference", - "startDate": "2030-01-01", - "endDate": "2031-01-01", - "options": { - "update": "yes", - "image": "yes", - "pdf": "yes", - "notebook": "yes", - "link": "yes", - "page": "yes" - } - }, - "rejected": false, - "expected": { - "options": { - "update": true, - "image": true, - "pdf": true, - "notebook": true, - "link": true, - "page": true - } - } - }, - { - "name": "flags/\"no\"", - "body": { - "name": "Conference", - "startDate": "2030-01-01", - "endDate": "2031-01-01", - "options": { - "update": "no", - "image": "no", - "pdf": "no", - "notebook": "no", - "link": "no", - "page": "no" - } - }, - "rejected": false, - "expected": { - "options": { - "update": false, - "image": false, - "pdf": false, - "notebook": false, - "link": false, - "page": false - } - } - }, - { - "name": "flags/\"\"", - "body": { - "name": "Conference", - "startDate": "2030-01-01", - "endDate": "2031-01-01", - "options": { - "update": "", - "image": "", - "pdf": "", - "notebook": "", - "link": "", - "page": "" - } - }, - "rejected": true, - "expected": {} - }, - { - "name": "flags/2", - "body": { - "name": "Conference", - "startDate": "2030-01-01", - "endDate": "2031-01-01", - "options": { - "update": 2, - "image": 2, - "pdf": 2, - "notebook": 2, - "link": 2, - "page": 2 - } - }, - "rejected": true, - "expected": {} - }, - { - "name": "flags/\"False\"", - "body": { - "name": "Conference", - "startDate": "2030-01-01", - "endDate": "2031-01-01", - "options": { - "update": "False", - "image": "False", - "pdf": "False", - "notebook": "False", - "link": "False", - "page": "False" - } - }, - "rejected": true, - "expected": {} - }, - { - "name": "flags/[]", - "body": { - "name": "Conference", - "startDate": "2030-01-01", - "endDate": "2031-01-01", - "options": { - "update": [], - "image": [], - "pdf": [], - "notebook": [], - "link": [], - "page": [] - } - }, - "rejected": true, - "expected": {} - }, - { - "name": "flags/{}", - "body": { - "name": "Conference", - "startDate": "2030-01-01", - "endDate": "2031-01-01", - "options": { - "update": {}, - "image": {}, - "pdf": {}, - "notebook": {}, - "link": {}, - "page": {} - } - }, - "rejected": true, - "expected": {} - }, - { - "name": "date/null", - "body": { - "name": "Conference", - "startDate": "2030-01-01", - "endDate": "2031-01-01", - "options": { - "expirationDate": null - } - }, - "rejected": false, - "expected": { - "options": { - "expirationDate": null - } - } - }, - { - "name": "date/\"\"", - "body": { - "name": "Conference", - "startDate": "2030-01-01", - "endDate": "2031-01-01", - "options": { - "expirationDate": "" - } - }, - "rejected": false, - "expected": { - "options": { - "expirationDate": null - } - } - }, - { - "name": "date/\"2030-04-03\"", - "body": { - "name": "Conference", - "startDate": "2030-01-01", - "endDate": "2031-01-01", - "options": { - "expirationDate": "2030-04-03" - } - }, - "rejected": false, - "expected": { - "options": { - "expirationDate": "2030-04-03T00:00:00.000Z" - } - } - }, - { - "name": "date/\"2030-04-03T12:34:56.789Z\"", - "body": { - "name": "Conference", - "startDate": "2030-01-01", - "endDate": "2031-01-01", - "options": { - "expirationDate": "2030-04-03T12:34:56.789Z" - } - }, - "rejected": false, - "expected": { - "options": { - "expirationDate": "2030-04-03T12:34:56.789Z" - } - } - }, - { - "name": "date/\"invalid\"", - "body": { - "name": "Conference", - "startDate": "2030-01-01", - "endDate": "2031-01-01", - "options": { - "expirationDate": "invalid" - } - }, - "rejected": true, - "expected": {} - }, - { - "name": "date/\"March 1 2030\"", - "body": { - "name": "Conference", - "startDate": "2030-01-01", - "endDate": "2031-01-01", - "options": { - "expirationDate": "March 1 2030" - } - }, - "rejected": false, - "expected": { - "options": { - "expirationDate": "2030-03-01T00:00:00.000Z" - } - } - }, - { - "name": "date/\"2030-02-29\"", - "body": { - "name": "Conference", - "startDate": "2030-01-01", - "endDate": "2031-01-01", - "options": { - "expirationDate": "2030-02-29" - } - }, - "rejected": false, - "expected": { - "options": { - "expirationDate": "2030-03-01T00:00:00.000Z" - } - } - }, - { - "name": "date/\"2030-02-28T24:00:00Z\"", - "body": { - "name": "Conference", - "startDate": "2030-01-01", - "endDate": "2031-01-01", - "options": { - "expirationDate": "2030-02-28T24:00:00Z" - } - }, - "rejected": false, - "expected": { - "options": { - "expirationDate": "2030-03-01T00:00:00.000Z" - } - } - }, - { - "name": "date/\"0001-01-01\"", - "body": { - "name": "Conference", - "startDate": "2030-01-01", - "endDate": "2031-01-01", - "options": { - "expirationDate": "0001-01-01" - } - }, - "rejected": false, - "expected": { - "options": { - "expirationDate": "0001-01-01T00:00:00.000Z" - } - } - }, - { - "name": "date/\"1700000000000\"", - "body": { - "name": "Conference", - "startDate": "2030-01-01", - "endDate": "2031-01-01", - "options": { - "expirationDate": "1700000000000" - } - }, - "rejected": false, - "expected": { - "options": { - "expirationDate": "2023-11-14T22:13:20.000Z" - } - } - }, - { - "name": "date/\"275761\"", - "body": { - "name": "Conference", - "startDate": "2030-01-01", - "endDate": "2031-01-01", - "options": { - "expirationDate": "275761" - } - }, - "rejected": false, - "expected": { - "options": { - "expirationDate": "1970-01-01T00:04:35.761Z" - } - } - }, - { - "name": "date/\"275760\"", - "body": { - "name": "Conference", - "startDate": "2030-01-01", - "endDate": "2031-01-01", - "options": { - "expirationDate": "275760" - } - }, - "rejected": false, - "expected": { - "options": { - "expirationDate": "+275760-01-01T00:00:00.000Z" - } - } - }, - { - "name": "date/\"-271821\"", - "body": { - "name": "Conference", - "startDate": "2030-01-01", - "endDate": "2031-01-01", - "options": { - "expirationDate": "-271821" - } - }, - "rejected": false, - "expected": { - "options": { - "expirationDate": "1969-12-31T23:55:28.179Z" - } - } - }, - { - "name": "date/\"1e12\"", - "body": { - "name": "Conference", - "startDate": "2030-01-01", - "endDate": "2031-01-01", - "options": { - "expirationDate": "1e12" - } - }, - "rejected": false, - "expected": { - "options": { - "expirationDate": "2001-09-09T01:46:40.000Z" - } - } - }, - { - "name": "date/\"0x100000\"", - "body": { - "name": "Conference", - "startDate": "2030-01-01", - "endDate": "2031-01-01", - "options": { - "expirationDate": "0x100000" - } - }, - "rejected": false, - "expected": { - "options": { - "expirationDate": "1970-01-01T00:17:28.576Z" - } - } - }, - { - "name": "date/\"Infinity\"", - "body": { - "name": "Conference", - "startDate": "2030-01-01", - "endDate": "2031-01-01", - "options": { - "expirationDate": "Infinity" - } - }, - "rejected": true, - "expected": {} - }, - { - "name": "date/[\"2030\",\"3\",\"1\"]", - "body": { - "name": "Conference", - "startDate": "2030-01-01", - "endDate": "2031-01-01", - "options": { - "expirationDate": [ - "2030", - "3", - "1" - ] - } - }, - "rejected": false, - "expected": { - "options": { - "expirationDate": "2030-03-01T00:00:00.000Z" - } - } - }, - { - "name": "date/[]", - "body": { - "name": "Conference", - "startDate": "2030-01-01", - "endDate": "2031-01-01", - "options": { - "expirationDate": [] - } - }, - "rejected": true, - "expected": {} - }, - { - "name": "date/{}", - "body": { - "name": "Conference", - "startDate": "2030-01-01", - "endDate": "2031-01-01", - "options": { - "expirationDate": {} - } - }, - "rejected": true, - "expected": {} - }, - { - "name": "date/{\"toString\":\"bad\"}", - "body": { - "name": "Conference", - "startDate": "2030-01-01", - "endDate": "2031-01-01", - "options": { - "expirationDate": { - "toString": "bad" - } - } - }, - "rejected": true, - "expected": {} - }, - { - "name": "date/0", - "body": { - "name": "Conference", - "startDate": "2030-01-01", - "endDate": "2031-01-01", - "options": { - "expirationDate": 0 - } - }, - "rejected": false, - "expected": { - "options": { - "expirationDate": "1970-01-01T00:00:00.000Z" - } - } - }, - { - "name": "date/1700000000000", - "body": { - "name": "Conference", - "startDate": "2030-01-01", - "endDate": "2031-01-01", - "options": { - "expirationDate": 1700000000000 - } - }, - "rejected": false, - "expected": { - "options": { - "expirationDate": "2023-11-14T22:13:20.000Z" - } - } - }, - { - "name": "date/1.5", - "body": { - "name": "Conference", - "startDate": "2030-01-01", - "endDate": "2031-01-01", - "options": { - "expirationDate": 1.5 - } - }, - "rejected": false, - "expected": { - "options": { - "expirationDate": "1970-01-01T00:00:00.001Z" - } - } - }, - { - "name": "date/-1.5", - "body": { - "name": "Conference", - "startDate": "2030-01-01", - "endDate": "2031-01-01", - "options": { - "expirationDate": -1.5 - } - }, - "rejected": false, - "expected": { - "options": { - "expirationDate": "1969-12-31T23:59:59.999Z" - } - } - }, - { - "name": "date/false", - "body": { - "name": "Conference", - "startDate": "2030-01-01", - "endDate": "2031-01-01", - "options": { - "expirationDate": false - } - }, - "rejected": true, - "expected": {} - }, - { - "name": "date/10000000000000000", - "body": { - "name": "Conference", - "startDate": "2030-01-01", - "endDate": "2031-01-01", - "options": { - "expirationDate": 10000000000000000 - } - }, - "rejected": true, - "expected": {} - }, - { - "name": "mode/null", - "body": { - "name": "Conference", - "startDate": "2030-01-01", - "endDate": "2031-01-01", - "options": { - "expirationMode": null - } - }, - "rejected": false, - "expected": { - "options": { - "expirationMode": null - } - } - }, - { - "name": "mode/\"never\"", - "body": { - "name": "Conference", - "startDate": "2030-01-01", - "endDate": "2031-01-01", - "options": { - "expirationMode": "never" - } - }, - "rejected": false, - "expected": { - "options": { - "expirationMode": "never" - } - } - }, - { - "name": "mode/0", - "body": { - "name": "Conference", - "startDate": "2030-01-01", - "endDate": "2031-01-01", - "options": { - "expirationMode": 0 - } - }, - "rejected": false, - "expected": { - "options": { - "expirationMode": "0" - } - } - }, - { - "name": "mode/true", - "body": { - "name": "Conference", - "startDate": "2030-01-01", - "endDate": "2031-01-01", - "options": { - "expirationMode": true - } - }, - "rejected": false, - "expected": { - "options": { - "expirationMode": "true" - } - } - }, - { - "name": "mode/{}", - "body": { - "name": "Conference", - "startDate": "2030-01-01", - "endDate": "2031-01-01", - "options": { - "expirationMode": {} - } - }, - "rejected": true, - "expected": {} - }, - { - "name": "mode/[]", - "body": { - "name": "Conference", - "startDate": "2030-01-01", - "endDate": "2031-01-01", - "options": { - "expirationMode": [] - } - }, - "rejected": true, - "expected": {} - }, - { - "name": "unknown", - "body": { - "name": "Conference", - "startDate": "2030-01-01", - "endDate": "2031-01-01", - "options": { - "terms": [ - "private" - ], - "pageSource": { - "branch": "main" - }, - "download": true, - "unknown": "discard" - } - }, - "rejected": false, - "expected": {} - }, - { - "name": "root/[]", - "body": { - "name": "Conference", - "startDate": "2030-01-01", - "endDate": "2031-01-01", - "options": [] - }, - "rejected": false, - "expected": {} - }, - { - "name": "root/false", - "body": { - "name": "Conference", - "startDate": "2030-01-01", - "endDate": "2031-01-01", - "options": false - }, - "rejected": false, - "expected": { - "options": false - } - }, - { - "name": "root/true", - "body": { - "name": "Conference", - "startDate": "2030-01-01", - "endDate": "2031-01-01", - "options": true - }, - "rejected": true, - "expected": {} - }, - { - "name": "root/0", - "body": { - "name": "Conference", - "startDate": "2030-01-01", - "endDate": "2031-01-01", - "options": 0 - }, - "rejected": false, - "expected": { - "options": 0 - } - }, - { - "name": "root/1", - "body": { - "name": "Conference", - "startDate": "2030-01-01", - "endDate": "2031-01-01", - "options": 1 - }, - "rejected": true, - "expected": {} - }, - { - "name": "root/\"bad\"", - "body": { - "name": "Conference", - "startDate": "2030-01-01", - "endDate": "2031-01-01", - "options": "bad" - }, - "rejected": true, - "expected": {} - } -] diff --git a/backend/internal/server/testdata/conference-output.json b/backend/internal/server/testdata/conference-output.json deleted file mode 100644 index e988bb5..0000000 --- a/backend/internal/server/testdata/conference-output.json +++ /dev/null @@ -1,16829 +0,0 @@ -{ - "now": "2030-03-01T12:34:56.789Z", - "cases": [ - { - "name": "rate=0/end=0001-01-01T00:00:00.000Z/history=0", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "0000-01-01T00:00:00.000Z", - "removeDate": "0001-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=0/end=0001-01-01T00:00:00.000Z/history=1", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "0000-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 1 - } - }, - { - "name": "rate=0/end=0001-01-01T00:00:00.000Z/history=2", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "1969-01-01T00:00:00.000Z", - "removeDate": "1970-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=0/end=0001-01-01T00:00:00.000Z/history=3", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=0/end=0001-01-01T00:00:00.000Z/history=4", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 1 - } - }, - { - "name": "rate=0/end=0001-01-01T00:00:00.000Z/history=5", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T01:23:45.678Z", - "removeDate": "2030-02-02T03:04:05.006Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=0/end=0001-01-01T00:00:00.000Z/history=6", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2031-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 1 - } - }, - { - "name": "rate=0/end=0001-01-01T00:00:00.000Z/history=7", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-02-01T00:00:00.000Z", - "removeDate": "2029-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=0/end=0001-01-01T00:00:00.000Z/history=8", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "1000-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 1 - } - }, - { - "name": "rate=0/end=0001-01-01T00:00:00.000Z/history=9", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": null - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 1 - } - }, - { - "name": "rate=0/end=0001-01-01T00:00:00.000Z/history=10", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": "2031-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=0/end=0001-01-01T00:00:00.000Z/history=11", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": "2030-01-02T00:00:00.000Z" - }, - { - "addDate": "2030-01-03T00:00:00.001Z" - }, - { - "addDate": "2029-12-31T23:59:59.999Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 2 - } - }, - { - "name": "rate=0/end=2030-01-15T00:00:00.000Z/history=0", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "0000-01-01T00:00:00.000Z", - "removeDate": "0001-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=0/end=2030-01-15T00:00:00.000Z/history=1", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "0000-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 1 - } - }, - { - "name": "rate=0/end=2030-01-15T00:00:00.000Z/history=2", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "1969-01-01T00:00:00.000Z", - "removeDate": "1970-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=0/end=2030-01-15T00:00:00.000Z/history=3", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=0/end=2030-01-15T00:00:00.000Z/history=4", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 1 - } - }, - { - "name": "rate=0/end=2030-01-15T00:00:00.000Z/history=5", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T01:23:45.678Z", - "removeDate": "2030-02-02T03:04:05.006Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=0/end=2030-01-15T00:00:00.000Z/history=6", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2031-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 1 - } - }, - { - "name": "rate=0/end=2030-01-15T00:00:00.000Z/history=7", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-02-01T00:00:00.000Z", - "removeDate": "2029-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=0/end=2030-01-15T00:00:00.000Z/history=8", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "1000-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 1 - } - }, - { - "name": "rate=0/end=2030-01-15T00:00:00.000Z/history=9", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": null - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 1 - } - }, - { - "name": "rate=0/end=2030-01-15T00:00:00.000Z/history=10", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": "2031-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=0/end=2030-01-15T00:00:00.000Z/history=11", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": "2030-01-02T00:00:00.000Z" - }, - { - "addDate": "2030-01-03T00:00:00.001Z" - }, - { - "addDate": "2029-12-31T23:59:59.999Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 2 - } - }, - { - "name": "rate=0/end=2030-03-01T12:34:56.789Z/history=0", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "0000-01-01T00:00:00.000Z", - "removeDate": "0001-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=0/end=2030-03-01T12:34:56.789Z/history=1", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "0000-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 1 - } - }, - { - "name": "rate=0/end=2030-03-01T12:34:56.789Z/history=2", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "1969-01-01T00:00:00.000Z", - "removeDate": "1970-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=0/end=2030-03-01T12:34:56.789Z/history=3", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=0/end=2030-03-01T12:34:56.789Z/history=4", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 1 - } - }, - { - "name": "rate=0/end=2030-03-01T12:34:56.789Z/history=5", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T01:23:45.678Z", - "removeDate": "2030-02-02T03:04:05.006Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=0/end=2030-03-01T12:34:56.789Z/history=6", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2031-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 1 - } - }, - { - "name": "rate=0/end=2030-03-01T12:34:56.789Z/history=7", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-02-01T00:00:00.000Z", - "removeDate": "2029-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=0/end=2030-03-01T12:34:56.789Z/history=8", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "1000-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 1 - } - }, - { - "name": "rate=0/end=2030-03-01T12:34:56.789Z/history=9", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": null - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 1 - } - }, - { - "name": "rate=0/end=2030-03-01T12:34:56.789Z/history=10", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": "2031-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=0/end=2030-03-01T12:34:56.789Z/history=11", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": "2030-01-02T00:00:00.000Z" - }, - { - "addDate": "2030-01-03T00:00:00.001Z" - }, - { - "addDate": "2029-12-31T23:59:59.999Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 2 - } - }, - { - "name": "rate=0/end=2031-01-01T00:00:00.000Z/history=0", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "0000-01-01T00:00:00.000Z", - "removeDate": "0001-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=0/end=2031-01-01T00:00:00.000Z/history=1", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "0000-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 1 - } - }, - { - "name": "rate=0/end=2031-01-01T00:00:00.000Z/history=2", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "1969-01-01T00:00:00.000Z", - "removeDate": "1970-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=0/end=2031-01-01T00:00:00.000Z/history=3", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=0/end=2031-01-01T00:00:00.000Z/history=4", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 1 - } - }, - { - "name": "rate=0/end=2031-01-01T00:00:00.000Z/history=5", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T01:23:45.678Z", - "removeDate": "2030-02-02T03:04:05.006Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=0/end=2031-01-01T00:00:00.000Z/history=6", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2031-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 1 - } - }, - { - "name": "rate=0/end=2031-01-01T00:00:00.000Z/history=7", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-02-01T00:00:00.000Z", - "removeDate": "2029-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=0/end=2031-01-01T00:00:00.000Z/history=8", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "1000-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 1 - } - }, - { - "name": "rate=0/end=2031-01-01T00:00:00.000Z/history=9", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": null - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 1 - } - }, - { - "name": "rate=0/end=2031-01-01T00:00:00.000Z/history=10", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": "2031-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=0/end=2031-01-01T00:00:00.000Z/history=11", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": "2030-01-02T00:00:00.000Z" - }, - { - "addDate": "2030-01-03T00:00:00.001Z" - }, - { - "addDate": "2029-12-31T23:59:59.999Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 2 - } - }, - { - "name": "rate=0.5/end=0001-01-01T00:00:00.000Z/history=0", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "0000-01-01T00:00:00.000Z", - "removeDate": "0001-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "price": 6.1, - "nbRepositories": 0 - } - }, - { - "name": "rate=0.5/end=0001-01-01T00:00:00.000Z/history=1", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "0000-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "price": 6.1, - "nbRepositories": 1 - } - }, - { - "name": "rate=0.5/end=0001-01-01T00:00:00.000Z/history=2", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "1969-01-01T00:00:00.000Z", - "removeDate": "1970-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=0.5/end=0001-01-01T00:00:00.000Z/history=3", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=0.5/end=0001-01-01T00:00:00.000Z/history=4", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 1 - } - }, - { - "name": "rate=0.5/end=0001-01-01T00:00:00.000Z/history=5", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T01:23:45.678Z", - "removeDate": "2030-02-02T03:04:05.006Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=0.5/end=0001-01-01T00:00:00.000Z/history=6", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2031-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 1 - } - }, - { - "name": "rate=0.5/end=0001-01-01T00:00:00.000Z/history=7", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-02-01T00:00:00.000Z", - "removeDate": "2029-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=0.5/end=0001-01-01T00:00:00.000Z/history=8", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "1000-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 1 - } - }, - { - "name": "rate=0.5/end=0001-01-01T00:00:00.000Z/history=9", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": null - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 1 - } - }, - { - "name": "rate=0.5/end=0001-01-01T00:00:00.000Z/history=10", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": "2031-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=0.5/end=0001-01-01T00:00:00.000Z/history=11", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": "2030-01-02T00:00:00.000Z" - }, - { - "addDate": "2030-01-03T00:00:00.001Z" - }, - { - "addDate": "2029-12-31T23:59:59.999Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 2 - } - }, - { - "name": "rate=0.5/end=2030-01-15T00:00:00.000Z/history=0", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "0000-01-01T00:00:00.000Z", - "removeDate": "0001-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "price": 6.1, - "nbRepositories": 0 - } - }, - { - "name": "rate=0.5/end=2030-01-15T00:00:00.000Z/history=1", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "0000-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "price": 12357.616666666667, - "nbRepositories": 1 - } - }, - { - "name": "rate=0.5/end=2030-01-15T00:00:00.000Z/history=2", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "1969-01-01T00:00:00.000Z", - "removeDate": "1970-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "price": 6.083333333333333, - "nbRepositories": 0 - } - }, - { - "name": "rate=0.5/end=2030-01-15T00:00:00.000Z/history=3", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=0.5/end=2030-01-15T00:00:00.000Z/history=4", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "price": 0.23333333333333334, - "nbRepositories": 1 - } - }, - { - "name": "rate=0.5/end=2030-01-15T00:00:00.000Z/history=5", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T01:23:45.678Z", - "removeDate": "2030-02-02T03:04:05.006Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "price": 0.23236387384259258, - "nbRepositories": 0 - } - }, - { - "name": "rate=0.5/end=2030-01-15T00:00:00.000Z/history=6", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2031-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 1 - } - }, - { - "name": "rate=0.5/end=2030-01-15T00:00:00.000Z/history=7", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-02-01T00:00:00.000Z", - "removeDate": "2029-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=0.5/end=2030-01-15T00:00:00.000Z/history=8", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "1000-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "price": 6270.233333333334, - "nbRepositories": 1 - } - }, - { - "name": "rate=0.5/end=2030-01-15T00:00:00.000Z/history=9", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": null - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "price": 0.23333333333333334, - "nbRepositories": 1 - } - }, - { - "name": "rate=0.5/end=2030-01-15T00:00:00.000Z/history=10", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": "2031-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "price": 0.23333333333333334, - "nbRepositories": 0 - } - }, - { - "name": "rate=0.5/end=2030-01-15T00:00:00.000Z/history=11", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": "2030-01-02T00:00:00.000Z" - }, - { - "addDate": "2030-01-03T00:00:00.001Z" - }, - { - "addDate": "2029-12-31T23:59:59.999Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "price": 0.44999999999999996, - "nbRepositories": 2 - } - }, - { - "name": "rate=0.5/end=2030-03-01T12:34:56.789Z/history=0", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "0000-01-01T00:00:00.000Z", - "removeDate": "0001-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "price": 6.1, - "nbRepositories": 0 - } - }, - { - "name": "rate=0.5/end=2030-03-01T12:34:56.789Z/history=1", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "0000-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "price": 12358.375404473187, - "nbRepositories": 1 - } - }, - { - "name": "rate=0.5/end=2030-03-01T12:34:56.789Z/history=2", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "1969-01-01T00:00:00.000Z", - "removeDate": "1970-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "price": 6.083333333333333, - "nbRepositories": 0 - } - }, - { - "name": "rate=0.5/end=2030-03-01T12:34:56.789Z/history=3", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=0.5/end=2030-03-01T12:34:56.789Z/history=4", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "price": 0.9920711398533949, - "nbRepositories": 1 - } - }, - { - "name": "rate=0.5/end=2030-03-01T12:34:56.789Z/history=5", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T01:23:45.678Z", - "removeDate": "2030-02-02T03:04:05.006Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "price": 0.5344944691358025, - "nbRepositories": 0 - } - }, - { - "name": "rate=0.5/end=2030-03-01T12:34:56.789Z/history=6", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2031-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 1 - } - }, - { - "name": "rate=0.5/end=2030-03-01T12:34:56.789Z/history=7", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-02-01T00:00:00.000Z", - "removeDate": "2029-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=0.5/end=2030-03-01T12:34:56.789Z/history=8", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "1000-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "price": 6270.9920711398545, - "nbRepositories": 1 - } - }, - { - "name": "rate=0.5/end=2030-03-01T12:34:56.789Z/history=9", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": null - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "price": 0.9920711398533949, - "nbRepositories": 1 - } - }, - { - "name": "rate=0.5/end=2030-03-01T12:34:56.789Z/history=10", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": "2031-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "price": 0.9920711398533949, - "nbRepositories": 0 - } - }, - { - "name": "rate=0.5/end=2030-03-01T12:34:56.789Z/history=11", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": "2030-01-02T00:00:00.000Z" - }, - { - "addDate": "2030-01-03T00:00:00.001Z" - }, - { - "addDate": "2029-12-31T23:59:59.999Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "price": 1.9674756130401234, - "nbRepositories": 2 - } - }, - { - "name": "rate=0.5/end=2031-01-01T00:00:00.000Z/history=0", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "0000-01-01T00:00:00.000Z", - "removeDate": "0001-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "price": 6.1, - "nbRepositories": 0 - } - }, - { - "name": "rate=0.5/end=2031-01-01T00:00:00.000Z/history=1", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "0000-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "price": 12358.375404473187, - "nbRepositories": 1 - } - }, - { - "name": "rate=0.5/end=2031-01-01T00:00:00.000Z/history=2", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "1969-01-01T00:00:00.000Z", - "removeDate": "1970-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "price": 6.083333333333333, - "nbRepositories": 0 - } - }, - { - "name": "rate=0.5/end=2031-01-01T00:00:00.000Z/history=3", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=0.5/end=2031-01-01T00:00:00.000Z/history=4", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "price": 0.9920711398533949, - "nbRepositories": 1 - } - }, - { - "name": "rate=0.5/end=2031-01-01T00:00:00.000Z/history=5", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T01:23:45.678Z", - "removeDate": "2030-02-02T03:04:05.006Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "price": 0.5344944691358025, - "nbRepositories": 0 - } - }, - { - "name": "rate=0.5/end=2031-01-01T00:00:00.000Z/history=6", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2031-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 1 - } - }, - { - "name": "rate=0.5/end=2031-01-01T00:00:00.000Z/history=7", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-02-01T00:00:00.000Z", - "removeDate": "2029-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=0.5/end=2031-01-01T00:00:00.000Z/history=8", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "1000-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "price": 6270.9920711398545, - "nbRepositories": 1 - } - }, - { - "name": "rate=0.5/end=2031-01-01T00:00:00.000Z/history=9", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": null - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "price": 0.9920711398533949, - "nbRepositories": 1 - } - }, - { - "name": "rate=0.5/end=2031-01-01T00:00:00.000Z/history=10", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": "2031-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "price": 0.9920711398533949, - "nbRepositories": 0 - } - }, - { - "name": "rate=0.5/end=2031-01-01T00:00:00.000Z/history=11", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": "2030-01-02T00:00:00.000Z" - }, - { - "addDate": "2030-01-03T00:00:00.001Z" - }, - { - "addDate": "2029-12-31T23:59:59.999Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.5, - "quota": { - "size": 500 - } - }, - "price": 1.9674756130401234, - "nbRepositories": 2 - } - }, - { - "name": "rate=3/end=0001-01-01T00:00:00.000Z/history=0", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "0000-01-01T00:00:00.000Z", - "removeDate": "0001-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "price": 36.6, - "nbRepositories": 0 - } - }, - { - "name": "rate=3/end=0001-01-01T00:00:00.000Z/history=1", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "0000-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "price": 36.6, - "nbRepositories": 1 - } - }, - { - "name": "rate=3/end=0001-01-01T00:00:00.000Z/history=2", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "1969-01-01T00:00:00.000Z", - "removeDate": "1970-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=3/end=0001-01-01T00:00:00.000Z/history=3", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=3/end=0001-01-01T00:00:00.000Z/history=4", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 1 - } - }, - { - "name": "rate=3/end=0001-01-01T00:00:00.000Z/history=5", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T01:23:45.678Z", - "removeDate": "2030-02-02T03:04:05.006Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=3/end=0001-01-01T00:00:00.000Z/history=6", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2031-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 1 - } - }, - { - "name": "rate=3/end=0001-01-01T00:00:00.000Z/history=7", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-02-01T00:00:00.000Z", - "removeDate": "2029-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=3/end=0001-01-01T00:00:00.000Z/history=8", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "1000-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 1 - } - }, - { - "name": "rate=3/end=0001-01-01T00:00:00.000Z/history=9", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": null - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 1 - } - }, - { - "name": "rate=3/end=0001-01-01T00:00:00.000Z/history=10", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": "2031-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=3/end=0001-01-01T00:00:00.000Z/history=11", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": "2030-01-02T00:00:00.000Z" - }, - { - "addDate": "2030-01-03T00:00:00.001Z" - }, - { - "addDate": "2029-12-31T23:59:59.999Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 2 - } - }, - { - "name": "rate=3/end=2030-01-15T00:00:00.000Z/history=0", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "0000-01-01T00:00:00.000Z", - "removeDate": "0001-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "price": 36.6, - "nbRepositories": 0 - } - }, - { - "name": "rate=3/end=2030-01-15T00:00:00.000Z/history=1", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "0000-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "price": 74145.7, - "nbRepositories": 1 - } - }, - { - "name": "rate=3/end=2030-01-15T00:00:00.000Z/history=2", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "1969-01-01T00:00:00.000Z", - "removeDate": "1970-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "price": 36.5, - "nbRepositories": 0 - } - }, - { - "name": "rate=3/end=2030-01-15T00:00:00.000Z/history=3", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=3/end=2030-01-15T00:00:00.000Z/history=4", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "price": 1.4000000000000001, - "nbRepositories": 1 - } - }, - { - "name": "rate=3/end=2030-01-15T00:00:00.000Z/history=5", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T01:23:45.678Z", - "removeDate": "2030-02-02T03:04:05.006Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "price": 1.3941832430555556, - "nbRepositories": 0 - } - }, - { - "name": "rate=3/end=2030-01-15T00:00:00.000Z/history=6", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2031-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 1 - } - }, - { - "name": "rate=3/end=2030-01-15T00:00:00.000Z/history=7", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-02-01T00:00:00.000Z", - "removeDate": "2029-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=3/end=2030-01-15T00:00:00.000Z/history=8", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "1000-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "price": 37621.4, - "nbRepositories": 1 - } - }, - { - "name": "rate=3/end=2030-01-15T00:00:00.000Z/history=9", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": null - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "price": 1.4000000000000001, - "nbRepositories": 1 - } - }, - { - "name": "rate=3/end=2030-01-15T00:00:00.000Z/history=10", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": "2031-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "price": 1.4000000000000001, - "nbRepositories": 0 - } - }, - { - "name": "rate=3/end=2030-01-15T00:00:00.000Z/history=11", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": "2030-01-02T00:00:00.000Z" - }, - { - "addDate": "2030-01-03T00:00:00.001Z" - }, - { - "addDate": "2029-12-31T23:59:59.999Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "price": 2.7, - "nbRepositories": 2 - } - }, - { - "name": "rate=3/end=2030-03-01T12:34:56.789Z/history=0", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "0000-01-01T00:00:00.000Z", - "removeDate": "0001-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "price": 36.6, - "nbRepositories": 0 - } - }, - { - "name": "rate=3/end=2030-03-01T12:34:56.789Z/history=1", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "0000-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "price": 74150.25242683913, - "nbRepositories": 1 - } - }, - { - "name": "rate=3/end=2030-03-01T12:34:56.789Z/history=2", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "1969-01-01T00:00:00.000Z", - "removeDate": "1970-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "price": 36.5, - "nbRepositories": 0 - } - }, - { - "name": "rate=3/end=2030-03-01T12:34:56.789Z/history=3", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=3/end=2030-03-01T12:34:56.789Z/history=4", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "price": 5.9524268391203705, - "nbRepositories": 1 - } - }, - { - "name": "rate=3/end=2030-03-01T12:34:56.789Z/history=5", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T01:23:45.678Z", - "removeDate": "2030-02-02T03:04:05.006Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "price": 3.2069668148148147, - "nbRepositories": 0 - } - }, - { - "name": "rate=3/end=2030-03-01T12:34:56.789Z/history=6", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2031-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 1 - } - }, - { - "name": "rate=3/end=2030-03-01T12:34:56.789Z/history=7", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-02-01T00:00:00.000Z", - "removeDate": "2029-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=3/end=2030-03-01T12:34:56.789Z/history=8", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "1000-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "price": 37625.952426839125, - "nbRepositories": 1 - } - }, - { - "name": "rate=3/end=2030-03-01T12:34:56.789Z/history=9", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": null - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "price": 5.9524268391203705, - "nbRepositories": 1 - } - }, - { - "name": "rate=3/end=2030-03-01T12:34:56.789Z/history=10", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": "2031-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "price": 5.9524268391203705, - "nbRepositories": 0 - } - }, - { - "name": "rate=3/end=2030-03-01T12:34:56.789Z/history=11", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": "2030-01-02T00:00:00.000Z" - }, - { - "addDate": "2030-01-03T00:00:00.001Z" - }, - { - "addDate": "2029-12-31T23:59:59.999Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "price": 11.80485367824074, - "nbRepositories": 2 - } - }, - { - "name": "rate=3/end=2031-01-01T00:00:00.000Z/history=0", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "0000-01-01T00:00:00.000Z", - "removeDate": "0001-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "price": 36.6, - "nbRepositories": 0 - } - }, - { - "name": "rate=3/end=2031-01-01T00:00:00.000Z/history=1", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "0000-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "price": 74150.25242683913, - "nbRepositories": 1 - } - }, - { - "name": "rate=3/end=2031-01-01T00:00:00.000Z/history=2", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "1969-01-01T00:00:00.000Z", - "removeDate": "1970-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "price": 36.5, - "nbRepositories": 0 - } - }, - { - "name": "rate=3/end=2031-01-01T00:00:00.000Z/history=3", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=3/end=2031-01-01T00:00:00.000Z/history=4", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "price": 5.9524268391203705, - "nbRepositories": 1 - } - }, - { - "name": "rate=3/end=2031-01-01T00:00:00.000Z/history=5", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T01:23:45.678Z", - "removeDate": "2030-02-02T03:04:05.006Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "price": 3.2069668148148147, - "nbRepositories": 0 - } - }, - { - "name": "rate=3/end=2031-01-01T00:00:00.000Z/history=6", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2031-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 1 - } - }, - { - "name": "rate=3/end=2031-01-01T00:00:00.000Z/history=7", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-02-01T00:00:00.000Z", - "removeDate": "2029-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=3/end=2031-01-01T00:00:00.000Z/history=8", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "1000-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "price": 37625.952426839125, - "nbRepositories": 1 - } - }, - { - "name": "rate=3/end=2031-01-01T00:00:00.000Z/history=9", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": null - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "price": 5.9524268391203705, - "nbRepositories": 1 - } - }, - { - "name": "rate=3/end=2031-01-01T00:00:00.000Z/history=10", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": "2031-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "price": 5.9524268391203705, - "nbRepositories": 0 - } - }, - { - "name": "rate=3/end=2031-01-01T00:00:00.000Z/history=11", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": "2030-01-02T00:00:00.000Z" - }, - { - "addDate": "2030-01-03T00:00:00.001Z" - }, - { - "addDate": "2029-12-31T23:59:59.999Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 3, - "quota": { - "size": 500 - } - }, - "price": 11.80485367824074, - "nbRepositories": 2 - } - }, - { - "name": "rate=0.123456789/end=0001-01-01T00:00:00.000Z/history=0", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "0000-01-01T00:00:00.000Z", - "removeDate": "0001-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "price": 1.5061728258, - "nbRepositories": 0 - } - }, - { - "name": "rate=0.123456789/end=0001-01-01T00:00:00.000Z/history=1", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "0000-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "price": 1.5061728258, - "nbRepositories": 1 - } - }, - { - "name": "rate=0.123456789/end=0001-01-01T00:00:00.000Z/history=2", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "1969-01-01T00:00:00.000Z", - "removeDate": "1970-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=0.123456789/end=0001-01-01T00:00:00.000Z/history=3", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=0.123456789/end=0001-01-01T00:00:00.000Z/history=4", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 1 - } - }, - { - "name": "rate=0.123456789/end=0001-01-01T00:00:00.000Z/history=5", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T01:23:45.678Z", - "removeDate": "2030-02-02T03:04:05.006Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=0.123456789/end=0001-01-01T00:00:00.000Z/history=6", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2031-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 1 - } - }, - { - "name": "rate=0.123456789/end=0001-01-01T00:00:00.000Z/history=7", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-02-01T00:00:00.000Z", - "removeDate": "2029-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=0.123456789/end=0001-01-01T00:00:00.000Z/history=8", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "1000-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 1 - } - }, - { - "name": "rate=0.123456789/end=0001-01-01T00:00:00.000Z/history=9", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": null - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 1 - } - }, - { - "name": "rate=0.123456789/end=0001-01-01T00:00:00.000Z/history=10", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": "2031-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=0.123456789/end=0001-01-01T00:00:00.000Z/history=11", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": "2030-01-02T00:00:00.000Z" - }, - { - "addDate": "2030-01-03T00:00:00.001Z" - }, - { - "addDate": "2029-12-31T23:59:59.999Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 2 - } - }, - { - "name": "rate=0.123456789/end=2030-01-15T00:00:00.000Z/history=0", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "0000-01-01T00:00:00.000Z", - "removeDate": "0001-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "price": 1.5061728258, - "nbRepositories": 0 - } - }, - { - "name": "rate=0.123456789/end=2030-01-15T00:00:00.000Z/history=1", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "0000-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "price": 3051.2633467191, - "nbRepositories": 1 - } - }, - { - "name": "rate=0.123456789/end=2030-01-15T00:00:00.000Z/history=2", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "1969-01-01T00:00:00.000Z", - "removeDate": "1970-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "price": 1.5020575995, - "nbRepositories": 0 - } - }, - { - "name": "rate=0.123456789/end=2030-01-15T00:00:00.000Z/history=3", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=0.123456789/end=2030-01-15T00:00:00.000Z/history=4", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "price": 0.0576131682, - "nbRepositories": 1 - } - }, - { - "name": "rate=0.123456789/end=2030-01-15T00:00:00.000Z/history=5", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T01:23:45.678Z", - "removeDate": "2030-02-02T03:04:05.006Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "price": 0.05737379548841515, - "nbRepositories": 0 - } - }, - { - "name": "rate=0.123456789/end=2030-01-15T00:00:00.000Z/history=6", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2031-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 1 - } - }, - { - "name": "rate=0.123456789/end=2030-01-15T00:00:00.000Z/history=7", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-02-01T00:00:00.000Z", - "removeDate": "2029-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=0.123456789/end=2030-01-15T00:00:00.000Z/history=8", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "1000-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "price": 1548.2057472282002, - "nbRepositories": 1 - } - }, - { - "name": "rate=0.123456789/end=2030-01-15T00:00:00.000Z/history=9", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": null - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "price": 0.0576131682, - "nbRepositories": 1 - } - }, - { - "name": "rate=0.123456789/end=2030-01-15T00:00:00.000Z/history=10", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": "2031-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "price": 0.0576131682, - "nbRepositories": 0 - } - }, - { - "name": "rate=0.123456789/end=2030-01-15T00:00:00.000Z/history=11", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": "2030-01-02T00:00:00.000Z" - }, - { - "addDate": "2030-01-03T00:00:00.001Z" - }, - { - "addDate": "2029-12-31T23:59:59.999Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "price": 0.1111111101, - "nbRepositories": 2 - } - }, - { - "name": "rate=0.123456789/end=2030-03-01T12:34:56.789Z/history=0", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "0000-01-01T00:00:00.000Z", - "removeDate": "0001-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "price": 1.5061728258, - "nbRepositories": 0 - } - }, - { - "name": "rate=0.123456789/end=2030-03-01T12:34:56.789Z/history=1", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "0000-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "price": 3051.450689385672, - "nbRepositories": 1 - } - }, - { - "name": "rate=0.123456789/end=2030-03-01T12:34:56.789Z/history=2", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "1969-01-01T00:00:00.000Z", - "removeDate": "1970-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "price": 1.5020575995, - "nbRepositories": 0 - } - }, - { - "name": "rate=0.123456789/end=2030-03-01T12:34:56.789Z/history=3", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=0.123456789/end=2030-03-01T12:34:56.789Z/history=4", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "price": 0.24495583477174016, - "nbRepositories": 1 - } - }, - { - "name": "rate=0.123456789/end=2030-03-01T12:34:56.789Z/history=5", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T01:23:45.678Z", - "removeDate": "2030-02-02T03:04:05.006Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "price": 0.13197394179553154, - "nbRepositories": 0 - } - }, - { - "name": "rate=0.123456789/end=2030-03-01T12:34:56.789Z/history=6", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2031-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 1 - } - }, - { - "name": "rate=0.123456789/end=2030-03-01T12:34:56.789Z/history=7", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-02-01T00:00:00.000Z", - "removeDate": "2029-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=0.123456789/end=2030-03-01T12:34:56.789Z/history=8", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "1000-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "price": 1548.393089894772, - "nbRepositories": 1 - } - }, - { - "name": "rate=0.123456789/end=2030-03-01T12:34:56.789Z/history=9", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": null - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "price": 0.24495583477174016, - "nbRepositories": 1 - } - }, - { - "name": "rate=0.123456789/end=2030-03-01T12:34:56.789Z/history=10", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": "2031-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "price": 0.24495583477174016, - "nbRepositories": 0 - } - }, - { - "name": "rate=0.123456789/end=2030-03-01T12:34:56.789Z/history=11", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": "2030-01-02T00:00:00.000Z" - }, - { - "addDate": "2030-01-03T00:00:00.001Z" - }, - { - "addDate": "2029-12-31T23:59:59.999Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "price": 0.48579644324348037, - "nbRepositories": 2 - } - }, - { - "name": "rate=0.123456789/end=2031-01-01T00:00:00.000Z/history=0", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "0000-01-01T00:00:00.000Z", - "removeDate": "0001-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "price": 1.5061728258, - "nbRepositories": 0 - } - }, - { - "name": "rate=0.123456789/end=2031-01-01T00:00:00.000Z/history=1", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "0000-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "price": 3051.450689385672, - "nbRepositories": 1 - } - }, - { - "name": "rate=0.123456789/end=2031-01-01T00:00:00.000Z/history=2", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "1969-01-01T00:00:00.000Z", - "removeDate": "1970-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "price": 1.5020575995, - "nbRepositories": 0 - } - }, - { - "name": "rate=0.123456789/end=2031-01-01T00:00:00.000Z/history=3", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=0.123456789/end=2031-01-01T00:00:00.000Z/history=4", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "price": 0.24495583477174016, - "nbRepositories": 1 - } - }, - { - "name": "rate=0.123456789/end=2031-01-01T00:00:00.000Z/history=5", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T01:23:45.678Z", - "removeDate": "2030-02-02T03:04:05.006Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "price": 0.13197394179553154, - "nbRepositories": 0 - } - }, - { - "name": "rate=0.123456789/end=2031-01-01T00:00:00.000Z/history=6", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2031-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 1 - } - }, - { - "name": "rate=0.123456789/end=2031-01-01T00:00:00.000Z/history=7", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-02-01T00:00:00.000Z", - "removeDate": "2029-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=0.123456789/end=2031-01-01T00:00:00.000Z/history=8", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "1000-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "price": 1548.393089894772, - "nbRepositories": 1 - } - }, - { - "name": "rate=0.123456789/end=2031-01-01T00:00:00.000Z/history=9", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": null - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "price": 0.24495583477174016, - "nbRepositories": 1 - } - }, - { - "name": "rate=0.123456789/end=2031-01-01T00:00:00.000Z/history=10", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": "2031-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "price": 0.24495583477174016, - "nbRepositories": 0 - } - }, - { - "name": "rate=0.123456789/end=2031-01-01T00:00:00.000Z/history=11", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": "2030-01-02T00:00:00.000Z" - }, - { - "addDate": "2030-01-03T00:00:00.001Z" - }, - { - "addDate": "2029-12-31T23:59:59.999Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": 0.123456789, - "quota": { - "size": 500 - } - }, - "price": 0.48579644324348037, - "nbRepositories": 2 - } - }, - { - "name": "rate=null/end=0001-01-01T00:00:00.000Z/history=0", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "0000-01-01T00:00:00.000Z", - "removeDate": "0001-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=null/end=0001-01-01T00:00:00.000Z/history=1", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "0000-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 1 - } - }, - { - "name": "rate=null/end=0001-01-01T00:00:00.000Z/history=2", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "1969-01-01T00:00:00.000Z", - "removeDate": "1970-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=null/end=0001-01-01T00:00:00.000Z/history=3", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=null/end=0001-01-01T00:00:00.000Z/history=4", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 1 - } - }, - { - "name": "rate=null/end=0001-01-01T00:00:00.000Z/history=5", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T01:23:45.678Z", - "removeDate": "2030-02-02T03:04:05.006Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=null/end=0001-01-01T00:00:00.000Z/history=6", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2031-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 1 - } - }, - { - "name": "rate=null/end=0001-01-01T00:00:00.000Z/history=7", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-02-01T00:00:00.000Z", - "removeDate": "2029-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=null/end=0001-01-01T00:00:00.000Z/history=8", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "1000-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 1 - } - }, - { - "name": "rate=null/end=0001-01-01T00:00:00.000Z/history=9", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": null - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 1 - } - }, - { - "name": "rate=null/end=0001-01-01T00:00:00.000Z/history=10", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": "2031-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=null/end=0001-01-01T00:00:00.000Z/history=11", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": "2030-01-02T00:00:00.000Z" - }, - { - "addDate": "2030-01-03T00:00:00.001Z" - }, - { - "addDate": "2029-12-31T23:59:59.999Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 2 - } - }, - { - "name": "rate=null/end=2030-01-15T00:00:00.000Z/history=0", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "0000-01-01T00:00:00.000Z", - "removeDate": "0001-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=null/end=2030-01-15T00:00:00.000Z/history=1", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "0000-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 1 - } - }, - { - "name": "rate=null/end=2030-01-15T00:00:00.000Z/history=2", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "1969-01-01T00:00:00.000Z", - "removeDate": "1970-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=null/end=2030-01-15T00:00:00.000Z/history=3", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=null/end=2030-01-15T00:00:00.000Z/history=4", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 1 - } - }, - { - "name": "rate=null/end=2030-01-15T00:00:00.000Z/history=5", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T01:23:45.678Z", - "removeDate": "2030-02-02T03:04:05.006Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=null/end=2030-01-15T00:00:00.000Z/history=6", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2031-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 1 - } - }, - { - "name": "rate=null/end=2030-01-15T00:00:00.000Z/history=7", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-02-01T00:00:00.000Z", - "removeDate": "2029-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=null/end=2030-01-15T00:00:00.000Z/history=8", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "1000-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 1 - } - }, - { - "name": "rate=null/end=2030-01-15T00:00:00.000Z/history=9", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": null - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 1 - } - }, - { - "name": "rate=null/end=2030-01-15T00:00:00.000Z/history=10", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": "2031-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=null/end=2030-01-15T00:00:00.000Z/history=11", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": "2030-01-02T00:00:00.000Z" - }, - { - "addDate": "2030-01-03T00:00:00.001Z" - }, - { - "addDate": "2029-12-31T23:59:59.999Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 2 - } - }, - { - "name": "rate=null/end=2030-03-01T12:34:56.789Z/history=0", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "0000-01-01T00:00:00.000Z", - "removeDate": "0001-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=null/end=2030-03-01T12:34:56.789Z/history=1", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "0000-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 1 - } - }, - { - "name": "rate=null/end=2030-03-01T12:34:56.789Z/history=2", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "1969-01-01T00:00:00.000Z", - "removeDate": "1970-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=null/end=2030-03-01T12:34:56.789Z/history=3", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=null/end=2030-03-01T12:34:56.789Z/history=4", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 1 - } - }, - { - "name": "rate=null/end=2030-03-01T12:34:56.789Z/history=5", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T01:23:45.678Z", - "removeDate": "2030-02-02T03:04:05.006Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=null/end=2030-03-01T12:34:56.789Z/history=6", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2031-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 1 - } - }, - { - "name": "rate=null/end=2030-03-01T12:34:56.789Z/history=7", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-02-01T00:00:00.000Z", - "removeDate": "2029-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=null/end=2030-03-01T12:34:56.789Z/history=8", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "1000-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 1 - } - }, - { - "name": "rate=null/end=2030-03-01T12:34:56.789Z/history=9", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": null - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 1 - } - }, - { - "name": "rate=null/end=2030-03-01T12:34:56.789Z/history=10", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": "2031-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=null/end=2030-03-01T12:34:56.789Z/history=11", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": "2030-01-02T00:00:00.000Z" - }, - { - "addDate": "2030-01-03T00:00:00.001Z" - }, - { - "addDate": "2029-12-31T23:59:59.999Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 2 - } - }, - { - "name": "rate=null/end=2031-01-01T00:00:00.000Z/history=0", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "0000-01-01T00:00:00.000Z", - "removeDate": "0001-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=null/end=2031-01-01T00:00:00.000Z/history=1", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "0000-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 1 - } - }, - { - "name": "rate=null/end=2031-01-01T00:00:00.000Z/history=2", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "1969-01-01T00:00:00.000Z", - "removeDate": "1970-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=null/end=2031-01-01T00:00:00.000Z/history=3", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=null/end=2031-01-01T00:00:00.000Z/history=4", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 1 - } - }, - { - "name": "rate=null/end=2031-01-01T00:00:00.000Z/history=5", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T01:23:45.678Z", - "removeDate": "2030-02-02T03:04:05.006Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=null/end=2031-01-01T00:00:00.000Z/history=6", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2031-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 1 - } - }, - { - "name": "rate=null/end=2031-01-01T00:00:00.000Z/history=7", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-02-01T00:00:00.000Z", - "removeDate": "2029-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=null/end=2031-01-01T00:00:00.000Z/history=8", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "1000-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 1 - } - }, - { - "name": "rate=null/end=2031-01-01T00:00:00.000Z/history=9", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": null - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 1 - } - }, - { - "name": "rate=null/end=2031-01-01T00:00:00.000Z/history=10", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": "2031-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=null/end=2031-01-01T00:00:00.000Z/history=11", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": "2030-01-02T00:00:00.000Z" - }, - { - "addDate": "2030-01-03T00:00:00.001Z" - }, - { - "addDate": "2029-12-31T23:59:59.999Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "pricePerRepository": null, - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 2 - } - }, - { - "name": "rate=undefined/end=0001-01-01T00:00:00.000Z/history=0", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "0000-01-01T00:00:00.000Z", - "removeDate": "0001-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "quota": { - "size": 500 - } - }, - "price": null, - "nbRepositories": 0 - } - }, - { - "name": "rate=undefined/end=0001-01-01T00:00:00.000Z/history=1", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "0000-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "quota": { - "size": 500 - } - }, - "price": null, - "nbRepositories": 1 - } - }, - { - "name": "rate=undefined/end=0001-01-01T00:00:00.000Z/history=2", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "1969-01-01T00:00:00.000Z", - "removeDate": "1970-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "quota": { - "size": 500 - } - }, - "price": null, - "nbRepositories": 0 - } - }, - { - "name": "rate=undefined/end=0001-01-01T00:00:00.000Z/history=3", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=undefined/end=0001-01-01T00:00:00.000Z/history=4", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "quota": { - "size": 500 - } - }, - "price": null, - "nbRepositories": 1 - } - }, - { - "name": "rate=undefined/end=0001-01-01T00:00:00.000Z/history=5", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T01:23:45.678Z", - "removeDate": "2030-02-02T03:04:05.006Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "quota": { - "size": 500 - } - }, - "price": null, - "nbRepositories": 0 - } - }, - { - "name": "rate=undefined/end=0001-01-01T00:00:00.000Z/history=6", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2031-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "quota": { - "size": 500 - } - }, - "price": null, - "nbRepositories": 1 - } - }, - { - "name": "rate=undefined/end=0001-01-01T00:00:00.000Z/history=7", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-02-01T00:00:00.000Z", - "removeDate": "2029-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "quota": { - "size": 500 - } - }, - "price": null, - "nbRepositories": 0 - } - }, - { - "name": "rate=undefined/end=0001-01-01T00:00:00.000Z/history=8", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "1000-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "quota": { - "size": 500 - } - }, - "price": null, - "nbRepositories": 1 - } - }, - { - "name": "rate=undefined/end=0001-01-01T00:00:00.000Z/history=9", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": null - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "quota": { - "size": 500 - } - }, - "price": null, - "nbRepositories": 1 - } - }, - { - "name": "rate=undefined/end=0001-01-01T00:00:00.000Z/history=10", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": "2031-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "quota": { - "size": 500 - } - }, - "price": null, - "nbRepositories": 0 - } - }, - { - "name": "rate=undefined/end=0001-01-01T00:00:00.000Z/history=11", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "plan": { - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": "2030-01-02T00:00:00.000Z" - }, - { - "addDate": "2030-01-03T00:00:00.001Z" - }, - { - "addDate": "2029-12-31T23:59:59.999Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "0001-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "quota": { - "size": 500 - } - }, - "price": null, - "nbRepositories": 2 - } - }, - { - "name": "rate=undefined/end=2030-01-15T00:00:00.000Z/history=0", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "0000-01-01T00:00:00.000Z", - "removeDate": "0001-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "quota": { - "size": 500 - } - }, - "price": null, - "nbRepositories": 0 - } - }, - { - "name": "rate=undefined/end=2030-01-15T00:00:00.000Z/history=1", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "0000-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "quota": { - "size": 500 - } - }, - "price": null, - "nbRepositories": 1 - } - }, - { - "name": "rate=undefined/end=2030-01-15T00:00:00.000Z/history=2", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "1969-01-01T00:00:00.000Z", - "removeDate": "1970-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "quota": { - "size": 500 - } - }, - "price": null, - "nbRepositories": 0 - } - }, - { - "name": "rate=undefined/end=2030-01-15T00:00:00.000Z/history=3", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=undefined/end=2030-01-15T00:00:00.000Z/history=4", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "quota": { - "size": 500 - } - }, - "price": null, - "nbRepositories": 1 - } - }, - { - "name": "rate=undefined/end=2030-01-15T00:00:00.000Z/history=5", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T01:23:45.678Z", - "removeDate": "2030-02-02T03:04:05.006Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "quota": { - "size": 500 - } - }, - "price": null, - "nbRepositories": 0 - } - }, - { - "name": "rate=undefined/end=2030-01-15T00:00:00.000Z/history=6", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2031-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "quota": { - "size": 500 - } - }, - "price": null, - "nbRepositories": 1 - } - }, - { - "name": "rate=undefined/end=2030-01-15T00:00:00.000Z/history=7", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-02-01T00:00:00.000Z", - "removeDate": "2029-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "quota": { - "size": 500 - } - }, - "price": null, - "nbRepositories": 0 - } - }, - { - "name": "rate=undefined/end=2030-01-15T00:00:00.000Z/history=8", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "1000-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "quota": { - "size": 500 - } - }, - "price": null, - "nbRepositories": 1 - } - }, - { - "name": "rate=undefined/end=2030-01-15T00:00:00.000Z/history=9", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": null - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "quota": { - "size": 500 - } - }, - "price": null, - "nbRepositories": 1 - } - }, - { - "name": "rate=undefined/end=2030-01-15T00:00:00.000Z/history=10", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": "2031-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "quota": { - "size": 500 - } - }, - "price": null, - "nbRepositories": 0 - } - }, - { - "name": "rate=undefined/end=2030-01-15T00:00:00.000Z/history=11", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "plan": { - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": "2030-01-02T00:00:00.000Z" - }, - { - "addDate": "2030-01-03T00:00:00.001Z" - }, - { - "addDate": "2029-12-31T23:59:59.999Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-01-15T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "quota": { - "size": 500 - } - }, - "price": null, - "nbRepositories": 2 - } - }, - { - "name": "rate=undefined/end=2030-03-01T12:34:56.789Z/history=0", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "0000-01-01T00:00:00.000Z", - "removeDate": "0001-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "quota": { - "size": 500 - } - }, - "price": null, - "nbRepositories": 0 - } - }, - { - "name": "rate=undefined/end=2030-03-01T12:34:56.789Z/history=1", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "0000-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "quota": { - "size": 500 - } - }, - "price": null, - "nbRepositories": 1 - } - }, - { - "name": "rate=undefined/end=2030-03-01T12:34:56.789Z/history=2", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "1969-01-01T00:00:00.000Z", - "removeDate": "1970-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "quota": { - "size": 500 - } - }, - "price": null, - "nbRepositories": 0 - } - }, - { - "name": "rate=undefined/end=2030-03-01T12:34:56.789Z/history=3", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=undefined/end=2030-03-01T12:34:56.789Z/history=4", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "quota": { - "size": 500 - } - }, - "price": null, - "nbRepositories": 1 - } - }, - { - "name": "rate=undefined/end=2030-03-01T12:34:56.789Z/history=5", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T01:23:45.678Z", - "removeDate": "2030-02-02T03:04:05.006Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "quota": { - "size": 500 - } - }, - "price": null, - "nbRepositories": 0 - } - }, - { - "name": "rate=undefined/end=2030-03-01T12:34:56.789Z/history=6", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2031-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "quota": { - "size": 500 - } - }, - "price": null, - "nbRepositories": 1 - } - }, - { - "name": "rate=undefined/end=2030-03-01T12:34:56.789Z/history=7", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-02-01T00:00:00.000Z", - "removeDate": "2029-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "quota": { - "size": 500 - } - }, - "price": null, - "nbRepositories": 0 - } - }, - { - "name": "rate=undefined/end=2030-03-01T12:34:56.789Z/history=8", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "1000-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "quota": { - "size": 500 - } - }, - "price": null, - "nbRepositories": 1 - } - }, - { - "name": "rate=undefined/end=2030-03-01T12:34:56.789Z/history=9", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": null - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "quota": { - "size": 500 - } - }, - "price": null, - "nbRepositories": 1 - } - }, - { - "name": "rate=undefined/end=2030-03-01T12:34:56.789Z/history=10", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": "2031-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "quota": { - "size": 500 - } - }, - "price": null, - "nbRepositories": 0 - } - }, - { - "name": "rate=undefined/end=2030-03-01T12:34:56.789Z/history=11", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "plan": { - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": "2030-01-02T00:00:00.000Z" - }, - { - "addDate": "2030-01-03T00:00:00.001Z" - }, - { - "addDate": "2029-12-31T23:59:59.999Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2030-03-01T12:34:56.789Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "quota": { - "size": 500 - } - }, - "price": null, - "nbRepositories": 2 - } - }, - { - "name": "rate=undefined/end=2031-01-01T00:00:00.000Z/history=0", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "0000-01-01T00:00:00.000Z", - "removeDate": "0001-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "quota": { - "size": 500 - } - }, - "price": null, - "nbRepositories": 0 - } - }, - { - "name": "rate=undefined/end=2031-01-01T00:00:00.000Z/history=1", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "0000-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "quota": { - "size": 500 - } - }, - "price": null, - "nbRepositories": 1 - } - }, - { - "name": "rate=undefined/end=2031-01-01T00:00:00.000Z/history=2", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "1969-01-01T00:00:00.000Z", - "removeDate": "1970-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "quota": { - "size": 500 - } - }, - "price": null, - "nbRepositories": 0 - } - }, - { - "name": "rate=undefined/end=2031-01-01T00:00:00.000Z/history=3", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "quota": { - "size": 500 - } - }, - "price": 0, - "nbRepositories": 0 - } - }, - { - "name": "rate=undefined/end=2031-01-01T00:00:00.000Z/history=4", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "quota": { - "size": 500 - } - }, - "price": null, - "nbRepositories": 1 - } - }, - { - "name": "rate=undefined/end=2031-01-01T00:00:00.000Z/history=5", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T01:23:45.678Z", - "removeDate": "2030-02-02T03:04:05.006Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "quota": { - "size": 500 - } - }, - "price": null, - "nbRepositories": 0 - } - }, - { - "name": "rate=undefined/end=2031-01-01T00:00:00.000Z/history=6", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2031-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "quota": { - "size": 500 - } - }, - "price": null, - "nbRepositories": 1 - } - }, - { - "name": "rate=undefined/end=2031-01-01T00:00:00.000Z/history=7", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-02-01T00:00:00.000Z", - "removeDate": "2029-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "quota": { - "size": 500 - } - }, - "price": null, - "nbRepositories": 0 - } - }, - { - "name": "rate=undefined/end=2031-01-01T00:00:00.000Z/history=8", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "1000-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "quota": { - "size": 500 - } - }, - "price": null, - "nbRepositories": 1 - } - }, - { - "name": "rate=undefined/end=2031-01-01T00:00:00.000Z/history=9", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": null - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "quota": { - "size": 500 - } - }, - "price": null, - "nbRepositories": 1 - } - }, - { - "name": "rate=undefined/end=2031-01-01T00:00:00.000Z/history=10", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": "2031-01-01T00:00:00.000Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "quota": { - "size": 500 - } - }, - "price": null, - "nbRepositories": 0 - } - }, - { - "name": "rate=undefined/end=2031-01-01T00:00:00.000Z/history=11", - "record": { - "conferenceID": "billing", - "name": "Conference", - "status": "ready", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "plan": { - "quota": { - "size": 500 - } - }, - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "url": "https://conference.example.test", - "owners": [ - "private-owner" - ], - "private": "must-not-appear", - "repositories": [ - { - "addDate": "2030-01-01T00:00:00.000Z", - "removeDate": "2030-01-02T00:00:00.000Z" - }, - { - "addDate": "2030-01-03T00:00:00.001Z" - }, - { - "addDate": "2029-12-31T23:59:59.999Z" - } - ] - }, - "expected": { - "conferenceID": "billing", - "name": "Conference", - "url": "https://conference.example.test", - "startDate": "2029-01-01T00:00:00.000Z", - "endDate": "2031-01-01T00:00:00.000Z", - "status": "ready", - "billing": { - "name": "Chair", - "email": "chair@example.test" - }, - "options": { - "image": true, - "link": false - }, - "plan": { - "quota": { - "size": 500 - } - }, - "price": null, - "nbRepositories": 2 - } - } - ] -} diff --git a/backend/internal/server/testdata/conferences.json b/backend/internal/server/testdata/conferences.json deleted file mode 100644 index 167f5f6..0000000 --- a/backend/internal/server/testdata/conferences.json +++ /dev/null @@ -1,2340 +0,0 @@ -{ - "now": "2030-01-01T00:00:00.000Z", - "cases": [ - { - "name": "valid", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "free_conference" - } - }, - "expected": null - }, - { - "name": "name/null", - "body": { - "name": null, - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "free_conference" - } - }, - "expected": { - "code": "conf_name_missing", - "status": 400 - } - }, - { - "name": "name/\"\"", - "body": { - "name": "", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "free_conference" - } - }, - "expected": { - "code": "conf_name_missing", - "status": 400 - } - }, - { - "name": "name/false", - "body": { - "name": false, - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "free_conference" - } - }, - "expected": { - "code": "conf_name_missing", - "status": 400 - } - }, - { - "name": "name/0", - "body": { - "name": 0, - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "free_conference" - } - }, - "expected": { - "code": "conf_name_missing", - "status": 400 - } - }, - { - "name": "name/missing", - "body": { - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "free_conference" - } - }, - "expected": { - "code": "conf_name_missing", - "status": 400 - } - }, - { - "name": "conferenceID/null", - "body": { - "name": "Conference", - "conferenceID": null, - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "free_conference" - } - }, - "expected": { - "code": "conf_id_missing", - "status": 400 - } - }, - { - "name": "conferenceID/\"\"", - "body": { - "name": "Conference", - "conferenceID": "", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "free_conference" - } - }, - "expected": { - "code": "conf_id_missing", - "status": 400 - } - }, - { - "name": "conferenceID/false", - "body": { - "name": "Conference", - "conferenceID": false, - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "free_conference" - } - }, - "expected": { - "code": "conf_id_missing", - "status": 400 - } - }, - { - "name": "conferenceID/0", - "body": { - "name": "Conference", - "conferenceID": 0, - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "free_conference" - } - }, - "expected": { - "code": "conf_id_missing", - "status": 400 - } - }, - { - "name": "conferenceID/missing", - "body": { - "name": "Conference", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "free_conference" - } - }, - "expected": { - "code": "conf_id_missing", - "status": 400 - } - }, - { - "name": "startDate/null", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": null, - "endDate": "2031-02-01", - "plan": { - "planID": "free_conference" - } - }, - "expected": { - "code": "conf_start_date_missing", - "status": 400 - } - }, - { - "name": "startDate/\"\"", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "", - "endDate": "2031-02-01", - "plan": { - "planID": "free_conference" - } - }, - "expected": { - "code": "conf_start_date_missing", - "status": 400 - } - }, - { - "name": "startDate/false", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": false, - "endDate": "2031-02-01", - "plan": { - "planID": "free_conference" - } - }, - "expected": { - "code": "conf_start_date_missing", - "status": 400 - } - }, - { - "name": "startDate/0", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": 0, - "endDate": "2031-02-01", - "plan": { - "planID": "free_conference" - } - }, - "expected": { - "code": "conf_start_date_missing", - "status": 400 - } - }, - { - "name": "startDate/missing", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "endDate": "2031-02-01", - "plan": { - "planID": "free_conference" - } - }, - "expected": { - "code": "conf_start_date_missing", - "status": 400 - } - }, - { - "name": "endDate/null", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": null, - "plan": { - "planID": "free_conference" - } - }, - "expected": { - "code": "conf_end_date_missing", - "status": 400 - } - }, - { - "name": "endDate/\"\"", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "", - "plan": { - "planID": "free_conference" - } - }, - "expected": { - "code": "conf_end_date_missing", - "status": 400 - } - }, - { - "name": "endDate/false", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": false, - "plan": { - "planID": "free_conference" - } - }, - "expected": { - "code": "conf_end_date_missing", - "status": 400 - } - }, - { - "name": "endDate/0", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": 0, - "plan": { - "planID": "free_conference" - } - }, - "expected": { - "code": "conf_end_date_missing", - "status": 400 - } - }, - { - "name": "endDate/missing", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "plan": { - "planID": "free_conference" - } - }, - "expected": { - "code": "conf_end_date_missing", - "status": 400 - } - }, - { - "name": "precedence/all", - "body": { - "plan": { - "planID": "free_conference" - } - }, - "expected": { - "code": "conf_name_missing", - "status": 400 - } - }, - { - "name": "start after end", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2032-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "free_conference" - } - }, - "expected": { - "code": "conf_start_date_invalid", - "status": 400 - } - }, - { - "name": "end in past", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2020-01-01", - "endDate": "2021-01-01", - "plan": { - "planID": "free_conference" - } - }, - "expected": { - "code": "conf_end_date_invalid", - "status": 400 - } - }, - { - "name": "end equals now", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2029-01-01", - "endDate": "2030-01-01T00:00:00.000Z", - "plan": { - "planID": "free_conference" - } - }, - "expected": null - }, - { - "name": "unknown plan", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "unknown" - } - }, - "expected": { - "code": "invalid_plan", - "status": 400 - } - }, - { - "name": "premium_conference/valid", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "premium_conference" - }, - "billing": { - "name": "Chair", - "email": "chair@example.test", - "address": "Address", - "city": "City", - "zip": "000", - "country": "Country" - } - }, - "expected": null - }, - { - "name": "premium_conference/missing billing", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "premium_conference" - } - }, - "expected": { - "code": "billing_missing", - "status": 400 - } - }, - { - "name": "premium_conference/empty billing", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "premium_conference" - }, - "billing": {} - }, - "expected": { - "code": "billing_name_missing", - "status": 400 - } - }, - { - "name": "premium_conference/name/null", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "premium_conference" - }, - "billing": { - "name": null, - "email": "chair@example.test", - "address": "Address", - "city": "City", - "zip": "000", - "country": "Country" - } - }, - "expected": { - "code": "billing_name_missing", - "status": 400 - } - }, - { - "name": "premium_conference/name/\"\"", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "premium_conference" - }, - "billing": { - "name": "", - "email": "chair@example.test", - "address": "Address", - "city": "City", - "zip": "000", - "country": "Country" - } - }, - "expected": { - "code": "billing_name_missing", - "status": 400 - } - }, - { - "name": "premium_conference/name/false", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "premium_conference" - }, - "billing": { - "name": false, - "email": "chair@example.test", - "address": "Address", - "city": "City", - "zip": "000", - "country": "Country" - } - }, - "expected": { - "code": "billing_name_missing", - "status": 400 - } - }, - { - "name": "premium_conference/name/0", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "premium_conference" - }, - "billing": { - "name": 0, - "email": "chair@example.test", - "address": "Address", - "city": "City", - "zip": "000", - "country": "Country" - } - }, - "expected": { - "code": "billing_name_missing", - "status": 400 - } - }, - { - "name": "premium_conference/name/\" \"", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "premium_conference" - }, - "billing": { - "name": " ", - "email": "chair@example.test", - "address": "Address", - "city": "City", - "zip": "000", - "country": "Country" - } - }, - "expected": null - }, - { - "name": "premium_conference/email/null", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "premium_conference" - }, - "billing": { - "name": "Chair", - "email": null, - "address": "Address", - "city": "City", - "zip": "000", - "country": "Country" - } - }, - "expected": { - "code": "billing_email_missing", - "status": 400 - } - }, - { - "name": "premium_conference/email/\"\"", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "premium_conference" - }, - "billing": { - "name": "Chair", - "email": "", - "address": "Address", - "city": "City", - "zip": "000", - "country": "Country" - } - }, - "expected": { - "code": "billing_email_missing", - "status": 400 - } - }, - { - "name": "premium_conference/email/false", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "premium_conference" - }, - "billing": { - "name": "Chair", - "email": false, - "address": "Address", - "city": "City", - "zip": "000", - "country": "Country" - } - }, - "expected": { - "code": "billing_email_missing", - "status": 400 - } - }, - { - "name": "premium_conference/email/0", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "premium_conference" - }, - "billing": { - "name": "Chair", - "email": 0, - "address": "Address", - "city": "City", - "zip": "000", - "country": "Country" - } - }, - "expected": { - "code": "billing_email_missing", - "status": 400 - } - }, - { - "name": "premium_conference/email/\" \"", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "premium_conference" - }, - "billing": { - "name": "Chair", - "email": " ", - "address": "Address", - "city": "City", - "zip": "000", - "country": "Country" - } - }, - "expected": null - }, - { - "name": "premium_conference/address/null", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "premium_conference" - }, - "billing": { - "name": "Chair", - "email": "chair@example.test", - "address": null, - "city": "City", - "zip": "000", - "country": "Country" - } - }, - "expected": { - "code": "billing_address_missing", - "status": 400 - } - }, - { - "name": "premium_conference/address/\"\"", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "premium_conference" - }, - "billing": { - "name": "Chair", - "email": "chair@example.test", - "address": "", - "city": "City", - "zip": "000", - "country": "Country" - } - }, - "expected": { - "code": "billing_address_missing", - "status": 400 - } - }, - { - "name": "premium_conference/address/false", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "premium_conference" - }, - "billing": { - "name": "Chair", - "email": "chair@example.test", - "address": false, - "city": "City", - "zip": "000", - "country": "Country" - } - }, - "expected": { - "code": "billing_address_missing", - "status": 400 - } - }, - { - "name": "premium_conference/address/0", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "premium_conference" - }, - "billing": { - "name": "Chair", - "email": "chair@example.test", - "address": 0, - "city": "City", - "zip": "000", - "country": "Country" - } - }, - "expected": { - "code": "billing_address_missing", - "status": 400 - } - }, - { - "name": "premium_conference/address/\" \"", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "premium_conference" - }, - "billing": { - "name": "Chair", - "email": "chair@example.test", - "address": " ", - "city": "City", - "zip": "000", - "country": "Country" - } - }, - "expected": null - }, - { - "name": "premium_conference/city/null", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "premium_conference" - }, - "billing": { - "name": "Chair", - "email": "chair@example.test", - "address": "Address", - "city": null, - "zip": "000", - "country": "Country" - } - }, - "expected": { - "code": "billing_city_missing", - "status": 400 - } - }, - { - "name": "premium_conference/city/\"\"", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "premium_conference" - }, - "billing": { - "name": "Chair", - "email": "chair@example.test", - "address": "Address", - "city": "", - "zip": "000", - "country": "Country" - } - }, - "expected": { - "code": "billing_city_missing", - "status": 400 - } - }, - { - "name": "premium_conference/city/false", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "premium_conference" - }, - "billing": { - "name": "Chair", - "email": "chair@example.test", - "address": "Address", - "city": false, - "zip": "000", - "country": "Country" - } - }, - "expected": { - "code": "billing_city_missing", - "status": 400 - } - }, - { - "name": "premium_conference/city/0", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "premium_conference" - }, - "billing": { - "name": "Chair", - "email": "chair@example.test", - "address": "Address", - "city": 0, - "zip": "000", - "country": "Country" - } - }, - "expected": { - "code": "billing_city_missing", - "status": 400 - } - }, - { - "name": "premium_conference/city/\" \"", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "premium_conference" - }, - "billing": { - "name": "Chair", - "email": "chair@example.test", - "address": "Address", - "city": " ", - "zip": "000", - "country": "Country" - } - }, - "expected": null - }, - { - "name": "premium_conference/zip/null", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "premium_conference" - }, - "billing": { - "name": "Chair", - "email": "chair@example.test", - "address": "Address", - "city": "City", - "zip": null, - "country": "Country" - } - }, - "expected": { - "code": "billing_zip_missing", - "status": 400 - } - }, - { - "name": "premium_conference/zip/\"\"", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "premium_conference" - }, - "billing": { - "name": "Chair", - "email": "chair@example.test", - "address": "Address", - "city": "City", - "zip": "", - "country": "Country" - } - }, - "expected": { - "code": "billing_zip_missing", - "status": 400 - } - }, - { - "name": "premium_conference/zip/false", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "premium_conference" - }, - "billing": { - "name": "Chair", - "email": "chair@example.test", - "address": "Address", - "city": "City", - "zip": false, - "country": "Country" - } - }, - "expected": { - "code": "billing_zip_missing", - "status": 400 - } - }, - { - "name": "premium_conference/zip/0", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "premium_conference" - }, - "billing": { - "name": "Chair", - "email": "chair@example.test", - "address": "Address", - "city": "City", - "zip": 0, - "country": "Country" - } - }, - "expected": { - "code": "billing_zip_missing", - "status": 400 - } - }, - { - "name": "premium_conference/zip/\" \"", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "premium_conference" - }, - "billing": { - "name": "Chair", - "email": "chair@example.test", - "address": "Address", - "city": "City", - "zip": " ", - "country": "Country" - } - }, - "expected": null - }, - { - "name": "premium_conference/country/null", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "premium_conference" - }, - "billing": { - "name": "Chair", - "email": "chair@example.test", - "address": "Address", - "city": "City", - "zip": "000", - "country": null - } - }, - "expected": { - "code": "billing_country_missing", - "status": 400 - } - }, - { - "name": "premium_conference/country/\"\"", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "premium_conference" - }, - "billing": { - "name": "Chair", - "email": "chair@example.test", - "address": "Address", - "city": "City", - "zip": "000", - "country": "" - } - }, - "expected": { - "code": "billing_country_missing", - "status": 400 - } - }, - { - "name": "premium_conference/country/false", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "premium_conference" - }, - "billing": { - "name": "Chair", - "email": "chair@example.test", - "address": "Address", - "city": "City", - "zip": "000", - "country": false - } - }, - "expected": { - "code": "billing_country_missing", - "status": 400 - } - }, - { - "name": "premium_conference/country/0", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "premium_conference" - }, - "billing": { - "name": "Chair", - "email": "chair@example.test", - "address": "Address", - "city": "City", - "zip": "000", - "country": 0 - } - }, - "expected": { - "code": "billing_country_missing", - "status": 400 - } - }, - { - "name": "premium_conference/country/\" \"", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "premium_conference" - }, - "billing": { - "name": "Chair", - "email": "chair@example.test", - "address": "Address", - "city": "City", - "zip": "000", - "country": " " - } - }, - "expected": null - }, - { - "name": "unlimited_conference/valid", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "unlimited_conference" - }, - "billing": { - "name": "Chair", - "email": "chair@example.test", - "address": "Address", - "city": "City", - "zip": "000", - "country": "Country" - } - }, - "expected": null - }, - { - "name": "unlimited_conference/missing billing", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "unlimited_conference" - } - }, - "expected": { - "code": "billing_missing", - "status": 400 - } - }, - { - "name": "unlimited_conference/empty billing", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "unlimited_conference" - }, - "billing": {} - }, - "expected": { - "code": "billing_name_missing", - "status": 400 - } - }, - { - "name": "unlimited_conference/name/null", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "unlimited_conference" - }, - "billing": { - "name": null, - "email": "chair@example.test", - "address": "Address", - "city": "City", - "zip": "000", - "country": "Country" - } - }, - "expected": { - "code": "billing_name_missing", - "status": 400 - } - }, - { - "name": "unlimited_conference/name/\"\"", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "unlimited_conference" - }, - "billing": { - "name": "", - "email": "chair@example.test", - "address": "Address", - "city": "City", - "zip": "000", - "country": "Country" - } - }, - "expected": { - "code": "billing_name_missing", - "status": 400 - } - }, - { - "name": "unlimited_conference/name/false", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "unlimited_conference" - }, - "billing": { - "name": false, - "email": "chair@example.test", - "address": "Address", - "city": "City", - "zip": "000", - "country": "Country" - } - }, - "expected": { - "code": "billing_name_missing", - "status": 400 - } - }, - { - "name": "unlimited_conference/name/0", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "unlimited_conference" - }, - "billing": { - "name": 0, - "email": "chair@example.test", - "address": "Address", - "city": "City", - "zip": "000", - "country": "Country" - } - }, - "expected": { - "code": "billing_name_missing", - "status": 400 - } - }, - { - "name": "unlimited_conference/name/\" \"", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "unlimited_conference" - }, - "billing": { - "name": " ", - "email": "chair@example.test", - "address": "Address", - "city": "City", - "zip": "000", - "country": "Country" - } - }, - "expected": null - }, - { - "name": "unlimited_conference/email/null", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "unlimited_conference" - }, - "billing": { - "name": "Chair", - "email": null, - "address": "Address", - "city": "City", - "zip": "000", - "country": "Country" - } - }, - "expected": { - "code": "billing_email_missing", - "status": 400 - } - }, - { - "name": "unlimited_conference/email/\"\"", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "unlimited_conference" - }, - "billing": { - "name": "Chair", - "email": "", - "address": "Address", - "city": "City", - "zip": "000", - "country": "Country" - } - }, - "expected": { - "code": "billing_email_missing", - "status": 400 - } - }, - { - "name": "unlimited_conference/email/false", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "unlimited_conference" - }, - "billing": { - "name": "Chair", - "email": false, - "address": "Address", - "city": "City", - "zip": "000", - "country": "Country" - } - }, - "expected": { - "code": "billing_email_missing", - "status": 400 - } - }, - { - "name": "unlimited_conference/email/0", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "unlimited_conference" - }, - "billing": { - "name": "Chair", - "email": 0, - "address": "Address", - "city": "City", - "zip": "000", - "country": "Country" - } - }, - "expected": { - "code": "billing_email_missing", - "status": 400 - } - }, - { - "name": "unlimited_conference/email/\" \"", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "unlimited_conference" - }, - "billing": { - "name": "Chair", - "email": " ", - "address": "Address", - "city": "City", - "zip": "000", - "country": "Country" - } - }, - "expected": null - }, - { - "name": "unlimited_conference/address/null", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "unlimited_conference" - }, - "billing": { - "name": "Chair", - "email": "chair@example.test", - "address": null, - "city": "City", - "zip": "000", - "country": "Country" - } - }, - "expected": { - "code": "billing_address_missing", - "status": 400 - } - }, - { - "name": "unlimited_conference/address/\"\"", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "unlimited_conference" - }, - "billing": { - "name": "Chair", - "email": "chair@example.test", - "address": "", - "city": "City", - "zip": "000", - "country": "Country" - } - }, - "expected": { - "code": "billing_address_missing", - "status": 400 - } - }, - { - "name": "unlimited_conference/address/false", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "unlimited_conference" - }, - "billing": { - "name": "Chair", - "email": "chair@example.test", - "address": false, - "city": "City", - "zip": "000", - "country": "Country" - } - }, - "expected": { - "code": "billing_address_missing", - "status": 400 - } - }, - { - "name": "unlimited_conference/address/0", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "unlimited_conference" - }, - "billing": { - "name": "Chair", - "email": "chair@example.test", - "address": 0, - "city": "City", - "zip": "000", - "country": "Country" - } - }, - "expected": { - "code": "billing_address_missing", - "status": 400 - } - }, - { - "name": "unlimited_conference/address/\" \"", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "unlimited_conference" - }, - "billing": { - "name": "Chair", - "email": "chair@example.test", - "address": " ", - "city": "City", - "zip": "000", - "country": "Country" - } - }, - "expected": null - }, - { - "name": "unlimited_conference/city/null", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "unlimited_conference" - }, - "billing": { - "name": "Chair", - "email": "chair@example.test", - "address": "Address", - "city": null, - "zip": "000", - "country": "Country" - } - }, - "expected": { - "code": "billing_city_missing", - "status": 400 - } - }, - { - "name": "unlimited_conference/city/\"\"", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "unlimited_conference" - }, - "billing": { - "name": "Chair", - "email": "chair@example.test", - "address": "Address", - "city": "", - "zip": "000", - "country": "Country" - } - }, - "expected": { - "code": "billing_city_missing", - "status": 400 - } - }, - { - "name": "unlimited_conference/city/false", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "unlimited_conference" - }, - "billing": { - "name": "Chair", - "email": "chair@example.test", - "address": "Address", - "city": false, - "zip": "000", - "country": "Country" - } - }, - "expected": { - "code": "billing_city_missing", - "status": 400 - } - }, - { - "name": "unlimited_conference/city/0", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "unlimited_conference" - }, - "billing": { - "name": "Chair", - "email": "chair@example.test", - "address": "Address", - "city": 0, - "zip": "000", - "country": "Country" - } - }, - "expected": { - "code": "billing_city_missing", - "status": 400 - } - }, - { - "name": "unlimited_conference/city/\" \"", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "unlimited_conference" - }, - "billing": { - "name": "Chair", - "email": "chair@example.test", - "address": "Address", - "city": " ", - "zip": "000", - "country": "Country" - } - }, - "expected": null - }, - { - "name": "unlimited_conference/zip/null", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "unlimited_conference" - }, - "billing": { - "name": "Chair", - "email": "chair@example.test", - "address": "Address", - "city": "City", - "zip": null, - "country": "Country" - } - }, - "expected": { - "code": "billing_zip_missing", - "status": 400 - } - }, - { - "name": "unlimited_conference/zip/\"\"", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "unlimited_conference" - }, - "billing": { - "name": "Chair", - "email": "chair@example.test", - "address": "Address", - "city": "City", - "zip": "", - "country": "Country" - } - }, - "expected": { - "code": "billing_zip_missing", - "status": 400 - } - }, - { - "name": "unlimited_conference/zip/false", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "unlimited_conference" - }, - "billing": { - "name": "Chair", - "email": "chair@example.test", - "address": "Address", - "city": "City", - "zip": false, - "country": "Country" - } - }, - "expected": { - "code": "billing_zip_missing", - "status": 400 - } - }, - { - "name": "unlimited_conference/zip/0", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "unlimited_conference" - }, - "billing": { - "name": "Chair", - "email": "chair@example.test", - "address": "Address", - "city": "City", - "zip": 0, - "country": "Country" - } - }, - "expected": { - "code": "billing_zip_missing", - "status": 400 - } - }, - { - "name": "unlimited_conference/zip/\" \"", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "unlimited_conference" - }, - "billing": { - "name": "Chair", - "email": "chair@example.test", - "address": "Address", - "city": "City", - "zip": " ", - "country": "Country" - } - }, - "expected": null - }, - { - "name": "unlimited_conference/country/null", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "unlimited_conference" - }, - "billing": { - "name": "Chair", - "email": "chair@example.test", - "address": "Address", - "city": "City", - "zip": "000", - "country": null - } - }, - "expected": { - "code": "billing_country_missing", - "status": 400 - } - }, - { - "name": "unlimited_conference/country/\"\"", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "unlimited_conference" - }, - "billing": { - "name": "Chair", - "email": "chair@example.test", - "address": "Address", - "city": "City", - "zip": "000", - "country": "" - } - }, - "expected": { - "code": "billing_country_missing", - "status": 400 - } - }, - { - "name": "unlimited_conference/country/false", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "unlimited_conference" - }, - "billing": { - "name": "Chair", - "email": "chair@example.test", - "address": "Address", - "city": "City", - "zip": "000", - "country": false - } - }, - "expected": { - "code": "billing_country_missing", - "status": 400 - } - }, - { - "name": "unlimited_conference/country/0", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "unlimited_conference" - }, - "billing": { - "name": "Chair", - "email": "chair@example.test", - "address": "Address", - "city": "City", - "zip": "000", - "country": 0 - } - }, - "expected": { - "code": "billing_country_missing", - "status": 400 - } - }, - { - "name": "unlimited_conference/country/\" \"", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "unlimited_conference" - }, - "billing": { - "name": "Chair", - "email": "chair@example.test", - "address": "Address", - "city": "City", - "zip": "000", - "country": " " - } - }, - "expected": null - }, - { - "name": "startDate/date/\"March 1 2031\"", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "March 1 2031", - "endDate": "2031-02-01", - "plan": { - "planID": "free_conference" - } - }, - "expected": { - "code": "conf_start_date_invalid", - "status": 400 - } - }, - { - "name": "startDate/date/\"2031-02-30\"", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-02-30", - "endDate": "2031-02-01", - "plan": { - "planID": "free_conference" - } - }, - "expected": { - "code": "conf_start_date_invalid", - "status": 400 - } - }, - { - "name": "startDate/date/\"0001-01-01\"", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "0001-01-01", - "endDate": "2031-02-01", - "plan": { - "planID": "free_conference" - } - }, - "expected": null - }, - { - "name": "startDate/date/\"2031-01-01T24:00:00Z\"", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01T24:00:00Z", - "endDate": "2031-02-01", - "plan": { - "planID": "free_conference" - } - }, - "expected": null - }, - { - "name": "startDate/date/\"invalid\"", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "invalid", - "endDate": "2031-02-01", - "plan": { - "planID": "free_conference" - } - }, - "expected": null - }, - { - "name": "startDate/date/{}", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": {}, - "endDate": "2031-02-01", - "plan": { - "planID": "free_conference" - } - }, - "expected": null - }, - { - "name": "startDate/date/{\"toString\":\"bad\"}", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": { - "toString": "bad" - }, - "endDate": "2031-02-01", - "plan": { - "planID": "free_conference" - } - }, - "expected": { - "code": "internal_error", - "status": 500 - } - }, - { - "name": "startDate/date/[]", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": [], - "endDate": "2031-02-01", - "plan": { - "planID": "free_conference" - } - }, - "expected": null - }, - { - "name": "startDate/date/[\"2031\",\"1\",\"1\"]", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": [ - "2031", - "1", - "1" - ], - "endDate": "2031-02-01", - "plan": { - "planID": "free_conference" - } - }, - "expected": null - }, - { - "name": "startDate/date/1", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": 1, - "endDate": "2031-02-01", - "plan": { - "planID": "free_conference" - } - }, - "expected": null - }, - { - "name": "startDate/date/1924992000000", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": 1924992000000, - "endDate": "2031-02-01", - "plan": { - "planID": "free_conference" - } - }, - "expected": null - }, - { - "name": "startDate/date/true", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": true, - "endDate": "2031-02-01", - "plan": { - "planID": "free_conference" - } - }, - "expected": null - }, - { - "name": "startDate/date/8640000000000001", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": 8640000000000001, - "endDate": "2031-02-01", - "plan": { - "planID": "free_conference" - } - }, - "expected": null - }, - { - "name": "endDate/date/\"March 1 2031\"", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "March 1 2031", - "plan": { - "planID": "free_conference" - } - }, - "expected": null - }, - { - "name": "endDate/date/\"2031-02-30\"", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-02-30", - "plan": { - "planID": "free_conference" - } - }, - "expected": null - }, - { - "name": "endDate/date/\"0001-01-01\"", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "0001-01-01", - "plan": { - "planID": "free_conference" - } - }, - "expected": { - "code": "conf_start_date_invalid", - "status": 400 - } - }, - { - "name": "endDate/date/\"2031-01-01T24:00:00Z\"", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "2031-01-01T24:00:00Z", - "plan": { - "planID": "free_conference" - } - }, - "expected": null - }, - { - "name": "endDate/date/\"invalid\"", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": "invalid", - "plan": { - "planID": "free_conference" - } - }, - "expected": null - }, - { - "name": "endDate/date/{}", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": {}, - "plan": { - "planID": "free_conference" - } - }, - "expected": null - }, - { - "name": "endDate/date/{\"toString\":\"bad\"}", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": { - "toString": "bad" - }, - "plan": { - "planID": "free_conference" - } - }, - "expected": { - "code": "internal_error", - "status": 500 - } - }, - { - "name": "endDate/date/[]", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": [], - "plan": { - "planID": "free_conference" - } - }, - "expected": null - }, - { - "name": "endDate/date/[\"2031\",\"1\",\"1\"]", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": [ - "2031", - "1", - "1" - ], - "plan": { - "planID": "free_conference" - } - }, - "expected": null - }, - { - "name": "endDate/date/1", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": 1, - "plan": { - "planID": "free_conference" - } - }, - "expected": { - "code": "conf_start_date_invalid", - "status": 400 - } - }, - { - "name": "endDate/date/1924992000000", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": 1924992000000, - "plan": { - "planID": "free_conference" - } - }, - "expected": null - }, - { - "name": "endDate/date/true", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": true, - "plan": { - "planID": "free_conference" - } - }, - "expected": { - "code": "conf_start_date_invalid", - "status": 400 - } - }, - { - "name": "endDate/date/8640000000000001", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "2031-01-01", - "endDate": 8640000000000001, - "plan": { - "planID": "free_conference" - } - }, - "expected": null - }, - { - "name": "invalid start before expired end", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "invalid", - "endDate": "2020-01-01", - "plan": { - "planID": "free_conference" - } - }, - "expected": { - "code": "conf_end_date_invalid", - "status": 400 - } - }, - { - "name": "coercion before plan", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": { - "toString": "bad" - }, - "endDate": "2031-02-01", - "plan": { - "planID": "invalid" - } - }, - "expected": { - "code": "internal_error", - "status": 500 - } - }, - { - "name": "invalid date after plan", - "body": { - "name": "Conference", - "conferenceID": "conference-test", - "startDate": "invalid", - "endDate": "2031-02-01", - "plan": { - "planID": "invalid" - } - }, - "expected": { - "code": "invalid_plan", - "status": 400 - } - } - ] -} diff --git a/backend/internal/server/testdata/content-verification.json b/backend/internal/server/testdata/content-verification.json deleted file mode 100644 index aba59fc..0000000 --- a/backend/internal/server/testdata/content-verification.json +++ /dev/null @@ -1,278 +0,0 @@ -[ - { - "name": "ordinary", - "pointer": "", - "revision": "b7a03985f2b13863493bd98e22d088b4ce285f08", - "proof": { - "gitSha": "b7a03985f2b13863493bd98e22d088b4ce285f08", - "sha256": "d301245189e452b41ec6963c8385e5776ac30b06aa2117526fe128fbff9eb6a3", - "size": 18 - }, - "expected": "git-b7a03985f2b13863493bd98e22d088b4ce285f08", - "fetched": 0 - }, - { - "name": "lfs", - "pointer": "version https://git-lfs.github.com/spec/v1\noid sha256:d301245189e452b41ec6963c8385e5776ac30b06aa2117526fe128fbff9eb6a3\nsize 18\n", - "revision": "462acda51d4133efef7be75aad09b382ccfb40f0", - "proof": { - "gitSha": "b7a03985f2b13863493bd98e22d088b4ce285f08", - "sha256": "d301245189e452b41ec6963c8385e5776ac30b06aa2117526fe128fbff9eb6a3", - "size": 18 - }, - "expected": "sha256-d301245189e452b41ec6963c8385e5776ac30b06aa2117526fe128fbff9eb6a3", - "fetched": 1 - }, - { - "name": "no final newline", - "pointer": "version https://git-lfs.github.com/spec/v1\noid sha256:d301245189e452b41ec6963c8385e5776ac30b06aa2117526fe128fbff9eb6a3\nsize 18", - "revision": "b9413e5478040a35d5a19db5aa6d6a920a26cbe1", - "proof": { - "gitSha": "b7a03985f2b13863493bd98e22d088b4ce285f08", - "sha256": "d301245189e452b41ec6963c8385e5776ac30b06aa2117526fe128fbff9eb6a3", - "size": 18 - }, - "expected": "sha256-d301245189e452b41ec6963c8385e5776ac30b06aa2117526fe128fbff9eb6a3", - "fetched": 1 - }, - { - "name": "wrong pointer hash", - "pointer": "version https://git-lfs.github.com/spec/v1\noid sha256:d301245189e452b41ec6963c8385e5776ac30b06aa2117526fe128fbff9eb6a3\nsize 18\n", - "revision": "0000000000000000000000000000000000000000", - "proof": { - "gitSha": "b7a03985f2b13863493bd98e22d088b4ce285f08", - "sha256": "d301245189e452b41ec6963c8385e5776ac30b06aa2117526fe128fbff9eb6a3", - "size": 18 - }, - "error": "invalid_blob_hash", - "fetched": 1 - }, - { - "name": "wrong oid", - "pointer": "version https://git-lfs.github.com/spec/v1\noid sha256:0000000000000000000000000000000000000000000000000000000000000000\nsize 18\n", - "revision": "0475404c8a4cf8fef90e5887bf87a3d363962367", - "proof": { - "gitSha": "b7a03985f2b13863493bd98e22d088b4ce285f08", - "sha256": "d301245189e452b41ec6963c8385e5776ac30b06aa2117526fe128fbff9eb6a3", - "size": 18 - }, - "error": "invalid_blob_hash", - "fetched": 1 - }, - { - "name": "wrong size", - "pointer": "version https://git-lfs.github.com/spec/v1\noid sha256:d301245189e452b41ec6963c8385e5776ac30b06aa2117526fe128fbff9eb6a3\nsize 1\n", - "revision": "9f121b9ad063eb6cc3bd64ec9e82a37296718610", - "proof": { - "gitSha": "b7a03985f2b13863493bd98e22d088b4ce285f08", - "sha256": "d301245189e452b41ec6963c8385e5776ac30b06aa2117526fe128fbff9eb6a3", - "size": 18 - }, - "error": "invalid_blob_hash", - "fetched": 1 - }, - { - "name": "wrong version", - "pointer": "version https://git-lfs.github.com/spec/v2\noid sha256:d301245189e452b41ec6963c8385e5776ac30b06aa2117526fe128fbff9eb6a3\nsize 18\n", - "revision": "ae68c6a815c291d17ec875ff41da9599dcee8cd0", - "proof": { - "gitSha": "b7a03985f2b13863493bd98e22d088b4ce285f08", - "sha256": "d301245189e452b41ec6963c8385e5776ac30b06aa2117526fe128fbff9eb6a3", - "size": 18 - }, - "error": "invalid_blob_hash", - "fetched": 1 - }, - { - "name": "missing oid", - "pointer": "version https://git-lfs.github.com/spec/v1\nsize 18", - "revision": "210cfdac23922a21488391a257d494073cd6517d", - "proof": { - "gitSha": "b7a03985f2b13863493bd98e22d088b4ce285f08", - "sha256": "d301245189e452b41ec6963c8385e5776ac30b06aa2117526fe128fbff9eb6a3", - "size": 18 - }, - "error": "invalid_blob_hash", - "fetched": 1 - }, - { - "name": "missing size", - "pointer": "version https://git-lfs.github.com/spec/v1\noid sha256:d301245189e452b41ec6963c8385e5776ac30b06aa2117526fe128fbff9eb6a3", - "revision": "dabd9adbb7fb83b6bb27e4dc555b3d40f70c79b2", - "proof": { - "gitSha": "b7a03985f2b13863493bd98e22d088b4ce285f08", - "sha256": "d301245189e452b41ec6963c8385e5776ac30b06aa2117526fe128fbff9eb6a3", - "size": 18 - }, - "error": "invalid_blob_hash", - "fetched": 1 - }, - { - "name": "uppercase oid", - "pointer": "version https://git-lfs.github.com/spec/v1\noid sha256:D301245189E452B41EC6963C8385E5776AC30B06AA2117526FE128FBFF9EB6A3\nsize 18\n", - "revision": "46a1d52e5dcd91664ef7ec17a6f92a642bae396a", - "proof": { - "gitSha": "b7a03985f2b13863493bd98e22d088b4ce285f08", - "sha256": "d301245189e452b41ec6963c8385e5776ac30b06aa2117526fe128fbff9eb6a3", - "size": 18 - }, - "error": "invalid_blob_hash", - "fetched": 1 - }, - { - "name": "negative size", - "pointer": "version https://git-lfs.github.com/spec/v1\noid sha256:d301245189e452b41ec6963c8385e5776ac30b06aa2117526fe128fbff9eb6a3\nsize -1\n", - "revision": "594c6900790fc0738afe570c0f93cd01bdc4da67", - "proof": { - "gitSha": "b7a03985f2b13863493bd98e22d088b4ce285f08", - "sha256": "d301245189e452b41ec6963c8385e5776ac30b06aa2117526fe128fbff9eb6a3", - "size": 18 - }, - "error": "invalid_blob_hash", - "fetched": 1 - }, - { - "name": "plus size", - "pointer": "version https://git-lfs.github.com/spec/v1\noid sha256:d301245189e452b41ec6963c8385e5776ac30b06aa2117526fe128fbff9eb6a3\nsize +18\n", - "revision": "576cfe95813eca03d94a43b1e607af95b3ec0870", - "proof": { - "gitSha": "b7a03985f2b13863493bd98e22d088b4ce285f08", - "sha256": "d301245189e452b41ec6963c8385e5776ac30b06aa2117526fe128fbff9eb6a3", - "size": 18 - }, - "error": "invalid_blob_hash", - "fetched": 1 - }, - { - "name": "leading zeros", - "pointer": "version https://git-lfs.github.com/spec/v1\noid sha256:d301245189e452b41ec6963c8385e5776ac30b06aa2117526fe128fbff9eb6a3\nsize 00018\n", - "revision": "3c5b5f5ab7242fa7739227a0837904dc875975a0", - "proof": { - "gitSha": "b7a03985f2b13863493bd98e22d088b4ce285f08", - "sha256": "d301245189e452b41ec6963c8385e5776ac30b06aa2117526fe128fbff9eb6a3", - "size": 18 - }, - "expected": "sha256-d301245189e452b41ec6963c8385e5776ac30b06aa2117526fe128fbff9eb6a3", - "fetched": 1 - }, - { - "name": "space after size", - "pointer": "version https://git-lfs.github.com/spec/v1\noid sha256:d301245189e452b41ec6963c8385e5776ac30b06aa2117526fe128fbff9eb6a3\nsize 18 \n", - "revision": "c1b74b2cc0ed9b4bf10f9a7483c84692ac6a7171", - "proof": { - "gitSha": "b7a03985f2b13863493bd98e22d088b4ce285f08", - "sha256": "d301245189e452b41ec6963c8385e5776ac30b06aa2117526fe128fbff9eb6a3", - "size": 18 - }, - "error": "invalid_blob_hash", - "fetched": 1 - }, - { - "name": "duplicate oid", - "pointer": "version https://git-lfs.github.com/spec/v1\noid sha256:d301245189e452b41ec6963c8385e5776ac30b06aa2117526fe128fbff9eb6a3\nsize 18\noid sha256:0000000000000000000000000000000000000000000000000000000000000000\n", - "revision": "7904097980812889d087b3942fac3cca9a9200c1", - "proof": { - "gitSha": "b7a03985f2b13863493bd98e22d088b4ce285f08", - "sha256": "d301245189e452b41ec6963c8385e5776ac30b06aa2117526fe128fbff9eb6a3", - "size": 18 - }, - "expected": "sha256-d301245189e452b41ec6963c8385e5776ac30b06aa2117526fe128fbff9eb6a3", - "fetched": 1 - }, - { - "name": "duplicate size", - "pointer": "version https://git-lfs.github.com/spec/v1\noid sha256:d301245189e452b41ec6963c8385e5776ac30b06aa2117526fe128fbff9eb6a3\nsize 18\nsize 1\n", - "revision": "30a9d840ca06699e1be11654330d4865fd7db6a5", - "proof": { - "gitSha": "b7a03985f2b13863493bd98e22d088b4ce285f08", - "sha256": "d301245189e452b41ec6963c8385e5776ac30b06aa2117526fe128fbff9eb6a3", - "size": 18 - }, - "expected": "sha256-d301245189e452b41ec6963c8385e5776ac30b06aa2117526fe128fbff9eb6a3", - "fetched": 1 - }, - { - "name": "CRLF header", - "pointer": "version https://git-lfs.github.com/spec/v1\r\noid sha256:d301245189e452b41ec6963c8385e5776ac30b06aa2117526fe128fbff9eb6a3\r\nsize 18\r\n", - "revision": "de36ded25cc0cd0417c39ee7f9455181a90b0c4c", - "proof": { - "gitSha": "b7a03985f2b13863493bd98e22d088b4ce285f08", - "sha256": "d301245189e452b41ec6963c8385e5776ac30b06aa2117526fe128fbff9eb6a3", - "size": 18 - }, - "error": "invalid_blob_hash", - "fetched": 1 - }, - { - "name": "CRLF fields", - "pointer": "version https://git-lfs.github.com/spec/v1\noid sha256:d301245189e452b41ec6963c8385e5776ac30b06aa2117526fe128fbff9eb6a3\r\nsize 18\r\n", - "revision": "862b6e77745fc904c2ea8450ecd51ea1810acd3b", - "proof": { - "gitSha": "b7a03985f2b13863493bd98e22d088b4ce285f08", - "sha256": "d301245189e452b41ec6963c8385e5776ac30b06aa2117526fe128fbff9eb6a3", - "size": 18 - }, - "expected": "sha256-d301245189e452b41ec6963c8385e5776ac30b06aa2117526fe128fbff9eb6a3", - "fetched": 1 - }, - { - "name": "unicode line separator", - "pointer": "version https://git-lfs.github.com/spec/v1\noid sha256:d301245189e452b41ec6963c8385e5776ac30b06aa2117526fe128fbff9eb6a3
size 18
", - "revision": "a852cb8085f2b5d96dbfb2288b0803e6ca4dc807", - "proof": { - "gitSha": "b7a03985f2b13863493bd98e22d088b4ce285f08", - "sha256": "d301245189e452b41ec6963c8385e5776ac30b06aa2117526fe128fbff9eb6a3", - "size": 18 - }, - "expected": "sha256-d301245189e452b41ec6963c8385e5776ac30b06aa2117526fe128fbff9eb6a3", - "fetched": 1 - }, - { - "name": "extra fields", - "pointer": "version https://git-lfs.github.com/spec/v1\noid sha256:d301245189e452b41ec6963c8385e5776ac30b06aa2117526fe128fbff9eb6a3\nsize 18\next-example hello\n", - "revision": "70c394e5bdf3cc66592ec9dc60a714c68c4a8bb2", - "proof": { - "gitSha": "b7a03985f2b13863493bd98e22d088b4ce285f08", - "sha256": "d301245189e452b41ec6963c8385e5776ac30b06aa2117526fe128fbff9eb6a3", - "size": 18 - }, - "expected": "sha256-d301245189e452b41ec6963c8385e5776ac30b06aa2117526fe128fbff9eb6a3", - "fetched": 1 - }, - { - "name": "at limit", - "pointer": "version https://git-lfs.github.com/spec/v1\noid sha256:d301245189e452b41ec6963c8385e5776ac30b06aa2117526fe128fbff9eb6a3\nsize 18\nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", - "revision": "5dfb13cb6764d2dfab8d3fe1c6f8bba28cf8c567", - "proof": { - "gitSha": "b7a03985f2b13863493bd98e22d088b4ce285f08", - "sha256": "d301245189e452b41ec6963c8385e5776ac30b06aa2117526fe128fbff9eb6a3", - "size": 18 - }, - "expected": "sha256-d301245189e452b41ec6963c8385e5776ac30b06aa2117526fe128fbff9eb6a3", - "fetched": 1 - }, - { - "name": "over limit", - "pointer": "version https://git-lfs.github.com/spec/v1\noid sha256:d301245189e452b41ec6963c8385e5776ac30b06aa2117526fe128fbff9eb6a3\nsize 18\nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", - "revision": "91052b0e2dea82a2a88b1a54b625e98e6810f41b", - "proof": { - "gitSha": "b7a03985f2b13863493bd98e22d088b4ce285f08", - "sha256": "d301245189e452b41ec6963c8385e5776ac30b06aa2117526fe128fbff9eb6a3", - "size": 18 - }, - "error": "invalid_lfs_pointer", - "fetched": 1 - }, - { - "name": "oversize integer", - "pointer": "version https://git-lfs.github.com/spec/v1\noid sha256:d301245189e452b41ec6963c8385e5776ac30b06aa2117526fe128fbff9eb6a3\nsize 999999999999999999999999999999\n", - "revision": "1b54d75d2bf714cd81eb6b40c2ebe56857e90798", - "proof": { - "gitSha": "b7a03985f2b13863493bd98e22d088b4ce285f08", - "sha256": "d301245189e452b41ec6963c8385e5776ac30b06aa2117526fe128fbff9eb6a3", - "size": 18 - }, - "error": "invalid_blob_hash", - "fetched": 1 - } -] diff --git a/backend/internal/server/testdata/dashboard-cursor-output.json b/backend/internal/server/testdata/dashboard-cursor-output.json deleted file mode 100644 index 3d87f66..0000000 --- a/backend/internal/server/testdata/dashboard-cursor-output.json +++ /dev/null @@ -1,206 +0,0 @@ -[ - { - "sort": "_label", - "value": "plain", - "type": "repo", - "id": "abcdefabcdefabcdefabcdef", - "expected": "eyJzb3J0IjoiX2xhYmVsIiwidmFsdWUiOiJwbGFpbiIsInR5cGUiOiJyZXBvIiwiaWQiOiJhYmNkZWZhYmNkZWZhYmNkZWZhYmNkZWYifQ" - }, - { - "sort": "_label", - "value": "<>&", - "type": "repo", - "id": "abcdefabcdefabcdefabcdef", - "expected": "eyJzb3J0IjoiX2xhYmVsIiwidmFsdWUiOiI8PiYiLCJ0eXBlIjoicmVwbyIsImlkIjoiYWJjZGVmYWJjZGVmYWJjZGVmYWJjZGVmIn0" - }, - { - "sort": "_label", - "value": "\"\\\n\t", - "type": "repo", - "id": "abcdefabcdefabcdefabcdef", - "expected": "eyJzb3J0IjoiX2xhYmVsIiwidmFsdWUiOiJcIlxcXG5cdCIsInR5cGUiOiJyZXBvIiwiaWQiOiJhYmNkZWZhYmNkZWZhYmNkZWZhYmNkZWYifQ" - }, - { - "sort": "_label", - "value": "é😀", - "type": "repo", - "id": "abcdefabcdefabcdefabcdef", - "expected": "eyJzb3J0IjoiX2xhYmVsIiwidmFsdWUiOiLDqfCfmIAiLCJ0eXBlIjoicmVwbyIsImlkIjoiYWJjZGVmYWJjZGVmYWJjZGVmYWJjZGVmIn0" - }, - { - "sort": "_label", - "value": "

", - "type": "repo", - "id": "abcdefabcdefabcdefabcdef", - "expected": "eyJzb3J0IjoiX2xhYmVsIiwidmFsdWUiOiLigKjigKkiLCJ0eXBlIjoicmVwbyIsImlkIjoiYWJjZGVmYWJjZGVmYWJjZGVmYWJjZGVmIn0" - }, - { - "sort": "_label", - "value": "\\u2028", - "type": "repo", - "id": "abcdefabcdefabcdefabcdef", - "expected": "eyJzb3J0IjoiX2xhYmVsIiwidmFsdWUiOiJcXHUyMDI4IiwidHlwZSI6InJlcG8iLCJpZCI6ImFiY2RlZmFiY2RlZmFiY2RlZmFiY2RlZiJ9" - }, - { - "sort": "_label", - "value": "\\\\u2029", - "type": "repo", - "id": "abcdefabcdefabcdefabcdef", - "expected": "eyJzb3J0IjoiX2xhYmVsIiwidmFsdWUiOiJcXFxcdTIwMjkiLCJ0eXBlIjoicmVwbyIsImlkIjoiYWJjZGVmYWJjZGVmYWJjZGVmYWJjZGVmIn0" - }, - { - "sort": "_label", - "value": "\\
", - "type": "repo", - "id": "abcdefabcdefabcdefabcdef", - "expected": "eyJzb3J0IjoiX2xhYmVsIiwidmFsdWUiOiJcXOKAqCIsInR5cGUiOiJyZXBvIiwiaWQiOiJhYmNkZWZhYmNkZWZhYmNkZWZhYmNkZWYifQ" - }, - { - "sort": "_label", - "value": 0, - "type": "repo", - "id": "abcdefabcdefabcdefabcdef", - "expected": "eyJzb3J0IjoiX2xhYmVsIiwidmFsdWUiOjAsInR5cGUiOiJyZXBvIiwiaWQiOiJhYmNkZWZhYmNkZWZhYmNkZWZhYmNkZWYifQ" - }, - { - "sort": "_label", - "value": 0, - "type": "repo", - "id": "abcdefabcdefabcdefabcdef", - "expected": "eyJzb3J0IjoiX2xhYmVsIiwidmFsdWUiOjAsInR5cGUiOiJyZXBvIiwiaWQiOiJhYmNkZWZhYmNkZWZhYmNkZWZhYmNkZWYifQ" - }, - { - "sort": "_label", - "value": 1, - "type": "repo", - "id": "abcdefabcdefabcdefabcdef", - "expected": "eyJzb3J0IjoiX2xhYmVsIiwidmFsdWUiOjEsInR5cGUiOiJyZXBvIiwiaWQiOiJhYmNkZWZhYmNkZWZhYmNkZWZhYmNkZWYifQ" - }, - { - "sort": "_label", - "value": -1, - "type": "repo", - "id": "abcdefabcdefabcdefabcdef", - "expected": "eyJzb3J0IjoiX2xhYmVsIiwidmFsdWUiOi0xLCJ0eXBlIjoicmVwbyIsImlkIjoiYWJjZGVmYWJjZGVmYWJjZGVmYWJjZGVmIn0" - }, - { - "sort": "_label", - "value": 1e-7, - "type": "repo", - "id": "abcdefabcdefabcdefabcdef", - "expected": "eyJzb3J0IjoiX2xhYmVsIiwidmFsdWUiOjFlLTcsInR5cGUiOiJyZXBvIiwiaWQiOiJhYmNkZWZhYmNkZWZhYmNkZWZhYmNkZWYifQ" - }, - { - "sort": "_label", - "value": 0.000001, - "type": "repo", - "id": "abcdefabcdefabcdefabcdef", - "expected": "eyJzb3J0IjoiX2xhYmVsIiwidmFsdWUiOjAuMDAwMDAxLCJ0eXBlIjoicmVwbyIsImlkIjoiYWJjZGVmYWJjZGVmYWJjZGVmYWJjZGVmIn0" - }, - { - "sort": "_label", - "value": 100000000000000000000, - "type": "repo", - "id": "abcdefabcdefabcdefabcdef", - "expected": "eyJzb3J0IjoiX2xhYmVsIiwidmFsdWUiOjEwMDAwMDAwMDAwMDAwMDAwMDAwMCwidHlwZSI6InJlcG8iLCJpZCI6ImFiY2RlZmFiY2RlZmFiY2RlZmFiY2RlZiJ9" - }, - { - "sort": "_label", - "value": 1e+21, - "type": "repo", - "id": "abcdefabcdefabcdefabcdef", - "expected": "eyJzb3J0IjoiX2xhYmVsIiwidmFsdWUiOjFlKzIxLCJ0eXBlIjoicmVwbyIsImlkIjoiYWJjZGVmYWJjZGVmYWJjZGVmYWJjZGVmIn0" - }, - { - "sort": "_label", - "value": 1.23456789, - "type": "repo", - "id": "abcdefabcdefabcdefabcdef", - "expected": "eyJzb3J0IjoiX2xhYmVsIiwidmFsdWUiOjEuMjM0NTY3ODksInR5cGUiOiJyZXBvIiwiaWQiOiJhYmNkZWZhYmNkZWZhYmNkZWZhYmNkZWYifQ" - }, - { - "sort": "_label", - "value": null, - "type": "repo", - "id": "abcdefabcdefabcdefabcdef", - "expected": "eyJzb3J0IjoiX2xhYmVsIiwidmFsdWUiOm51bGwsInR5cGUiOiJyZXBvIiwiaWQiOiJhYmNkZWZhYmNkZWZhYmNkZWZhYmNkZWYifQ" - }, - { - "sort": "_label", - "value": true, - "type": "repo", - "id": "abcdefabcdefabcdefabcdef", - "expected": "eyJzb3J0IjoiX2xhYmVsIiwidmFsdWUiOnRydWUsInR5cGUiOiJyZXBvIiwiaWQiOiJhYmNkZWZhYmNkZWZhYmNkZWZhYmNkZWYifQ" - }, - { - "sort": "_label", - "value": false, - "type": "repo", - "id": "abcdefabcdefabcdefabcdef", - "expected": "eyJzb3J0IjoiX2xhYmVsIiwidmFsdWUiOmZhbHNlLCJ0eXBlIjoicmVwbyIsImlkIjoiYWJjZGVmYWJjZGVmYWJjZGVmYWJjZGVmIn0" - }, - { - "sort": "-anonymizeDate", - "value": 0, - "date": true, - "type": "pr", - "id": "abcdefabcdefabcdefabcdef", - "expected": "eyJzb3J0IjoiLWFub255bWl6ZURhdGUiLCJ2YWx1ZSI6IjE5NzAtMDEtMDFUMDA6MDA6MDAuMDAwWiIsInR5cGUiOiJwciIsImlkIjoiYWJjZGVmYWJjZGVmYWJjZGVmYWJjZGVmIn0" - }, - { - "sort": "-anonymizeDate", - "value": 1, - "date": true, - "type": "pr", - "id": "abcdefabcdefabcdefabcdef", - "expected": "eyJzb3J0IjoiLWFub255bWl6ZURhdGUiLCJ2YWx1ZSI6IjE5NzAtMDEtMDFUMDA6MDA6MDAuMDAxWiIsInR5cGUiOiJwciIsImlkIjoiYWJjZGVmYWJjZGVmYWJjZGVmYWJjZGVmIn0" - }, - { - "sort": "-anonymizeDate", - "value": -1, - "date": true, - "type": "pr", - "id": "abcdefabcdefabcdefabcdef", - "expected": "eyJzb3J0IjoiLWFub255bWl6ZURhdGUiLCJ2YWx1ZSI6IjE5NjktMTItMzFUMjM6NTk6NTkuOTk5WiIsInR5cGUiOiJwciIsImlkIjoiYWJjZGVmYWJjZGVmYWJjZGVmYWJjZGVmIn0" - }, - { - "sort": "-anonymizeDate", - "value": 1700000000123, - "date": true, - "type": "pr", - "id": "abcdefabcdefabcdefabcdef", - "expected": "eyJzb3J0IjoiLWFub255bWl6ZURhdGUiLCJ2YWx1ZSI6IjIwMjMtMTEtMTRUMjI6MTM6MjAuMTIzWiIsInR5cGUiOiJwciIsImlkIjoiYWJjZGVmYWJjZGVmYWJjZGVmYWJjZGVmIn0" - }, - { - "sort": "-anonymizeDate", - "value": -62135596800000, - "date": true, - "type": "pr", - "id": "abcdefabcdefabcdefabcdef", - "expected": "eyJzb3J0IjoiLWFub255bWl6ZURhdGUiLCJ2YWx1ZSI6IjAwMDEtMDEtMDFUMDA6MDA6MDAuMDAwWiIsInR5cGUiOiJwciIsImlkIjoiYWJjZGVmYWJjZGVmYWJjZGVmYWJjZGVmIn0" - }, - { - "sort": "-anonymizeDate", - "value": 253402300800000, - "date": true, - "type": "pr", - "id": "abcdefabcdefabcdefabcdef", - "expected": "eyJzb3J0IjoiLWFub255bWl6ZURhdGUiLCJ2YWx1ZSI6IiswMTAwMDAtMDEtMDFUMDA6MDA6MDAuMDAwWiIsInR5cGUiOiJwciIsImlkIjoiYWJjZGVmYWJjZGVmYWJjZGVmYWJjZGVmIn0" - }, - { - "sort": "_name", - "value": "cursor-a", - "type": "repo", - "id": "eeddcc000000000000000001", - "http": true, - "expected": "eyJzb3J0IjoiX25hbWUiLCJ2YWx1ZSI6ImN1cnNvci1hIiwidHlwZSI6InJlcG8iLCJpZCI6ImVlZGRjYzAwMDAwMDAwMDAwMDAwMDAwMSJ9" - }, - { - "sort": "_name", - "value": "cursor-b", - "type": "repo", - "id": "eeddcc000000000000000002", - "http": true, - "expected": "eyJzb3J0IjoiX25hbWUiLCJ2YWx1ZSI6ImN1cnNvci1iIiwidHlwZSI6InJlcG8iLCJpZCI6ImVlZGRjYzAwMDAwMDAwMDAwMDAwMDAwMiJ9" - } -] diff --git a/backend/internal/server/testdata/dashboard-cursors.json b/backend/internal/server/testdata/dashboard-cursors.json deleted file mode 100644 index 7dae411..0000000 --- a/backend/internal/server/testdata/dashboard-cursors.json +++ /dev/null @@ -1,21122 +0,0 @@ -[ - { - "sort": "_name", - "cursor": "eyJzb3J0IjoiX25hbWUiLCJ0eXBlIjoicmVwbyIsImlkIjoiMTExMTExMTExMTExMTExMTExMTExMTExIiwidmFsdWUiOiJhYmMifQ", - "rejected": false, - "expected": { - "sort": "_name", - "type": "repo", - "id": "111111111111111111111111", - "value": "abc" - }, - "http": true - }, - { - "sort": "_name", - "cursor": "eyJzb3J0IjoiX25hbWUiLCJ0eXBlIjoicmVwbyIsImlkIjoiMTExMTExMTExMTExMTExMTExMTExMTExIiwidmFsdWUiOjQyfQ", - "rejected": false, - "expected": { - "sort": "_name", - "type": "repo", - "id": "111111111111111111111111", - "value": 42 - }, - "http": true - }, - { - "sort": "_name", - "cursor": "eyJzb3J0IjoiX25hbWUiLCJ0eXBlIjoicmVwbyIsImlkIjoiMTExMTExMTExMTExMTExMTExMTExMTExIiwidmFsdWUiOm51bGx9", - "rejected": true, - "http": true - }, - { - "sort": "_name", - "cursor": "eyJzb3J0IjoiX25hbWUiLCJ0eXBlIjoicmVwbyIsImlkIjoiMTExMTExMTExMTExMTExMTExMTExMTExIiwidmFsdWUiOnRydWV9", - "rejected": true, - "http": true - }, - { - "sort": "_name", - "cursor": "eyJzb3J0IjoiX25hbWUiLCJ0eXBlIjoicmVwbyIsImlkIjoiMTExMTExMTExMTExMTExMTExMTExMTExIiwidmFsdWUiOmZhbHNlfQ", - "rejected": true, - "http": true - }, - { - "sort": "_name", - "cursor": "eyJzb3J0IjoiX25hbWUiLCJ0eXBlIjoicmVwbyIsImlkIjoiMTExMTExMTExMTExMTExMTExMTExMTExIiwidmFsdWUiOnt9fQ", - "rejected": true, - "http": true - }, - { - "sort": "_name", - "cursor": "eyJzb3J0IjoiX25hbWUiLCJ0eXBlIjoicmVwbyIsImlkIjoiMTExMTExMTExMTExMTExMTExMTExMTExIiwidmFsdWUiOnsiJG5lIjpudWxsfX0", - "rejected": true, - "http": true - }, - { - "sort": "_name", - "cursor": "eyJzb3J0IjoiX25hbWUiLCJ0eXBlIjoicmVwbyIsImlkIjoiMTExMTExMTExMTExMTExMTExMTExMTExIiwidmFsdWUiOltdfQ", - "rejected": true, - "http": true - }, - { - "sort": "_name", - "cursor": "eyJzb3J0IjoiX25hbWUiLCJ0eXBlIjoicmVwbyIsImlkIjoiMTExMTExMTExMTExMTExMTExMTExMTExIiwidmFsdWUiOlsiMjAyMC0wMS0wMiJdfQ", - "rejected": true, - "http": true - }, - { - "sort": "_name", - "cursor": "eyJzb3J0IjoiX25hbWUiLCJ0eXBlIjoicmVwbyIsImlkIjoiMTExMTExMTExMTExMTExMTExMTExMTExIiwidmFsdWUiOiIyMDIwLTAxLTAyVDAzOjA0OjA1WiJ9", - "rejected": false, - "expected": { - "sort": "_name", - "type": "repo", - "id": "111111111111111111111111", - "value": "2020-01-02T03:04:05Z" - }, - "http": true - }, - { - "sort": "_name", - "cursor": "eyJzb3J0IjoiX25hbWUiLCJ0eXBlIjoicmVwbyIsImlkIjoiMTExMTExMTExMTExMTExMTExMTExMTExIiwidmFsdWUiOiIwMDAxLTAxLTAxIn0", - "rejected": false, - "expected": { - "sort": "_name", - "type": "repo", - "id": "111111111111111111111111", - "value": "0001-01-01" - }, - "http": true - }, - { - "sort": "_name", - "cursor": "eyJzb3J0IjoiX25hbWUiLCJ0eXBlIjoicmVwbyIsImlkIjoiMTExMTExMTExMTExMTExMTExMTExMTExIiwidmFsdWUiOjB9", - "rejected": false, - "expected": { - "sort": "_name", - "type": "repo", - "id": "111111111111111111111111", - "value": 0 - }, - "http": true - }, - { - "sort": "_name", - "cursor": "eyJzb3J0IjoiX25hbWUiLCJ0eXBlIjoicmVwbyIsImlkIjoiMTExMTExMTExMTExMTExMTExMTExMTExIiwidmFsdWUiOjg2NDAwMDAwMDAwMDAwMDF9", - "rejected": false, - "expected": { - "sort": "_name", - "type": "repo", - "id": "111111111111111111111111", - "value": 8640000000000001 - }, - "http": true - }, - { - "sort": "-pageView", - "cursor": "eyJzb3J0IjoiLXBhZ2VWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiYWJjIn0", - "rejected": false, - "expected": { - "sort": "-pageView", - "type": "repo", - "id": "111111111111111111111111", - "value": "abc" - }, - "http": true - }, - { - "sort": "-pageView", - "cursor": "eyJzb3J0IjoiLXBhZ2VWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjo0Mn0", - "rejected": false, - "expected": { - "sort": "-pageView", - "type": "repo", - "id": "111111111111111111111111", - "value": 42 - }, - "http": true - }, - { - "sort": "-pageView", - "cursor": "eyJzb3J0IjoiLXBhZ2VWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjpudWxsfQ", - "rejected": true, - "http": true - }, - { - "sort": "-pageView", - "cursor": "eyJzb3J0IjoiLXBhZ2VWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjp0cnVlfQ", - "rejected": true, - "http": true - }, - { - "sort": "-pageView", - "cursor": "eyJzb3J0IjoiLXBhZ2VWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjpmYWxzZX0", - "rejected": true, - "http": true - }, - { - "sort": "-pageView", - "cursor": "eyJzb3J0IjoiLXBhZ2VWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjp7fX0", - "rejected": true, - "http": true - }, - { - "sort": "-pageView", - "cursor": "eyJzb3J0IjoiLXBhZ2VWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjp7IiRuZSI6bnVsbH19", - "rejected": true, - "http": true - }, - { - "sort": "-pageView", - "cursor": "eyJzb3J0IjoiLXBhZ2VWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjpbXX0", - "rejected": true, - "http": true - }, - { - "sort": "-pageView", - "cursor": "eyJzb3J0IjoiLXBhZ2VWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjpbIjIwMjAtMDEtMDIiXX0", - "rejected": true, - "http": true - }, - { - "sort": "-pageView", - "cursor": "eyJzb3J0IjoiLXBhZ2VWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMC0wMS0wMlQwMzowNDowNVoifQ", - "rejected": false, - "expected": { - "sort": "-pageView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2020-01-02T03:04:05Z" - }, - "http": true - }, - { - "sort": "-pageView", - "cursor": "eyJzb3J0IjoiLXBhZ2VWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSJ9", - "rejected": false, - "expected": { - "sort": "-pageView", - "type": "repo", - "id": "111111111111111111111111", - "value": "0001-01-01" - }, - "http": true - }, - { - "sort": "-pageView", - "cursor": "eyJzb3J0IjoiLXBhZ2VWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjowfQ", - "rejected": false, - "expected": { - "sort": "-pageView", - "type": "repo", - "id": "111111111111111111111111", - "value": 0 - }, - "http": true - }, - { - "sort": "-pageView", - "cursor": "eyJzb3J0IjoiLXBhZ2VWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjo4NjQwMDAwMDAwMDAwMDAxfQ", - "rejected": false, - "expected": { - "sort": "-pageView", - "type": "repo", - "id": "111111111111111111111111", - "value": 8640000000000001 - }, - "http": true - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6ImFiYyJ9", - "rejected": true, - "http": true - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6NDJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1970-01-01T00:00:00.042Z" - }, - "http": true - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6bnVsbH0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1970-01-01T00:00:00.000Z" - }, - "http": true - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6dHJ1ZX0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1970-01-01T00:00:00.001Z" - }, - "http": true - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6ZmFsc2V9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1970-01-01T00:00:00.000Z" - }, - "http": true - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6e319", - "rejected": true, - "http": true - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6eyIkbmUiOm51bGx9fQ", - "rejected": true, - "http": true - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6W119", - "rejected": true, - "http": true - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6WyIyMDIwLTAxLTAyIl19", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2020-01-02T00:00:00.000Z" - }, - "http": true - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjAtMDEtMDJUMDM6MDQ6MDVaIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2020-01-02T03:04:05.000Z" - }, - "http": true - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "0001-01-01T00:00:00.000Z" - }, - "http": true - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6MH0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1970-01-01T00:00:00.000Z" - }, - "http": true - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6ODY0MDAwMDAwMDAwMDAwMX0", - "rejected": true, - "http": true - }, - { - "sort": "_name", - "cursor": "eyJzb3J0IjoiX25hbWUiLCJ0eXBlIjoiIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6ImFiYyJ9", - "rejected": false, - "expected": { - "sort": "_name", - "type": "", - "id": "111111111111111111111111", - "value": "abc" - }, - "http": true - }, - { - "sort": "_name", - "cursor": "eyJzb3J0IjoiX25hbWUiLCJ0eXBlIjoib3RoZXItZm9yZ2UiLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiYWJjIn0", - "rejected": false, - "expected": { - "sort": "_name", - "type": "other-forge", - "id": "111111111111111111111111", - "value": "abc" - }, - "http": true - }, - { - "sort": "_name", - "cursor": "eyJzb3J0IjoiX25hbWUiLCJ0eXBlIjpmYWxzZSwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6ImFiYyJ9", - "rejected": true, - "http": true - }, - { - "sort": "_name", - "cursor": "eyJzb3J0IjoiX25hbWUiLCJ0eXBlIjp7fSwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6ImFiYyJ9", - "rejected": true, - "http": true - }, - { - "sort": "_name", - "cursor": "eyJzb3J0IjoiX25hbWUiLCJ0eXBlIjpbInJlcG8iXSwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6ImFiYyJ9", - "rejected": true, - "http": true - }, - { - "sort": "_name", - "cursor": "eyJzb3J0Ijoid3JvbmciLCJ0eXBlIjoicmVwbyIsImlkIjoiMTExMTExMTExMTExMTExMTExMTExMTExIiwidmFsdWUiOiJhYmMifQ", - "rejected": true, - "http": true - }, - { - "sort": "_name", - "cursor": "eyJzb3J0IjoiX25hbWUiLCJ0eXBlIjoicmVwbyIsImlkIjoiYmFkIiwidmFsdWUiOiJhYmMifQ", - "rejected": true, - "http": true - }, - { - "sort": "_name", - "cursor": "eyJzb3J0IjoiX25hbWUiLCJ0eXBlIjpudWxsLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiYWJjIn0", - "rejected": true, - "http": true - }, - { - "sort": "_name", - "cursor": "eyJzb3J0IjoiX25hbWUiLCJ0eXBlIjoicmVwbyIsImlkIjoiMTExMTExMTExMTExMTExMTExMTExMTExIn0", - "rejected": true, - "http": true - }, - { - "sort": "_name", - "cursor": "eyJzb3J0IjoiX25hbWUiLCJ0eXBlIjoicmVwbyIsImlkIjoiMTExMTExMTExMTExMTExMTExMTExMTExIiwidmFsdWUiOiJ0ZXh0In0=", - "rejected": false, - "expected": { - "sort": "_name", - "type": "repo", - "id": "111111111111111111111111", - "value": "text" - }, - "http": true - }, - { - "sort": "_name", - "cursor": " \neyJzb3J0IjoiX25hbWUiLCJ0eXBlIjoicmVwbyIsImlkIjoiMTExMTExMTExMTExMTExMTExMTExMTExIiwidmFsdWUiOiJ0ZXh0In0\n", - "rejected": false, - "expected": { - "sort": "_name", - "type": "repo", - "id": "111111111111111111111111", - "value": "text" - }, - "http": true - }, - { - "sort": "_name", - "cursor": "eyJzb3J0IjoiX25hbWUiLCJ0eXBlIjoicmVwbyIsImlkIjoiMTExMTExMTExMTExMTExMTExMTExMTExIiwidmFsdWUiOiJ0ZXh0In0", - "rejected": false, - "expected": { - "sort": "_name", - "type": "repo", - "id": "111111111111111111111111", - "value": "text" - }, - "http": true - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IiJ9", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6ImludmFsaWQifQ", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "0000-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "0001-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDIifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjkifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzEifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzIifQ", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDAtMDEifQ", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMTMtMDEifQ", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDAifQ", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDEifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjRUMDA6MDAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDJUMDA6MDAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDF0MDA6MDB6In0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IiAyMDI0LTAxLTAxICJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDFUMDA6MDBaICJ9", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDFUMDA6MDBaXHUwMDAwaWdub3JlZCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IiswMTAwMDAtMDEtMDEifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "+010000-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDEtMDEtMDEifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "-000001-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDEtMDEifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IisyNzU3NjAtMDktMTMifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "+275760-09-13T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IisyNzU3NjAtMDktMTQifQ", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0yNzE4MjEtMDQtMjAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "-271821-04-20T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0yNzE4MjEtMDQtMTkifQ", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMDA6MDBaIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMDA6MDArMDI6MzAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-28T21:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMDA6MDAtMDMzMCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T03:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMDA6MDAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6MzQ6NTZaIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6MzQ6NTYrMDI6MzAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T10:04:56.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6MzQ6NTYtMDMzMCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T16:04:56.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6MzQ6NTYifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6MzQ6NTYuMVoifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T12:34:56.100Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6MzQ6NTYuMSswMjozMCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T10:04:56.100Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6MzQ6NTYuMS0wMzMwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T16:04:56.100Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6MzQ6NTYuMSJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T12:34:56.100Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6MzQ6NTYuMTIzNDU2Nzg5WiJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T12:34:56.123Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6MzQ6NTYuMTIzNDU2Nzg5KzAyOjMwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T10:04:56.123Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6MzQ6NTYuMTIzNDU2Nzg5LTAzMzAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T16:04:56.123Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6MzQ6NTYuMTIzNDU2Nzg5In0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T12:34:56.123Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMjQ6MDBaIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMjQ6MDArMDI6MzAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T21:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMjQ6MDAtMDMzMCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T03:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMjQ6MDAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMjQ6MDA6MDAuMDAxWiJ9", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMjQ6MDA6MDAuMDAxKzAyOjMwIn0", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMjQ6MDA6MDAuMDAxLTAzMzAifQ", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMjQ6MDA6MDAuMDAxIn0", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMjU6MDBaIn0", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMjU6MDArMDI6MzAifQ", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMjU6MDAtMDMzMCJ9", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMjU6MDAifQ", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6NjBaIn0", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6NjArMDI6MzAifQ", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6NjAtMDMzMCJ9", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6NjAifQ", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6MzQ6NjBaIn0", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6MzQ6NjArMDI6MzAifQ", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6MzQ6NjAtMDMzMCJ9", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6MzQ6NjAifQ", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMDA6MDBaIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMDA6MDArMDI6MzAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-02-28T21:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMDA6MDAtMDMzMCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-01T03:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMDA6MDAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6MzQ6NTZaIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-01T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6MzQ6NTYrMDI6MzAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-01T10:04:56.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6MzQ6NTYtMDMzMCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-01T16:04:56.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6MzQ6NTYifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-01T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6MzQ6NTYuMVoifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-01T12:34:56.100Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6MzQ6NTYuMSswMjozMCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-01T10:04:56.100Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6MzQ6NTYuMS0wMzMwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-01T16:04:56.100Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6MzQ6NTYuMSJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-01T12:34:56.100Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6MzQ6NTYuMTIzNDU2Nzg5WiJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-01T12:34:56.123Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6MzQ6NTYuMTIzNDU2Nzg5KzAyOjMwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-01T10:04:56.123Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6MzQ6NTYuMTIzNDU2Nzg5LTAzMzAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-01T16:04:56.123Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6MzQ6NTYuMTIzNDU2Nzg5In0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-01T12:34:56.123Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMjQ6MDBaIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMjQ6MDArMDI6MzAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-01T21:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMjQ6MDAtMDMzMCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T03:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMjQ6MDAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMjQ6MDA6MDAuMDAxWiJ9", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMjQ6MDA6MDAuMDAxKzAyOjMwIn0", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMjQ6MDA6MDAuMDAxLTAzMzAifQ", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMjQ6MDA6MDAuMDAxIn0", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMjU6MDBaIn0", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMjU6MDArMDI6MzAifQ", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMjU6MDAtMDMzMCJ9", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMjU6MDAifQ", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6NjBaIn0", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6NjArMDI6MzAifQ", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6NjAtMDMzMCJ9", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6NjAifQ", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6MzQ6NjBaIn0", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6MzQ6NjArMDI6MzAifQ", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6MzQ6NjAtMDMzMCJ9", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6MzQ6NjAifQ", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMDA6MDBaIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMDA6MDArMDI6MzAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T21:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMDA6MDAtMDMzMCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T03:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMDA6MDAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6MzQ6NTZaIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6MzQ6NTYrMDI6MzAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T10:04:56.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6MzQ6NTYtMDMzMCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T16:04:56.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6MzQ6NTYifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6MzQ6NTYuMVoifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T12:34:56.100Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6MzQ6NTYuMSswMjozMCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T10:04:56.100Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6MzQ6NTYuMS0wMzMwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T16:04:56.100Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6MzQ6NTYuMSJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T12:34:56.100Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6MzQ6NTYuMTIzNDU2Nzg5WiJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T12:34:56.123Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6MzQ6NTYuMTIzNDU2Nzg5KzAyOjMwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T10:04:56.123Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6MzQ6NTYuMTIzNDU2Nzg5LTAzMzAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T16:04:56.123Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6MzQ6NTYuMTIzNDU2Nzg5In0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T12:34:56.123Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMjQ6MDBaIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMjQ6MDArMDI6MzAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T21:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMjQ6MDAtMDMzMCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-02T03:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMjQ6MDAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMjQ6MDA6MDAuMDAxWiJ9", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMjQ6MDA6MDAuMDAxKzAyOjMwIn0", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMjQ6MDA6MDAuMDAxLTAzMzAifQ", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMjQ6MDA6MDAuMDAxIn0", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMjU6MDBaIn0", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMjU6MDArMDI6MzAifQ", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMjU6MDAtMDMzMCJ9", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMjU6MDAifQ", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6NjBaIn0", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6NjArMDI6MzAifQ", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6NjAtMDMzMCJ9", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6NjAifQ", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6MzQ6NjBaIn0", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6MzQ6NjArMDI6MzAifQ", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6MzQ6NjAtMDMzMCJ9", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6MzQ6NjAifQ", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2000-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjEifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjEyIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-12-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjEzIn0", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMxIn0", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjQ5In0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1950-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ijk5In0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjEwMCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "0100-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDAwMC0wMS0wMSJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2000-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDEtMDFUMDA6MDBaIn0", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjEvMi8wMyJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQvMDIvMzAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQuMDIuMjkifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1In0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgSmFudWFyeSAyMDI0In0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-05T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IlR1ZSwgMDUgTWFyIDIwMjQgMTI6MzQ6NTYgR01UIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-05T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ik1hcmNoIDUsIDIwMjQgMTI6MzAgUE0ifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-05T12:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDEgMTI6MzQ6NTYifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-01T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDEgMTI6MzQ6NTYuMTIzNCBHTVQrMDIwMCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-01T10:34:56.123Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDEgKGNvbW1lbnQpIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Iihjb21tZW50KSAyMDI0LTAxLTAxIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6ImdhcmJhZ2UgMjAyNC0wMS0wMSJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6ImdhcmJhZ2UyMDI0LTAxLTAxIn0", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDEgZ2FyYmFnZSJ9", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDEgR01ULTgifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-01T08:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDEgMTI6OjMwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-01T12:00:30.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDEgMTI6MzA6NDAgRVNUIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-01T17:30:40.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ijk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OSJ9", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgR01UIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-28T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgRVNUIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgKzAxMzAifQ", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MzQifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T12:34:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MzQgR01UIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T12:34:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MzQgVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T11:04:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MzQgRVNUIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T17:34:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MzQgKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T11:04:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MzQ6NTYuMDAwMTIzIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MzQ6NTYuMDAwMTIzIEdNVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MzQ6NTYuMDAwMTIzIFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T11:04:56.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MzQ6NTYuMDAwMTIzIEVTVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T17:34:56.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MzQ6NTYuMDAwMTIzICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T11:04:56.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5In0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T12:34:56.999Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IEdNVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T12:34:56.999Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T11:04:56.999Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IEVTVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T17:34:56.999Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5ICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T11:04:56.999Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMjQ6MDAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMjQ6MDAgR01UIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMjQ6MDAgVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMjQ6MDAgRVNUIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMjQ6MDAgKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MDAgQU0ifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MDAgQU0gR01UIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MDAgQU0gVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-28T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MDAgQU0gRVNUIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MDAgQU0gKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-28T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MDAgUE0ifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MDAgUE0gR01UIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MDAgUE0gVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MDAgUE0gRVNUIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T17:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MDAgUE0gKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMDowMCBQTSJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMDowMCBQTSBHTVQifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMDowMCBQTSBVVEMrMDE6MzAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMDowMCBQTSBFU1QifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T17:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMDowMCBQTSArMDEzMCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTM6MDAgUE0ifQ", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTM6MDAgUE0gR01UIn0", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTM6MDAgUE0gVVRDKzAxOjMwIn0", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTM6MDAgUE0gRVNUIn0", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTM6MDAgUE0gKzAxMzAifQ", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgR01UIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-01T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgRVNUIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgKzAxMzAifQ", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MzQifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T12:34:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MzQgR01UIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T12:34:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MzQgVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T11:04:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MzQgRVNUIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T17:34:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MzQgKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T11:04:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MzQ6NTYuMDAwMTIzIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MzQ6NTYuMDAwMTIzIEdNVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MzQ6NTYuMDAwMTIzIFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T11:04:56.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MzQ6NTYuMDAwMTIzIEVTVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T17:34:56.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MzQ6NTYuMDAwMTIzICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T11:04:56.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5In0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T12:34:56.999Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IEdNVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T12:34:56.999Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T11:04:56.999Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IEVTVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T17:34:56.999Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5ICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T11:04:56.999Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMjQ6MDAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-03T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMjQ6MDAgR01UIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-03T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMjQ6MDAgVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMjQ6MDAgRVNUIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-03T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMjQ6MDAgKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MDAgQU0ifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MDAgQU0gR01UIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MDAgQU0gVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-01T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MDAgQU0gRVNUIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MDAgQU0gKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-01T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MDAgUE0ifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MDAgUE0gR01UIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MDAgUE0gVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MDAgUE0gRVNUIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T17:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MDAgUE0gKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMDowMCBQTSJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMDowMCBQTSBHTVQifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMDowMCBQTSBVVEMrMDE6MzAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMDowMCBQTSBFU1QifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T17:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMDowMCBQTSArMDEzMCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTM6MDAgUE0ifQ", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTM6MDAgUE0gR01UIn0", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTM6MDAgUE0gVVRDKzAxOjMwIn0", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTM6MDAgUE0gRVNUIn0", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTM6MDAgUE0gKzAxMzAifQ", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "0001-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgR01UIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2000-12-31T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgRVNUIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgKzAxMzAifQ", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MzQifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T12:34:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MzQgR01UIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T12:34:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MzQgVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T11:04:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MzQgRVNUIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T17:34:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MzQgKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T11:04:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MzQ6NTYuMDAwMTIzIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MzQ6NTYuMDAwMTIzIEdNVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MzQ6NTYuMDAwMTIzIFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T11:04:56.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MzQ6NTYuMDAwMTIzIEVTVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T17:34:56.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MzQ6NTYuMDAwMTIzICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T11:04:56.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5In0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T12:34:56.999Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IEdNVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T12:34:56.999Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T11:04:56.999Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IEVTVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T17:34:56.999Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5ICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T11:04:56.999Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMjQ6MDAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMjQ6MDAgR01UIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMjQ6MDAgVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMjQ6MDAgRVNUIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-02T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMjQ6MDAgKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MDAgQU0ifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MDAgQU0gR01UIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MDAgQU0gVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2000-12-31T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MDAgQU0gRVNUIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MDAgQU0gKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2000-12-31T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MDAgUE0ifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MDAgUE0gR01UIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MDAgUE0gVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MDAgUE0gRVNUIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T17:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MDAgUE0gKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMDowMCBQTSJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMDowMCBQTSBHTVQifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMDowMCBQTSBVVEMrMDE6MzAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMDowMCBQTSBFU1QifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T17:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMDowMCBQTSArMDEzMCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTM6MDAgUE0ifQ", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTM6MDAgUE0gR01UIn0", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTM6MDAgUE0gVVRDKzAxOjMwIn0", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTM6MDAgUE0gRVNUIn0", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTM6MDAgUE0gKzAxMzAifQ", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgR01UIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-02T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgRVNUIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgKzAxMzAifQ", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MzQifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T12:34:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MzQgR01UIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T12:34:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MzQgVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T11:04:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MzQgRVNUIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T17:34:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MzQgKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T11:04:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MzQ6NTYuMDAwMTIzIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MzQ6NTYuMDAwMTIzIEdNVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MzQ6NTYuMDAwMTIzIFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T11:04:56.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MzQ6NTYuMDAwMTIzIEVTVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T17:34:56.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MzQ6NTYuMDAwMTIzICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T11:04:56.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5In0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T12:34:56.999Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IEdNVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T12:34:56.999Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T11:04:56.999Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IEVTVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T17:34:56.999Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5ICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T11:04:56.999Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMjQ6MDAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-04T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMjQ6MDAgR01UIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-04T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMjQ6MDAgVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMjQ6MDAgRVNUIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-04T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMjQ6MDAgKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MDAgQU0ifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MDAgQU0gR01UIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MDAgQU0gVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-02T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MDAgQU0gRVNUIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MDAgQU0gKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-02T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MDAgUE0ifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MDAgUE0gR01UIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MDAgUE0gVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MDAgUE0gRVNUIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T17:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MDAgUE0gKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMDowMCBQTSJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMDowMCBQTSBHTVQifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMDowMCBQTSBVVEMrMDE6MzAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMDowMCBQTSBFU1QifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T17:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMDowMCBQTSArMDEzMCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTM6MDAgUE0ifQ", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTM6MDAgUE0gR01UIn0", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTM6MDAgUE0gVVRDKzAxOjMwIn0", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTM6MDAgUE0gRVNUIn0", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTM6MDAgUE0gKzAxMzAifQ", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIEdNVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-01T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIEVTVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzICswMTMwIn0", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjM0In0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T12:34:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjM0IEdNVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T12:34:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjM0IFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T11:04:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjM0IEVTVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T17:34:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjM0ICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T11:04:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjM0OjU2LjAwMDEyMyJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjM0OjU2LjAwMDEyMyBHTVQifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjM0OjU2LjAwMDEyMyBVVEMrMDE6MzAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T11:04:56.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjM0OjU2LjAwMDEyMyBFU1QifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T17:34:56.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjM0OjU2LjAwMDEyMyArMDEzMCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T11:04:56.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T12:34:56.999Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSBHTVQifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T12:34:56.999Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSBVVEMrMDE6MzAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T11:04:56.999Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSBFU1QifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T17:34:56.999Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSArMDEzMCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T11:04:56.999Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDI0OjAwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-03T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDI0OjAwIEdNVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-03T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDI0OjAwIFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDI0OjAwIEVTVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-03T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDI0OjAwICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjAwIEFNIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjAwIEFNIEdNVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjAwIEFNIFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-01T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjAwIEFNIEVTVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjAwIEFNICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-01T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjAwIFBNIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjAwIFBNIEdNVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjAwIFBNIFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjAwIFBNIEVTVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T17:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjAwIFBNICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDA6MDAgUE0ifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDA6MDAgUE0gR01UIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDA6MDAgUE0gVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDA6MDAgUE0gRVNUIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T17:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDA6MDAgUE0gKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEzOjAwIFBNIn0", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEzOjAwIFBNIEdNVCJ9", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEzOjAwIFBNIFVUQyswMTozMCJ9", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEzOjAwIFBNIEVTVCJ9", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEzOjAwIFBNICswMTMwIn0", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIEdNVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-01T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIEVTVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyICswMTMwIn0", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjM0In0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T12:34:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjM0IEdNVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T12:34:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjM0IFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T11:04:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjM0IEVTVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T17:34:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjM0ICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T11:04:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjM0OjU2LjAwMDEyMyJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjM0OjU2LjAwMDEyMyBHTVQifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjM0OjU2LjAwMDEyMyBVVEMrMDE6MzAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T11:04:56.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjM0OjU2LjAwMDEyMyBFU1QifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T17:34:56.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjM0OjU2LjAwMDEyMyArMDEzMCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T11:04:56.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T12:34:56.999Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSBHTVQifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T12:34:56.999Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSBVVEMrMDE6MzAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T11:04:56.999Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSBFU1QifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T17:34:56.999Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSArMDEzMCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T11:04:56.999Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDI0OjAwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-03T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDI0OjAwIEdNVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-03T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDI0OjAwIFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDI0OjAwIEVTVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-03T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDI0OjAwICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjAwIEFNIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjAwIEFNIEdNVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjAwIEFNIFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-01T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjAwIEFNIEVTVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjAwIEFNICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-01T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjAwIFBNIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjAwIFBNIEdNVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjAwIFBNIFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjAwIFBNIEVTVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T17:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjAwIFBNICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDA6MDAgUE0ifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDA6MDAgUE0gR01UIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDA6MDAgUE0gVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDA6MDAgUE0gRVNUIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T17:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDA6MDAgUE0gKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEzOjAwIFBNIn0", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEzOjAwIFBNIEdNVCJ9", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEzOjAwIFBNIFVUQyswMTozMCJ9", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEzOjAwIFBNIEVTVCJ9", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEzOjAwIFBNICswMTMwIn0", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1In0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IEdNVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-04T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IEVTVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1ICswMTMwIn0", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjM0In0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T12:34:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjM0IEdNVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T12:34:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjM0IFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T11:04:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjM0IEVTVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T17:34:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjM0ICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T11:04:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjM0OjU2LjAwMDEyMyJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjM0OjU2LjAwMDEyMyBHTVQifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjM0OjU2LjAwMDEyMyBVVEMrMDE6MzAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T11:04:56.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjM0OjU2LjAwMDEyMyBFU1QifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T17:34:56.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjM0OjU2LjAwMDEyMyArMDEzMCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T11:04:56.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T12:34:56.999Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSBHTVQifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T12:34:56.999Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSBVVEMrMDE6MzAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T11:04:56.999Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSBFU1QifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T17:34:56.999Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSArMDEzMCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T11:04:56.999Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDI0OjAwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-06T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDI0OjAwIEdNVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-06T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDI0OjAwIFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDI0OjAwIEVTVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-06T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDI0OjAwICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjAwIEFNIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjAwIEFNIEdNVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjAwIEFNIFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-04T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjAwIEFNIEVTVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjAwIEFNICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-04T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjAwIFBNIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjAwIFBNIEdNVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjAwIFBNIFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjAwIFBNIEVTVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T17:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjAwIFBNICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDA6MDAgUE0ifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDA6MDAgUE0gR01UIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDA6MDAgUE0gVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDA6MDAgUE0gRVNUIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T17:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDA6MDAgUE0gKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEzOjAwIFBNIn0", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEzOjAwIFBNIEdNVCJ9", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEzOjAwIFBNIFVUQyswMTozMCJ9", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEzOjAwIFBNIEVTVCJ9", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEzOjAwIFBNICswMTMwIn0", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgR01UIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-04T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgRVNUIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgKzAxMzAifQ", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MzQifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T12:34:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MzQgR01UIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T12:34:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MzQgVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T11:04:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MzQgRVNUIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T17:34:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MzQgKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T11:04:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MzQ6NTYuMDAwMTIzIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MzQ6NTYuMDAwMTIzIEdNVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MzQ6NTYuMDAwMTIzIFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T11:04:56.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MzQ6NTYuMDAwMTIzIEVTVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T17:34:56.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MzQ6NTYuMDAwMTIzICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T11:04:56.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5In0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T12:34:56.999Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IEdNVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T12:34:56.999Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T11:04:56.999Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IEVTVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T17:34:56.999Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5ICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T11:04:56.999Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMjQ6MDAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-06T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMjQ6MDAgR01UIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-06T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMjQ6MDAgVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMjQ6MDAgRVNUIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-06T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMjQ6MDAgKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MDAgQU0ifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MDAgQU0gR01UIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MDAgQU0gVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-04T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MDAgQU0gRVNUIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MDAgQU0gKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-04T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MDAgUE0ifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MDAgUE0gR01UIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MDAgUE0gVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MDAgUE0gRVNUIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T17:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MDAgUE0gKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMDowMCBQTSJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMDowMCBQTSBHTVQifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMDowMCBQTSBVVEMrMDE6MzAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMDowMCBQTSBFU1QifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T17:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMDowMCBQTSArMDEzMCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTM6MDAgUE0ifQ", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTM6MDAgUE0gR01UIn0", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTM6MDAgUE0gVVRDKzAxOjMwIn0", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTM6MDAgUE0gRVNUIn0", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTM6MDAgUE0gKzAxMzAifQ", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5In0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IEdNVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-30T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IEVTVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5ICswMTMwIn0", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjM0In0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T12:34:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjM0IEdNVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T12:34:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjM0IFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T11:04:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjM0IEVTVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T17:34:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjM0ICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T11:04:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjM0OjU2LjAwMDEyMyJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjM0OjU2LjAwMDEyMyBHTVQifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjM0OjU2LjAwMDEyMyBVVEMrMDE6MzAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T11:04:56.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjM0OjU2LjAwMDEyMyBFU1QifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T17:34:56.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjM0OjU2LjAwMDEyMyArMDEzMCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T11:04:56.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T12:34:56.999Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSBHTVQifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T12:34:56.999Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSBVVEMrMDE6MzAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T11:04:56.999Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSBFU1QifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T17:34:56.999Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSArMDEzMCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T11:04:56.999Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDI0OjAwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2000-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDI0OjAwIEdNVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2000-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDI0OjAwIFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDI0OjAwIEVTVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2000-01-01T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDI0OjAwICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjAwIEFNIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjAwIEFNIEdNVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjAwIEFNIFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-30T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjAwIEFNIEVTVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjAwIEFNICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-30T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjAwIFBNIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjAwIFBNIEdNVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjAwIFBNIFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjAwIFBNIEVTVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T17:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjAwIFBNICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDA6MDAgUE0ifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDA6MDAgUE0gR01UIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDA6MDAgUE0gVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDA6MDAgUE0gRVNUIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T17:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDA6MDAgUE0gKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEzOjAwIFBNIn0", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEzOjAwIFBNIEdNVCJ9", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEzOjAwIFBNIFVUQyswMTozMCJ9", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEzOjAwIFBNIEVTVCJ9", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEzOjAwIFBNICswMTMwIn0", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIEdNVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-01T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIEVTVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyICswMTMwIn0", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjM0In0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T12:34:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjM0IEdNVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T12:34:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjM0IFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T11:04:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjM0IEVTVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T17:34:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjM0ICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T11:04:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjM0OjU2LjAwMDEyMyJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjM0OjU2LjAwMDEyMyBHTVQifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjM0OjU2LjAwMDEyMyBVVEMrMDE6MzAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T11:04:56.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjM0OjU2LjAwMDEyMyBFU1QifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T17:34:56.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjM0OjU2LjAwMDEyMyArMDEzMCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T11:04:56.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T12:34:56.999Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSBHTVQifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T12:34:56.999Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSBVVEMrMDE6MzAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T11:04:56.999Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSBFU1QifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T17:34:56.999Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSArMDEzMCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T11:04:56.999Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDI0OjAwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-03T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDI0OjAwIEdNVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-03T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDI0OjAwIFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDI0OjAwIEVTVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-03T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDI0OjAwICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjAwIEFNIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjAwIEFNIEdNVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjAwIEFNIFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-01T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjAwIEFNIEVTVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjAwIEFNICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-01T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjAwIFBNIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjAwIFBNIEdNVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjAwIFBNIFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjAwIFBNIEVTVCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T17:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjAwIFBNICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDA6MDAgUE0ifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDA6MDAgUE0gR01UIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDA6MDAgUE0gVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDA6MDAgUE0gRVNUIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T17:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDA6MDAgUE0gKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEzOjAwIFBNIn0", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEzOjAwIFBNIEdNVCJ9", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEzOjAwIFBNIFVUQyswMTozMCJ9", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEzOjAwIFBNIEVTVCJ9", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEzOjAwIFBNICswMTMwIn0", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDEgIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDFcdCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDFcbiJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDHvu78ifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDEgKGlnbm9yZWQpIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDEgZ2FyYmFnZSJ9", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDFcdTAwMDBpZ25vcmVkIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6WyIyMDI0LTAyLTI5Il19", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6WyIyMDI0LTAyLTI5Il19", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6WyIyMDI0LTAyLTI5IiwiMjAyNC0wMy0wMSJdfQ", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6WyIiXX0", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6eyJ4IjoieCJ9fQ", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6eyJ0b1N0cmluZyI6IngifX0", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6ImludmFsaWQifQ", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6eyJ0b1N0cmluZyI6IngifX0", - "rejected": true, - "http": false - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ik1hcmNoIDEgMjAyNCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T00:00:00.000Z" - }, - "http": true - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T00:00:00.000Z" - }, - "http": true - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMjQ6MDA6MDBaIn0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T00:00:00.000Z" - }, - "http": true - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T00:00:00.000Z" - }, - "http": true - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6WyIyMDI0IiwiMyIsIjEiXX0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T00:00:00.000Z" - }, - "http": true - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDMtMDFUMDE6MDA6MDArMDI6MDAifQ", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T23:00:00.000Z" - }, - "http": true - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDMtMDF0MDA6MDB6In0", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T00:00:00.000Z" - }, - "http": true - }, - { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDMtMDFUMDA6MDBaXHUwMDAwaWdub3JlZCJ9", - "rejected": false, - "expected": { - "sort": "anonymizeDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T00:00:00.000Z" - }, - "http": true - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiIn0", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiaW52YWxpZCJ9", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "0000-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "0001-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMiJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOSJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMSJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMiJ9", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMC0wMSJ9", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0xMy0wMSJ9", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMS0wMCJ9", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMS0wMSJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNFQwMDowMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMlQwMDowMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMS0wMXQwMDowMHoifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiIDIwMjQtMDEtMDEgIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMS0wMVQwMDowMFogIn0", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMS0wMVQwMDowMFpcdTAwMDBpZ25vcmVkIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiKzAxMDAwMC0wMS0wMSJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "+010000-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMS0wMS0wMSJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "-000001-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMS0wMSJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiKzI3NTc2MC0wOS0xMyJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "+275760-09-13T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiKzI3NTc2MC0wOS0xNCJ9", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTI3MTgyMS0wNC0yMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "-271821-04-20T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTI3MTgyMS0wNC0xOSJ9", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQwMDowMFoifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQwMDowMCswMjozMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-28T21:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQwMDowMC0wMzMwIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T03:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQwMDowMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQxMjozNDo1NloifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQxMjozNDo1NiswMjozMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T10:04:56.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQxMjozNDo1Ni0wMzMwIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T16:04:56.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQxMjozNDo1NiJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQxMjozNDo1Ni4xWiJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T12:34:56.100Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQxMjozNDo1Ni4xKzAyOjMwIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T10:04:56.100Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQxMjozNDo1Ni4xLTAzMzAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T16:04:56.100Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQxMjozNDo1Ni4xIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T12:34:56.100Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQxMjozNDo1Ni4xMjM0NTY3ODlaIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T12:34:56.123Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQxMjozNDo1Ni4xMjM0NTY3ODkrMDI6MzAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T10:04:56.123Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQxMjozNDo1Ni4xMjM0NTY3ODktMDMzMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T16:04:56.123Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQxMjozNDo1Ni4xMjM0NTY3ODkifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T12:34:56.123Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQyNDowMFoifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQyNDowMCswMjozMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T21:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQyNDowMC0wMzMwIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T03:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQyNDowMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQyNDowMDowMC4wMDFaIn0", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQyNDowMDowMC4wMDErMDI6MzAifQ", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQyNDowMDowMC4wMDEtMDMzMCJ9", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQyNDowMDowMC4wMDEifQ", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQyNTowMFoifQ", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQyNTowMCswMjozMCJ9", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQyNTowMC0wMzMwIn0", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQyNTowMCJ9", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQxMjo2MFoifQ", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQxMjo2MCswMjozMCJ9", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQxMjo2MC0wMzMwIn0", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQxMjo2MCJ9", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQxMjozNDo2MFoifQ", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQxMjozNDo2MCswMjozMCJ9", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQxMjozNDo2MC0wMzMwIn0", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQxMjozNDo2MCJ9", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQwMDowMFoifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQwMDowMCswMjozMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-02-28T21:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQwMDowMC0wMzMwIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-01T03:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQwMDowMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQxMjozNDo1NloifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-01T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQxMjozNDo1NiswMjozMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-01T10:04:56.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQxMjozNDo1Ni0wMzMwIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-01T16:04:56.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQxMjozNDo1NiJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-01T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQxMjozNDo1Ni4xWiJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-01T12:34:56.100Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQxMjozNDo1Ni4xKzAyOjMwIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-01T10:04:56.100Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQxMjozNDo1Ni4xLTAzMzAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-01T16:04:56.100Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQxMjozNDo1Ni4xIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-01T12:34:56.100Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQxMjozNDo1Ni4xMjM0NTY3ODlaIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-01T12:34:56.123Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQxMjozNDo1Ni4xMjM0NTY3ODkrMDI6MzAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-01T10:04:56.123Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQxMjozNDo1Ni4xMjM0NTY3ODktMDMzMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-01T16:04:56.123Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQxMjozNDo1Ni4xMjM0NTY3ODkifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-01T12:34:56.123Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQyNDowMFoifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQyNDowMCswMjozMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-01T21:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQyNDowMC0wMzMwIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T03:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQyNDowMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQyNDowMDowMC4wMDFaIn0", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQyNDowMDowMC4wMDErMDI6MzAifQ", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQyNDowMDowMC4wMDEtMDMzMCJ9", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQyNDowMDowMC4wMDEifQ", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQyNTowMFoifQ", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQyNTowMCswMjozMCJ9", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQyNTowMC0wMzMwIn0", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQyNTowMCJ9", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQxMjo2MFoifQ", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQxMjo2MCswMjozMCJ9", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQxMjo2MC0wMzMwIn0", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQxMjo2MCJ9", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQxMjozNDo2MFoifQ", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQxMjozNDo2MCswMjozMCJ9", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQxMjozNDo2MC0wMzMwIn0", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQxMjozNDo2MCJ9", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQwMDowMFoifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQwMDowMCswMjozMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T21:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQwMDowMC0wMzMwIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T03:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQwMDowMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQxMjozNDo1NloifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQxMjozNDo1NiswMjozMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T10:04:56.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQxMjozNDo1Ni0wMzMwIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T16:04:56.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQxMjozNDo1NiJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQxMjozNDo1Ni4xWiJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T12:34:56.100Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQxMjozNDo1Ni4xKzAyOjMwIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T10:04:56.100Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQxMjozNDo1Ni4xLTAzMzAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T16:04:56.100Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQxMjozNDo1Ni4xIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T12:34:56.100Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQxMjozNDo1Ni4xMjM0NTY3ODlaIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T12:34:56.123Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQxMjozNDo1Ni4xMjM0NTY3ODkrMDI6MzAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T10:04:56.123Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQxMjozNDo1Ni4xMjM0NTY3ODktMDMzMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T16:04:56.123Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQxMjozNDo1Ni4xMjM0NTY3ODkifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T12:34:56.123Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQyNDowMFoifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQyNDowMCswMjozMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T21:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQyNDowMC0wMzMwIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-02T03:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQyNDowMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQyNDowMDowMC4wMDFaIn0", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQyNDowMDowMC4wMDErMDI6MzAifQ", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQyNDowMDowMC4wMDEtMDMzMCJ9", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQyNDowMDowMC4wMDEifQ", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQyNTowMFoifQ", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQyNTowMCswMjozMCJ9", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQyNTowMC0wMzMwIn0", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQyNTowMCJ9", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQxMjo2MFoifQ", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQxMjo2MCswMjozMCJ9", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQxMjo2MC0wMzMwIn0", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQxMjo2MCJ9", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQxMjozNDo2MFoifQ", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQxMjozNDo2MCswMjozMCJ9", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQxMjozNDo2MC0wMzMwIn0", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQxMjozNDo2MCJ9", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2000-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMSJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMTIifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-12-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMTMifQ", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzEifQ", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNDkifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNTAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "1950-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiOTkifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMTAwIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "0100-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMDAwLTAxLTAxIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2000-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMS0wMVQwMDowMFoifQ", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMS8yLzAzIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC8wMi8zMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC4wMi4yOSJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBKYW51YXJ5IDIwMjQifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-05T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiVHVlLCAwNSBNYXIgMjAyNCAxMjozNDo1NiBHTVQifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-05T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiTWFyY2ggNSwgMjAyNCAxMjozMCBQTSJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-05T12:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMS0wMSAxMjozNDo1NiJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-01T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMS0wMSAxMjozNDo1Ni4xMjM0IEdNVCswMjAwIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-01T10:34:56.123Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMS0wMSAoY29tbWVudCkifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiKGNvbW1lbnQpIDIwMjQtMDEtMDEifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiZ2FyYmFnZSAyMDI0LTAxLTAxIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiZ2FyYmFnZTIwMjQtMDEtMDEifQ", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMS0wMSBnYXJiYWdlIn0", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMS0wMSBHTVQtOCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-01T08:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMS0wMSAxMjo6MzAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-01T12:00:30.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMS0wMSAxMjozMDo0MCBFU1QifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-01T17:30:40.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiOTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5In0", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSBHTVQifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSBVVEMrMDE6MzAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-28T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSBFU1QifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSArMDEzMCJ9", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAxMjozNCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T12:34:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAxMjozNCBHTVQifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T12:34:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAxMjozNCBVVEMrMDE6MzAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T11:04:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAxMjozNCBFU1QifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T17:34:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAxMjozNCArMDEzMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T11:04:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAxMjozNDo1Ni4wMDAxMjMifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAxMjozNDo1Ni4wMDAxMjMgR01UIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAxMjozNDo1Ni4wMDAxMjMgVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T11:04:56.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAxMjozNDo1Ni4wMDAxMjMgRVNUIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T17:34:56.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAxMjozNDo1Ni4wMDAxMjMgKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T11:04:56.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAxMjozNDo1Ni45OTk5OTk5OTk5OTkifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T12:34:56.999Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAxMjozNDo1Ni45OTk5OTk5OTk5OTkgR01UIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T12:34:56.999Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAxMjozNDo1Ni45OTk5OTk5OTk5OTkgVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T11:04:56.999Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAxMjozNDo1Ni45OTk5OTk5OTk5OTkgRVNUIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T17:34:56.999Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAxMjozNDo1Ni45OTk5OTk5OTk5OTkgKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T11:04:56.999Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAyNDowMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAyNDowMCBHTVQifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAyNDowMCBVVEMrMDE6MzAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAyNDowMCBFU1QifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAyNDowMCArMDEzMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAxMjowMCBBTSJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAxMjowMCBBTSBHTVQifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAxMjowMCBBTSBVVEMrMDE6MzAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-28T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAxMjowMCBBTSBFU1QifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAxMjowMCBBTSArMDEzMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-28T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAxMjowMCBQTSJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAxMjowMCBQTSBHTVQifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAxMjowMCBQTSBVVEMrMDE6MzAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAxMjowMCBQTSBFU1QifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T17:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAxMjowMCBQTSArMDEzMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAwOjAwIFBNIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAwOjAwIFBNIEdNVCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAwOjAwIFBNIFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAwOjAwIFBNIEVTVCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T17:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAwOjAwIFBNICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAxMzowMCBQTSJ9", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAxMzowMCBQTSBHTVQifQ", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAxMzowMCBQTSBVVEMrMDE6MzAifQ", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAxMzowMCBQTSBFU1QifQ", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAxMzowMCBQTSArMDEzMCJ9", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCBHTVQifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCBVVEMrMDE6MzAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-01T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCBFU1QifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCArMDEzMCJ9", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAxMjozNCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T12:34:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAxMjozNCBHTVQifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T12:34:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAxMjozNCBVVEMrMDE6MzAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T11:04:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAxMjozNCBFU1QifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T17:34:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAxMjozNCArMDEzMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T11:04:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAxMjozNDo1Ni4wMDAxMjMifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAxMjozNDo1Ni4wMDAxMjMgR01UIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAxMjozNDo1Ni4wMDAxMjMgVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T11:04:56.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAxMjozNDo1Ni4wMDAxMjMgRVNUIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T17:34:56.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAxMjozNDo1Ni4wMDAxMjMgKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T11:04:56.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAxMjozNDo1Ni45OTk5OTk5OTk5OTkifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T12:34:56.999Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAxMjozNDo1Ni45OTk5OTk5OTk5OTkgR01UIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T12:34:56.999Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAxMjozNDo1Ni45OTk5OTk5OTk5OTkgVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T11:04:56.999Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAxMjozNDo1Ni45OTk5OTk5OTk5OTkgRVNUIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T17:34:56.999Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAxMjozNDo1Ni45OTk5OTk5OTk5OTkgKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T11:04:56.999Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAyNDowMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-03T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAyNDowMCBHTVQifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-03T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAyNDowMCBVVEMrMDE6MzAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAyNDowMCBFU1QifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-03T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAyNDowMCArMDEzMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAxMjowMCBBTSJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAxMjowMCBBTSBHTVQifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAxMjowMCBBTSBVVEMrMDE6MzAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-01T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAxMjowMCBBTSBFU1QifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAxMjowMCBBTSArMDEzMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-01T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAxMjowMCBQTSJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAxMjowMCBQTSBHTVQifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAxMjowMCBQTSBVVEMrMDE6MzAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAxMjowMCBQTSBFU1QifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T17:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAxMjowMCBQTSArMDEzMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAwOjAwIFBNIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAwOjAwIFBNIEdNVCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAwOjAwIFBNIFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAwOjAwIFBNIEVTVCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T17:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAwOjAwIFBNICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAxMzowMCBQTSJ9", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAxMzowMCBQTSBHTVQifQ", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAxMzowMCBQTSBVVEMrMDE6MzAifQ", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAxMzowMCBQTSBFU1QifQ", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAxMzowMCBQTSArMDEzMCJ9", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "0001-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSBHTVQifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSBVVEMrMDE6MzAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2000-12-31T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSBFU1QifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSArMDEzMCJ9", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAxMjozNCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T12:34:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAxMjozNCBHTVQifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T12:34:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAxMjozNCBVVEMrMDE6MzAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T11:04:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAxMjozNCBFU1QifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T17:34:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAxMjozNCArMDEzMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T11:04:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAxMjozNDo1Ni4wMDAxMjMifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAxMjozNDo1Ni4wMDAxMjMgR01UIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAxMjozNDo1Ni4wMDAxMjMgVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T11:04:56.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAxMjozNDo1Ni4wMDAxMjMgRVNUIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T17:34:56.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAxMjozNDo1Ni4wMDAxMjMgKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T11:04:56.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAxMjozNDo1Ni45OTk5OTk5OTk5OTkifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T12:34:56.999Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAxMjozNDo1Ni45OTk5OTk5OTk5OTkgR01UIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T12:34:56.999Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAxMjozNDo1Ni45OTk5OTk5OTk5OTkgVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T11:04:56.999Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAxMjozNDo1Ni45OTk5OTk5OTk5OTkgRVNUIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T17:34:56.999Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAxMjozNDo1Ni45OTk5OTk5OTk5OTkgKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T11:04:56.999Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAyNDowMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAyNDowMCBHTVQifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAyNDowMCBVVEMrMDE6MzAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAyNDowMCBFU1QifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-02T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAyNDowMCArMDEzMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAxMjowMCBBTSJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAxMjowMCBBTSBHTVQifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAxMjowMCBBTSBVVEMrMDE6MzAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2000-12-31T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAxMjowMCBBTSBFU1QifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAxMjowMCBBTSArMDEzMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2000-12-31T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAxMjowMCBQTSJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAxMjowMCBQTSBHTVQifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAxMjowMCBQTSBVVEMrMDE6MzAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAxMjowMCBQTSBFU1QifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T17:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAxMjowMCBQTSArMDEzMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAwOjAwIFBNIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAwOjAwIFBNIEdNVCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAwOjAwIFBNIFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAwOjAwIFBNIEVTVCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T17:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAwOjAwIFBNICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAxMzowMCBQTSJ9", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAxMzowMCBQTSBHTVQifQ", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAxMzowMCBQTSBVVEMrMDE6MzAifQ", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAxMzowMCBQTSBFU1QifQ", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAxMzowMCBQTSArMDEzMCJ9", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyBHTVQifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyBVVEMrMDE6MzAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-02T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyBFU1QifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyArMDEzMCJ9", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAxMjozNCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T12:34:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAxMjozNCBHTVQifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T12:34:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAxMjozNCBVVEMrMDE6MzAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T11:04:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAxMjozNCBFU1QifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T17:34:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAxMjozNCArMDEzMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T11:04:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAxMjozNDo1Ni4wMDAxMjMifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAxMjozNDo1Ni4wMDAxMjMgR01UIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAxMjozNDo1Ni4wMDAxMjMgVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T11:04:56.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAxMjozNDo1Ni4wMDAxMjMgRVNUIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T17:34:56.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAxMjozNDo1Ni4wMDAxMjMgKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T11:04:56.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAxMjozNDo1Ni45OTk5OTk5OTk5OTkifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T12:34:56.999Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAxMjozNDo1Ni45OTk5OTk5OTk5OTkgR01UIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T12:34:56.999Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAxMjozNDo1Ni45OTk5OTk5OTk5OTkgVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T11:04:56.999Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAxMjozNDo1Ni45OTk5OTk5OTk5OTkgRVNUIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T17:34:56.999Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAxMjozNDo1Ni45OTk5OTk5OTk5OTkgKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T11:04:56.999Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAyNDowMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-04T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAyNDowMCBHTVQifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-04T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAyNDowMCBVVEMrMDE6MzAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAyNDowMCBFU1QifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-04T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAyNDowMCArMDEzMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAxMjowMCBBTSJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAxMjowMCBBTSBHTVQifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAxMjowMCBBTSBVVEMrMDE6MzAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-02T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAxMjowMCBBTSBFU1QifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAxMjowMCBBTSArMDEzMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-02T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAxMjowMCBQTSJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAxMjowMCBQTSBHTVQifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAxMjowMCBQTSBVVEMrMDE6MzAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAxMjowMCBQTSBFU1QifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T17:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAxMjowMCBQTSArMDEzMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAwOjAwIFBNIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAwOjAwIFBNIEdNVCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAwOjAwIFBNIFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAwOjAwIFBNIEVTVCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T17:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAwOjAwIFBNICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAxMzowMCBQTSJ9", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAxMzowMCBQTSBHTVQifQ", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAxMzowMCBQTSBVVEMrMDE6MzAifQ", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAxMzowMCBQTSBFU1QifQ", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAxMzowMCBQTSArMDEzMCJ9", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgR01UIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-01T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgRVNUIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgKzAxMzAifQ", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMTI6MzQifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T12:34:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMTI6MzQgR01UIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T12:34:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMTI6MzQgVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T11:04:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMTI6MzQgRVNUIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T17:34:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMTI6MzQgKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T11:04:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMTI6MzQ6NTYuMDAwMTIzIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMTI6MzQ6NTYuMDAwMTIzIEdNVCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMTI6MzQ6NTYuMDAwMTIzIFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T11:04:56.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMTI6MzQ6NTYuMDAwMTIzIEVTVCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T17:34:56.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMTI6MzQ6NTYuMDAwMTIzICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T11:04:56.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5In0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T12:34:56.999Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IEdNVCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T12:34:56.999Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T11:04:56.999Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IEVTVCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T17:34:56.999Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5ICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T11:04:56.999Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMjQ6MDAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-03T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMjQ6MDAgR01UIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-03T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMjQ6MDAgVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMjQ6MDAgRVNUIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-03T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMjQ6MDAgKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMTI6MDAgQU0ifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMTI6MDAgQU0gR01UIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMTI6MDAgQU0gVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-01T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMTI6MDAgQU0gRVNUIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMTI6MDAgQU0gKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-01T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMTI6MDAgUE0ifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMTI6MDAgUE0gR01UIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMTI6MDAgUE0gVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMTI6MDAgUE0gRVNUIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T17:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMTI6MDAgUE0gKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMDowMCBQTSJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMDowMCBQTSBHTVQifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMDowMCBQTSBVVEMrMDE6MzAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMDowMCBQTSBFU1QifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T17:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMDowMCBQTSArMDEzMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMTM6MDAgUE0ifQ", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMTM6MDAgUE0gR01UIn0", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMTM6MDAgUE0gVVRDKzAxOjMwIn0", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMTM6MDAgUE0gRVNUIn0", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMTM6MDAgUE0gKzAxMzAifQ", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgR01UIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-01T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgRVNUIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgKzAxMzAifQ", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMTI6MzQifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T12:34:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMTI6MzQgR01UIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T12:34:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMTI6MzQgVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T11:04:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMTI6MzQgRVNUIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T17:34:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMTI6MzQgKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T11:04:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMTI6MzQ6NTYuMDAwMTIzIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMTI6MzQ6NTYuMDAwMTIzIEdNVCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMTI6MzQ6NTYuMDAwMTIzIFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T11:04:56.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMTI6MzQ6NTYuMDAwMTIzIEVTVCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T17:34:56.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMTI6MzQ6NTYuMDAwMTIzICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T11:04:56.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5In0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T12:34:56.999Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IEdNVCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T12:34:56.999Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T11:04:56.999Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IEVTVCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T17:34:56.999Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5ICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T11:04:56.999Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMjQ6MDAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-03T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMjQ6MDAgR01UIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-03T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMjQ6MDAgVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMjQ6MDAgRVNUIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-03T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMjQ6MDAgKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMTI6MDAgQU0ifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMTI6MDAgQU0gR01UIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMTI6MDAgQU0gVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-01T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMTI6MDAgQU0gRVNUIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMTI6MDAgQU0gKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-01T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMTI6MDAgUE0ifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMTI6MDAgUE0gR01UIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMTI6MDAgUE0gVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMTI6MDAgUE0gRVNUIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T17:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMTI6MDAgUE0gKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMDowMCBQTSJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMDowMCBQTSBHTVQifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMDowMCBQTSBVVEMrMDE6MzAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMDowMCBQTSBFU1QifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T17:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMDowMCBQTSArMDEzMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMTM6MDAgUE0ifQ", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMTM6MDAgUE0gR01UIn0", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMTM6MDAgUE0gVVRDKzAxOjMwIn0", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMTM6MDAgUE0gRVNUIn0", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMTM6MDAgUE0gKzAxMzAifQ", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgR01UIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-04T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgRVNUIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgKzAxMzAifQ", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMTI6MzQifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T12:34:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMTI6MzQgR01UIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T12:34:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMTI6MzQgVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T11:04:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMTI6MzQgRVNUIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T17:34:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMTI6MzQgKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T11:04:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMTI6MzQ6NTYuMDAwMTIzIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMTI6MzQ6NTYuMDAwMTIzIEdNVCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMTI6MzQ6NTYuMDAwMTIzIFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T11:04:56.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMTI6MzQ6NTYuMDAwMTIzIEVTVCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T17:34:56.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMTI6MzQ6NTYuMDAwMTIzICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T11:04:56.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5In0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T12:34:56.999Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IEdNVCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T12:34:56.999Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T11:04:56.999Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IEVTVCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T17:34:56.999Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5ICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T11:04:56.999Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMjQ6MDAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-06T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMjQ6MDAgR01UIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-06T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMjQ6MDAgVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMjQ6MDAgRVNUIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-06T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMjQ6MDAgKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMTI6MDAgQU0ifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMTI6MDAgQU0gR01UIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMTI6MDAgQU0gVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-04T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMTI6MDAgQU0gRVNUIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMTI6MDAgQU0gKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-04T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMTI6MDAgUE0ifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMTI6MDAgUE0gR01UIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMTI6MDAgUE0gVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMTI6MDAgUE0gRVNUIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T17:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMTI6MDAgUE0gKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMDowMCBQTSJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMDowMCBQTSBHTVQifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMDowMCBQTSBVVEMrMDE6MzAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMDowMCBQTSBFU1QifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T17:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMDowMCBQTSArMDEzMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMTM6MDAgUE0ifQ", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMTM6MDAgUE0gR01UIn0", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMTM6MDAgUE0gVVRDKzAxOjMwIn0", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMTM6MDAgUE0gRVNUIn0", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMTM6MDAgUE0gKzAxMzAifQ", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSBHTVQifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSBVVEMrMDE6MzAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-04T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSBFU1QifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSArMDEzMCJ9", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAxMjozNCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T12:34:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAxMjozNCBHTVQifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T12:34:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAxMjozNCBVVEMrMDE6MzAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T11:04:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAxMjozNCBFU1QifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T17:34:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAxMjozNCArMDEzMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T11:04:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAxMjozNDo1Ni4wMDAxMjMifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAxMjozNDo1Ni4wMDAxMjMgR01UIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAxMjozNDo1Ni4wMDAxMjMgVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T11:04:56.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAxMjozNDo1Ni4wMDAxMjMgRVNUIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T17:34:56.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAxMjozNDo1Ni4wMDAxMjMgKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T11:04:56.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAxMjozNDo1Ni45OTk5OTk5OTk5OTkifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T12:34:56.999Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAxMjozNDo1Ni45OTk5OTk5OTk5OTkgR01UIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T12:34:56.999Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAxMjozNDo1Ni45OTk5OTk5OTk5OTkgVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T11:04:56.999Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAxMjozNDo1Ni45OTk5OTk5OTk5OTkgRVNUIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T17:34:56.999Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAxMjozNDo1Ni45OTk5OTk5OTk5OTkgKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T11:04:56.999Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAyNDowMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-06T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAyNDowMCBHTVQifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-06T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAyNDowMCBVVEMrMDE6MzAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAyNDowMCBFU1QifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-06T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAyNDowMCArMDEzMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAxMjowMCBBTSJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAxMjowMCBBTSBHTVQifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAxMjowMCBBTSBVVEMrMDE6MzAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-04T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAxMjowMCBBTSBFU1QifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAxMjowMCBBTSArMDEzMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-04T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAxMjowMCBQTSJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAxMjowMCBQTSBHTVQifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAxMjowMCBQTSBVVEMrMDE6MzAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAxMjowMCBQTSBFU1QifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T17:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAxMjowMCBQTSArMDEzMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAwOjAwIFBNIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAwOjAwIFBNIEdNVCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAwOjAwIFBNIFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAwOjAwIFBNIEVTVCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T17:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAwOjAwIFBNICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAxMzowMCBQTSJ9", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAxMzowMCBQTSBHTVQifQ", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAxMzowMCBQTSBVVEMrMDE6MzAifQ", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAxMzowMCBQTSBFU1QifQ", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAxMzowMCBQTSArMDEzMCJ9", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgR01UIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-30T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgRVNUIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgKzAxMzAifQ", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMTI6MzQifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T12:34:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMTI6MzQgR01UIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T12:34:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMTI6MzQgVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T11:04:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMTI6MzQgRVNUIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T17:34:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMTI6MzQgKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T11:04:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMTI6MzQ6NTYuMDAwMTIzIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMTI6MzQ6NTYuMDAwMTIzIEdNVCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMTI6MzQ6NTYuMDAwMTIzIFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T11:04:56.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMTI6MzQ6NTYuMDAwMTIzIEVTVCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T17:34:56.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMTI6MzQ6NTYuMDAwMTIzICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T11:04:56.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5In0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T12:34:56.999Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IEdNVCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T12:34:56.999Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T11:04:56.999Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IEVTVCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T17:34:56.999Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5ICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T11:04:56.999Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMjQ6MDAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2000-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMjQ6MDAgR01UIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2000-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMjQ6MDAgVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMjQ6MDAgRVNUIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2000-01-01T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMjQ6MDAgKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMTI6MDAgQU0ifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMTI6MDAgQU0gR01UIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMTI6MDAgQU0gVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-30T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMTI6MDAgQU0gRVNUIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMTI6MDAgQU0gKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-30T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMTI6MDAgUE0ifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMTI6MDAgUE0gR01UIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMTI6MDAgUE0gVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMTI6MDAgUE0gRVNUIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T17:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMTI6MDAgUE0gKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMDowMCBQTSJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMDowMCBQTSBHTVQifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMDowMCBQTSBVVEMrMDE6MzAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMDowMCBQTSBFU1QifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T17:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMDowMCBQTSArMDEzMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMTM6MDAgUE0ifQ", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMTM6MDAgUE0gR01UIn0", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMTM6MDAgUE0gVVRDKzAxOjMwIn0", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMTM6MDAgUE0gRVNUIn0", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMTM6MDAgUE0gKzAxMzAifQ", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgR01UIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-01T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgRVNUIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgKzAxMzAifQ", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMTI6MzQifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T12:34:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMTI6MzQgR01UIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T12:34:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMTI6MzQgVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T11:04:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMTI6MzQgRVNUIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T17:34:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMTI6MzQgKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T11:04:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMTI6MzQ6NTYuMDAwMTIzIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMTI6MzQ6NTYuMDAwMTIzIEdNVCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMTI6MzQ6NTYuMDAwMTIzIFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T11:04:56.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMTI6MzQ6NTYuMDAwMTIzIEVTVCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T17:34:56.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMTI6MzQ6NTYuMDAwMTIzICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T11:04:56.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5In0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T12:34:56.999Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IEdNVCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T12:34:56.999Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T11:04:56.999Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IEVTVCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T17:34:56.999Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5ICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T11:04:56.999Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMjQ6MDAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-03T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMjQ6MDAgR01UIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-03T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMjQ6MDAgVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMjQ6MDAgRVNUIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-03T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMjQ6MDAgKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMTI6MDAgQU0ifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMTI6MDAgQU0gR01UIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMTI6MDAgQU0gVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-01T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMTI6MDAgQU0gRVNUIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMTI6MDAgQU0gKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-01T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMTI6MDAgUE0ifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMTI6MDAgUE0gR01UIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMTI6MDAgUE0gVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMTI6MDAgUE0gRVNUIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T17:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMTI6MDAgUE0gKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMDowMCBQTSJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMDowMCBQTSBHTVQifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMDowMCBQTSBVVEMrMDE6MzAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMDowMCBQTSBFU1QifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T17:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMDowMCBQTSArMDEzMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMTM6MDAgUE0ifQ", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMTM6MDAgUE0gR01UIn0", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMTM6MDAgUE0gVVRDKzAxOjMwIn0", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMTM6MDAgUE0gRVNUIn0", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMTM6MDAgUE0gKzAxMzAifQ", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMS0wMSAifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMS0wMVx0In0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMS0wMVxuIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMS0wMe-7vyJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMS0wMSAoaWdub3JlZCkifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMS0wMSBnYXJiYWdlIn0", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMS0wMVx1MDAwMGlnbm9yZWQifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjpbIjIwMjQtMDItMjkiXX0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjpbIjIwMjQtMDItMjkiXX0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjpbIjIwMjQtMDItMjkiLCIyMDI0LTAzLTAxIl19", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjpbIiJdfQ", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjp7IngiOiJ4In19", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjp7InRvU3RyaW5nIjoieCJ9fQ", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiaW52YWxpZCJ9", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjp7InRvU3RyaW5nIjoieCJ9fQ", - "rejected": true, - "http": false - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiTWFyY2ggMSAyMDI0In0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T00:00:00.000Z" - }, - "http": true - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T00:00:00.000Z" - }, - "http": true - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQyNDowMDowMFoifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T00:00:00.000Z" - }, - "http": true - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T00:00:00.000Z" - }, - "http": true - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjpbIjIwMjQiLCIzIiwiMSJdfQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T00:00:00.000Z" - }, - "http": true - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMy0wMVQwMTowMDowMCswMjowMCJ9", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T23:00:00.000Z" - }, - "http": true - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMy0wMXQwMDowMHoifQ", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T00:00:00.000Z" - }, - "http": true - }, - { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMy0wMVQwMDowMFpcdTAwMDBpZ25vcmVkIn0", - "rejected": false, - "expected": { - "sort": "-lastView", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T00:00:00.000Z" - }, - "http": true - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IiJ9", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6ImludmFsaWQifQ", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "0000-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "0001-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDIifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjkifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzEifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzIifQ", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDAtMDEifQ", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMTMtMDEifQ", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDAifQ", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDEifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjRUMDA6MDAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDJUMDA6MDAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDF0MDA6MDB6In0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IiAyMDI0LTAxLTAxICJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDFUMDA6MDBaICJ9", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDFUMDA6MDBaXHUwMDAwaWdub3JlZCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IiswMTAwMDAtMDEtMDEifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "+010000-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDEtMDEtMDEifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "-000001-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDEtMDEifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IisyNzU3NjAtMDktMTMifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "+275760-09-13T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IisyNzU3NjAtMDktMTQifQ", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0yNzE4MjEtMDQtMjAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "-271821-04-20T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0yNzE4MjEtMDQtMTkifQ", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMDA6MDBaIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMDA6MDArMDI6MzAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-28T21:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMDA6MDAtMDMzMCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T03:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMDA6MDAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6MzQ6NTZaIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6MzQ6NTYrMDI6MzAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T10:04:56.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6MzQ6NTYtMDMzMCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T16:04:56.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6MzQ6NTYifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6MzQ6NTYuMVoifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T12:34:56.100Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6MzQ6NTYuMSswMjozMCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T10:04:56.100Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6MzQ6NTYuMS0wMzMwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T16:04:56.100Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6MzQ6NTYuMSJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T12:34:56.100Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6MzQ6NTYuMTIzNDU2Nzg5WiJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T12:34:56.123Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6MzQ6NTYuMTIzNDU2Nzg5KzAyOjMwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T10:04:56.123Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6MzQ6NTYuMTIzNDU2Nzg5LTAzMzAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T16:04:56.123Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6MzQ6NTYuMTIzNDU2Nzg5In0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T12:34:56.123Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMjQ6MDBaIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMjQ6MDArMDI6MzAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T21:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMjQ6MDAtMDMzMCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T03:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMjQ6MDAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMjQ6MDA6MDAuMDAxWiJ9", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMjQ6MDA6MDAuMDAxKzAyOjMwIn0", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMjQ6MDA6MDAuMDAxLTAzMzAifQ", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMjQ6MDA6MDAuMDAxIn0", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMjU6MDBaIn0", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMjU6MDArMDI6MzAifQ", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMjU6MDAtMDMzMCJ9", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMjU6MDAifQ", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6NjBaIn0", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6NjArMDI6MzAifQ", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6NjAtMDMzMCJ9", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6NjAifQ", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6MzQ6NjBaIn0", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6MzQ6NjArMDI6MzAifQ", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6MzQ6NjAtMDMzMCJ9", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6MzQ6NjAifQ", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMDA6MDBaIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMDA6MDArMDI6MzAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-02-28T21:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMDA6MDAtMDMzMCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-01T03:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMDA6MDAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6MzQ6NTZaIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-01T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6MzQ6NTYrMDI6MzAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-01T10:04:56.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6MzQ6NTYtMDMzMCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-01T16:04:56.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6MzQ6NTYifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-01T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6MzQ6NTYuMVoifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-01T12:34:56.100Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6MzQ6NTYuMSswMjozMCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-01T10:04:56.100Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6MzQ6NTYuMS0wMzMwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-01T16:04:56.100Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6MzQ6NTYuMSJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-01T12:34:56.100Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6MzQ6NTYuMTIzNDU2Nzg5WiJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-01T12:34:56.123Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6MzQ6NTYuMTIzNDU2Nzg5KzAyOjMwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-01T10:04:56.123Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6MzQ6NTYuMTIzNDU2Nzg5LTAzMzAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-01T16:04:56.123Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6MzQ6NTYuMTIzNDU2Nzg5In0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-01T12:34:56.123Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMjQ6MDBaIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMjQ6MDArMDI6MzAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-01T21:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMjQ6MDAtMDMzMCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T03:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMjQ6MDAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMjQ6MDA6MDAuMDAxWiJ9", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMjQ6MDA6MDAuMDAxKzAyOjMwIn0", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMjQ6MDA6MDAuMDAxLTAzMzAifQ", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMjQ6MDA6MDAuMDAxIn0", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMjU6MDBaIn0", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMjU6MDArMDI6MzAifQ", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMjU6MDAtMDMzMCJ9", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMjU6MDAifQ", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6NjBaIn0", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6NjArMDI6MzAifQ", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6NjAtMDMzMCJ9", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6NjAifQ", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6MzQ6NjBaIn0", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6MzQ6NjArMDI6MzAifQ", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6MzQ6NjAtMDMzMCJ9", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6MzQ6NjAifQ", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMDA6MDBaIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMDA6MDArMDI6MzAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T21:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMDA6MDAtMDMzMCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T03:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMDA6MDAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6MzQ6NTZaIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6MzQ6NTYrMDI6MzAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T10:04:56.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6MzQ6NTYtMDMzMCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T16:04:56.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6MzQ6NTYifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6MzQ6NTYuMVoifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T12:34:56.100Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6MzQ6NTYuMSswMjozMCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T10:04:56.100Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6MzQ6NTYuMS0wMzMwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T16:04:56.100Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6MzQ6NTYuMSJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T12:34:56.100Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6MzQ6NTYuMTIzNDU2Nzg5WiJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T12:34:56.123Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6MzQ6NTYuMTIzNDU2Nzg5KzAyOjMwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T10:04:56.123Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6MzQ6NTYuMTIzNDU2Nzg5LTAzMzAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T16:04:56.123Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6MzQ6NTYuMTIzNDU2Nzg5In0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T12:34:56.123Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMjQ6MDBaIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMjQ6MDArMDI6MzAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T21:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMjQ6MDAtMDMzMCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-02T03:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMjQ6MDAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMjQ6MDA6MDAuMDAxWiJ9", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMjQ6MDA6MDAuMDAxKzAyOjMwIn0", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMjQ6MDA6MDAuMDAxLTAzMzAifQ", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMjQ6MDA6MDAuMDAxIn0", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMjU6MDBaIn0", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMjU6MDArMDI6MzAifQ", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMjU6MDAtMDMzMCJ9", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMjU6MDAifQ", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6NjBaIn0", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6NjArMDI6MzAifQ", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6NjAtMDMzMCJ9", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6NjAifQ", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6MzQ6NjBaIn0", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6MzQ6NjArMDI6MzAifQ", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6MzQ6NjAtMDMzMCJ9", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6MzQ6NjAifQ", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2000-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjEifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjEyIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-12-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjEzIn0", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMxIn0", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjQ5In0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1950-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ijk5In0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjEwMCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "0100-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDAwMC0wMS0wMSJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2000-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDEtMDFUMDA6MDBaIn0", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjEvMi8wMyJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQvMDIvMzAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQuMDIuMjkifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1In0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgSmFudWFyeSAyMDI0In0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-05T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IlR1ZSwgMDUgTWFyIDIwMjQgMTI6MzQ6NTYgR01UIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-05T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ik1hcmNoIDUsIDIwMjQgMTI6MzAgUE0ifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-05T12:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDEgMTI6MzQ6NTYifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-01T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDEgMTI6MzQ6NTYuMTIzNCBHTVQrMDIwMCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-01T10:34:56.123Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDEgKGNvbW1lbnQpIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Iihjb21tZW50KSAyMDI0LTAxLTAxIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6ImdhcmJhZ2UgMjAyNC0wMS0wMSJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6ImdhcmJhZ2UyMDI0LTAxLTAxIn0", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDEgZ2FyYmFnZSJ9", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDEgR01ULTgifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-01T08:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDEgMTI6OjMwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-01T12:00:30.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDEgMTI6MzA6NDAgRVNUIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-01T17:30:40.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ijk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OSJ9", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgR01UIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-28T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgRVNUIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgKzAxMzAifQ", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MzQifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T12:34:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MzQgR01UIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T12:34:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MzQgVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T11:04:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MzQgRVNUIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T17:34:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MzQgKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T11:04:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MzQ6NTYuMDAwMTIzIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MzQ6NTYuMDAwMTIzIEdNVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MzQ6NTYuMDAwMTIzIFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T11:04:56.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MzQ6NTYuMDAwMTIzIEVTVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T17:34:56.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MzQ6NTYuMDAwMTIzICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T11:04:56.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5In0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T12:34:56.999Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IEdNVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T12:34:56.999Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T11:04:56.999Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IEVTVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T17:34:56.999Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5ICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T11:04:56.999Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMjQ6MDAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMjQ6MDAgR01UIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMjQ6MDAgVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMjQ6MDAgRVNUIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMjQ6MDAgKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MDAgQU0ifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MDAgQU0gR01UIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MDAgQU0gVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-28T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MDAgQU0gRVNUIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MDAgQU0gKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-28T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MDAgUE0ifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MDAgUE0gR01UIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MDAgUE0gVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MDAgUE0gRVNUIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T17:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MDAgUE0gKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMDowMCBQTSJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMDowMCBQTSBHTVQifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMDowMCBQTSBVVEMrMDE6MzAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMDowMCBQTSBFU1QifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T17:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMDowMCBQTSArMDEzMCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTM6MDAgUE0ifQ", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTM6MDAgUE0gR01UIn0", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTM6MDAgUE0gVVRDKzAxOjMwIn0", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTM6MDAgUE0gRVNUIn0", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTM6MDAgUE0gKzAxMzAifQ", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgR01UIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-01T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgRVNUIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgKzAxMzAifQ", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MzQifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T12:34:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MzQgR01UIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T12:34:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MzQgVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T11:04:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MzQgRVNUIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T17:34:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MzQgKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T11:04:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MzQ6NTYuMDAwMTIzIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MzQ6NTYuMDAwMTIzIEdNVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MzQ6NTYuMDAwMTIzIFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T11:04:56.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MzQ6NTYuMDAwMTIzIEVTVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T17:34:56.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MzQ6NTYuMDAwMTIzICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T11:04:56.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5In0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T12:34:56.999Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IEdNVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T12:34:56.999Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T11:04:56.999Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IEVTVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T17:34:56.999Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5ICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T11:04:56.999Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMjQ6MDAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-03T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMjQ6MDAgR01UIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-03T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMjQ6MDAgVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMjQ6MDAgRVNUIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-03T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMjQ6MDAgKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MDAgQU0ifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MDAgQU0gR01UIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MDAgQU0gVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-01T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MDAgQU0gRVNUIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MDAgQU0gKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-01T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MDAgUE0ifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MDAgUE0gR01UIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MDAgUE0gVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MDAgUE0gRVNUIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T17:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MDAgUE0gKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMDowMCBQTSJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMDowMCBQTSBHTVQifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMDowMCBQTSBVVEMrMDE6MzAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMDowMCBQTSBFU1QifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T17:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMDowMCBQTSArMDEzMCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2023-03-02T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTM6MDAgUE0ifQ", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTM6MDAgUE0gR01UIn0", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTM6MDAgUE0gVVRDKzAxOjMwIn0", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTM6MDAgUE0gRVNUIn0", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTM6MDAgUE0gKzAxMzAifQ", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "0001-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgR01UIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2000-12-31T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgRVNUIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgKzAxMzAifQ", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MzQifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T12:34:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MzQgR01UIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T12:34:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MzQgVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T11:04:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MzQgRVNUIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T17:34:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MzQgKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T11:04:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MzQ6NTYuMDAwMTIzIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MzQ6NTYuMDAwMTIzIEdNVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MzQ6NTYuMDAwMTIzIFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T11:04:56.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MzQ6NTYuMDAwMTIzIEVTVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T17:34:56.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MzQ6NTYuMDAwMTIzICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T11:04:56.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5In0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T12:34:56.999Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IEdNVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T12:34:56.999Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T11:04:56.999Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IEVTVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T17:34:56.999Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5ICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T11:04:56.999Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMjQ6MDAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMjQ6MDAgR01UIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMjQ6MDAgVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMjQ6MDAgRVNUIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-02T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMjQ6MDAgKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MDAgQU0ifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MDAgQU0gR01UIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MDAgQU0gVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2000-12-31T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MDAgQU0gRVNUIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MDAgQU0gKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2000-12-31T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MDAgUE0ifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MDAgUE0gR01UIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MDAgUE0gVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MDAgUE0gRVNUIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T17:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MDAgUE0gKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMDowMCBQTSJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMDowMCBQTSBHTVQifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMDowMCBQTSBVVEMrMDE6MzAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMDowMCBQTSBFU1QifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T17:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMDowMCBQTSArMDEzMCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-01T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTM6MDAgUE0ifQ", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTM6MDAgUE0gR01UIn0", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTM6MDAgUE0gVVRDKzAxOjMwIn0", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTM6MDAgUE0gRVNUIn0", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTM6MDAgUE0gKzAxMzAifQ", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgR01UIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-02T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgRVNUIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgKzAxMzAifQ", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MzQifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T12:34:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MzQgR01UIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T12:34:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MzQgVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T11:04:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MzQgRVNUIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T17:34:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MzQgKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T11:04:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MzQ6NTYuMDAwMTIzIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MzQ6NTYuMDAwMTIzIEdNVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MzQ6NTYuMDAwMTIzIFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T11:04:56.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MzQ6NTYuMDAwMTIzIEVTVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T17:34:56.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MzQ6NTYuMDAwMTIzICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T11:04:56.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5In0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T12:34:56.999Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IEdNVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T12:34:56.999Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T11:04:56.999Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IEVTVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T17:34:56.999Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5ICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T11:04:56.999Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMjQ6MDAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-04T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMjQ6MDAgR01UIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-04T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMjQ6MDAgVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMjQ6MDAgRVNUIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-04T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMjQ6MDAgKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MDAgQU0ifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MDAgQU0gR01UIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MDAgQU0gVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-02T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MDAgQU0gRVNUIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MDAgQU0gKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-02T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MDAgUE0ifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MDAgUE0gR01UIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MDAgUE0gVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MDAgUE0gRVNUIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T17:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MDAgUE0gKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMDowMCBQTSJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMDowMCBQTSBHTVQifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMDowMCBQTSBVVEMrMDE6MzAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMDowMCBQTSBFU1QifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T17:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMDowMCBQTSArMDEzMCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTM6MDAgUE0ifQ", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTM6MDAgUE0gR01UIn0", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTM6MDAgUE0gVVRDKzAxOjMwIn0", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTM6MDAgUE0gRVNUIn0", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTM6MDAgUE0gKzAxMzAifQ", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIEdNVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-01T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIEVTVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzICswMTMwIn0", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjM0In0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T12:34:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjM0IEdNVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T12:34:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjM0IFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T11:04:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjM0IEVTVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T17:34:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjM0ICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T11:04:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjM0OjU2LjAwMDEyMyJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjM0OjU2LjAwMDEyMyBHTVQifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjM0OjU2LjAwMDEyMyBVVEMrMDE6MzAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T11:04:56.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjM0OjU2LjAwMDEyMyBFU1QifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T17:34:56.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjM0OjU2LjAwMDEyMyArMDEzMCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T11:04:56.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T12:34:56.999Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSBHTVQifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T12:34:56.999Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSBVVEMrMDE6MzAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T11:04:56.999Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSBFU1QifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T17:34:56.999Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSArMDEzMCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T11:04:56.999Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDI0OjAwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-03T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDI0OjAwIEdNVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-03T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDI0OjAwIFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDI0OjAwIEVTVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-03T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDI0OjAwICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjAwIEFNIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjAwIEFNIEdNVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjAwIEFNIFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-01T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjAwIEFNIEVTVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjAwIEFNICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-01T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjAwIFBNIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjAwIFBNIEdNVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjAwIFBNIFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjAwIFBNIEVTVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T17:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjAwIFBNICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDA6MDAgUE0ifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDA6MDAgUE0gR01UIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDA6MDAgUE0gVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDA6MDAgUE0gRVNUIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T17:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDA6MDAgUE0gKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2003-01-02T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEzOjAwIFBNIn0", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEzOjAwIFBNIEdNVCJ9", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEzOjAwIFBNIFVUQyswMTozMCJ9", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEzOjAwIFBNIEVTVCJ9", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEzOjAwIFBNICswMTMwIn0", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIEdNVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-01T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIEVTVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyICswMTMwIn0", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjM0In0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T12:34:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjM0IEdNVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T12:34:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjM0IFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T11:04:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjM0IEVTVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T17:34:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjM0ICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T11:04:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjM0OjU2LjAwMDEyMyJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjM0OjU2LjAwMDEyMyBHTVQifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjM0OjU2LjAwMDEyMyBVVEMrMDE6MzAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T11:04:56.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjM0OjU2LjAwMDEyMyBFU1QifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T17:34:56.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjM0OjU2LjAwMDEyMyArMDEzMCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T11:04:56.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T12:34:56.999Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSBHTVQifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T12:34:56.999Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSBVVEMrMDE6MzAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T11:04:56.999Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSBFU1QifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T17:34:56.999Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSArMDEzMCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T11:04:56.999Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDI0OjAwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-03T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDI0OjAwIEdNVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-03T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDI0OjAwIFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDI0OjAwIEVTVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-03T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDI0OjAwICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjAwIEFNIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjAwIEFNIEdNVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjAwIEFNIFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-01T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjAwIEFNIEVTVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjAwIEFNICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-01T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjAwIFBNIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjAwIFBNIEdNVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjAwIFBNIFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjAwIFBNIEVTVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T17:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjAwIFBNICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDA6MDAgUE0ifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDA6MDAgUE0gR01UIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDA6MDAgUE0gVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDA6MDAgUE0gRVNUIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T17:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDA6MDAgUE0gKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2032-01-02T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEzOjAwIFBNIn0", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEzOjAwIFBNIEdNVCJ9", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEzOjAwIFBNIFVUQyswMTozMCJ9", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEzOjAwIFBNIEVTVCJ9", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEzOjAwIFBNICswMTMwIn0", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1In0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IEdNVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-04T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IEVTVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1ICswMTMwIn0", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjM0In0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T12:34:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjM0IEdNVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T12:34:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjM0IFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T11:04:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjM0IEVTVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T17:34:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjM0ICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T11:04:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjM0OjU2LjAwMDEyMyJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjM0OjU2LjAwMDEyMyBHTVQifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjM0OjU2LjAwMDEyMyBVVEMrMDE6MzAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T11:04:56.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjM0OjU2LjAwMDEyMyBFU1QifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T17:34:56.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjM0OjU2LjAwMDEyMyArMDEzMCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T11:04:56.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T12:34:56.999Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSBHTVQifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T12:34:56.999Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSBVVEMrMDE6MzAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T11:04:56.999Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSBFU1QifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T17:34:56.999Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSArMDEzMCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T11:04:56.999Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDI0OjAwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-06T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDI0OjAwIEdNVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-06T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDI0OjAwIFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDI0OjAwIEVTVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-06T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDI0OjAwICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjAwIEFNIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjAwIEFNIEdNVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjAwIEFNIFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-04T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjAwIEFNIEVTVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjAwIEFNICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-04T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjAwIFBNIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjAwIFBNIEdNVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjAwIFBNIFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjAwIFBNIEVTVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T17:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjAwIFBNICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDA6MDAgUE0ifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDA6MDAgUE0gR01UIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDA6MDAgUE0gVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDA6MDAgUE0gRVNUIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T17:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDA6MDAgUE0gKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-01-05T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEzOjAwIFBNIn0", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEzOjAwIFBNIEdNVCJ9", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEzOjAwIFBNIFVUQyswMTozMCJ9", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEzOjAwIFBNIEVTVCJ9", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEzOjAwIFBNICswMTMwIn0", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgR01UIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-04T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgRVNUIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgKzAxMzAifQ", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MzQifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T12:34:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MzQgR01UIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T12:34:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MzQgVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T11:04:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MzQgRVNUIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T17:34:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MzQgKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T11:04:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MzQ6NTYuMDAwMTIzIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MzQ6NTYuMDAwMTIzIEdNVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MzQ6NTYuMDAwMTIzIFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T11:04:56.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MzQ6NTYuMDAwMTIzIEVTVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T17:34:56.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MzQ6NTYuMDAwMTIzICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T11:04:56.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5In0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T12:34:56.999Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IEdNVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T12:34:56.999Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T11:04:56.999Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IEVTVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T17:34:56.999Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5ICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T11:04:56.999Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMjQ6MDAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-06T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMjQ6MDAgR01UIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-06T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMjQ6MDAgVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMjQ6MDAgRVNUIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-06T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMjQ6MDAgKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MDAgQU0ifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MDAgQU0gR01UIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MDAgQU0gVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-04T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MDAgQU0gRVNUIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MDAgQU0gKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-04T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MDAgUE0ifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MDAgUE0gR01UIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MDAgUE0gVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MDAgUE0gRVNUIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T17:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MDAgUE0gKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMDowMCBQTSJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMDowMCBQTSBHTVQifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMDowMCBQTSBVVEMrMDE6MzAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMDowMCBQTSBFU1QifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T17:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMDowMCBQTSArMDEzMCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2049-03-05T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTM6MDAgUE0ifQ", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTM6MDAgUE0gR01UIn0", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTM6MDAgUE0gVVRDKzAxOjMwIn0", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTM6MDAgUE0gRVNUIn0", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTM6MDAgUE0gKzAxMzAifQ", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5In0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IEdNVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-30T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IEVTVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5ICswMTMwIn0", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjM0In0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T12:34:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjM0IEdNVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T12:34:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjM0IFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T11:04:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjM0IEVTVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T17:34:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjM0ICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T11:04:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjM0OjU2LjAwMDEyMyJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjM0OjU2LjAwMDEyMyBHTVQifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjM0OjU2LjAwMDEyMyBVVEMrMDE6MzAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T11:04:56.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjM0OjU2LjAwMDEyMyBFU1QifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T17:34:56.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjM0OjU2LjAwMDEyMyArMDEzMCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T11:04:56.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T12:34:56.999Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSBHTVQifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T12:34:56.999Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSBVVEMrMDE6MzAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T11:04:56.999Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSBFU1QifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T17:34:56.999Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSArMDEzMCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T11:04:56.999Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDI0OjAwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2000-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDI0OjAwIEdNVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2000-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDI0OjAwIFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDI0OjAwIEVTVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2000-01-01T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDI0OjAwICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjAwIEFNIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjAwIEFNIEdNVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjAwIEFNIFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-30T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjAwIEFNIEVTVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjAwIEFNICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-30T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjAwIFBNIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjAwIFBNIEdNVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjAwIFBNIFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjAwIFBNIEVTVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T17:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjAwIFBNICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDA6MDAgUE0ifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDA6MDAgUE0gR01UIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDA6MDAgUE0gVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDA6MDAgUE0gRVNUIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T17:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDA6MDAgUE0gKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "1999-12-31T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEzOjAwIFBNIn0", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEzOjAwIFBNIEdNVCJ9", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEzOjAwIFBNIFVUQyswMTozMCJ9", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEzOjAwIFBNIEVTVCJ9", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEzOjAwIFBNICswMTMwIn0", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIEdNVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-01T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIEVTVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyICswMTMwIn0", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjM0In0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T12:34:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjM0IEdNVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T12:34:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjM0IFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T11:04:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjM0IEVTVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T17:34:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjM0ICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T11:04:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjM0OjU2LjAwMDEyMyJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjM0OjU2LjAwMDEyMyBHTVQifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T12:34:56.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjM0OjU2LjAwMDEyMyBVVEMrMDE6MzAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T11:04:56.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjM0OjU2LjAwMDEyMyBFU1QifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T17:34:56.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjM0OjU2LjAwMDEyMyArMDEzMCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T11:04:56.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T12:34:56.999Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSBHTVQifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T12:34:56.999Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSBVVEMrMDE6MzAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T11:04:56.999Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSBFU1QifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T17:34:56.999Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSArMDEzMCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T11:04:56.999Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDI0OjAwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-03T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDI0OjAwIEdNVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-03T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDI0OjAwIFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDI0OjAwIEVTVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-03T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDI0OjAwICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjAwIEFNIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjAwIEFNIEdNVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjAwIEFNIFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-01T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjAwIEFNIEVTVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T05:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjAwIEFNICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-01T22:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjAwIFBNIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjAwIFBNIEdNVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjAwIFBNIFVUQyswMTozMCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjAwIFBNIEVTVCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T17:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjAwIFBNICswMTMwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDA6MDAgUE0ifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDA6MDAgUE0gR01UIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T12:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDA6MDAgUE0gVVRDKzAxOjMwIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDA6MDAgUE0gRVNUIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T17:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDA6MDAgUE0gKzAxMzAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-02T10:30:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEzOjAwIFBNIn0", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEzOjAwIFBNIEdNVCJ9", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEzOjAwIFBNIFVUQyswMTozMCJ9", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEzOjAwIFBNIEVTVCJ9", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEzOjAwIFBNICswMTMwIn0", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDEgIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDFcdCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDFcbiJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDHvu78ifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDEgKGlnbm9yZWQpIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDEgZ2FyYmFnZSJ9", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDFcdTAwMDBpZ25vcmVkIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-01-01T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6WyIyMDI0LTAyLTI5Il19", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6WyIyMDI0LTAyLTI5Il19", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T00:00:00.000Z" - }, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6WyIyMDI0LTAyLTI5IiwiMjAyNC0wMy0wMSJdfQ", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6WyIiXX0", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6eyJ4IjoieCJ9fQ", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6eyJ0b1N0cmluZyI6IngifX0", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6ImludmFsaWQifQ", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6eyJ0b1N0cmluZyI6IngifX0", - "rejected": true, - "http": false - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ik1hcmNoIDEgMjAyNCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T00:00:00.000Z" - }, - "http": true - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T00:00:00.000Z" - }, - "http": true - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMjQ6MDA6MDBaIn0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T00:00:00.000Z" - }, - "http": true - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2001-02-03T00:00:00.000Z" - }, - "http": true - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6WyIyMDI0IiwiMyIsIjEiXX0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T00:00:00.000Z" - }, - "http": true - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDMtMDFUMDE6MDA6MDArMDI6MDAifQ", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-02-29T23:00:00.000Z" - }, - "http": true - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDMtMDF0MDA6MDB6In0", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T00:00:00.000Z" - }, - "http": true - }, - { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDMtMDFUMDA6MDBaXHUwMDAwaWdub3JlZCJ9", - "rejected": false, - "expected": { - "sort": "options.expirationDate", - "type": "repo", - "id": "111111111111111111111111", - "value": "2024-03-01T00:00:00.000Z" - }, - "http": true - } -] diff --git a/backend/internal/server/testdata/dashboard-filters.json b/backend/internal/server/testdata/dashboard-filters.json deleted file mode 100644 index 5c131be..0000000 --- a/backend/internal/server/testdata/dashboard-filters.json +++ /dev/null @@ -1,739 +0,0 @@ -[ - { - "query": {}, - "expected": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "query": { - "type": "repo" - }, - "expected": { - "_type": "repo", - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "query": { - "type": "pr" - }, - "expected": { - "_type": "pr", - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "query": { - "type": "gist" - }, - "expected": { - "_type": "gist", - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "query": { - "type": "unknown" - }, - "expected": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "query": { - "type": [ - "repo", - "gist" - ] - }, - "expected": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "query": { - "attention": "true" - }, - "expected": { - "_attention": true, - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "query": { - "attention": "false" - }, - "expected": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "query": { - "attention": [ - "true", - "true" - ] - }, - "expected": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "query": { - "statuses": "" - }, - "expected": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "query": { - "statuses": "ready" - }, - "expected": { - "_statusKey": { - "$in": [ - "ready" - ] - } - } - }, - { - "query": { - "statuses": "ready,removed" - }, - "expected": { - "_statusKey": { - "$in": [ - "ready", - "removed" - ] - } - } - }, - { - "query": { - "statuses": "invalid" - }, - "expected": { - "_statusKey": { - "$in": [] - } - } - }, - { - "query": { - "statuses": "ready,,error,ready" - }, - "expected": { - "_statusKey": { - "$in": [ - "ready", - "error", - "ready" - ] - } - } - }, - { - "query": { - "statuses": [ - "ready", - "removed" - ] - }, - "expected": { - "_statusKey": { - "$in": [ - "ready", - "removed" - ] - } - } - }, - { - "query": { - "statuses": [ - "", - "" - ] - }, - "expected": { - "_statusKey": { - "$in": [] - } - } - }, - { - "query": { - "q": "plain" - }, - "expected": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - }, - "$or": [ - { - "_anonymousId": { - "$regex": "plain", - "$options": "i" - } - }, - { - "_label": { - "$regex": "plain", - "$options": "i" - } - }, - { - "_source": { - "$regex": "plain", - "$options": "i" - } - }, - { - "conference": { - "$regex": "plain", - "$options": "i" - } - } - ] - } - }, - { - "query": { - "q": " text " - }, - "expected": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - }, - "$or": [ - { - "_anonymousId": { - "$regex": "text", - "$options": "i" - } - }, - { - "_label": { - "$regex": "text", - "$options": "i" - } - }, - { - "_source": { - "$regex": "text", - "$options": "i" - } - }, - { - "conference": { - "$regex": "text", - "$options": "i" - } - } - ] - } - }, - { - "query": { - "q": "[a].*+?^${}()|\\" - }, - "expected": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - }, - "$or": [ - { - "_anonymousId": { - "$regex": "\\[a\\]\\.\\*\\+\\?\\^\\$\\{\\}\\(\\)\\|\\\\", - "$options": "i" - } - }, - { - "_label": { - "$regex": "\\[a\\]\\.\\*\\+\\?\\^\\$\\{\\}\\(\\)\\|\\\\", - "$options": "i" - } - }, - { - "_source": { - "$regex": "\\[a\\]\\.\\*\\+\\?\\^\\$\\{\\}\\(\\)\\|\\\\", - "$options": "i" - } - }, - { - "conference": { - "$regex": "\\[a\\]\\.\\*\\+\\?\\^\\$\\{\\}\\(\\)\\|\\\\", - "$options": "i" - } - } - ] - } - }, - { - "query": { - "q": "text" - }, - "expected": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - }, - "$or": [ - { - "_anonymousId": { - "$regex": "text", - "$options": "i" - } - }, - { - "_label": { - "$regex": "text", - "$options": "i" - } - }, - { - "_source": { - "$regex": "text", - "$options": "i" - } - }, - { - "conference": { - "$regex": "text", - "$options": "i" - } - } - ] - } - }, - { - "query": { - "q": "…text…" - }, - "expected": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - }, - "$or": [ - { - "_anonymousId": { - "$regex": "…text…", - "$options": "i" - } - }, - { - "_label": { - "$regex": "…text…", - "$options": "i" - } - }, - { - "_source": { - "$regex": "…text…", - "$options": "i" - } - }, - { - "conference": { - "$regex": "…text…", - "$options": "i" - } - } - ] - } - }, - { - "query": { - "q": "éééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééétail" - }, - "expected": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - }, - "$or": [ - { - "_anonymousId": { - "$regex": "éééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééé", - "$options": "i" - } - }, - { - "_label": { - "$regex": "éééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééé", - "$options": "i" - } - }, - { - "_source": { - "$regex": "éééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééé", - "$options": "i" - } - }, - { - "conference": { - "$regex": "éééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééé", - "$options": "i" - } - } - ] - } - }, - { - "query": { - "q": "😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀tail" - }, - "expected": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - }, - "$or": [ - { - "_anonymousId": { - "$regex": "😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀", - "$options": "i" - } - }, - { - "_label": { - "$regex": "😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀", - "$options": "i" - } - }, - { - "_source": { - "$regex": "😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀", - "$options": "i" - } - }, - { - "conference": { - "$regex": "😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀", - "$options": "i" - } - } - ] - } - }, - { - "query": { - "q": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa😀" - }, - "expected": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - }, - "$or": [ - { - "_anonymousId": { - "$regex": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa�", - "$options": "i" - } - }, - { - "_label": { - "$regex": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa�", - "$options": "i" - } - }, - { - "_source": { - "$regex": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa�", - "$options": "i" - } - }, - { - "conference": { - "$regex": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa�", - "$options": "i" - } - } - ] - } - }, - { - "query": { - "q": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa😀tail" - }, - "expected": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - }, - "$or": [ - { - "_anonymousId": { - "$regex": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa😀", - "$options": "i" - } - }, - { - "_label": { - "$regex": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa😀", - "$options": "i" - } - }, - { - "_source": { - "$regex": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa😀", - "$options": "i" - } - }, - { - "conference": { - "$regex": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa😀", - "$options": "i" - } - } - ] - } - }, - { - "query": { - "q": [ - "first", - "second" - ] - }, - "expected": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - }, - "$or": [ - { - "_anonymousId": { - "$regex": "first,second", - "$options": "i" - } - }, - { - "_label": { - "$regex": "first,second", - "$options": "i" - } - }, - { - "_source": { - "$regex": "first,second", - "$options": "i" - } - }, - { - "conference": { - "$regex": "first,second", - "$options": "i" - } - } - ] - } - }, - { - "query": { - "q": [ - "", - "" - ] - }, - "expected": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - }, - "$or": [ - { - "_anonymousId": { - "$regex": ",", - "$options": "i" - } - }, - { - "_label": { - "$regex": ",", - "$options": "i" - } - }, - { - "_source": { - "$regex": ",", - "$options": "i" - } - }, - { - "conference": { - "$regex": ",", - "$options": "i" - } - } - ] - } - }, - { - "query": { - "q": [ - " first", - "second " - ] - }, - "expected": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - }, - "$or": [ - { - "_anonymousId": { - "$regex": "first,second", - "$options": "i" - } - }, - { - "_label": { - "$regex": "first,second", - "$options": "i" - } - }, - { - "_source": { - "$regex": "first,second", - "$options": "i" - } - }, - { - "conference": { - "$regex": "first,second", - "$options": "i" - } - } - ] - } - } -] diff --git a/backend/internal/server/testdata/dashboard-limits.json b/backend/internal/server/testdata/dashboard-limits.json deleted file mode 100644 index 509c3ae..0000000 --- a/backend/internal/server/testdata/dashboard-limits.json +++ /dev/null @@ -1,321 +0,0 @@ -[ - { - "values": [], - "expected": 50 - }, - { - "values": [ - "1", - "2" - ], - "expected": 50 - }, - { - "values": [ - "", - "" - ], - "expected": 50 - }, - { - "values": [ - "2", - "" - ], - "expected": 50 - }, - { - "values": [ - "" - ], - "expected": 50 - }, - { - "values": [ - " " - ], - "expected": 50 - }, - { - "values": [ - "0" - ], - "expected": 50 - }, - { - "values": [ - "-0" - ], - "expected": 50 - }, - { - "values": [ - "1" - ], - "expected": 1 - }, - { - "values": [ - "-1" - ], - "expected": 1 - }, - { - "values": [ - "2.9" - ], - "expected": 2 - }, - { - "values": [ - "-0.1" - ], - "expected": 1 - }, - { - "values": [ - "0.1" - ], - "expected": 50 - }, - { - "values": [ - "100" - ], - "expected": 100 - }, - { - "values": [ - "101" - ], - "expected": 100 - }, - { - "values": [ - "999999999999999999999999" - ], - "expected": 100 - }, - { - "values": [ - "1e2" - ], - "expected": 100 - }, - { - "values": [ - "1e-2" - ], - "expected": 50 - }, - { - "values": [ - "1e999" - ], - "expected": 100 - }, - { - "values": [ - "-1e999" - ], - "expected": 1 - }, - { - "values": [ - "1e-9999" - ], - "expected": 50 - }, - { - "values": [ - "0x2" - ], - "expected": 2 - }, - { - "values": [ - "0Xff" - ], - "expected": 100 - }, - { - "values": [ - "0x" - ], - "expected": 50 - }, - { - "values": [ - "0xgg" - ], - "expected": 50 - }, - { - "values": [ - "0xfffffffffffffffffffffffffffff" - ], - "expected": 100 - }, - { - "values": [ - "0xffffz" - ], - "expected": 50 - }, - { - "values": [ - "0b10" - ], - "expected": 2 - }, - { - "values": [ - "0B101" - ], - "expected": 5 - }, - { - "values": [ - "0b12" - ], - "expected": 50 - }, - { - "values": [ - "0o10" - ], - "expected": 8 - }, - { - "values": [ - "0O10" - ], - "expected": 8 - }, - { - "values": [ - "0o8" - ], - "expected": 50 - }, - { - "values": [ - "-0x2" - ], - "expected": 50 - }, - { - "values": [ - "+0x2" - ], - "expected": 50 - }, - { - "values": [ - "Infinity" - ], - "expected": 100 - }, - { - "values": [ - "+Infinity" - ], - "expected": 100 - }, - { - "values": [ - "-Infinity" - ], - "expected": 1 - }, - { - "values": [ - "Inf" - ], - "expected": 50 - }, - { - "values": [ - "NaN" - ], - "expected": 50 - }, - { - "values": [ - "true" - ], - "expected": 50 - }, - { - "values": [ - "null" - ], - "expected": 50 - }, - { - "values": [ - "1_0" - ], - "expected": 50 - }, - { - "values": [ - "0x1p2" - ], - "expected": 50 - }, - { - "values": [ - ".5" - ], - "expected": 50 - }, - { - "values": [ - "+.5" - ], - "expected": 50 - }, - { - "values": [ - "1." - ], - "expected": 1 - }, - { - "values": [ - "01" - ], - "expected": 1 - }, - { - "values": [ - "1e" - ], - "expected": 50 - }, - { - "values": [ - "2suffix" - ], - "expected": 50 - }, - { - "values": [ - "2" - ], - "expected": 2 - }, - { - "values": [ - "…2…" - ], - "expected": 50 - }, - { - "values": [ - "\n2\t" - ], - "expected": 2 - } -] diff --git a/backend/internal/server/testdata/dashboard-pipeline.json b/backend/internal/server/testdata/dashboard-pipeline.json deleted file mode 100644 index 5d217f4..0000000 --- a/backend/internal/server/testdata/dashboard-pipeline.json +++ /dev/null @@ -1,843981 +0,0 @@ -{ - "now": "2026-01-02T03:04:05.000Z", - "owner": "111111111111111111111111", - "cases": [ - { - "name": "case-0", - "query": {}, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1", - "query": { - "sort": "_name" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$_anonymousId", - "" - ] - } - } - }, - { - "$set": { - "_sort": { - "$toLower": "$_sort" - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2", - "query": { - "sort": "-_name" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$_anonymousId", - "" - ] - } - } - }, - { - "$set": { - "_sort": { - "$toLower": "$_sort" - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-3", - "query": { - "sort": "_label" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$_label", - "" - ] - } - } - }, - { - "$set": { - "_sort": { - "$toLower": "$_sort" - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-4", - "query": { - "sort": "-_label" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$_label", - "" - ] - } - } - }, - { - "$set": { - "_sort": { - "$toLower": "$_sort" - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-5", - "query": { - "sort": "status" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$status", - "" - ] - } - } - }, - { - "$set": { - "_sort": { - "$toLower": "$_sort" - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-6", - "query": { - "sort": "-status" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$status", - "" - ] - } - } - }, - { - "$set": { - "_sort": { - "$toLower": "$_sort" - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-7", - "query": { - "sort": "anonymizeDate" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-8", - "query": { - "sort": "-anonymizeDate" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-9", - "query": { - "sort": "lastView" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-10", - "query": { - "sort": "-lastView" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-11", - "query": { - "sort": "pageView" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$pageView", - 0 - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-12", - "query": { - "sort": "-pageView" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$pageView", - 0 - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-13", - "query": { - "sort": "options.expirationDate" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-14", - "query": { - "sort": "-options.expirationDate" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-15", - "query": { - "sort": "invalid" - }, - "error": "invalid_sort" - }, - { - "name": "case-16", - "query": { - "sort": [ - "_name", - "_label" - ] - }, - "error": "invalid_sort" - }, - { - "name": "case-17", - "query": {}, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-18", - "query": { - "type": "repo" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_type": "repo", - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_type": "repo", - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-19", - "query": { - "type": "pr" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_type": "pr", - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_type": "pr", - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-20", - "query": { - "type": "gist" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_type": "gist", - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_type": "gist", - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-21", - "query": { - "type": "unknown" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-22", - "query": { - "type": [ - "repo", - "gist" - ] - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-23", - "query": { - "attention": "true" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_attention": true, - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_attention": true, - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-24", - "query": { - "attention": "false" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-25", - "query": { - "attention": [ - "true", - "true" - ] - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-26", - "query": { - "statuses": "" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-27", - "query": { - "statuses": "ready" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-28", - "query": { - "statuses": "ready,removed" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "removed" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "removed" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-29", - "query": { - "statuses": "invalid" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-30", - "query": { - "statuses": "ready,,error,ready" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "error", - "ready" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "error", - "ready" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-31", - "query": { - "statuses": [ - "ready", - "removed" - ] - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "removed" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "removed" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-32", - "query": { - "statuses": [ - "", - "" - ] - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-33", - "query": { - "q": "plain" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - }, - "$or": [ - { - "_anonymousId": { - "$regex": "plain", - "$options": "i" - } - }, - { - "_label": { - "$regex": "plain", - "$options": "i" - } - }, - { - "_source": { - "$regex": "plain", - "$options": "i" - } - }, - { - "conference": { - "$regex": "plain", - "$options": "i" - } - } - ] - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - }, - "$or": [ - { - "_anonymousId": { - "$regex": "plain", - "$options": "i" - } - }, - { - "_label": { - "$regex": "plain", - "$options": "i" - } - }, - { - "_source": { - "$regex": "plain", - "$options": "i" - } - }, - { - "conference": { - "$regex": "plain", - "$options": "i" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-34", - "query": { - "q": " text " - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - }, - "$or": [ - { - "_anonymousId": { - "$regex": "text", - "$options": "i" - } - }, - { - "_label": { - "$regex": "text", - "$options": "i" - } - }, - { - "_source": { - "$regex": "text", - "$options": "i" - } - }, - { - "conference": { - "$regex": "text", - "$options": "i" - } - } - ] - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - }, - "$or": [ - { - "_anonymousId": { - "$regex": "text", - "$options": "i" - } - }, - { - "_label": { - "$regex": "text", - "$options": "i" - } - }, - { - "_source": { - "$regex": "text", - "$options": "i" - } - }, - { - "conference": { - "$regex": "text", - "$options": "i" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-35", - "query": { - "q": "[a].*+?^${}()|\\" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - }, - "$or": [ - { - "_anonymousId": { - "$regex": "\\[a\\]\\.\\*\\+\\?\\^\\$\\{\\}\\(\\)\\|\\\\", - "$options": "i" - } - }, - { - "_label": { - "$regex": "\\[a\\]\\.\\*\\+\\?\\^\\$\\{\\}\\(\\)\\|\\\\", - "$options": "i" - } - }, - { - "_source": { - "$regex": "\\[a\\]\\.\\*\\+\\?\\^\\$\\{\\}\\(\\)\\|\\\\", - "$options": "i" - } - }, - { - "conference": { - "$regex": "\\[a\\]\\.\\*\\+\\?\\^\\$\\{\\}\\(\\)\\|\\\\", - "$options": "i" - } - } - ] - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - }, - "$or": [ - { - "_anonymousId": { - "$regex": "\\[a\\]\\.\\*\\+\\?\\^\\$\\{\\}\\(\\)\\|\\\\", - "$options": "i" - } - }, - { - "_label": { - "$regex": "\\[a\\]\\.\\*\\+\\?\\^\\$\\{\\}\\(\\)\\|\\\\", - "$options": "i" - } - }, - { - "_source": { - "$regex": "\\[a\\]\\.\\*\\+\\?\\^\\$\\{\\}\\(\\)\\|\\\\", - "$options": "i" - } - }, - { - "conference": { - "$regex": "\\[a\\]\\.\\*\\+\\?\\^\\$\\{\\}\\(\\)\\|\\\\", - "$options": "i" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-36", - "query": { - "q": "text" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - }, - "$or": [ - { - "_anonymousId": { - "$regex": "text", - "$options": "i" - } - }, - { - "_label": { - "$regex": "text", - "$options": "i" - } - }, - { - "_source": { - "$regex": "text", - "$options": "i" - } - }, - { - "conference": { - "$regex": "text", - "$options": "i" - } - } - ] - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - }, - "$or": [ - { - "_anonymousId": { - "$regex": "text", - "$options": "i" - } - }, - { - "_label": { - "$regex": "text", - "$options": "i" - } - }, - { - "_source": { - "$regex": "text", - "$options": "i" - } - }, - { - "conference": { - "$regex": "text", - "$options": "i" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-37", - "query": { - "q": "…text…" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - }, - "$or": [ - { - "_anonymousId": { - "$regex": "…text…", - "$options": "i" - } - }, - { - "_label": { - "$regex": "…text…", - "$options": "i" - } - }, - { - "_source": { - "$regex": "…text…", - "$options": "i" - } - }, - { - "conference": { - "$regex": "…text…", - "$options": "i" - } - } - ] - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - }, - "$or": [ - { - "_anonymousId": { - "$regex": "…text…", - "$options": "i" - } - }, - { - "_label": { - "$regex": "…text…", - "$options": "i" - } - }, - { - "_source": { - "$regex": "…text…", - "$options": "i" - } - }, - { - "conference": { - "$regex": "…text…", - "$options": "i" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-38", - "query": { - "q": "éééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééétail" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - }, - "$or": [ - { - "_anonymousId": { - "$regex": "éééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééé", - "$options": "i" - } - }, - { - "_label": { - "$regex": "éééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééé", - "$options": "i" - } - }, - { - "_source": { - "$regex": "éééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééé", - "$options": "i" - } - }, - { - "conference": { - "$regex": "éééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééé", - "$options": "i" - } - } - ] - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - }, - "$or": [ - { - "_anonymousId": { - "$regex": "éééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééé", - "$options": "i" - } - }, - { - "_label": { - "$regex": "éééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééé", - "$options": "i" - } - }, - { - "_source": { - "$regex": "éééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééé", - "$options": "i" - } - }, - { - "conference": { - "$regex": "éééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééé", - "$options": "i" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-39", - "query": { - "q": "😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀tail" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - }, - "$or": [ - { - "_anonymousId": { - "$regex": "😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀", - "$options": "i" - } - }, - { - "_label": { - "$regex": "😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀", - "$options": "i" - } - }, - { - "_source": { - "$regex": "😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀", - "$options": "i" - } - }, - { - "conference": { - "$regex": "😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀", - "$options": "i" - } - } - ] - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - }, - "$or": [ - { - "_anonymousId": { - "$regex": "😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀", - "$options": "i" - } - }, - { - "_label": { - "$regex": "😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀", - "$options": "i" - } - }, - { - "_source": { - "$regex": "😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀", - "$options": "i" - } - }, - { - "conference": { - "$regex": "😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀", - "$options": "i" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-40", - "query": { - "q": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa😀" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - }, - "$or": [ - { - "_anonymousId": { - "$regex": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa�", - "$options": "i" - } - }, - { - "_label": { - "$regex": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa�", - "$options": "i" - } - }, - { - "_source": { - "$regex": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa�", - "$options": "i" - } - }, - { - "conference": { - "$regex": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa�", - "$options": "i" - } - } - ] - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - }, - "$or": [ - { - "_anonymousId": { - "$regex": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa�", - "$options": "i" - } - }, - { - "_label": { - "$regex": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa�", - "$options": "i" - } - }, - { - "_source": { - "$regex": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa�", - "$options": "i" - } - }, - { - "conference": { - "$regex": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa�", - "$options": "i" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-41", - "query": { - "q": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa😀tail" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - }, - "$or": [ - { - "_anonymousId": { - "$regex": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa😀", - "$options": "i" - } - }, - { - "_label": { - "$regex": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa😀", - "$options": "i" - } - }, - { - "_source": { - "$regex": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa😀", - "$options": "i" - } - }, - { - "conference": { - "$regex": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa😀", - "$options": "i" - } - } - ] - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - }, - "$or": [ - { - "_anonymousId": { - "$regex": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa😀", - "$options": "i" - } - }, - { - "_label": { - "$regex": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa😀", - "$options": "i" - } - }, - { - "_source": { - "$regex": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa😀", - "$options": "i" - } - }, - { - "conference": { - "$regex": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa😀", - "$options": "i" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-42", - "query": { - "q": [ - "first", - "second" - ] - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - }, - "$or": [ - { - "_anonymousId": { - "$regex": "first,second", - "$options": "i" - } - }, - { - "_label": { - "$regex": "first,second", - "$options": "i" - } - }, - { - "_source": { - "$regex": "first,second", - "$options": "i" - } - }, - { - "conference": { - "$regex": "first,second", - "$options": "i" - } - } - ] - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - }, - "$or": [ - { - "_anonymousId": { - "$regex": "first,second", - "$options": "i" - } - }, - { - "_label": { - "$regex": "first,second", - "$options": "i" - } - }, - { - "_source": { - "$regex": "first,second", - "$options": "i" - } - }, - { - "conference": { - "$regex": "first,second", - "$options": "i" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-43", - "query": { - "q": [ - "", - "" - ] - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - }, - "$or": [ - { - "_anonymousId": { - "$regex": ",", - "$options": "i" - } - }, - { - "_label": { - "$regex": ",", - "$options": "i" - } - }, - { - "_source": { - "$regex": ",", - "$options": "i" - } - }, - { - "conference": { - "$regex": ",", - "$options": "i" - } - } - ] - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - }, - "$or": [ - { - "_anonymousId": { - "$regex": ",", - "$options": "i" - } - }, - { - "_label": { - "$regex": ",", - "$options": "i" - } - }, - { - "_source": { - "$regex": ",", - "$options": "i" - } - }, - { - "conference": { - "$regex": ",", - "$options": "i" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-44", - "query": { - "q": [ - " first", - "second " - ] - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - }, - "$or": [ - { - "_anonymousId": { - "$regex": "first,second", - "$options": "i" - } - }, - { - "_label": { - "$regex": "first,second", - "$options": "i" - } - }, - { - "_source": { - "$regex": "first,second", - "$options": "i" - } - }, - { - "conference": { - "$regex": "first,second", - "$options": "i" - } - } - ] - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - }, - "$or": [ - { - "_anonymousId": { - "$regex": "first,second", - "$options": "i" - } - }, - { - "_label": { - "$regex": "first,second", - "$options": "i" - } - }, - { - "_source": { - "$regex": "first,second", - "$options": "i" - } - }, - { - "conference": { - "$regex": "first,second", - "$options": "i" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-45", - "query": {}, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-46", - "query": { - "limit": [ - "1", - "2" - ] - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-47", - "query": { - "limit": [ - "", - "" - ] - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-48", - "query": { - "limit": [ - "2", - "" - ] - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-49", - "query": { - "limit": "" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-50", - "query": { - "limit": " " - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-51", - "query": { - "limit": "0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-52", - "query": { - "limit": "-0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-53", - "query": { - "limit": "1" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 2 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-54", - "query": { - "limit": "-1" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 2 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-55", - "query": { - "limit": "2.9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 3 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-56", - "query": { - "limit": "-0.1" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 2 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-57", - "query": { - "limit": "0.1" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-58", - "query": { - "limit": "100" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 101 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-59", - "query": { - "limit": "101" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 101 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-60", - "query": { - "limit": "999999999999999999999999" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 101 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-61", - "query": { - "limit": "1e2" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 101 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-62", - "query": { - "limit": "1e-2" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-63", - "query": { - "limit": "1e999" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 101 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-64", - "query": { - "limit": "-1e999" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 2 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-65", - "query": { - "limit": "1e-9999" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-66", - "query": { - "limit": "0x2" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 3 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-67", - "query": { - "limit": "0Xff" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 101 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-68", - "query": { - "limit": "0x" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-69", - "query": { - "limit": "0xgg" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-70", - "query": { - "limit": "0xfffffffffffffffffffffffffffff" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 101 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-71", - "query": { - "limit": "0xffffz" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-72", - "query": { - "limit": "0b10" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 3 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-73", - "query": { - "limit": "0B101" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 6 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-74", - "query": { - "limit": "0b12" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-75", - "query": { - "limit": "0o10" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 9 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-76", - "query": { - "limit": "0O10" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 9 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-77", - "query": { - "limit": "0o8" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-78", - "query": { - "limit": "-0x2" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-79", - "query": { - "limit": "+0x2" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-80", - "query": { - "limit": "Infinity" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 101 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-81", - "query": { - "limit": "+Infinity" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 101 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-82", - "query": { - "limit": "-Infinity" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 2 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-83", - "query": { - "limit": "Inf" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-84", - "query": { - "limit": "NaN" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-85", - "query": { - "limit": "true" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-86", - "query": { - "limit": "null" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-87", - "query": { - "limit": "1_0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-88", - "query": { - "limit": "0x1p2" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-89", - "query": { - "limit": ".5" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-90", - "query": { - "limit": "+.5" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-91", - "query": { - "limit": "1." - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 2 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-92", - "query": { - "limit": "01" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 2 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-93", - "query": { - "limit": "1e" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-94", - "query": { - "limit": "2suffix" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-95", - "query": { - "limit": "2" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 3 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-96", - "query": { - "limit": "…2…" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-97", - "query": { - "limit": "\n2\t" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 3 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-98", - "query": { - "sort": "_name", - "cursor": "eyJzb3J0IjoiX25hbWUiLCJ0eXBlIjoicmVwbyIsImlkIjoiMTExMTExMTExMTExMTExMTExMTExMTExIiwidmFsdWUiOiJhYmMifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$_anonymousId", - "" - ] - } - } - }, - { - "$set": { - "_sort": { - "$toLower": "$_sort" - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "abc" - } - }, - { - "_sort": "abc", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "abc", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-99", - "query": { - "sort": "_name", - "cursor": "eyJzb3J0IjoiX25hbWUiLCJ0eXBlIjoicmVwbyIsImlkIjoiMTExMTExMTExMTExMTExMTExMTExMTExIiwidmFsdWUiOjQyfQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$_anonymousId", - "" - ] - } - } - }, - { - "$set": { - "_sort": { - "$toLower": "$_sort" - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": 42 - } - }, - { - "_sort": 42, - "_type": { - "$gt": "repo" - } - }, - { - "_sort": 42, - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-100", - "query": { - "sort": "_name", - "cursor": "eyJzb3J0IjoiX25hbWUiLCJ0eXBlIjoicmVwbyIsImlkIjoiMTExMTExMTExMTExMTExMTExMTExMTExIiwidmFsdWUiOm51bGx9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-101", - "query": { - "sort": "_name", - "cursor": "eyJzb3J0IjoiX25hbWUiLCJ0eXBlIjoicmVwbyIsImlkIjoiMTExMTExMTExMTExMTExMTExMTExMTExIiwidmFsdWUiOnRydWV9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-102", - "query": { - "sort": "_name", - "cursor": "eyJzb3J0IjoiX25hbWUiLCJ0eXBlIjoicmVwbyIsImlkIjoiMTExMTExMTExMTExMTExMTExMTExMTExIiwidmFsdWUiOmZhbHNlfQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-103", - "query": { - "sort": "_name", - "cursor": "eyJzb3J0IjoiX25hbWUiLCJ0eXBlIjoicmVwbyIsImlkIjoiMTExMTExMTExMTExMTExMTExMTExMTExIiwidmFsdWUiOnt9fQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-104", - "query": { - "sort": "_name", - "cursor": "eyJzb3J0IjoiX25hbWUiLCJ0eXBlIjoicmVwbyIsImlkIjoiMTExMTExMTExMTExMTExMTExMTExMTExIiwidmFsdWUiOnsiJG5lIjpudWxsfX0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-105", - "query": { - "sort": "_name", - "cursor": "eyJzb3J0IjoiX25hbWUiLCJ0eXBlIjoicmVwbyIsImlkIjoiMTExMTExMTExMTExMTExMTExMTExMTExIiwidmFsdWUiOltdfQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-106", - "query": { - "sort": "_name", - "cursor": "eyJzb3J0IjoiX25hbWUiLCJ0eXBlIjoicmVwbyIsImlkIjoiMTExMTExMTExMTExMTExMTExMTExMTExIiwidmFsdWUiOlsiMjAyMC0wMS0wMiJdfQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-107", - "query": { - "sort": "_name", - "cursor": "eyJzb3J0IjoiX25hbWUiLCJ0eXBlIjoicmVwbyIsImlkIjoiMTExMTExMTExMTExMTExMTExMTExMTExIiwidmFsdWUiOiIyMDIwLTAxLTAyVDAzOjA0OjA1WiJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$_anonymousId", - "" - ] - } - } - }, - { - "$set": { - "_sort": { - "$toLower": "$_sort" - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2020-01-02T03:04:05Z" - } - }, - { - "_sort": "2020-01-02T03:04:05Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2020-01-02T03:04:05Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-108", - "query": { - "sort": "_name", - "cursor": "eyJzb3J0IjoiX25hbWUiLCJ0eXBlIjoicmVwbyIsImlkIjoiMTExMTExMTExMTExMTExMTExMTExMTExIiwidmFsdWUiOiIwMDAxLTAxLTAxIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$_anonymousId", - "" - ] - } - } - }, - { - "$set": { - "_sort": { - "$toLower": "$_sort" - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "0001-01-01" - } - }, - { - "_sort": "0001-01-01", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "0001-01-01", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-109", - "query": { - "sort": "_name", - "cursor": "eyJzb3J0IjoiX25hbWUiLCJ0eXBlIjoicmVwbyIsImlkIjoiMTExMTExMTExMTExMTExMTExMTExMTExIiwidmFsdWUiOjB9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$_anonymousId", - "" - ] - } - } - }, - { - "$set": { - "_sort": { - "$toLower": "$_sort" - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": 0 - } - }, - { - "_sort": 0, - "_type": { - "$gt": "repo" - } - }, - { - "_sort": 0, - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-110", - "query": { - "sort": "_name", - "cursor": "eyJzb3J0IjoiX25hbWUiLCJ0eXBlIjoicmVwbyIsImlkIjoiMTExMTExMTExMTExMTExMTExMTExMTExIiwidmFsdWUiOjg2NDAwMDAwMDAwMDAwMDF9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$_anonymousId", - "" - ] - } - } - }, - { - "$set": { - "_sort": { - "$toLower": "$_sort" - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": 8640000000000001 - } - }, - { - "_sort": 8640000000000001, - "_type": { - "$gt": "repo" - } - }, - { - "_sort": 8640000000000001, - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-111", - "query": { - "sort": "-pageView", - "cursor": "eyJzb3J0IjoiLXBhZ2VWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiYWJjIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$pageView", - 0 - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "abc" - } - }, - { - "_sort": "abc", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "abc", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-112", - "query": { - "sort": "-pageView", - "cursor": "eyJzb3J0IjoiLXBhZ2VWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjo0Mn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$pageView", - 0 - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": 42 - } - }, - { - "_sort": 42, - "_type": { - "$gt": "repo" - } - }, - { - "_sort": 42, - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-113", - "query": { - "sort": "-pageView", - "cursor": "eyJzb3J0IjoiLXBhZ2VWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjpudWxsfQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-114", - "query": { - "sort": "-pageView", - "cursor": "eyJzb3J0IjoiLXBhZ2VWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjp0cnVlfQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-115", - "query": { - "sort": "-pageView", - "cursor": "eyJzb3J0IjoiLXBhZ2VWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjpmYWxzZX0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-116", - "query": { - "sort": "-pageView", - "cursor": "eyJzb3J0IjoiLXBhZ2VWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjp7fX0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-117", - "query": { - "sort": "-pageView", - "cursor": "eyJzb3J0IjoiLXBhZ2VWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjp7IiRuZSI6bnVsbH19" - }, - "error": "invalid_cursor" - }, - { - "name": "case-118", - "query": { - "sort": "-pageView", - "cursor": "eyJzb3J0IjoiLXBhZ2VWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjpbXX0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-119", - "query": { - "sort": "-pageView", - "cursor": "eyJzb3J0IjoiLXBhZ2VWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjpbIjIwMjAtMDEtMDIiXX0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-120", - "query": { - "sort": "-pageView", - "cursor": "eyJzb3J0IjoiLXBhZ2VWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMC0wMS0wMlQwMzowNDowNVoifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$pageView", - 0 - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2020-01-02T03:04:05Z" - } - }, - { - "_sort": "2020-01-02T03:04:05Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2020-01-02T03:04:05Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-121", - "query": { - "sort": "-pageView", - "cursor": "eyJzb3J0IjoiLXBhZ2VWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$pageView", - 0 - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "0001-01-01" - } - }, - { - "_sort": "0001-01-01", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "0001-01-01", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-122", - "query": { - "sort": "-pageView", - "cursor": "eyJzb3J0IjoiLXBhZ2VWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjowfQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$pageView", - 0 - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": 0 - } - }, - { - "_sort": 0, - "_type": { - "$gt": "repo" - } - }, - { - "_sort": 0, - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-123", - "query": { - "sort": "-pageView", - "cursor": "eyJzb3J0IjoiLXBhZ2VWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjo4NjQwMDAwMDAwMDAwMDAxfQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$pageView", - 0 - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": 8640000000000001 - } - }, - { - "_sort": 8640000000000001, - "_type": { - "$gt": "repo" - } - }, - { - "_sort": 8640000000000001, - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-124", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6ImFiYyJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-125", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6NDJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1970-01-01T00:00:00.042Z" - } - }, - { - "_sort": "1970-01-01T00:00:00.042Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1970-01-01T00:00:00.042Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-126", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6bnVsbH0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1970-01-01T00:00:00.000Z" - } - }, - { - "_sort": "1970-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1970-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-127", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6dHJ1ZX0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1970-01-01T00:00:00.001Z" - } - }, - { - "_sort": "1970-01-01T00:00:00.001Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1970-01-01T00:00:00.001Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-128", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6ZmFsc2V9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1970-01-01T00:00:00.000Z" - } - }, - { - "_sort": "1970-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1970-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-129", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6e319" - }, - "error": "invalid_cursor" - }, - { - "name": "case-130", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6eyIkbmUiOm51bGx9fQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-131", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6W119" - }, - "error": "invalid_cursor" - }, - { - "name": "case-132", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6WyIyMDIwLTAxLTAyIl19" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2020-01-02T00:00:00.000Z" - } - }, - { - "_sort": "2020-01-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2020-01-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-133", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjAtMDEtMDJUMDM6MDQ6MDVaIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2020-01-02T03:04:05.000Z" - } - }, - { - "_sort": "2020-01-02T03:04:05.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2020-01-02T03:04:05.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-134", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "0001-01-01T00:00:00.000Z" - } - }, - { - "_sort": "0001-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "0001-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-135", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6MH0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1970-01-01T00:00:00.000Z" - } - }, - { - "_sort": "1970-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1970-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-136", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6ODY0MDAwMDAwMDAwMDAwMX0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-137", - "query": { - "sort": "_name", - "cursor": "eyJzb3J0IjoiX25hbWUiLCJ0eXBlIjoiIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6ImFiYyJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$_anonymousId", - "" - ] - } - } - }, - { - "$set": { - "_sort": { - "$toLower": "$_sort" - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "abc" - } - }, - { - "_sort": "abc", - "_type": { - "$gt": "" - } - }, - { - "_sort": "abc", - "_type": "", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-138", - "query": { - "sort": "_name", - "cursor": "eyJzb3J0IjoiX25hbWUiLCJ0eXBlIjoib3RoZXItZm9yZ2UiLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiYWJjIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$_anonymousId", - "" - ] - } - } - }, - { - "$set": { - "_sort": { - "$toLower": "$_sort" - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "abc" - } - }, - { - "_sort": "abc", - "_type": { - "$gt": "other-forge" - } - }, - { - "_sort": "abc", - "_type": "other-forge", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-139", - "query": { - "sort": "_name", - "cursor": "eyJzb3J0IjoiX25hbWUiLCJ0eXBlIjpmYWxzZSwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6ImFiYyJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-140", - "query": { - "sort": "_name", - "cursor": "eyJzb3J0IjoiX25hbWUiLCJ0eXBlIjp7fSwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6ImFiYyJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-141", - "query": { - "sort": "_name", - "cursor": "eyJzb3J0IjoiX25hbWUiLCJ0eXBlIjpbInJlcG8iXSwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6ImFiYyJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-142", - "query": { - "sort": "_name", - "cursor": "eyJzb3J0Ijoid3JvbmciLCJ0eXBlIjoicmVwbyIsImlkIjoiMTExMTExMTExMTExMTExMTExMTExMTExIiwidmFsdWUiOiJhYmMifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-143", - "query": { - "sort": "_name", - "cursor": "eyJzb3J0IjoiX25hbWUiLCJ0eXBlIjoicmVwbyIsImlkIjoiYmFkIiwidmFsdWUiOiJhYmMifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-144", - "query": { - "sort": "_name", - "cursor": "eyJzb3J0IjoiX25hbWUiLCJ0eXBlIjpudWxsLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiYWJjIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-145", - "query": { - "sort": "_name", - "cursor": "eyJzb3J0IjoiX25hbWUiLCJ0eXBlIjoicmVwbyIsImlkIjoiMTExMTExMTExMTExMTExMTExMTExMTExIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-146", - "query": { - "sort": "_name", - "cursor": "eyJzb3J0IjoiX25hbWUiLCJ0eXBlIjoicmVwbyIsImlkIjoiMTExMTExMTExMTExMTExMTExMTExMTExIiwidmFsdWUiOiJ0ZXh0In0=" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$_anonymousId", - "" - ] - } - } - }, - { - "$set": { - "_sort": { - "$toLower": "$_sort" - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "text" - } - }, - { - "_sort": "text", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "text", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-147", - "query": { - "sort": "_name", - "cursor": " \neyJzb3J0IjoiX25hbWUiLCJ0eXBlIjoicmVwbyIsImlkIjoiMTExMTExMTExMTExMTExMTExMTExMTExIiwidmFsdWUiOiJ0ZXh0In0\n" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$_anonymousId", - "" - ] - } - } - }, - { - "$set": { - "_sort": { - "$toLower": "$_sort" - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "text" - } - }, - { - "_sort": "text", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "text", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-148", - "query": { - "sort": "_name", - "cursor": "eyJzb3J0IjoiX25hbWUiLCJ0eXBlIjoicmVwbyIsImlkIjoiMTExMTExMTExMTExMTExMTExMTExMTExIiwidmFsdWUiOiJ0ZXh0In0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$_anonymousId", - "" - ] - } - } - }, - { - "$set": { - "_sort": { - "$toLower": "$_sort" - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "text" - } - }, - { - "_sort": "text", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "text", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-149", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IiJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-150", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6ImludmFsaWQifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-151", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "0000-01-01T00:00:00.000Z" - } - }, - { - "_sort": "0000-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "0000-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-152", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "0001-01-01T00:00:00.000Z" - } - }, - { - "_sort": "0001-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "0001-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-153", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-154", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDIifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-02-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-155", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjkifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-01T00:00:00.000Z" - } - }, - { - "_sort": "2023-03-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-156", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-157", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzEifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-02T00:00:00.000Z" - } - }, - { - "_sort": "2024-03-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-158", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzIifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-159", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDAtMDEifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-160", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMTMtMDEifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-161", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-162", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDEifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-163", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjRUMDA6MDAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-164", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDJUMDA6MDAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-02-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-165", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDF0MDA6MDB6In0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-166", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IiAyMDI0LTAxLTAxICJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-167", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDFUMDA6MDBaICJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-168", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDFUMDA6MDBaXHUwMDAwaWdub3JlZCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-169", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IiswMTAwMDAtMDEtMDEifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "+010000-01-01T00:00:00.000Z" - } - }, - { - "_sort": "+010000-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "+010000-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-170", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDEtMDEtMDEifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "-000001-01-01T00:00:00.000Z" - } - }, - { - "_sort": "-000001-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "-000001-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-171", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDEtMDEifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2001-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-172", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IisyNzU3NjAtMDktMTMifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "+275760-09-13T00:00:00.000Z" - } - }, - { - "_sort": "+275760-09-13T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "+275760-09-13T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-173", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IisyNzU3NjAtMDktMTQifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-174", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0yNzE4MjEtMDQtMjAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "-271821-04-20T00:00:00.000Z" - } - }, - { - "_sort": "-271821-04-20T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "-271821-04-20T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-175", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0yNzE4MjEtMDQtMTkifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-176", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMDA6MDBaIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T00:00:00.000Z" - } - }, - { - "_sort": "2024-02-29T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-177", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMDA6MDArMDI6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-28T21:30:00.000Z" - } - }, - { - "_sort": "2024-02-28T21:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-28T21:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-178", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMDA6MDAtMDMzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T03:30:00.000Z" - } - }, - { - "_sort": "2024-02-29T03:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T03:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-179", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMDA6MDAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T00:00:00.000Z" - } - }, - { - "_sort": "2024-02-29T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-180", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6MzQ6NTZaIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T12:34:56.000Z" - } - }, - { - "_sort": "2024-02-29T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-181", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6MzQ6NTYrMDI6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T10:04:56.000Z" - } - }, - { - "_sort": "2024-02-29T10:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T10:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-182", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6MzQ6NTYtMDMzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T16:04:56.000Z" - } - }, - { - "_sort": "2024-02-29T16:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T16:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-183", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6MzQ6NTYifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T12:34:56.000Z" - } - }, - { - "_sort": "2024-02-29T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-184", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6MzQ6NTYuMVoifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T12:34:56.100Z" - } - }, - { - "_sort": "2024-02-29T12:34:56.100Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T12:34:56.100Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-185", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6MzQ6NTYuMSswMjozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T10:04:56.100Z" - } - }, - { - "_sort": "2024-02-29T10:04:56.100Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T10:04:56.100Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-186", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6MzQ6NTYuMS0wMzMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T16:04:56.100Z" - } - }, - { - "_sort": "2024-02-29T16:04:56.100Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T16:04:56.100Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-187", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6MzQ6NTYuMSJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T12:34:56.100Z" - } - }, - { - "_sort": "2024-02-29T12:34:56.100Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T12:34:56.100Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-188", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6MzQ6NTYuMTIzNDU2Nzg5WiJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T12:34:56.123Z" - } - }, - { - "_sort": "2024-02-29T12:34:56.123Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T12:34:56.123Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-189", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6MzQ6NTYuMTIzNDU2Nzg5KzAyOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T10:04:56.123Z" - } - }, - { - "_sort": "2024-02-29T10:04:56.123Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T10:04:56.123Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-190", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6MzQ6NTYuMTIzNDU2Nzg5LTAzMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T16:04:56.123Z" - } - }, - { - "_sort": "2024-02-29T16:04:56.123Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T16:04:56.123Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-191", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6MzQ6NTYuMTIzNDU2Nzg5In0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T12:34:56.123Z" - } - }, - { - "_sort": "2024-02-29T12:34:56.123Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T12:34:56.123Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-192", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMjQ6MDBaIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-193", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMjQ6MDArMDI6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T21:30:00.000Z" - } - }, - { - "_sort": "2024-02-29T21:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T21:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-194", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMjQ6MDAtMDMzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-01T03:30:00.000Z" - } - }, - { - "_sort": "2024-03-01T03:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T03:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-195", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMjQ6MDAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-196", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMjQ6MDA6MDAuMDAxWiJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-197", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMjQ6MDA6MDAuMDAxKzAyOjMwIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-198", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMjQ6MDA6MDAuMDAxLTAzMzAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-199", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMjQ6MDA6MDAuMDAxIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-200", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMjU6MDBaIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-201", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMjU6MDArMDI6MzAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-202", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMjU6MDAtMDMzMCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-203", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMjU6MDAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-204", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6NjBaIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-205", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6NjArMDI6MzAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-206", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6NjAtMDMzMCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-207", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6NjAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-208", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6MzQ6NjBaIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-209", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6MzQ6NjArMDI6MzAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-210", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6MzQ6NjAtMDMzMCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-211", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6MzQ6NjAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-212", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMDA6MDBaIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-01T00:00:00.000Z" - } - }, - { - "_sort": "2023-03-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-213", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMDA6MDArMDI6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-02-28T21:30:00.000Z" - } - }, - { - "_sort": "2023-02-28T21:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-02-28T21:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-214", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMDA6MDAtMDMzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-01T03:30:00.000Z" - } - }, - { - "_sort": "2023-03-01T03:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-01T03:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-215", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMDA6MDAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-01T00:00:00.000Z" - } - }, - { - "_sort": "2023-03-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-216", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6MzQ6NTZaIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-01T12:34:56.000Z" - } - }, - { - "_sort": "2023-03-01T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-01T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-217", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6MzQ6NTYrMDI6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-01T10:04:56.000Z" - } - }, - { - "_sort": "2023-03-01T10:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-01T10:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-218", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6MzQ6NTYtMDMzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-01T16:04:56.000Z" - } - }, - { - "_sort": "2023-03-01T16:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-01T16:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-219", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6MzQ6NTYifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-01T12:34:56.000Z" - } - }, - { - "_sort": "2023-03-01T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-01T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-220", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6MzQ6NTYuMVoifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-01T12:34:56.100Z" - } - }, - { - "_sort": "2023-03-01T12:34:56.100Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-01T12:34:56.100Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-221", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6MzQ6NTYuMSswMjozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-01T10:04:56.100Z" - } - }, - { - "_sort": "2023-03-01T10:04:56.100Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-01T10:04:56.100Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-222", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6MzQ6NTYuMS0wMzMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-01T16:04:56.100Z" - } - }, - { - "_sort": "2023-03-01T16:04:56.100Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-01T16:04:56.100Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-223", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6MzQ6NTYuMSJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-01T12:34:56.100Z" - } - }, - { - "_sort": "2023-03-01T12:34:56.100Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-01T12:34:56.100Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-224", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6MzQ6NTYuMTIzNDU2Nzg5WiJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-01T12:34:56.123Z" - } - }, - { - "_sort": "2023-03-01T12:34:56.123Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-01T12:34:56.123Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-225", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6MzQ6NTYuMTIzNDU2Nzg5KzAyOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-01T10:04:56.123Z" - } - }, - { - "_sort": "2023-03-01T10:04:56.123Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-01T10:04:56.123Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-226", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6MzQ6NTYuMTIzNDU2Nzg5LTAzMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-01T16:04:56.123Z" - } - }, - { - "_sort": "2023-03-01T16:04:56.123Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-01T16:04:56.123Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-227", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6MzQ6NTYuMTIzNDU2Nzg5In0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-01T12:34:56.123Z" - } - }, - { - "_sort": "2023-03-01T12:34:56.123Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-01T12:34:56.123Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-228", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMjQ6MDBaIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T00:00:00.000Z" - } - }, - { - "_sort": "2023-03-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-229", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMjQ6MDArMDI6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-01T21:30:00.000Z" - } - }, - { - "_sort": "2023-03-01T21:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-01T21:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-230", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMjQ6MDAtMDMzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T03:30:00.000Z" - } - }, - { - "_sort": "2023-03-02T03:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T03:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-231", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMjQ6MDAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T00:00:00.000Z" - } - }, - { - "_sort": "2023-03-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-232", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMjQ6MDA6MDAuMDAxWiJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-233", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMjQ6MDA6MDAuMDAxKzAyOjMwIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-234", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMjQ6MDA6MDAuMDAxLTAzMzAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-235", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMjQ6MDA6MDAuMDAxIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-236", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMjU6MDBaIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-237", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMjU6MDArMDI6MzAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-238", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMjU6MDAtMDMzMCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-239", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMjU6MDAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-240", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6NjBaIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-241", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6NjArMDI6MzAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-242", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6NjAtMDMzMCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-243", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6NjAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-244", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6MzQ6NjBaIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-245", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6MzQ6NjArMDI6MzAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-246", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6MzQ6NjAtMDMzMCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-247", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6MzQ6NjAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-248", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMDA6MDBaIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-249", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMDA6MDArMDI6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T21:30:00.000Z" - } - }, - { - "_sort": "2024-02-29T21:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T21:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-250", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMDA6MDAtMDMzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-01T03:30:00.000Z" - } - }, - { - "_sort": "2024-03-01T03:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T03:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-251", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMDA6MDAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-252", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6MzQ6NTZaIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-01T12:34:56.000Z" - } - }, - { - "_sort": "2024-03-01T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-253", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6MzQ6NTYrMDI6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-01T10:04:56.000Z" - } - }, - { - "_sort": "2024-03-01T10:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T10:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-254", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6MzQ6NTYtMDMzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-01T16:04:56.000Z" - } - }, - { - "_sort": "2024-03-01T16:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T16:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-255", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6MzQ6NTYifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-01T12:34:56.000Z" - } - }, - { - "_sort": "2024-03-01T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-256", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6MzQ6NTYuMVoifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-01T12:34:56.100Z" - } - }, - { - "_sort": "2024-03-01T12:34:56.100Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T12:34:56.100Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-257", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6MzQ6NTYuMSswMjozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-01T10:04:56.100Z" - } - }, - { - "_sort": "2024-03-01T10:04:56.100Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T10:04:56.100Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-258", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6MzQ6NTYuMS0wMzMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-01T16:04:56.100Z" - } - }, - { - "_sort": "2024-03-01T16:04:56.100Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T16:04:56.100Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-259", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6MzQ6NTYuMSJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-01T12:34:56.100Z" - } - }, - { - "_sort": "2024-03-01T12:34:56.100Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T12:34:56.100Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-260", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6MzQ6NTYuMTIzNDU2Nzg5WiJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-01T12:34:56.123Z" - } - }, - { - "_sort": "2024-03-01T12:34:56.123Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T12:34:56.123Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-261", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6MzQ6NTYuMTIzNDU2Nzg5KzAyOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-01T10:04:56.123Z" - } - }, - { - "_sort": "2024-03-01T10:04:56.123Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T10:04:56.123Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-262", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6MzQ6NTYuMTIzNDU2Nzg5LTAzMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-01T16:04:56.123Z" - } - }, - { - "_sort": "2024-03-01T16:04:56.123Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T16:04:56.123Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-263", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6MzQ6NTYuMTIzNDU2Nzg5In0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-01T12:34:56.123Z" - } - }, - { - "_sort": "2024-03-01T12:34:56.123Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T12:34:56.123Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-264", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMjQ6MDBaIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-02T00:00:00.000Z" - } - }, - { - "_sort": "2024-03-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-265", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMjQ6MDArMDI6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-01T21:30:00.000Z" - } - }, - { - "_sort": "2024-03-01T21:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T21:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-266", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMjQ6MDAtMDMzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-02T03:30:00.000Z" - } - }, - { - "_sort": "2024-03-02T03:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-02T03:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-267", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMjQ6MDAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-02T00:00:00.000Z" - } - }, - { - "_sort": "2024-03-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-268", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMjQ6MDA6MDAuMDAxWiJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-269", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMjQ6MDA6MDAuMDAxKzAyOjMwIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-270", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMjQ6MDA6MDAuMDAxLTAzMzAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-271", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMjQ6MDA6MDAuMDAxIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-272", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMjU6MDBaIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-273", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMjU6MDArMDI6MzAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-274", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMjU6MDAtMDMzMCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-275", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMjU6MDAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-276", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6NjBaIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-277", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6NjArMDI6MzAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-278", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6NjAtMDMzMCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-279", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6NjAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-280", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6MzQ6NjBaIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-281", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6MzQ6NjArMDI6MzAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-282", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6MzQ6NjAtMDMzMCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-283", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6MzQ6NjAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-284", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2000-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2000-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2000-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-285", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjEifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2001-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-286", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjEyIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-12-01T00:00:00.000Z" - } - }, - { - "_sort": "2001-12-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-12-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-287", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjEzIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-288", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMxIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-289", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2032-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-290", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjQ5In0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2049-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-291", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1950-01-01T00:00:00.000Z" - } - }, - { - "_sort": "1950-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1950-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-292", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ijk5In0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-01-01T00:00:00.000Z" - } - }, - { - "_sort": "1999-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-293", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjEwMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "0100-01-01T00:00:00.000Z" - } - }, - { - "_sort": "0100-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "0100-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-294", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDAwMC0wMS0wMSJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2000-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2000-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2000-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-295", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T00:00:00.000Z" - } - }, - { - "_sort": "2001-02-03T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-296", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDEtMDFUMDA6MDBaIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-297", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjEvMi8wMyJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-02T00:00:00.000Z" - } - }, - { - "_sort": "2003-01-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-298", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQvMDIvMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-299", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQuMDIuMjkifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T00:00:00.000Z" - } - }, - { - "_sort": "2024-02-29T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-300", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1In0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-05T00:00:00.000Z" - } - }, - { - "_sort": "2001-01-05T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-301", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgSmFudWFyeSAyMDI0In0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-05T00:00:00.000Z" - } - }, - { - "_sort": "2024-01-05T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-05T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-302", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IlR1ZSwgMDUgTWFyIDIwMjQgMTI6MzQ6NTYgR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-05T12:34:56.000Z" - } - }, - { - "_sort": "2024-03-05T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-05T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-303", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ik1hcmNoIDUsIDIwMjQgMTI6MzAgUE0ifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-05T12:30:00.000Z" - } - }, - { - "_sort": "2024-03-05T12:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-05T12:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-304", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDEgMTI6MzQ6NTYifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-01T12:34:56.000Z" - } - }, - { - "_sort": "2024-01-01T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-01T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-305", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDEgMTI6MzQ6NTYuMTIzNCBHTVQrMDIwMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-01T10:34:56.123Z" - } - }, - { - "_sort": "2024-01-01T10:34:56.123Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-01T10:34:56.123Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-306", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDEgKGNvbW1lbnQpIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-307", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Iihjb21tZW50KSAyMDI0LTAxLTAxIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-308", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6ImdhcmJhZ2UgMjAyNC0wMS0wMSJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-309", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6ImdhcmJhZ2UyMDI0LTAxLTAxIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-310", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDEgZ2FyYmFnZSJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-311", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDEgR01ULTgifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-01T08:00:00.000Z" - } - }, - { - "_sort": "2024-01-01T08:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-01T08:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-312", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDEgMTI6OjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-01T12:00:30.000Z" - } - }, - { - "_sort": "2024-01-01T12:00:30.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-01T12:00:30.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-313", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDEgMTI6MzA6NDAgRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-01T17:30:40.000Z" - } - }, - { - "_sort": "2024-01-01T17:30:40.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-01T17:30:40.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-314", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ijk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OSJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-315", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T00:00:00.000Z" - } - }, - { - "_sort": "2024-02-29T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-316", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T00:00:00.000Z" - } - }, - { - "_sort": "2024-02-29T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-317", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-28T22:30:00.000Z" - } - }, - { - "_sort": "2024-02-28T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-28T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-318", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T05:00:00.000Z" - } - }, - { - "_sort": "2024-02-29T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-319", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgKzAxMzAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-320", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MzQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T12:34:00.000Z" - } - }, - { - "_sort": "2024-02-29T12:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T12:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-321", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MzQgR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T12:34:00.000Z" - } - }, - { - "_sort": "2024-02-29T12:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T12:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-322", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MzQgVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T11:04:00.000Z" - } - }, - { - "_sort": "2024-02-29T11:04:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T11:04:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-323", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MzQgRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T17:34:00.000Z" - } - }, - { - "_sort": "2024-02-29T17:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T17:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-324", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MzQgKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T11:04:00.000Z" - } - }, - { - "_sort": "2024-02-29T11:04:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T11:04:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-325", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MzQ6NTYuMDAwMTIzIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T12:34:56.000Z" - } - }, - { - "_sort": "2024-02-29T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-326", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MzQ6NTYuMDAwMTIzIEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T12:34:56.000Z" - } - }, - { - "_sort": "2024-02-29T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-327", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MzQ6NTYuMDAwMTIzIFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T11:04:56.000Z" - } - }, - { - "_sort": "2024-02-29T11:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T11:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-328", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MzQ6NTYuMDAwMTIzIEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T17:34:56.000Z" - } - }, - { - "_sort": "2024-02-29T17:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T17:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-329", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MzQ6NTYuMDAwMTIzICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T11:04:56.000Z" - } - }, - { - "_sort": "2024-02-29T11:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T11:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-330", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5In0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T12:34:56.999Z" - } - }, - { - "_sort": "2024-02-29T12:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T12:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-331", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T12:34:56.999Z" - } - }, - { - "_sort": "2024-02-29T12:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T12:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-332", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T11:04:56.999Z" - } - }, - { - "_sort": "2024-02-29T11:04:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T11:04:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-333", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T17:34:56.999Z" - } - }, - { - "_sort": "2024-02-29T17:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T17:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-334", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5ICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T11:04:56.999Z" - } - }, - { - "_sort": "2024-02-29T11:04:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T11:04:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-335", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMjQ6MDAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-336", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMjQ6MDAgR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-337", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMjQ6MDAgVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T22:30:00.000Z" - } - }, - { - "_sort": "2024-02-29T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-338", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMjQ6MDAgRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-01T05:00:00.000Z" - } - }, - { - "_sort": "2024-03-01T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-339", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMjQ6MDAgKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T22:30:00.000Z" - } - }, - { - "_sort": "2024-02-29T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-340", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MDAgQU0ifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T00:00:00.000Z" - } - }, - { - "_sort": "2024-02-29T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-341", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MDAgQU0gR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T00:00:00.000Z" - } - }, - { - "_sort": "2024-02-29T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-342", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MDAgQU0gVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-28T22:30:00.000Z" - } - }, - { - "_sort": "2024-02-28T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-28T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-343", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MDAgQU0gRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T05:00:00.000Z" - } - }, - { - "_sort": "2024-02-29T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-344", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MDAgQU0gKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-28T22:30:00.000Z" - } - }, - { - "_sort": "2024-02-28T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-28T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-345", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MDAgUE0ifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T12:00:00.000Z" - } - }, - { - "_sort": "2024-02-29T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-346", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MDAgUE0gR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T12:00:00.000Z" - } - }, - { - "_sort": "2024-02-29T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-347", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MDAgUE0gVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T10:30:00.000Z" - } - }, - { - "_sort": "2024-02-29T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-348", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MDAgUE0gRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T17:00:00.000Z" - } - }, - { - "_sort": "2024-02-29T17:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T17:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-349", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MDAgUE0gKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T10:30:00.000Z" - } - }, - { - "_sort": "2024-02-29T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-350", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMDowMCBQTSJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T12:00:00.000Z" - } - }, - { - "_sort": "2024-02-29T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-351", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMDowMCBQTSBHTVQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T12:00:00.000Z" - } - }, - { - "_sort": "2024-02-29T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-352", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMDowMCBQTSBVVEMrMDE6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T10:30:00.000Z" - } - }, - { - "_sort": "2024-02-29T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-353", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMDowMCBQTSBFU1QifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T17:00:00.000Z" - } - }, - { - "_sort": "2024-02-29T17:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T17:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-354", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMDowMCBQTSArMDEzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T10:30:00.000Z" - } - }, - { - "_sort": "2024-02-29T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-355", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTM6MDAgUE0ifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-356", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTM6MDAgUE0gR01UIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-357", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTM6MDAgUE0gVVRDKzAxOjMwIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-358", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTM6MDAgUE0gRVNUIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-359", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTM6MDAgUE0gKzAxMzAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-360", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T00:00:00.000Z" - } - }, - { - "_sort": "2023-03-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-361", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T00:00:00.000Z" - } - }, - { - "_sort": "2023-03-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-362", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-01T22:30:00.000Z" - } - }, - { - "_sort": "2023-03-01T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-01T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-363", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T05:00:00.000Z" - } - }, - { - "_sort": "2023-03-02T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-364", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgKzAxMzAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-365", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MzQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T12:34:00.000Z" - } - }, - { - "_sort": "2023-03-02T12:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T12:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-366", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MzQgR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T12:34:00.000Z" - } - }, - { - "_sort": "2023-03-02T12:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T12:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-367", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MzQgVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T11:04:00.000Z" - } - }, - { - "_sort": "2023-03-02T11:04:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T11:04:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-368", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MzQgRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T17:34:00.000Z" - } - }, - { - "_sort": "2023-03-02T17:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T17:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-369", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MzQgKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T11:04:00.000Z" - } - }, - { - "_sort": "2023-03-02T11:04:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T11:04:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-370", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MzQ6NTYuMDAwMTIzIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T12:34:56.000Z" - } - }, - { - "_sort": "2023-03-02T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-371", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MzQ6NTYuMDAwMTIzIEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T12:34:56.000Z" - } - }, - { - "_sort": "2023-03-02T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-372", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MzQ6NTYuMDAwMTIzIFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T11:04:56.000Z" - } - }, - { - "_sort": "2023-03-02T11:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T11:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-373", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MzQ6NTYuMDAwMTIzIEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T17:34:56.000Z" - } - }, - { - "_sort": "2023-03-02T17:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T17:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-374", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MzQ6NTYuMDAwMTIzICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T11:04:56.000Z" - } - }, - { - "_sort": "2023-03-02T11:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T11:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-375", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5In0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T12:34:56.999Z" - } - }, - { - "_sort": "2023-03-02T12:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T12:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-376", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T12:34:56.999Z" - } - }, - { - "_sort": "2023-03-02T12:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T12:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-377", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T11:04:56.999Z" - } - }, - { - "_sort": "2023-03-02T11:04:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T11:04:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-378", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T17:34:56.999Z" - } - }, - { - "_sort": "2023-03-02T17:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T17:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-379", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5ICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T11:04:56.999Z" - } - }, - { - "_sort": "2023-03-02T11:04:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T11:04:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-380", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMjQ6MDAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-03T00:00:00.000Z" - } - }, - { - "_sort": "2023-03-03T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-03T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-381", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMjQ6MDAgR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-03T00:00:00.000Z" - } - }, - { - "_sort": "2023-03-03T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-03T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-382", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMjQ6MDAgVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T22:30:00.000Z" - } - }, - { - "_sort": "2023-03-02T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-383", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMjQ6MDAgRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-03T05:00:00.000Z" - } - }, - { - "_sort": "2023-03-03T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-03T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-384", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMjQ6MDAgKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T22:30:00.000Z" - } - }, - { - "_sort": "2023-03-02T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-385", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MDAgQU0ifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T00:00:00.000Z" - } - }, - { - "_sort": "2023-03-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-386", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MDAgQU0gR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T00:00:00.000Z" - } - }, - { - "_sort": "2023-03-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-387", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MDAgQU0gVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-01T22:30:00.000Z" - } - }, - { - "_sort": "2023-03-01T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-01T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-388", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MDAgQU0gRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T05:00:00.000Z" - } - }, - { - "_sort": "2023-03-02T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-389", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MDAgQU0gKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-01T22:30:00.000Z" - } - }, - { - "_sort": "2023-03-01T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-01T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-390", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MDAgUE0ifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T12:00:00.000Z" - } - }, - { - "_sort": "2023-03-02T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-391", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MDAgUE0gR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T12:00:00.000Z" - } - }, - { - "_sort": "2023-03-02T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-392", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MDAgUE0gVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T10:30:00.000Z" - } - }, - { - "_sort": "2023-03-02T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-393", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MDAgUE0gRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T17:00:00.000Z" - } - }, - { - "_sort": "2023-03-02T17:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T17:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-394", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MDAgUE0gKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T10:30:00.000Z" - } - }, - { - "_sort": "2023-03-02T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-395", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMDowMCBQTSJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T12:00:00.000Z" - } - }, - { - "_sort": "2023-03-02T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-396", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMDowMCBQTSBHTVQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T12:00:00.000Z" - } - }, - { - "_sort": "2023-03-02T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-397", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMDowMCBQTSBVVEMrMDE6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T10:30:00.000Z" - } - }, - { - "_sort": "2023-03-02T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-398", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMDowMCBQTSBFU1QifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T17:00:00.000Z" - } - }, - { - "_sort": "2023-03-02T17:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T17:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-399", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMDowMCBQTSArMDEzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T10:30:00.000Z" - } - }, - { - "_sort": "2023-03-02T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-400", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTM6MDAgUE0ifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-401", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTM6MDAgUE0gR01UIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-402", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTM6MDAgUE0gVVRDKzAxOjMwIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-403", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTM6MDAgUE0gRVNUIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-404", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTM6MDAgUE0gKzAxMzAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-405", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "0001-01-01T00:00:00.000Z" - } - }, - { - "_sort": "0001-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "0001-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-406", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2001-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-407", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2000-12-31T22:30:00.000Z" - } - }, - { - "_sort": "2000-12-31T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2000-12-31T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-408", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-01T05:00:00.000Z" - } - }, - { - "_sort": "2001-01-01T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-409", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgKzAxMzAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-410", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MzQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-01T12:34:00.000Z" - } - }, - { - "_sort": "2001-01-01T12:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T12:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-411", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MzQgR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-01T12:34:00.000Z" - } - }, - { - "_sort": "2001-01-01T12:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T12:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-412", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MzQgVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-01T11:04:00.000Z" - } - }, - { - "_sort": "2001-01-01T11:04:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T11:04:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-413", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MzQgRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-01T17:34:00.000Z" - } - }, - { - "_sort": "2001-01-01T17:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T17:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-414", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MzQgKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-01T11:04:00.000Z" - } - }, - { - "_sort": "2001-01-01T11:04:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T11:04:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-415", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MzQ6NTYuMDAwMTIzIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-01T12:34:56.000Z" - } - }, - { - "_sort": "2001-01-01T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-416", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MzQ6NTYuMDAwMTIzIEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-01T12:34:56.000Z" - } - }, - { - "_sort": "2001-01-01T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-417", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MzQ6NTYuMDAwMTIzIFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-01T11:04:56.000Z" - } - }, - { - "_sort": "2001-01-01T11:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T11:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-418", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MzQ6NTYuMDAwMTIzIEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-01T17:34:56.000Z" - } - }, - { - "_sort": "2001-01-01T17:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T17:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-419", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MzQ6NTYuMDAwMTIzICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-01T11:04:56.000Z" - } - }, - { - "_sort": "2001-01-01T11:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T11:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-420", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5In0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-01T12:34:56.999Z" - } - }, - { - "_sort": "2001-01-01T12:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T12:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-421", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-01T12:34:56.999Z" - } - }, - { - "_sort": "2001-01-01T12:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T12:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-422", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-01T11:04:56.999Z" - } - }, - { - "_sort": "2001-01-01T11:04:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T11:04:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-423", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-01T17:34:56.999Z" - } - }, - { - "_sort": "2001-01-01T17:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T17:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-424", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5ICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-01T11:04:56.999Z" - } - }, - { - "_sort": "2001-01-01T11:04:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T11:04:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-425", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMjQ6MDAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-02T00:00:00.000Z" - } - }, - { - "_sort": "2001-01-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-426", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMjQ6MDAgR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-02T00:00:00.000Z" - } - }, - { - "_sort": "2001-01-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-427", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMjQ6MDAgVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-01T22:30:00.000Z" - } - }, - { - "_sort": "2001-01-01T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-428", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMjQ6MDAgRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-02T05:00:00.000Z" - } - }, - { - "_sort": "2001-01-02T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-02T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-429", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMjQ6MDAgKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-01T22:30:00.000Z" - } - }, - { - "_sort": "2001-01-01T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-430", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MDAgQU0ifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2001-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-431", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MDAgQU0gR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2001-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-432", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MDAgQU0gVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2000-12-31T22:30:00.000Z" - } - }, - { - "_sort": "2000-12-31T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2000-12-31T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-433", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MDAgQU0gRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-01T05:00:00.000Z" - } - }, - { - "_sort": "2001-01-01T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-434", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MDAgQU0gKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2000-12-31T22:30:00.000Z" - } - }, - { - "_sort": "2000-12-31T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2000-12-31T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-435", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MDAgUE0ifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-01T12:00:00.000Z" - } - }, - { - "_sort": "2001-01-01T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-436", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MDAgUE0gR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-01T12:00:00.000Z" - } - }, - { - "_sort": "2001-01-01T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-437", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MDAgUE0gVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-01T10:30:00.000Z" - } - }, - { - "_sort": "2001-01-01T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-438", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MDAgUE0gRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-01T17:00:00.000Z" - } - }, - { - "_sort": "2001-01-01T17:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T17:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-439", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MDAgUE0gKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-01T10:30:00.000Z" - } - }, - { - "_sort": "2001-01-01T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-440", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMDowMCBQTSJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-01T12:00:00.000Z" - } - }, - { - "_sort": "2001-01-01T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-441", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMDowMCBQTSBHTVQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-01T12:00:00.000Z" - } - }, - { - "_sort": "2001-01-01T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-442", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMDowMCBQTSBVVEMrMDE6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-01T10:30:00.000Z" - } - }, - { - "_sort": "2001-01-01T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-443", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMDowMCBQTSBFU1QifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-01T17:00:00.000Z" - } - }, - { - "_sort": "2001-01-01T17:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T17:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-444", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMDowMCBQTSArMDEzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-01T10:30:00.000Z" - } - }, - { - "_sort": "2001-01-01T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-445", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTM6MDAgUE0ifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-446", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTM6MDAgUE0gR01UIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-447", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTM6MDAgUE0gVVRDKzAxOjMwIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-448", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTM6MDAgUE0gRVNUIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-449", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTM6MDAgUE0gKzAxMzAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-450", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T00:00:00.000Z" - } - }, - { - "_sort": "2001-02-03T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-451", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T00:00:00.000Z" - } - }, - { - "_sort": "2001-02-03T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-452", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-02T22:30:00.000Z" - } - }, - { - "_sort": "2001-02-02T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-02T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-453", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T05:00:00.000Z" - } - }, - { - "_sort": "2001-02-03T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-454", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgKzAxMzAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-455", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MzQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T12:34:00.000Z" - } - }, - { - "_sort": "2001-02-03T12:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T12:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-456", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MzQgR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T12:34:00.000Z" - } - }, - { - "_sort": "2001-02-03T12:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T12:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-457", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MzQgVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T11:04:00.000Z" - } - }, - { - "_sort": "2001-02-03T11:04:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T11:04:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-458", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MzQgRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T17:34:00.000Z" - } - }, - { - "_sort": "2001-02-03T17:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T17:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-459", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MzQgKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T11:04:00.000Z" - } - }, - { - "_sort": "2001-02-03T11:04:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T11:04:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-460", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MzQ6NTYuMDAwMTIzIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T12:34:56.000Z" - } - }, - { - "_sort": "2001-02-03T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-461", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MzQ6NTYuMDAwMTIzIEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T12:34:56.000Z" - } - }, - { - "_sort": "2001-02-03T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-462", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MzQ6NTYuMDAwMTIzIFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T11:04:56.000Z" - } - }, - { - "_sort": "2001-02-03T11:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T11:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-463", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MzQ6NTYuMDAwMTIzIEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T17:34:56.000Z" - } - }, - { - "_sort": "2001-02-03T17:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T17:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-464", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MzQ6NTYuMDAwMTIzICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T11:04:56.000Z" - } - }, - { - "_sort": "2001-02-03T11:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T11:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-465", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5In0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T12:34:56.999Z" - } - }, - { - "_sort": "2001-02-03T12:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T12:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-466", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T12:34:56.999Z" - } - }, - { - "_sort": "2001-02-03T12:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T12:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-467", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T11:04:56.999Z" - } - }, - { - "_sort": "2001-02-03T11:04:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T11:04:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-468", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T17:34:56.999Z" - } - }, - { - "_sort": "2001-02-03T17:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T17:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-469", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5ICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T11:04:56.999Z" - } - }, - { - "_sort": "2001-02-03T11:04:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T11:04:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-470", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMjQ6MDAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-04T00:00:00.000Z" - } - }, - { - "_sort": "2001-02-04T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-04T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-471", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMjQ6MDAgR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-04T00:00:00.000Z" - } - }, - { - "_sort": "2001-02-04T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-04T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-472", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMjQ6MDAgVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T22:30:00.000Z" - } - }, - { - "_sort": "2001-02-03T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-473", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMjQ6MDAgRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-04T05:00:00.000Z" - } - }, - { - "_sort": "2001-02-04T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-04T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-474", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMjQ6MDAgKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T22:30:00.000Z" - } - }, - { - "_sort": "2001-02-03T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-475", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MDAgQU0ifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T00:00:00.000Z" - } - }, - { - "_sort": "2001-02-03T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-476", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MDAgQU0gR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T00:00:00.000Z" - } - }, - { - "_sort": "2001-02-03T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-477", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MDAgQU0gVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-02T22:30:00.000Z" - } - }, - { - "_sort": "2001-02-02T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-02T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-478", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MDAgQU0gRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T05:00:00.000Z" - } - }, - { - "_sort": "2001-02-03T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-479", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MDAgQU0gKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-02T22:30:00.000Z" - } - }, - { - "_sort": "2001-02-02T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-02T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-480", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MDAgUE0ifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T12:00:00.000Z" - } - }, - { - "_sort": "2001-02-03T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-481", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MDAgUE0gR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T12:00:00.000Z" - } - }, - { - "_sort": "2001-02-03T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-482", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MDAgUE0gVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T10:30:00.000Z" - } - }, - { - "_sort": "2001-02-03T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-483", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MDAgUE0gRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T17:00:00.000Z" - } - }, - { - "_sort": "2001-02-03T17:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T17:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-484", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MDAgUE0gKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T10:30:00.000Z" - } - }, - { - "_sort": "2001-02-03T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-485", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMDowMCBQTSJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T12:00:00.000Z" - } - }, - { - "_sort": "2001-02-03T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-486", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMDowMCBQTSBHTVQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T12:00:00.000Z" - } - }, - { - "_sort": "2001-02-03T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-487", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMDowMCBQTSBVVEMrMDE6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T10:30:00.000Z" - } - }, - { - "_sort": "2001-02-03T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-488", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMDowMCBQTSBFU1QifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T17:00:00.000Z" - } - }, - { - "_sort": "2001-02-03T17:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T17:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-489", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMDowMCBQTSArMDEzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T10:30:00.000Z" - } - }, - { - "_sort": "2001-02-03T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-490", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTM6MDAgUE0ifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-491", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTM6MDAgUE0gR01UIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-492", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTM6MDAgUE0gVVRDKzAxOjMwIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-493", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTM6MDAgUE0gRVNUIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-494", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTM6MDAgUE0gKzAxMzAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-495", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-02T00:00:00.000Z" - } - }, - { - "_sort": "2003-01-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-496", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-02T00:00:00.000Z" - } - }, - { - "_sort": "2003-01-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-497", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-01T22:30:00.000Z" - } - }, - { - "_sort": "2003-01-01T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-01T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-498", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-02T05:00:00.000Z" - } - }, - { - "_sort": "2003-01-02T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-499", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzICswMTMwIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-500", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjM0In0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-02T12:34:00.000Z" - } - }, - { - "_sort": "2003-01-02T12:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T12:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-501", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjM0IEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-02T12:34:00.000Z" - } - }, - { - "_sort": "2003-01-02T12:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T12:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-502", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjM0IFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-02T11:04:00.000Z" - } - }, - { - "_sort": "2003-01-02T11:04:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T11:04:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-503", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjM0IEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-02T17:34:00.000Z" - } - }, - { - "_sort": "2003-01-02T17:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T17:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-504", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjM0ICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-02T11:04:00.000Z" - } - }, - { - "_sort": "2003-01-02T11:04:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T11:04:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-505", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjM0OjU2LjAwMDEyMyJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-02T12:34:56.000Z" - } - }, - { - "_sort": "2003-01-02T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-506", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjM0OjU2LjAwMDEyMyBHTVQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-02T12:34:56.000Z" - } - }, - { - "_sort": "2003-01-02T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-507", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjM0OjU2LjAwMDEyMyBVVEMrMDE6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-02T11:04:56.000Z" - } - }, - { - "_sort": "2003-01-02T11:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T11:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-508", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjM0OjU2LjAwMDEyMyBFU1QifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-02T17:34:56.000Z" - } - }, - { - "_sort": "2003-01-02T17:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T17:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-509", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjM0OjU2LjAwMDEyMyArMDEzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-02T11:04:56.000Z" - } - }, - { - "_sort": "2003-01-02T11:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T11:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-510", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-02T12:34:56.999Z" - } - }, - { - "_sort": "2003-01-02T12:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T12:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-511", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSBHTVQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-02T12:34:56.999Z" - } - }, - { - "_sort": "2003-01-02T12:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T12:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-512", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSBVVEMrMDE6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-02T11:04:56.999Z" - } - }, - { - "_sort": "2003-01-02T11:04:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T11:04:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-513", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSBFU1QifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-02T17:34:56.999Z" - } - }, - { - "_sort": "2003-01-02T17:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T17:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-514", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSArMDEzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-02T11:04:56.999Z" - } - }, - { - "_sort": "2003-01-02T11:04:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T11:04:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-515", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDI0OjAwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-03T00:00:00.000Z" - } - }, - { - "_sort": "2003-01-03T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-03T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-516", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDI0OjAwIEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-03T00:00:00.000Z" - } - }, - { - "_sort": "2003-01-03T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-03T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-517", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDI0OjAwIFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-02T22:30:00.000Z" - } - }, - { - "_sort": "2003-01-02T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-518", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDI0OjAwIEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-03T05:00:00.000Z" - } - }, - { - "_sort": "2003-01-03T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-03T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-519", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDI0OjAwICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-02T22:30:00.000Z" - } - }, - { - "_sort": "2003-01-02T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-520", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjAwIEFNIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-02T00:00:00.000Z" - } - }, - { - "_sort": "2003-01-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-521", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjAwIEFNIEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-02T00:00:00.000Z" - } - }, - { - "_sort": "2003-01-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-522", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjAwIEFNIFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-01T22:30:00.000Z" - } - }, - { - "_sort": "2003-01-01T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-01T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-523", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjAwIEFNIEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-02T05:00:00.000Z" - } - }, - { - "_sort": "2003-01-02T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-524", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjAwIEFNICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-01T22:30:00.000Z" - } - }, - { - "_sort": "2003-01-01T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-01T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-525", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjAwIFBNIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-02T12:00:00.000Z" - } - }, - { - "_sort": "2003-01-02T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-526", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjAwIFBNIEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-02T12:00:00.000Z" - } - }, - { - "_sort": "2003-01-02T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-527", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjAwIFBNIFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-02T10:30:00.000Z" - } - }, - { - "_sort": "2003-01-02T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-528", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjAwIFBNIEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-02T17:00:00.000Z" - } - }, - { - "_sort": "2003-01-02T17:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T17:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-529", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjAwIFBNICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-02T10:30:00.000Z" - } - }, - { - "_sort": "2003-01-02T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-530", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDA6MDAgUE0ifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-02T12:00:00.000Z" - } - }, - { - "_sort": "2003-01-02T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-531", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDA6MDAgUE0gR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-02T12:00:00.000Z" - } - }, - { - "_sort": "2003-01-02T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-532", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDA6MDAgUE0gVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-02T10:30:00.000Z" - } - }, - { - "_sort": "2003-01-02T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-533", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDA6MDAgUE0gRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-02T17:00:00.000Z" - } - }, - { - "_sort": "2003-01-02T17:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T17:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-534", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDA6MDAgUE0gKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-02T10:30:00.000Z" - } - }, - { - "_sort": "2003-01-02T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-535", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEzOjAwIFBNIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-536", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEzOjAwIFBNIEdNVCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-537", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEzOjAwIFBNIFVUQyswMTozMCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-538", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEzOjAwIFBNIEVTVCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-539", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEzOjAwIFBNICswMTMwIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-540", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-02T00:00:00.000Z" - } - }, - { - "_sort": "2032-01-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-541", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-02T00:00:00.000Z" - } - }, - { - "_sort": "2032-01-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-542", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-01T22:30:00.000Z" - } - }, - { - "_sort": "2032-01-01T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-01T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-543", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-02T05:00:00.000Z" - } - }, - { - "_sort": "2032-01-02T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-544", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyICswMTMwIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-545", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjM0In0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-02T12:34:00.000Z" - } - }, - { - "_sort": "2032-01-02T12:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T12:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-546", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjM0IEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-02T12:34:00.000Z" - } - }, - { - "_sort": "2032-01-02T12:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T12:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-547", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjM0IFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-02T11:04:00.000Z" - } - }, - { - "_sort": "2032-01-02T11:04:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T11:04:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-548", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjM0IEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-02T17:34:00.000Z" - } - }, - { - "_sort": "2032-01-02T17:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T17:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-549", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjM0ICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-02T11:04:00.000Z" - } - }, - { - "_sort": "2032-01-02T11:04:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T11:04:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-550", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjM0OjU2LjAwMDEyMyJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-02T12:34:56.000Z" - } - }, - { - "_sort": "2032-01-02T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-551", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjM0OjU2LjAwMDEyMyBHTVQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-02T12:34:56.000Z" - } - }, - { - "_sort": "2032-01-02T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-552", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjM0OjU2LjAwMDEyMyBVVEMrMDE6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-02T11:04:56.000Z" - } - }, - { - "_sort": "2032-01-02T11:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T11:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-553", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjM0OjU2LjAwMDEyMyBFU1QifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-02T17:34:56.000Z" - } - }, - { - "_sort": "2032-01-02T17:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T17:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-554", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjM0OjU2LjAwMDEyMyArMDEzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-02T11:04:56.000Z" - } - }, - { - "_sort": "2032-01-02T11:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T11:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-555", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-02T12:34:56.999Z" - } - }, - { - "_sort": "2032-01-02T12:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T12:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-556", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSBHTVQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-02T12:34:56.999Z" - } - }, - { - "_sort": "2032-01-02T12:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T12:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-557", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSBVVEMrMDE6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-02T11:04:56.999Z" - } - }, - { - "_sort": "2032-01-02T11:04:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T11:04:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-558", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSBFU1QifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-02T17:34:56.999Z" - } - }, - { - "_sort": "2032-01-02T17:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T17:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-559", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSArMDEzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-02T11:04:56.999Z" - } - }, - { - "_sort": "2032-01-02T11:04:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T11:04:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-560", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDI0OjAwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-03T00:00:00.000Z" - } - }, - { - "_sort": "2032-01-03T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-03T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-561", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDI0OjAwIEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-03T00:00:00.000Z" - } - }, - { - "_sort": "2032-01-03T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-03T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-562", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDI0OjAwIFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-02T22:30:00.000Z" - } - }, - { - "_sort": "2032-01-02T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-563", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDI0OjAwIEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-03T05:00:00.000Z" - } - }, - { - "_sort": "2032-01-03T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-03T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-564", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDI0OjAwICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-02T22:30:00.000Z" - } - }, - { - "_sort": "2032-01-02T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-565", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjAwIEFNIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-02T00:00:00.000Z" - } - }, - { - "_sort": "2032-01-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-566", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjAwIEFNIEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-02T00:00:00.000Z" - } - }, - { - "_sort": "2032-01-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-567", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjAwIEFNIFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-01T22:30:00.000Z" - } - }, - { - "_sort": "2032-01-01T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-01T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-568", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjAwIEFNIEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-02T05:00:00.000Z" - } - }, - { - "_sort": "2032-01-02T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-569", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjAwIEFNICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-01T22:30:00.000Z" - } - }, - { - "_sort": "2032-01-01T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-01T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-570", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjAwIFBNIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-02T12:00:00.000Z" - } - }, - { - "_sort": "2032-01-02T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-571", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjAwIFBNIEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-02T12:00:00.000Z" - } - }, - { - "_sort": "2032-01-02T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-572", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjAwIFBNIFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-02T10:30:00.000Z" - } - }, - { - "_sort": "2032-01-02T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-573", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjAwIFBNIEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-02T17:00:00.000Z" - } - }, - { - "_sort": "2032-01-02T17:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T17:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-574", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjAwIFBNICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-02T10:30:00.000Z" - } - }, - { - "_sort": "2032-01-02T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-575", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDA6MDAgUE0ifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-02T12:00:00.000Z" - } - }, - { - "_sort": "2032-01-02T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-576", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDA6MDAgUE0gR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-02T12:00:00.000Z" - } - }, - { - "_sort": "2032-01-02T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-577", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDA6MDAgUE0gVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-02T10:30:00.000Z" - } - }, - { - "_sort": "2032-01-02T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-578", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDA6MDAgUE0gRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-02T17:00:00.000Z" - } - }, - { - "_sort": "2032-01-02T17:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T17:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-579", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDA6MDAgUE0gKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-02T10:30:00.000Z" - } - }, - { - "_sort": "2032-01-02T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-580", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEzOjAwIFBNIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-581", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEzOjAwIFBNIEdNVCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-582", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEzOjAwIFBNIFVUQyswMTozMCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-583", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEzOjAwIFBNIEVTVCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-584", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEzOjAwIFBNICswMTMwIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-585", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1In0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-05T00:00:00.000Z" - } - }, - { - "_sort": "2001-01-05T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-586", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-05T00:00:00.000Z" - } - }, - { - "_sort": "2001-01-05T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-587", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-04T22:30:00.000Z" - } - }, - { - "_sort": "2001-01-04T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-04T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-588", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-05T05:00:00.000Z" - } - }, - { - "_sort": "2001-01-05T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-589", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1ICswMTMwIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-590", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjM0In0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-05T12:34:00.000Z" - } - }, - { - "_sort": "2001-01-05T12:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T12:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-591", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjM0IEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-05T12:34:00.000Z" - } - }, - { - "_sort": "2001-01-05T12:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T12:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-592", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjM0IFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-05T11:04:00.000Z" - } - }, - { - "_sort": "2001-01-05T11:04:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T11:04:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-593", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjM0IEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-05T17:34:00.000Z" - } - }, - { - "_sort": "2001-01-05T17:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T17:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-594", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjM0ICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-05T11:04:00.000Z" - } - }, - { - "_sort": "2001-01-05T11:04:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T11:04:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-595", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjM0OjU2LjAwMDEyMyJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-05T12:34:56.000Z" - } - }, - { - "_sort": "2001-01-05T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-596", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjM0OjU2LjAwMDEyMyBHTVQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-05T12:34:56.000Z" - } - }, - { - "_sort": "2001-01-05T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-597", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjM0OjU2LjAwMDEyMyBVVEMrMDE6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-05T11:04:56.000Z" - } - }, - { - "_sort": "2001-01-05T11:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T11:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-598", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjM0OjU2LjAwMDEyMyBFU1QifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-05T17:34:56.000Z" - } - }, - { - "_sort": "2001-01-05T17:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T17:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-599", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjM0OjU2LjAwMDEyMyArMDEzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-05T11:04:56.000Z" - } - }, - { - "_sort": "2001-01-05T11:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T11:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-600", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-05T12:34:56.999Z" - } - }, - { - "_sort": "2001-01-05T12:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T12:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-601", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSBHTVQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-05T12:34:56.999Z" - } - }, - { - "_sort": "2001-01-05T12:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T12:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-602", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSBVVEMrMDE6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-05T11:04:56.999Z" - } - }, - { - "_sort": "2001-01-05T11:04:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T11:04:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-603", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSBFU1QifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-05T17:34:56.999Z" - } - }, - { - "_sort": "2001-01-05T17:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T17:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-604", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSArMDEzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-05T11:04:56.999Z" - } - }, - { - "_sort": "2001-01-05T11:04:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T11:04:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-605", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDI0OjAwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-06T00:00:00.000Z" - } - }, - { - "_sort": "2001-01-06T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-06T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-606", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDI0OjAwIEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-06T00:00:00.000Z" - } - }, - { - "_sort": "2001-01-06T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-06T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-607", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDI0OjAwIFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-05T22:30:00.000Z" - } - }, - { - "_sort": "2001-01-05T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-608", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDI0OjAwIEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-06T05:00:00.000Z" - } - }, - { - "_sort": "2001-01-06T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-06T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-609", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDI0OjAwICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-05T22:30:00.000Z" - } - }, - { - "_sort": "2001-01-05T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-610", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjAwIEFNIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-05T00:00:00.000Z" - } - }, - { - "_sort": "2001-01-05T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-611", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjAwIEFNIEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-05T00:00:00.000Z" - } - }, - { - "_sort": "2001-01-05T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-612", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjAwIEFNIFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-04T22:30:00.000Z" - } - }, - { - "_sort": "2001-01-04T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-04T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-613", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjAwIEFNIEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-05T05:00:00.000Z" - } - }, - { - "_sort": "2001-01-05T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-614", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjAwIEFNICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-04T22:30:00.000Z" - } - }, - { - "_sort": "2001-01-04T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-04T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-615", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjAwIFBNIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-05T12:00:00.000Z" - } - }, - { - "_sort": "2001-01-05T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-616", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjAwIFBNIEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-05T12:00:00.000Z" - } - }, - { - "_sort": "2001-01-05T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-617", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjAwIFBNIFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-05T10:30:00.000Z" - } - }, - { - "_sort": "2001-01-05T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-618", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjAwIFBNIEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-05T17:00:00.000Z" - } - }, - { - "_sort": "2001-01-05T17:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T17:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-619", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjAwIFBNICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-05T10:30:00.000Z" - } - }, - { - "_sort": "2001-01-05T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-620", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDA6MDAgUE0ifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-05T12:00:00.000Z" - } - }, - { - "_sort": "2001-01-05T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-621", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDA6MDAgUE0gR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-05T12:00:00.000Z" - } - }, - { - "_sort": "2001-01-05T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-622", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDA6MDAgUE0gVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-05T10:30:00.000Z" - } - }, - { - "_sort": "2001-01-05T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-623", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDA6MDAgUE0gRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-05T17:00:00.000Z" - } - }, - { - "_sort": "2001-01-05T17:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T17:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-624", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDA6MDAgUE0gKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-05T10:30:00.000Z" - } - }, - { - "_sort": "2001-01-05T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-625", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEzOjAwIFBNIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-626", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEzOjAwIFBNIEdNVCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-627", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEzOjAwIFBNIFVUQyswMTozMCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-628", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEzOjAwIFBNIEVTVCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-629", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEzOjAwIFBNICswMTMwIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-630", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-05T00:00:00.000Z" - } - }, - { - "_sort": "2049-03-05T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-631", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-05T00:00:00.000Z" - } - }, - { - "_sort": "2049-03-05T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-632", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-04T22:30:00.000Z" - } - }, - { - "_sort": "2049-03-04T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-04T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-633", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-05T05:00:00.000Z" - } - }, - { - "_sort": "2049-03-05T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-634", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgKzAxMzAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-635", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MzQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-05T12:34:00.000Z" - } - }, - { - "_sort": "2049-03-05T12:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T12:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-636", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MzQgR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-05T12:34:00.000Z" - } - }, - { - "_sort": "2049-03-05T12:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T12:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-637", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MzQgVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-05T11:04:00.000Z" - } - }, - { - "_sort": "2049-03-05T11:04:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T11:04:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-638", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MzQgRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-05T17:34:00.000Z" - } - }, - { - "_sort": "2049-03-05T17:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T17:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-639", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MzQgKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-05T11:04:00.000Z" - } - }, - { - "_sort": "2049-03-05T11:04:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T11:04:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-640", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MzQ6NTYuMDAwMTIzIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-05T12:34:56.000Z" - } - }, - { - "_sort": "2049-03-05T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-641", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MzQ6NTYuMDAwMTIzIEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-05T12:34:56.000Z" - } - }, - { - "_sort": "2049-03-05T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-642", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MzQ6NTYuMDAwMTIzIFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-05T11:04:56.000Z" - } - }, - { - "_sort": "2049-03-05T11:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T11:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-643", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MzQ6NTYuMDAwMTIzIEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-05T17:34:56.000Z" - } - }, - { - "_sort": "2049-03-05T17:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T17:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-644", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MzQ6NTYuMDAwMTIzICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-05T11:04:56.000Z" - } - }, - { - "_sort": "2049-03-05T11:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T11:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-645", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5In0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-05T12:34:56.999Z" - } - }, - { - "_sort": "2049-03-05T12:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T12:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-646", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-05T12:34:56.999Z" - } - }, - { - "_sort": "2049-03-05T12:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T12:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-647", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-05T11:04:56.999Z" - } - }, - { - "_sort": "2049-03-05T11:04:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T11:04:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-648", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-05T17:34:56.999Z" - } - }, - { - "_sort": "2049-03-05T17:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T17:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-649", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5ICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-05T11:04:56.999Z" - } - }, - { - "_sort": "2049-03-05T11:04:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T11:04:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-650", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMjQ6MDAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-06T00:00:00.000Z" - } - }, - { - "_sort": "2049-03-06T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-06T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-651", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMjQ6MDAgR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-06T00:00:00.000Z" - } - }, - { - "_sort": "2049-03-06T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-06T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-652", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMjQ6MDAgVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-05T22:30:00.000Z" - } - }, - { - "_sort": "2049-03-05T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-653", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMjQ6MDAgRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-06T05:00:00.000Z" - } - }, - { - "_sort": "2049-03-06T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-06T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-654", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMjQ6MDAgKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-05T22:30:00.000Z" - } - }, - { - "_sort": "2049-03-05T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-655", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MDAgQU0ifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-05T00:00:00.000Z" - } - }, - { - "_sort": "2049-03-05T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-656", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MDAgQU0gR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-05T00:00:00.000Z" - } - }, - { - "_sort": "2049-03-05T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-657", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MDAgQU0gVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-04T22:30:00.000Z" - } - }, - { - "_sort": "2049-03-04T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-04T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-658", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MDAgQU0gRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-05T05:00:00.000Z" - } - }, - { - "_sort": "2049-03-05T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-659", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MDAgQU0gKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-04T22:30:00.000Z" - } - }, - { - "_sort": "2049-03-04T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-04T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-660", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MDAgUE0ifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-05T12:00:00.000Z" - } - }, - { - "_sort": "2049-03-05T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-661", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MDAgUE0gR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-05T12:00:00.000Z" - } - }, - { - "_sort": "2049-03-05T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-662", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MDAgUE0gVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-05T10:30:00.000Z" - } - }, - { - "_sort": "2049-03-05T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-663", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MDAgUE0gRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-05T17:00:00.000Z" - } - }, - { - "_sort": "2049-03-05T17:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T17:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-664", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MDAgUE0gKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-05T10:30:00.000Z" - } - }, - { - "_sort": "2049-03-05T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-665", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMDowMCBQTSJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-05T12:00:00.000Z" - } - }, - { - "_sort": "2049-03-05T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-666", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMDowMCBQTSBHTVQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-05T12:00:00.000Z" - } - }, - { - "_sort": "2049-03-05T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-667", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMDowMCBQTSBVVEMrMDE6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-05T10:30:00.000Z" - } - }, - { - "_sort": "2049-03-05T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-668", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMDowMCBQTSBFU1QifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-05T17:00:00.000Z" - } - }, - { - "_sort": "2049-03-05T17:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T17:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-669", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMDowMCBQTSArMDEzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-05T10:30:00.000Z" - } - }, - { - "_sort": "2049-03-05T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-670", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTM6MDAgUE0ifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-671", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTM6MDAgUE0gR01UIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-672", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTM6MDAgUE0gVVRDKzAxOjMwIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-673", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTM6MDAgUE0gRVNUIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-674", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTM6MDAgUE0gKzAxMzAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-675", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5In0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-31T00:00:00.000Z" - } - }, - { - "_sort": "1999-12-31T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-676", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-31T00:00:00.000Z" - } - }, - { - "_sort": "1999-12-31T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-677", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-30T22:30:00.000Z" - } - }, - { - "_sort": "1999-12-30T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-30T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-678", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-31T05:00:00.000Z" - } - }, - { - "_sort": "1999-12-31T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-679", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5ICswMTMwIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-680", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjM0In0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-31T12:34:00.000Z" - } - }, - { - "_sort": "1999-12-31T12:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T12:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-681", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjM0IEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-31T12:34:00.000Z" - } - }, - { - "_sort": "1999-12-31T12:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T12:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-682", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjM0IFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-31T11:04:00.000Z" - } - }, - { - "_sort": "1999-12-31T11:04:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T11:04:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-683", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjM0IEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-31T17:34:00.000Z" - } - }, - { - "_sort": "1999-12-31T17:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T17:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-684", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjM0ICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-31T11:04:00.000Z" - } - }, - { - "_sort": "1999-12-31T11:04:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T11:04:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-685", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjM0OjU2LjAwMDEyMyJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-31T12:34:56.000Z" - } - }, - { - "_sort": "1999-12-31T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-686", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjM0OjU2LjAwMDEyMyBHTVQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-31T12:34:56.000Z" - } - }, - { - "_sort": "1999-12-31T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-687", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjM0OjU2LjAwMDEyMyBVVEMrMDE6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-31T11:04:56.000Z" - } - }, - { - "_sort": "1999-12-31T11:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T11:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-688", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjM0OjU2LjAwMDEyMyBFU1QifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-31T17:34:56.000Z" - } - }, - { - "_sort": "1999-12-31T17:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T17:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-689", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjM0OjU2LjAwMDEyMyArMDEzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-31T11:04:56.000Z" - } - }, - { - "_sort": "1999-12-31T11:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T11:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-690", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-31T12:34:56.999Z" - } - }, - { - "_sort": "1999-12-31T12:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T12:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-691", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSBHTVQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-31T12:34:56.999Z" - } - }, - { - "_sort": "1999-12-31T12:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T12:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-692", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSBVVEMrMDE6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-31T11:04:56.999Z" - } - }, - { - "_sort": "1999-12-31T11:04:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T11:04:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-693", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSBFU1QifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-31T17:34:56.999Z" - } - }, - { - "_sort": "1999-12-31T17:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T17:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-694", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSArMDEzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-31T11:04:56.999Z" - } - }, - { - "_sort": "1999-12-31T11:04:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T11:04:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-695", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDI0OjAwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2000-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2000-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2000-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-696", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDI0OjAwIEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2000-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2000-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2000-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-697", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDI0OjAwIFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-31T22:30:00.000Z" - } - }, - { - "_sort": "1999-12-31T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-698", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDI0OjAwIEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2000-01-01T05:00:00.000Z" - } - }, - { - "_sort": "2000-01-01T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2000-01-01T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-699", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDI0OjAwICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-31T22:30:00.000Z" - } - }, - { - "_sort": "1999-12-31T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-700", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjAwIEFNIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-31T00:00:00.000Z" - } - }, - { - "_sort": "1999-12-31T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-701", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjAwIEFNIEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-31T00:00:00.000Z" - } - }, - { - "_sort": "1999-12-31T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-702", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjAwIEFNIFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-30T22:30:00.000Z" - } - }, - { - "_sort": "1999-12-30T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-30T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-703", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjAwIEFNIEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-31T05:00:00.000Z" - } - }, - { - "_sort": "1999-12-31T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-704", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjAwIEFNICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-30T22:30:00.000Z" - } - }, - { - "_sort": "1999-12-30T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-30T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-705", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjAwIFBNIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-31T12:00:00.000Z" - } - }, - { - "_sort": "1999-12-31T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-706", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjAwIFBNIEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-31T12:00:00.000Z" - } - }, - { - "_sort": "1999-12-31T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-707", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjAwIFBNIFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-31T10:30:00.000Z" - } - }, - { - "_sort": "1999-12-31T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-708", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjAwIFBNIEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-31T17:00:00.000Z" - } - }, - { - "_sort": "1999-12-31T17:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T17:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-709", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjAwIFBNICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-31T10:30:00.000Z" - } - }, - { - "_sort": "1999-12-31T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-710", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDA6MDAgUE0ifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-31T12:00:00.000Z" - } - }, - { - "_sort": "1999-12-31T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-711", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDA6MDAgUE0gR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-31T12:00:00.000Z" - } - }, - { - "_sort": "1999-12-31T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-712", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDA6MDAgUE0gVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-31T10:30:00.000Z" - } - }, - { - "_sort": "1999-12-31T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-713", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDA6MDAgUE0gRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-31T17:00:00.000Z" - } - }, - { - "_sort": "1999-12-31T17:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T17:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-714", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDA6MDAgUE0gKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-31T10:30:00.000Z" - } - }, - { - "_sort": "1999-12-31T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-715", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEzOjAwIFBNIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-716", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEzOjAwIFBNIEdNVCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-717", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEzOjAwIFBNIFVUQyswMTozMCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-718", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEzOjAwIFBNIEVTVCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-719", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEzOjAwIFBNICswMTMwIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-720", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-02T00:00:00.000Z" - } - }, - { - "_sort": "2024-01-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-721", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-02T00:00:00.000Z" - } - }, - { - "_sort": "2024-01-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-722", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-01T22:30:00.000Z" - } - }, - { - "_sort": "2024-01-01T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-01T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-723", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-02T05:00:00.000Z" - } - }, - { - "_sort": "2024-01-02T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-724", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyICswMTMwIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-725", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjM0In0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-02T12:34:00.000Z" - } - }, - { - "_sort": "2024-01-02T12:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T12:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-726", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjM0IEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-02T12:34:00.000Z" - } - }, - { - "_sort": "2024-01-02T12:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T12:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-727", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjM0IFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-02T11:04:00.000Z" - } - }, - { - "_sort": "2024-01-02T11:04:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T11:04:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-728", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjM0IEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-02T17:34:00.000Z" - } - }, - { - "_sort": "2024-01-02T17:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T17:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-729", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjM0ICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-02T11:04:00.000Z" - } - }, - { - "_sort": "2024-01-02T11:04:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T11:04:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-730", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjM0OjU2LjAwMDEyMyJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-02T12:34:56.000Z" - } - }, - { - "_sort": "2024-01-02T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-731", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjM0OjU2LjAwMDEyMyBHTVQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-02T12:34:56.000Z" - } - }, - { - "_sort": "2024-01-02T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-732", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjM0OjU2LjAwMDEyMyBVVEMrMDE6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-02T11:04:56.000Z" - } - }, - { - "_sort": "2024-01-02T11:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T11:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-733", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjM0OjU2LjAwMDEyMyBFU1QifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-02T17:34:56.000Z" - } - }, - { - "_sort": "2024-01-02T17:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T17:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-734", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjM0OjU2LjAwMDEyMyArMDEzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-02T11:04:56.000Z" - } - }, - { - "_sort": "2024-01-02T11:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T11:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-735", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-02T12:34:56.999Z" - } - }, - { - "_sort": "2024-01-02T12:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T12:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-736", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSBHTVQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-02T12:34:56.999Z" - } - }, - { - "_sort": "2024-01-02T12:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T12:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-737", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSBVVEMrMDE6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-02T11:04:56.999Z" - } - }, - { - "_sort": "2024-01-02T11:04:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T11:04:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-738", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSBFU1QifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-02T17:34:56.999Z" - } - }, - { - "_sort": "2024-01-02T17:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T17:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-739", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSArMDEzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-02T11:04:56.999Z" - } - }, - { - "_sort": "2024-01-02T11:04:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T11:04:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-740", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDI0OjAwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-03T00:00:00.000Z" - } - }, - { - "_sort": "2024-01-03T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-03T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-741", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDI0OjAwIEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-03T00:00:00.000Z" - } - }, - { - "_sort": "2024-01-03T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-03T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-742", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDI0OjAwIFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-02T22:30:00.000Z" - } - }, - { - "_sort": "2024-01-02T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-743", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDI0OjAwIEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-03T05:00:00.000Z" - } - }, - { - "_sort": "2024-01-03T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-03T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-744", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDI0OjAwICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-02T22:30:00.000Z" - } - }, - { - "_sort": "2024-01-02T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-745", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjAwIEFNIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-02T00:00:00.000Z" - } - }, - { - "_sort": "2024-01-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-746", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjAwIEFNIEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-02T00:00:00.000Z" - } - }, - { - "_sort": "2024-01-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-747", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjAwIEFNIFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-01T22:30:00.000Z" - } - }, - { - "_sort": "2024-01-01T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-01T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-748", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjAwIEFNIEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-02T05:00:00.000Z" - } - }, - { - "_sort": "2024-01-02T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-749", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjAwIEFNICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-01T22:30:00.000Z" - } - }, - { - "_sort": "2024-01-01T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-01T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-750", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjAwIFBNIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-02T12:00:00.000Z" - } - }, - { - "_sort": "2024-01-02T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-751", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjAwIFBNIEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-02T12:00:00.000Z" - } - }, - { - "_sort": "2024-01-02T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-752", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjAwIFBNIFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-02T10:30:00.000Z" - } - }, - { - "_sort": "2024-01-02T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-753", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjAwIFBNIEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-02T17:00:00.000Z" - } - }, - { - "_sort": "2024-01-02T17:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T17:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-754", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjAwIFBNICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-02T10:30:00.000Z" - } - }, - { - "_sort": "2024-01-02T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-755", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDA6MDAgUE0ifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-02T12:00:00.000Z" - } - }, - { - "_sort": "2024-01-02T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-756", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDA6MDAgUE0gR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-02T12:00:00.000Z" - } - }, - { - "_sort": "2024-01-02T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-757", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDA6MDAgUE0gVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-02T10:30:00.000Z" - } - }, - { - "_sort": "2024-01-02T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-758", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDA6MDAgUE0gRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-02T17:00:00.000Z" - } - }, - { - "_sort": "2024-01-02T17:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T17:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-759", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDA6MDAgUE0gKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-02T10:30:00.000Z" - } - }, - { - "_sort": "2024-01-02T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-760", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEzOjAwIFBNIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-761", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEzOjAwIFBNIEdNVCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-762", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEzOjAwIFBNIFVUQyswMTozMCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-763", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEzOjAwIFBNIEVTVCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-764", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEzOjAwIFBNICswMTMwIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-765", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDEgIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-766", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDFcdCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-767", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDFcbiJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-768", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDHvu78ifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-769", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDEgKGlnbm9yZWQpIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-770", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDEgZ2FyYmFnZSJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-771", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDFcdTAwMDBpZ25vcmVkIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-772", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6WyIyMDI0LTAyLTI5Il19" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T00:00:00.000Z" - } - }, - { - "_sort": "2024-02-29T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-773", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6WyIyMDI0LTAyLTI5Il19" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T00:00:00.000Z" - } - }, - { - "_sort": "2024-02-29T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-774", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6WyIyMDI0LTAyLTI5IiwiMjAyNC0wMy0wMSJdfQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-775", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6WyIiXX0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-776", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6eyJ4IjoieCJ9fQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-777", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6eyJ0b1N0cmluZyI6IngifX0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-778", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6ImludmFsaWQifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-779", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6eyJ0b1N0cmluZyI6IngifX0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-780", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ik1hcmNoIDEgMjAyNCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-781", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-782", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMjQ6MDA6MDBaIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-783", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T00:00:00.000Z" - } - }, - { - "_sort": "2001-02-03T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-784", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6WyIyMDI0IiwiMyIsIjEiXX0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-785", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDMtMDFUMDE6MDA6MDArMDI6MDAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T23:00:00.000Z" - } - }, - { - "_sort": "2024-02-29T23:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T23:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-786", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDMtMDF0MDA6MDB6In0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-787", - "query": { - "sort": "anonymizeDate", - "cursor": "eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDMtMDFUMDA6MDBaXHUwMDAwaWdub3JlZCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-788", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-789", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiaW52YWxpZCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-790", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "0000-01-01T00:00:00.000Z" - } - }, - { - "_sort": "0000-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "0000-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-791", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "0001-01-01T00:00:00.000Z" - } - }, - { - "_sort": "0001-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "0001-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-792", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-793", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMiJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-02-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-02-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-794", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOSJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2023-03-01T00:00:00.000Z" - } - }, - { - "_sort": "2023-03-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-795", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-03-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-796", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMSJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-03-02T00:00:00.000Z" - } - }, - { - "_sort": "2024-03-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-797", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMiJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-798", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMC0wMSJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-799", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0xMy0wMSJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-800", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMS0wMCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-801", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMS0wMSJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-802", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNFQwMDowMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-803", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMlQwMDowMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-02-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-02-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-804", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMS0wMXQwMDowMHoifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-805", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiIDIwMjQtMDEtMDEgIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-806", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMS0wMVQwMDowMFogIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-807", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMS0wMVQwMDowMFpcdTAwMDBpZ25vcmVkIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-808", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiKzAxMDAwMC0wMS0wMSJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "+010000-01-01T00:00:00.000Z" - } - }, - { - "_sort": "+010000-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "+010000-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-809", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMS0wMS0wMSJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "-000001-01-01T00:00:00.000Z" - } - }, - { - "_sort": "-000001-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "-000001-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-810", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMS0wMSJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2001-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-811", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiKzI3NTc2MC0wOS0xMyJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "+275760-09-13T00:00:00.000Z" - } - }, - { - "_sort": "+275760-09-13T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "+275760-09-13T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-812", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiKzI3NTc2MC0wOS0xNCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-813", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTI3MTgyMS0wNC0yMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "-271821-04-20T00:00:00.000Z" - } - }, - { - "_sort": "-271821-04-20T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "-271821-04-20T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-814", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTI3MTgyMS0wNC0xOSJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-815", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQwMDowMFoifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-02-29T00:00:00.000Z" - } - }, - { - "_sort": "2024-02-29T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-816", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQwMDowMCswMjozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-02-28T21:30:00.000Z" - } - }, - { - "_sort": "2024-02-28T21:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-28T21:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-817", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQwMDowMC0wMzMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-02-29T03:30:00.000Z" - } - }, - { - "_sort": "2024-02-29T03:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T03:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-818", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQwMDowMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-02-29T00:00:00.000Z" - } - }, - { - "_sort": "2024-02-29T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-819", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQxMjozNDo1NloifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-02-29T12:34:56.000Z" - } - }, - { - "_sort": "2024-02-29T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-820", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQxMjozNDo1NiswMjozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-02-29T10:04:56.000Z" - } - }, - { - "_sort": "2024-02-29T10:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T10:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-821", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQxMjozNDo1Ni0wMzMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-02-29T16:04:56.000Z" - } - }, - { - "_sort": "2024-02-29T16:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T16:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-822", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQxMjozNDo1NiJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-02-29T12:34:56.000Z" - } - }, - { - "_sort": "2024-02-29T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-823", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQxMjozNDo1Ni4xWiJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-02-29T12:34:56.100Z" - } - }, - { - "_sort": "2024-02-29T12:34:56.100Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T12:34:56.100Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-824", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQxMjozNDo1Ni4xKzAyOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-02-29T10:04:56.100Z" - } - }, - { - "_sort": "2024-02-29T10:04:56.100Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T10:04:56.100Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-825", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQxMjozNDo1Ni4xLTAzMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-02-29T16:04:56.100Z" - } - }, - { - "_sort": "2024-02-29T16:04:56.100Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T16:04:56.100Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-826", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQxMjozNDo1Ni4xIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-02-29T12:34:56.100Z" - } - }, - { - "_sort": "2024-02-29T12:34:56.100Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T12:34:56.100Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-827", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQxMjozNDo1Ni4xMjM0NTY3ODlaIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-02-29T12:34:56.123Z" - } - }, - { - "_sort": "2024-02-29T12:34:56.123Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T12:34:56.123Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-828", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQxMjozNDo1Ni4xMjM0NTY3ODkrMDI6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-02-29T10:04:56.123Z" - } - }, - { - "_sort": "2024-02-29T10:04:56.123Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T10:04:56.123Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-829", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQxMjozNDo1Ni4xMjM0NTY3ODktMDMzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-02-29T16:04:56.123Z" - } - }, - { - "_sort": "2024-02-29T16:04:56.123Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T16:04:56.123Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-830", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQxMjozNDo1Ni4xMjM0NTY3ODkifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-02-29T12:34:56.123Z" - } - }, - { - "_sort": "2024-02-29T12:34:56.123Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T12:34:56.123Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-831", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQyNDowMFoifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-03-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-832", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQyNDowMCswMjozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-02-29T21:30:00.000Z" - } - }, - { - "_sort": "2024-02-29T21:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T21:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-833", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQyNDowMC0wMzMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-03-01T03:30:00.000Z" - } - }, - { - "_sort": "2024-03-01T03:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T03:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-834", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQyNDowMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-03-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-835", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQyNDowMDowMC4wMDFaIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-836", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQyNDowMDowMC4wMDErMDI6MzAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-837", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQyNDowMDowMC4wMDEtMDMzMCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-838", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQyNDowMDowMC4wMDEifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-839", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQyNTowMFoifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-840", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQyNTowMCswMjozMCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-841", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQyNTowMC0wMzMwIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-842", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQyNTowMCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-843", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQxMjo2MFoifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-844", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQxMjo2MCswMjozMCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-845", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQxMjo2MC0wMzMwIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-846", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQxMjo2MCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-847", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQxMjozNDo2MFoifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-848", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQxMjozNDo2MCswMjozMCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-849", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQxMjozNDo2MC0wMzMwIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-850", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQxMjozNDo2MCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-851", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQwMDowMFoifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2023-03-01T00:00:00.000Z" - } - }, - { - "_sort": "2023-03-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-852", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQwMDowMCswMjozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2023-02-28T21:30:00.000Z" - } - }, - { - "_sort": "2023-02-28T21:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-02-28T21:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-853", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQwMDowMC0wMzMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2023-03-01T03:30:00.000Z" - } - }, - { - "_sort": "2023-03-01T03:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-01T03:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-854", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQwMDowMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2023-03-01T00:00:00.000Z" - } - }, - { - "_sort": "2023-03-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-855", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQxMjozNDo1NloifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2023-03-01T12:34:56.000Z" - } - }, - { - "_sort": "2023-03-01T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-01T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-856", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQxMjozNDo1NiswMjozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2023-03-01T10:04:56.000Z" - } - }, - { - "_sort": "2023-03-01T10:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-01T10:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-857", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQxMjozNDo1Ni0wMzMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2023-03-01T16:04:56.000Z" - } - }, - { - "_sort": "2023-03-01T16:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-01T16:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-858", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQxMjozNDo1NiJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2023-03-01T12:34:56.000Z" - } - }, - { - "_sort": "2023-03-01T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-01T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-859", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQxMjozNDo1Ni4xWiJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2023-03-01T12:34:56.100Z" - } - }, - { - "_sort": "2023-03-01T12:34:56.100Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-01T12:34:56.100Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-860", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQxMjozNDo1Ni4xKzAyOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2023-03-01T10:04:56.100Z" - } - }, - { - "_sort": "2023-03-01T10:04:56.100Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-01T10:04:56.100Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-861", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQxMjozNDo1Ni4xLTAzMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2023-03-01T16:04:56.100Z" - } - }, - { - "_sort": "2023-03-01T16:04:56.100Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-01T16:04:56.100Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-862", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQxMjozNDo1Ni4xIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2023-03-01T12:34:56.100Z" - } - }, - { - "_sort": "2023-03-01T12:34:56.100Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-01T12:34:56.100Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-863", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQxMjozNDo1Ni4xMjM0NTY3ODlaIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2023-03-01T12:34:56.123Z" - } - }, - { - "_sort": "2023-03-01T12:34:56.123Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-01T12:34:56.123Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-864", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQxMjozNDo1Ni4xMjM0NTY3ODkrMDI6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2023-03-01T10:04:56.123Z" - } - }, - { - "_sort": "2023-03-01T10:04:56.123Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-01T10:04:56.123Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-865", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQxMjozNDo1Ni4xMjM0NTY3ODktMDMzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2023-03-01T16:04:56.123Z" - } - }, - { - "_sort": "2023-03-01T16:04:56.123Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-01T16:04:56.123Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-866", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQxMjozNDo1Ni4xMjM0NTY3ODkifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2023-03-01T12:34:56.123Z" - } - }, - { - "_sort": "2023-03-01T12:34:56.123Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-01T12:34:56.123Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-867", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQyNDowMFoifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2023-03-02T00:00:00.000Z" - } - }, - { - "_sort": "2023-03-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-868", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQyNDowMCswMjozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2023-03-01T21:30:00.000Z" - } - }, - { - "_sort": "2023-03-01T21:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-01T21:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-869", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQyNDowMC0wMzMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2023-03-02T03:30:00.000Z" - } - }, - { - "_sort": "2023-03-02T03:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T03:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-870", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQyNDowMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2023-03-02T00:00:00.000Z" - } - }, - { - "_sort": "2023-03-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-871", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQyNDowMDowMC4wMDFaIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-872", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQyNDowMDowMC4wMDErMDI6MzAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-873", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQyNDowMDowMC4wMDEtMDMzMCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-874", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQyNDowMDowMC4wMDEifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-875", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQyNTowMFoifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-876", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQyNTowMCswMjozMCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-877", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQyNTowMC0wMzMwIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-878", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQyNTowMCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-879", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQxMjo2MFoifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-880", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQxMjo2MCswMjozMCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-881", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQxMjo2MC0wMzMwIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-882", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQxMjo2MCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-883", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQxMjozNDo2MFoifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-884", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQxMjozNDo2MCswMjozMCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-885", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQxMjozNDo2MC0wMzMwIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-886", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0yOVQxMjozNDo2MCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-887", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQwMDowMFoifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-03-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-888", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQwMDowMCswMjozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-02-29T21:30:00.000Z" - } - }, - { - "_sort": "2024-02-29T21:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T21:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-889", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQwMDowMC0wMzMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-03-01T03:30:00.000Z" - } - }, - { - "_sort": "2024-03-01T03:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T03:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-890", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQwMDowMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-03-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-891", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQxMjozNDo1NloifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-03-01T12:34:56.000Z" - } - }, - { - "_sort": "2024-03-01T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-892", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQxMjozNDo1NiswMjozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-03-01T10:04:56.000Z" - } - }, - { - "_sort": "2024-03-01T10:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T10:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-893", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQxMjozNDo1Ni0wMzMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-03-01T16:04:56.000Z" - } - }, - { - "_sort": "2024-03-01T16:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T16:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-894", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQxMjozNDo1NiJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-03-01T12:34:56.000Z" - } - }, - { - "_sort": "2024-03-01T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-895", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQxMjozNDo1Ni4xWiJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-03-01T12:34:56.100Z" - } - }, - { - "_sort": "2024-03-01T12:34:56.100Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T12:34:56.100Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-896", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQxMjozNDo1Ni4xKzAyOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-03-01T10:04:56.100Z" - } - }, - { - "_sort": "2024-03-01T10:04:56.100Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T10:04:56.100Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-897", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQxMjozNDo1Ni4xLTAzMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-03-01T16:04:56.100Z" - } - }, - { - "_sort": "2024-03-01T16:04:56.100Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T16:04:56.100Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-898", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQxMjozNDo1Ni4xIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-03-01T12:34:56.100Z" - } - }, - { - "_sort": "2024-03-01T12:34:56.100Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T12:34:56.100Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-899", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQxMjozNDo1Ni4xMjM0NTY3ODlaIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-03-01T12:34:56.123Z" - } - }, - { - "_sort": "2024-03-01T12:34:56.123Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T12:34:56.123Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-900", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQxMjozNDo1Ni4xMjM0NTY3ODkrMDI6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-03-01T10:04:56.123Z" - } - }, - { - "_sort": "2024-03-01T10:04:56.123Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T10:04:56.123Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-901", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQxMjozNDo1Ni4xMjM0NTY3ODktMDMzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-03-01T16:04:56.123Z" - } - }, - { - "_sort": "2024-03-01T16:04:56.123Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T16:04:56.123Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-902", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQxMjozNDo1Ni4xMjM0NTY3ODkifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-03-01T12:34:56.123Z" - } - }, - { - "_sort": "2024-03-01T12:34:56.123Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T12:34:56.123Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-903", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQyNDowMFoifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-03-02T00:00:00.000Z" - } - }, - { - "_sort": "2024-03-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-904", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQyNDowMCswMjozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-03-01T21:30:00.000Z" - } - }, - { - "_sort": "2024-03-01T21:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T21:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-905", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQyNDowMC0wMzMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-03-02T03:30:00.000Z" - } - }, - { - "_sort": "2024-03-02T03:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-02T03:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-906", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQyNDowMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-03-02T00:00:00.000Z" - } - }, - { - "_sort": "2024-03-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-907", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQyNDowMDowMC4wMDFaIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-908", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQyNDowMDowMC4wMDErMDI6MzAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-909", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQyNDowMDowMC4wMDEtMDMzMCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-910", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQyNDowMDowMC4wMDEifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-911", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQyNTowMFoifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-912", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQyNTowMCswMjozMCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-913", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQyNTowMC0wMzMwIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-914", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQyNTowMCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-915", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQxMjo2MFoifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-916", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQxMjo2MCswMjozMCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-917", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQxMjo2MC0wMzMwIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-918", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQxMjo2MCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-919", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQxMjozNDo2MFoifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-920", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQxMjozNDo2MCswMjozMCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-921", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQxMjozNDo2MC0wMzMwIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-922", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMFQxMjozNDo2MCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-923", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2000-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2000-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2000-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-924", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMSJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2001-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-925", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMTIifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-12-01T00:00:00.000Z" - } - }, - { - "_sort": "2001-12-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-12-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-926", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMTMifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-927", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzEifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-928", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2032-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2032-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-929", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNDkifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2049-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2049-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-930", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNTAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "1950-01-01T00:00:00.000Z" - } - }, - { - "_sort": "1950-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1950-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-931", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiOTkifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "1999-01-01T00:00:00.000Z" - } - }, - { - "_sort": "1999-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-932", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMTAwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "0100-01-01T00:00:00.000Z" - } - }, - { - "_sort": "0100-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "0100-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-933", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMDAwLTAxLTAxIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2000-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2000-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2000-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-934", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-02-03T00:00:00.000Z" - } - }, - { - "_sort": "2001-02-03T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-935", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMS0wMVQwMDowMFoifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-936", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMS8yLzAzIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2003-01-02T00:00:00.000Z" - } - }, - { - "_sort": "2003-01-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-937", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC8wMi8zMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-03-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-938", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC4wMi4yOSJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-02-29T00:00:00.000Z" - } - }, - { - "_sort": "2024-02-29T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-939", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-05T00:00:00.000Z" - } - }, - { - "_sort": "2001-01-05T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-940", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBKYW51YXJ5IDIwMjQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-01-05T00:00:00.000Z" - } - }, - { - "_sort": "2024-01-05T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-05T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-941", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiVHVlLCAwNSBNYXIgMjAyNCAxMjozNDo1NiBHTVQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-03-05T12:34:56.000Z" - } - }, - { - "_sort": "2024-03-05T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-05T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-942", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiTWFyY2ggNSwgMjAyNCAxMjozMCBQTSJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-03-05T12:30:00.000Z" - } - }, - { - "_sort": "2024-03-05T12:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-05T12:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-943", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMS0wMSAxMjozNDo1NiJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-01-01T12:34:56.000Z" - } - }, - { - "_sort": "2024-01-01T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-01T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-944", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMS0wMSAxMjozNDo1Ni4xMjM0IEdNVCswMjAwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-01-01T10:34:56.123Z" - } - }, - { - "_sort": "2024-01-01T10:34:56.123Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-01T10:34:56.123Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-945", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMS0wMSAoY29tbWVudCkifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-946", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiKGNvbW1lbnQpIDIwMjQtMDEtMDEifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-947", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiZ2FyYmFnZSAyMDI0LTAxLTAxIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-948", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiZ2FyYmFnZTIwMjQtMDEtMDEifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-949", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMS0wMSBnYXJiYWdlIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-950", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMS0wMSBHTVQtOCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-01-01T08:00:00.000Z" - } - }, - { - "_sort": "2024-01-01T08:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-01T08:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-951", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMS0wMSAxMjo6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-01-01T12:00:30.000Z" - } - }, - { - "_sort": "2024-01-01T12:00:30.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-01T12:00:30.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-952", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMS0wMSAxMjozMDo0MCBFU1QifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-01-01T17:30:40.000Z" - } - }, - { - "_sort": "2024-01-01T17:30:40.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-01T17:30:40.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-953", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiOTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5In0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-954", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-02-29T00:00:00.000Z" - } - }, - { - "_sort": "2024-02-29T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-955", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSBHTVQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-02-29T00:00:00.000Z" - } - }, - { - "_sort": "2024-02-29T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-956", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSBVVEMrMDE6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-02-28T22:30:00.000Z" - } - }, - { - "_sort": "2024-02-28T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-28T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-957", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSBFU1QifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-02-29T05:00:00.000Z" - } - }, - { - "_sort": "2024-02-29T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-958", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSArMDEzMCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-959", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAxMjozNCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-02-29T12:34:00.000Z" - } - }, - { - "_sort": "2024-02-29T12:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T12:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-960", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAxMjozNCBHTVQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-02-29T12:34:00.000Z" - } - }, - { - "_sort": "2024-02-29T12:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T12:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-961", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAxMjozNCBVVEMrMDE6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-02-29T11:04:00.000Z" - } - }, - { - "_sort": "2024-02-29T11:04:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T11:04:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-962", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAxMjozNCBFU1QifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-02-29T17:34:00.000Z" - } - }, - { - "_sort": "2024-02-29T17:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T17:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-963", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAxMjozNCArMDEzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-02-29T11:04:00.000Z" - } - }, - { - "_sort": "2024-02-29T11:04:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T11:04:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-964", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAxMjozNDo1Ni4wMDAxMjMifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-02-29T12:34:56.000Z" - } - }, - { - "_sort": "2024-02-29T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-965", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAxMjozNDo1Ni4wMDAxMjMgR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-02-29T12:34:56.000Z" - } - }, - { - "_sort": "2024-02-29T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-966", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAxMjozNDo1Ni4wMDAxMjMgVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-02-29T11:04:56.000Z" - } - }, - { - "_sort": "2024-02-29T11:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T11:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-967", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAxMjozNDo1Ni4wMDAxMjMgRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-02-29T17:34:56.000Z" - } - }, - { - "_sort": "2024-02-29T17:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T17:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-968", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAxMjozNDo1Ni4wMDAxMjMgKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-02-29T11:04:56.000Z" - } - }, - { - "_sort": "2024-02-29T11:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T11:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-969", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAxMjozNDo1Ni45OTk5OTk5OTk5OTkifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-02-29T12:34:56.999Z" - } - }, - { - "_sort": "2024-02-29T12:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T12:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-970", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAxMjozNDo1Ni45OTk5OTk5OTk5OTkgR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-02-29T12:34:56.999Z" - } - }, - { - "_sort": "2024-02-29T12:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T12:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-971", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAxMjozNDo1Ni45OTk5OTk5OTk5OTkgVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-02-29T11:04:56.999Z" - } - }, - { - "_sort": "2024-02-29T11:04:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T11:04:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-972", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAxMjozNDo1Ni45OTk5OTk5OTk5OTkgRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-02-29T17:34:56.999Z" - } - }, - { - "_sort": "2024-02-29T17:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T17:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-973", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAxMjozNDo1Ni45OTk5OTk5OTk5OTkgKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-02-29T11:04:56.999Z" - } - }, - { - "_sort": "2024-02-29T11:04:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T11:04:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-974", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAyNDowMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-03-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-975", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAyNDowMCBHTVQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-03-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-976", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAyNDowMCBVVEMrMDE6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-02-29T22:30:00.000Z" - } - }, - { - "_sort": "2024-02-29T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-977", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAyNDowMCBFU1QifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-03-01T05:00:00.000Z" - } - }, - { - "_sort": "2024-03-01T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-978", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAyNDowMCArMDEzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-02-29T22:30:00.000Z" - } - }, - { - "_sort": "2024-02-29T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-979", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAxMjowMCBBTSJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-02-29T00:00:00.000Z" - } - }, - { - "_sort": "2024-02-29T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-980", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAxMjowMCBBTSBHTVQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-02-29T00:00:00.000Z" - } - }, - { - "_sort": "2024-02-29T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-981", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAxMjowMCBBTSBVVEMrMDE6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-02-28T22:30:00.000Z" - } - }, - { - "_sort": "2024-02-28T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-28T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-982", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAxMjowMCBBTSBFU1QifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-02-29T05:00:00.000Z" - } - }, - { - "_sort": "2024-02-29T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-983", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAxMjowMCBBTSArMDEzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-02-28T22:30:00.000Z" - } - }, - { - "_sort": "2024-02-28T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-28T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-984", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAxMjowMCBQTSJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-02-29T12:00:00.000Z" - } - }, - { - "_sort": "2024-02-29T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-985", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAxMjowMCBQTSBHTVQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-02-29T12:00:00.000Z" - } - }, - { - "_sort": "2024-02-29T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-986", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAxMjowMCBQTSBVVEMrMDE6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-02-29T10:30:00.000Z" - } - }, - { - "_sort": "2024-02-29T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-987", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAxMjowMCBQTSBFU1QifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-02-29T17:00:00.000Z" - } - }, - { - "_sort": "2024-02-29T17:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T17:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-988", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAxMjowMCBQTSArMDEzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-02-29T10:30:00.000Z" - } - }, - { - "_sort": "2024-02-29T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-989", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAwOjAwIFBNIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-02-29T12:00:00.000Z" - } - }, - { - "_sort": "2024-02-29T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-990", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAwOjAwIFBNIEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-02-29T12:00:00.000Z" - } - }, - { - "_sort": "2024-02-29T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-991", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAwOjAwIFBNIFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-02-29T10:30:00.000Z" - } - }, - { - "_sort": "2024-02-29T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-992", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAwOjAwIFBNIEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-02-29T17:00:00.000Z" - } - }, - { - "_sort": "2024-02-29T17:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T17:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-993", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAwOjAwIFBNICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-02-29T10:30:00.000Z" - } - }, - { - "_sort": "2024-02-29T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-994", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAxMzowMCBQTSJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-995", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAxMzowMCBQTSBHTVQifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-996", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAxMzowMCBQTSBVVEMrMDE6MzAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-997", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAxMzowMCBQTSBFU1QifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-998", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOSAxMzowMCBQTSArMDEzMCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-999", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2023-03-02T00:00:00.000Z" - } - }, - { - "_sort": "2023-03-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1000", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCBHTVQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2023-03-02T00:00:00.000Z" - } - }, - { - "_sort": "2023-03-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1001", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCBVVEMrMDE6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2023-03-01T22:30:00.000Z" - } - }, - { - "_sort": "2023-03-01T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-01T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1002", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCBFU1QifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2023-03-02T05:00:00.000Z" - } - }, - { - "_sort": "2023-03-02T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1003", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCArMDEzMCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1004", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAxMjozNCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2023-03-02T12:34:00.000Z" - } - }, - { - "_sort": "2023-03-02T12:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T12:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1005", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAxMjozNCBHTVQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2023-03-02T12:34:00.000Z" - } - }, - { - "_sort": "2023-03-02T12:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T12:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1006", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAxMjozNCBVVEMrMDE6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2023-03-02T11:04:00.000Z" - } - }, - { - "_sort": "2023-03-02T11:04:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T11:04:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1007", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAxMjozNCBFU1QifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2023-03-02T17:34:00.000Z" - } - }, - { - "_sort": "2023-03-02T17:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T17:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1008", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAxMjozNCArMDEzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2023-03-02T11:04:00.000Z" - } - }, - { - "_sort": "2023-03-02T11:04:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T11:04:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1009", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAxMjozNDo1Ni4wMDAxMjMifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2023-03-02T12:34:56.000Z" - } - }, - { - "_sort": "2023-03-02T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1010", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAxMjozNDo1Ni4wMDAxMjMgR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2023-03-02T12:34:56.000Z" - } - }, - { - "_sort": "2023-03-02T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1011", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAxMjozNDo1Ni4wMDAxMjMgVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2023-03-02T11:04:56.000Z" - } - }, - { - "_sort": "2023-03-02T11:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T11:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1012", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAxMjozNDo1Ni4wMDAxMjMgRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2023-03-02T17:34:56.000Z" - } - }, - { - "_sort": "2023-03-02T17:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T17:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1013", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAxMjozNDo1Ni4wMDAxMjMgKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2023-03-02T11:04:56.000Z" - } - }, - { - "_sort": "2023-03-02T11:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T11:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1014", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAxMjozNDo1Ni45OTk5OTk5OTk5OTkifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2023-03-02T12:34:56.999Z" - } - }, - { - "_sort": "2023-03-02T12:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T12:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1015", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAxMjozNDo1Ni45OTk5OTk5OTk5OTkgR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2023-03-02T12:34:56.999Z" - } - }, - { - "_sort": "2023-03-02T12:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T12:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1016", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAxMjozNDo1Ni45OTk5OTk5OTk5OTkgVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2023-03-02T11:04:56.999Z" - } - }, - { - "_sort": "2023-03-02T11:04:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T11:04:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1017", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAxMjozNDo1Ni45OTk5OTk5OTk5OTkgRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2023-03-02T17:34:56.999Z" - } - }, - { - "_sort": "2023-03-02T17:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T17:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1018", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAxMjozNDo1Ni45OTk5OTk5OTk5OTkgKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2023-03-02T11:04:56.999Z" - } - }, - { - "_sort": "2023-03-02T11:04:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T11:04:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1019", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAyNDowMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2023-03-03T00:00:00.000Z" - } - }, - { - "_sort": "2023-03-03T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-03T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1020", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAyNDowMCBHTVQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2023-03-03T00:00:00.000Z" - } - }, - { - "_sort": "2023-03-03T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-03T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1021", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAyNDowMCBVVEMrMDE6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2023-03-02T22:30:00.000Z" - } - }, - { - "_sort": "2023-03-02T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1022", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAyNDowMCBFU1QifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2023-03-03T05:00:00.000Z" - } - }, - { - "_sort": "2023-03-03T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-03T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1023", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAyNDowMCArMDEzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2023-03-02T22:30:00.000Z" - } - }, - { - "_sort": "2023-03-02T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1024", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAxMjowMCBBTSJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2023-03-02T00:00:00.000Z" - } - }, - { - "_sort": "2023-03-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1025", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAxMjowMCBBTSBHTVQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2023-03-02T00:00:00.000Z" - } - }, - { - "_sort": "2023-03-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1026", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAxMjowMCBBTSBVVEMrMDE6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2023-03-01T22:30:00.000Z" - } - }, - { - "_sort": "2023-03-01T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-01T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1027", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAxMjowMCBBTSBFU1QifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2023-03-02T05:00:00.000Z" - } - }, - { - "_sort": "2023-03-02T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1028", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAxMjowMCBBTSArMDEzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2023-03-01T22:30:00.000Z" - } - }, - { - "_sort": "2023-03-01T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-01T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1029", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAxMjowMCBQTSJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2023-03-02T12:00:00.000Z" - } - }, - { - "_sort": "2023-03-02T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1030", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAxMjowMCBQTSBHTVQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2023-03-02T12:00:00.000Z" - } - }, - { - "_sort": "2023-03-02T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1031", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAxMjowMCBQTSBVVEMrMDE6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2023-03-02T10:30:00.000Z" - } - }, - { - "_sort": "2023-03-02T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1032", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAxMjowMCBQTSBFU1QifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2023-03-02T17:00:00.000Z" - } - }, - { - "_sort": "2023-03-02T17:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T17:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1033", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAxMjowMCBQTSArMDEzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2023-03-02T10:30:00.000Z" - } - }, - { - "_sort": "2023-03-02T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1034", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAwOjAwIFBNIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2023-03-02T12:00:00.000Z" - } - }, - { - "_sort": "2023-03-02T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1035", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAwOjAwIFBNIEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2023-03-02T12:00:00.000Z" - } - }, - { - "_sort": "2023-03-02T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1036", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAwOjAwIFBNIFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2023-03-02T10:30:00.000Z" - } - }, - { - "_sort": "2023-03-02T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1037", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAwOjAwIFBNIEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2023-03-02T17:00:00.000Z" - } - }, - { - "_sort": "2023-03-02T17:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T17:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1038", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAwOjAwIFBNICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2023-03-02T10:30:00.000Z" - } - }, - { - "_sort": "2023-03-02T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1039", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAxMzowMCBQTSJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1040", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAxMzowMCBQTSBHTVQifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1041", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAxMzowMCBQTSBVVEMrMDE6MzAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1042", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAxMzowMCBQTSBFU1QifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1043", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyMy0wMi0zMCAxMzowMCBQTSArMDEzMCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1044", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "0001-01-01T00:00:00.000Z" - } - }, - { - "_sort": "0001-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "0001-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1045", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSBHTVQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2001-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1046", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSBVVEMrMDE6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2000-12-31T22:30:00.000Z" - } - }, - { - "_sort": "2000-12-31T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2000-12-31T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1047", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSBFU1QifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-01T05:00:00.000Z" - } - }, - { - "_sort": "2001-01-01T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1048", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSArMDEzMCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1049", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAxMjozNCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-01T12:34:00.000Z" - } - }, - { - "_sort": "2001-01-01T12:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T12:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1050", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAxMjozNCBHTVQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-01T12:34:00.000Z" - } - }, - { - "_sort": "2001-01-01T12:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T12:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1051", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAxMjozNCBVVEMrMDE6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-01T11:04:00.000Z" - } - }, - { - "_sort": "2001-01-01T11:04:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T11:04:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1052", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAxMjozNCBFU1QifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-01T17:34:00.000Z" - } - }, - { - "_sort": "2001-01-01T17:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T17:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1053", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAxMjozNCArMDEzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-01T11:04:00.000Z" - } - }, - { - "_sort": "2001-01-01T11:04:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T11:04:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1054", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAxMjozNDo1Ni4wMDAxMjMifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-01T12:34:56.000Z" - } - }, - { - "_sort": "2001-01-01T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1055", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAxMjozNDo1Ni4wMDAxMjMgR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-01T12:34:56.000Z" - } - }, - { - "_sort": "2001-01-01T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1056", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAxMjozNDo1Ni4wMDAxMjMgVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-01T11:04:56.000Z" - } - }, - { - "_sort": "2001-01-01T11:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T11:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1057", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAxMjozNDo1Ni4wMDAxMjMgRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-01T17:34:56.000Z" - } - }, - { - "_sort": "2001-01-01T17:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T17:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1058", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAxMjozNDo1Ni4wMDAxMjMgKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-01T11:04:56.000Z" - } - }, - { - "_sort": "2001-01-01T11:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T11:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1059", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAxMjozNDo1Ni45OTk5OTk5OTk5OTkifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-01T12:34:56.999Z" - } - }, - { - "_sort": "2001-01-01T12:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T12:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1060", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAxMjozNDo1Ni45OTk5OTk5OTk5OTkgR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-01T12:34:56.999Z" - } - }, - { - "_sort": "2001-01-01T12:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T12:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1061", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAxMjozNDo1Ni45OTk5OTk5OTk5OTkgVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-01T11:04:56.999Z" - } - }, - { - "_sort": "2001-01-01T11:04:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T11:04:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1062", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAxMjozNDo1Ni45OTk5OTk5OTk5OTkgRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-01T17:34:56.999Z" - } - }, - { - "_sort": "2001-01-01T17:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T17:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1063", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAxMjozNDo1Ni45OTk5OTk5OTk5OTkgKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-01T11:04:56.999Z" - } - }, - { - "_sort": "2001-01-01T11:04:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T11:04:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1064", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAyNDowMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-02T00:00:00.000Z" - } - }, - { - "_sort": "2001-01-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1065", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAyNDowMCBHTVQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-02T00:00:00.000Z" - } - }, - { - "_sort": "2001-01-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1066", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAyNDowMCBVVEMrMDE6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-01T22:30:00.000Z" - } - }, - { - "_sort": "2001-01-01T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1067", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAyNDowMCBFU1QifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-02T05:00:00.000Z" - } - }, - { - "_sort": "2001-01-02T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-02T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1068", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAyNDowMCArMDEzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-01T22:30:00.000Z" - } - }, - { - "_sort": "2001-01-01T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1069", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAxMjowMCBBTSJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2001-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1070", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAxMjowMCBBTSBHTVQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2001-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1071", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAxMjowMCBBTSBVVEMrMDE6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2000-12-31T22:30:00.000Z" - } - }, - { - "_sort": "2000-12-31T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2000-12-31T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1072", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAxMjowMCBBTSBFU1QifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-01T05:00:00.000Z" - } - }, - { - "_sort": "2001-01-01T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1073", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAxMjowMCBBTSArMDEzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2000-12-31T22:30:00.000Z" - } - }, - { - "_sort": "2000-12-31T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2000-12-31T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1074", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAxMjowMCBQTSJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-01T12:00:00.000Z" - } - }, - { - "_sort": "2001-01-01T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1075", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAxMjowMCBQTSBHTVQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-01T12:00:00.000Z" - } - }, - { - "_sort": "2001-01-01T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1076", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAxMjowMCBQTSBVVEMrMDE6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-01T10:30:00.000Z" - } - }, - { - "_sort": "2001-01-01T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1077", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAxMjowMCBQTSBFU1QifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-01T17:00:00.000Z" - } - }, - { - "_sort": "2001-01-01T17:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T17:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1078", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAxMjowMCBQTSArMDEzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-01T10:30:00.000Z" - } - }, - { - "_sort": "2001-01-01T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1079", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAwOjAwIFBNIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-01T12:00:00.000Z" - } - }, - { - "_sort": "2001-01-01T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1080", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAwOjAwIFBNIEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-01T12:00:00.000Z" - } - }, - { - "_sort": "2001-01-01T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1081", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAwOjAwIFBNIFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-01T10:30:00.000Z" - } - }, - { - "_sort": "2001-01-01T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1082", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAwOjAwIFBNIEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-01T17:00:00.000Z" - } - }, - { - "_sort": "2001-01-01T17:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T17:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1083", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAwOjAwIFBNICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-01T10:30:00.000Z" - } - }, - { - "_sort": "2001-01-01T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1084", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAxMzowMCBQTSJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1085", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAxMzowMCBQTSBHTVQifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1086", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAxMzowMCBQTSBVVEMrMDE6MzAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1087", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAxMzowMCBQTSBFU1QifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1088", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDAwMS0wMS0wMSAxMzowMCBQTSArMDEzMCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1089", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-02-03T00:00:00.000Z" - } - }, - { - "_sort": "2001-02-03T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1090", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyBHTVQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-02-03T00:00:00.000Z" - } - }, - { - "_sort": "2001-02-03T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1091", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyBVVEMrMDE6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-02-02T22:30:00.000Z" - } - }, - { - "_sort": "2001-02-02T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-02T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1092", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyBFU1QifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-02-03T05:00:00.000Z" - } - }, - { - "_sort": "2001-02-03T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1093", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyArMDEzMCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1094", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAxMjozNCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-02-03T12:34:00.000Z" - } - }, - { - "_sort": "2001-02-03T12:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T12:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1095", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAxMjozNCBHTVQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-02-03T12:34:00.000Z" - } - }, - { - "_sort": "2001-02-03T12:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T12:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1096", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAxMjozNCBVVEMrMDE6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-02-03T11:04:00.000Z" - } - }, - { - "_sort": "2001-02-03T11:04:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T11:04:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1097", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAxMjozNCBFU1QifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-02-03T17:34:00.000Z" - } - }, - { - "_sort": "2001-02-03T17:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T17:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1098", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAxMjozNCArMDEzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-02-03T11:04:00.000Z" - } - }, - { - "_sort": "2001-02-03T11:04:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T11:04:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1099", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAxMjozNDo1Ni4wMDAxMjMifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-02-03T12:34:56.000Z" - } - }, - { - "_sort": "2001-02-03T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1100", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAxMjozNDo1Ni4wMDAxMjMgR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-02-03T12:34:56.000Z" - } - }, - { - "_sort": "2001-02-03T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1101", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAxMjozNDo1Ni4wMDAxMjMgVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-02-03T11:04:56.000Z" - } - }, - { - "_sort": "2001-02-03T11:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T11:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1102", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAxMjozNDo1Ni4wMDAxMjMgRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-02-03T17:34:56.000Z" - } - }, - { - "_sort": "2001-02-03T17:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T17:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1103", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAxMjozNDo1Ni4wMDAxMjMgKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-02-03T11:04:56.000Z" - } - }, - { - "_sort": "2001-02-03T11:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T11:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1104", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAxMjozNDo1Ni45OTk5OTk5OTk5OTkifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-02-03T12:34:56.999Z" - } - }, - { - "_sort": "2001-02-03T12:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T12:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1105", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAxMjozNDo1Ni45OTk5OTk5OTk5OTkgR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-02-03T12:34:56.999Z" - } - }, - { - "_sort": "2001-02-03T12:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T12:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1106", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAxMjozNDo1Ni45OTk5OTk5OTk5OTkgVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-02-03T11:04:56.999Z" - } - }, - { - "_sort": "2001-02-03T11:04:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T11:04:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1107", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAxMjozNDo1Ni45OTk5OTk5OTk5OTkgRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-02-03T17:34:56.999Z" - } - }, - { - "_sort": "2001-02-03T17:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T17:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1108", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAxMjozNDo1Ni45OTk5OTk5OTk5OTkgKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-02-03T11:04:56.999Z" - } - }, - { - "_sort": "2001-02-03T11:04:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T11:04:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1109", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAyNDowMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-02-04T00:00:00.000Z" - } - }, - { - "_sort": "2001-02-04T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-04T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1110", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAyNDowMCBHTVQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-02-04T00:00:00.000Z" - } - }, - { - "_sort": "2001-02-04T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-04T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1111", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAyNDowMCBVVEMrMDE6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-02-03T22:30:00.000Z" - } - }, - { - "_sort": "2001-02-03T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1112", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAyNDowMCBFU1QifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-02-04T05:00:00.000Z" - } - }, - { - "_sort": "2001-02-04T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-04T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1113", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAyNDowMCArMDEzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-02-03T22:30:00.000Z" - } - }, - { - "_sort": "2001-02-03T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1114", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAxMjowMCBBTSJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-02-03T00:00:00.000Z" - } - }, - { - "_sort": "2001-02-03T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1115", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAxMjowMCBBTSBHTVQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-02-03T00:00:00.000Z" - } - }, - { - "_sort": "2001-02-03T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1116", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAxMjowMCBBTSBVVEMrMDE6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-02-02T22:30:00.000Z" - } - }, - { - "_sort": "2001-02-02T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-02T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1117", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAxMjowMCBBTSBFU1QifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-02-03T05:00:00.000Z" - } - }, - { - "_sort": "2001-02-03T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1118", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAxMjowMCBBTSArMDEzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-02-02T22:30:00.000Z" - } - }, - { - "_sort": "2001-02-02T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-02T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1119", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAxMjowMCBQTSJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-02-03T12:00:00.000Z" - } - }, - { - "_sort": "2001-02-03T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1120", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAxMjowMCBQTSBHTVQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-02-03T12:00:00.000Z" - } - }, - { - "_sort": "2001-02-03T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1121", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAxMjowMCBQTSBVVEMrMDE6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-02-03T10:30:00.000Z" - } - }, - { - "_sort": "2001-02-03T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1122", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAxMjowMCBQTSBFU1QifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-02-03T17:00:00.000Z" - } - }, - { - "_sort": "2001-02-03T17:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T17:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1123", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAxMjowMCBQTSArMDEzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-02-03T10:30:00.000Z" - } - }, - { - "_sort": "2001-02-03T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1124", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAwOjAwIFBNIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-02-03T12:00:00.000Z" - } - }, - { - "_sort": "2001-02-03T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1125", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAwOjAwIFBNIEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-02-03T12:00:00.000Z" - } - }, - { - "_sort": "2001-02-03T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1126", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAwOjAwIFBNIFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-02-03T10:30:00.000Z" - } - }, - { - "_sort": "2001-02-03T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1127", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAwOjAwIFBNIEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-02-03T17:00:00.000Z" - } - }, - { - "_sort": "2001-02-03T17:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T17:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1128", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAwOjAwIFBNICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-02-03T10:30:00.000Z" - } - }, - { - "_sort": "2001-02-03T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1129", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAxMzowMCBQTSJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1130", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAxMzowMCBQTSBHTVQifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1131", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAxMzowMCBQTSBVVEMrMDE6MzAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1132", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAxMzowMCBQTSBFU1QifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1133", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyAxMzowMCBQTSArMDEzMCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1134", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2003-01-02T00:00:00.000Z" - } - }, - { - "_sort": "2003-01-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1135", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2003-01-02T00:00:00.000Z" - } - }, - { - "_sort": "2003-01-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1136", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2003-01-01T22:30:00.000Z" - } - }, - { - "_sort": "2003-01-01T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-01T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1137", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2003-01-02T05:00:00.000Z" - } - }, - { - "_sort": "2003-01-02T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1138", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgKzAxMzAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1139", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMTI6MzQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2003-01-02T12:34:00.000Z" - } - }, - { - "_sort": "2003-01-02T12:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T12:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1140", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMTI6MzQgR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2003-01-02T12:34:00.000Z" - } - }, - { - "_sort": "2003-01-02T12:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T12:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1141", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMTI6MzQgVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2003-01-02T11:04:00.000Z" - } - }, - { - "_sort": "2003-01-02T11:04:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T11:04:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1142", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMTI6MzQgRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2003-01-02T17:34:00.000Z" - } - }, - { - "_sort": "2003-01-02T17:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T17:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1143", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMTI6MzQgKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2003-01-02T11:04:00.000Z" - } - }, - { - "_sort": "2003-01-02T11:04:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T11:04:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1144", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMTI6MzQ6NTYuMDAwMTIzIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2003-01-02T12:34:56.000Z" - } - }, - { - "_sort": "2003-01-02T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1145", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMTI6MzQ6NTYuMDAwMTIzIEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2003-01-02T12:34:56.000Z" - } - }, - { - "_sort": "2003-01-02T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1146", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMTI6MzQ6NTYuMDAwMTIzIFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2003-01-02T11:04:56.000Z" - } - }, - { - "_sort": "2003-01-02T11:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T11:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1147", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMTI6MzQ6NTYuMDAwMTIzIEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2003-01-02T17:34:56.000Z" - } - }, - { - "_sort": "2003-01-02T17:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T17:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1148", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMTI6MzQ6NTYuMDAwMTIzICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2003-01-02T11:04:56.000Z" - } - }, - { - "_sort": "2003-01-02T11:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T11:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1149", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5In0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2003-01-02T12:34:56.999Z" - } - }, - { - "_sort": "2003-01-02T12:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T12:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1150", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2003-01-02T12:34:56.999Z" - } - }, - { - "_sort": "2003-01-02T12:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T12:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1151", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2003-01-02T11:04:56.999Z" - } - }, - { - "_sort": "2003-01-02T11:04:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T11:04:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1152", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2003-01-02T17:34:56.999Z" - } - }, - { - "_sort": "2003-01-02T17:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T17:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1153", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5ICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2003-01-02T11:04:56.999Z" - } - }, - { - "_sort": "2003-01-02T11:04:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T11:04:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1154", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMjQ6MDAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2003-01-03T00:00:00.000Z" - } - }, - { - "_sort": "2003-01-03T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-03T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1155", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMjQ6MDAgR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2003-01-03T00:00:00.000Z" - } - }, - { - "_sort": "2003-01-03T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-03T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1156", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMjQ6MDAgVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2003-01-02T22:30:00.000Z" - } - }, - { - "_sort": "2003-01-02T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1157", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMjQ6MDAgRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2003-01-03T05:00:00.000Z" - } - }, - { - "_sort": "2003-01-03T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-03T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1158", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMjQ6MDAgKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2003-01-02T22:30:00.000Z" - } - }, - { - "_sort": "2003-01-02T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1159", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMTI6MDAgQU0ifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2003-01-02T00:00:00.000Z" - } - }, - { - "_sort": "2003-01-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1160", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMTI6MDAgQU0gR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2003-01-02T00:00:00.000Z" - } - }, - { - "_sort": "2003-01-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1161", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMTI6MDAgQU0gVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2003-01-01T22:30:00.000Z" - } - }, - { - "_sort": "2003-01-01T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-01T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1162", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMTI6MDAgQU0gRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2003-01-02T05:00:00.000Z" - } - }, - { - "_sort": "2003-01-02T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1163", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMTI6MDAgQU0gKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2003-01-01T22:30:00.000Z" - } - }, - { - "_sort": "2003-01-01T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-01T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1164", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMTI6MDAgUE0ifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2003-01-02T12:00:00.000Z" - } - }, - { - "_sort": "2003-01-02T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1165", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMTI6MDAgUE0gR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2003-01-02T12:00:00.000Z" - } - }, - { - "_sort": "2003-01-02T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1166", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMTI6MDAgUE0gVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2003-01-02T10:30:00.000Z" - } - }, - { - "_sort": "2003-01-02T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1167", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMTI6MDAgUE0gRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2003-01-02T17:00:00.000Z" - } - }, - { - "_sort": "2003-01-02T17:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T17:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1168", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMTI6MDAgUE0gKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2003-01-02T10:30:00.000Z" - } - }, - { - "_sort": "2003-01-02T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1169", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMDowMCBQTSJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2003-01-02T12:00:00.000Z" - } - }, - { - "_sort": "2003-01-02T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1170", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMDowMCBQTSBHTVQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2003-01-02T12:00:00.000Z" - } - }, - { - "_sort": "2003-01-02T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1171", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMDowMCBQTSBVVEMrMDE6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2003-01-02T10:30:00.000Z" - } - }, - { - "_sort": "2003-01-02T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1172", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMDowMCBQTSBFU1QifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2003-01-02T17:00:00.000Z" - } - }, - { - "_sort": "2003-01-02T17:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T17:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1173", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMDowMCBQTSArMDEzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2003-01-02T10:30:00.000Z" - } - }, - { - "_sort": "2003-01-02T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1174", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMTM6MDAgUE0ifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1175", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMTM6MDAgUE0gR01UIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1176", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMTM6MDAgUE0gVVRDKzAxOjMwIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1177", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMTM6MDAgUE0gRVNUIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1178", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMDEvMDIvMDMgMTM6MDAgUE0gKzAxMzAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1179", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2032-01-02T00:00:00.000Z" - } - }, - { - "_sort": "2032-01-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1180", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2032-01-02T00:00:00.000Z" - } - }, - { - "_sort": "2032-01-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1181", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2032-01-01T22:30:00.000Z" - } - }, - { - "_sort": "2032-01-01T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-01T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1182", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2032-01-02T05:00:00.000Z" - } - }, - { - "_sort": "2032-01-02T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1183", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgKzAxMzAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1184", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMTI6MzQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2032-01-02T12:34:00.000Z" - } - }, - { - "_sort": "2032-01-02T12:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T12:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1185", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMTI6MzQgR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2032-01-02T12:34:00.000Z" - } - }, - { - "_sort": "2032-01-02T12:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T12:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1186", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMTI6MzQgVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2032-01-02T11:04:00.000Z" - } - }, - { - "_sort": "2032-01-02T11:04:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T11:04:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1187", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMTI6MzQgRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2032-01-02T17:34:00.000Z" - } - }, - { - "_sort": "2032-01-02T17:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T17:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1188", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMTI6MzQgKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2032-01-02T11:04:00.000Z" - } - }, - { - "_sort": "2032-01-02T11:04:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T11:04:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1189", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMTI6MzQ6NTYuMDAwMTIzIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2032-01-02T12:34:56.000Z" - } - }, - { - "_sort": "2032-01-02T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1190", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMTI6MzQ6NTYuMDAwMTIzIEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2032-01-02T12:34:56.000Z" - } - }, - { - "_sort": "2032-01-02T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1191", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMTI6MzQ6NTYuMDAwMTIzIFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2032-01-02T11:04:56.000Z" - } - }, - { - "_sort": "2032-01-02T11:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T11:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1192", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMTI6MzQ6NTYuMDAwMTIzIEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2032-01-02T17:34:56.000Z" - } - }, - { - "_sort": "2032-01-02T17:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T17:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1193", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMTI6MzQ6NTYuMDAwMTIzICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2032-01-02T11:04:56.000Z" - } - }, - { - "_sort": "2032-01-02T11:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T11:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1194", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5In0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2032-01-02T12:34:56.999Z" - } - }, - { - "_sort": "2032-01-02T12:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T12:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1195", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2032-01-02T12:34:56.999Z" - } - }, - { - "_sort": "2032-01-02T12:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T12:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1196", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2032-01-02T11:04:56.999Z" - } - }, - { - "_sort": "2032-01-02T11:04:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T11:04:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1197", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2032-01-02T17:34:56.999Z" - } - }, - { - "_sort": "2032-01-02T17:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T17:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1198", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5ICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2032-01-02T11:04:56.999Z" - } - }, - { - "_sort": "2032-01-02T11:04:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T11:04:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1199", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMjQ6MDAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2032-01-03T00:00:00.000Z" - } - }, - { - "_sort": "2032-01-03T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-03T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1200", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMjQ6MDAgR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2032-01-03T00:00:00.000Z" - } - }, - { - "_sort": "2032-01-03T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-03T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1201", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMjQ6MDAgVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2032-01-02T22:30:00.000Z" - } - }, - { - "_sort": "2032-01-02T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1202", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMjQ6MDAgRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2032-01-03T05:00:00.000Z" - } - }, - { - "_sort": "2032-01-03T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-03T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1203", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMjQ6MDAgKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2032-01-02T22:30:00.000Z" - } - }, - { - "_sort": "2032-01-02T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1204", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMTI6MDAgQU0ifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2032-01-02T00:00:00.000Z" - } - }, - { - "_sort": "2032-01-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1205", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMTI6MDAgQU0gR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2032-01-02T00:00:00.000Z" - } - }, - { - "_sort": "2032-01-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1206", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMTI6MDAgQU0gVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2032-01-01T22:30:00.000Z" - } - }, - { - "_sort": "2032-01-01T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-01T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1207", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMTI6MDAgQU0gRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2032-01-02T05:00:00.000Z" - } - }, - { - "_sort": "2032-01-02T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1208", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMTI6MDAgQU0gKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2032-01-01T22:30:00.000Z" - } - }, - { - "_sort": "2032-01-01T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-01T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1209", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMTI6MDAgUE0ifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2032-01-02T12:00:00.000Z" - } - }, - { - "_sort": "2032-01-02T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1210", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMTI6MDAgUE0gR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2032-01-02T12:00:00.000Z" - } - }, - { - "_sort": "2032-01-02T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1211", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMTI6MDAgUE0gVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2032-01-02T10:30:00.000Z" - } - }, - { - "_sort": "2032-01-02T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1212", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMTI6MDAgUE0gRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2032-01-02T17:00:00.000Z" - } - }, - { - "_sort": "2032-01-02T17:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T17:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1213", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMTI6MDAgUE0gKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2032-01-02T10:30:00.000Z" - } - }, - { - "_sort": "2032-01-02T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1214", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMDowMCBQTSJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2032-01-02T12:00:00.000Z" - } - }, - { - "_sort": "2032-01-02T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1215", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMDowMCBQTSBHTVQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2032-01-02T12:00:00.000Z" - } - }, - { - "_sort": "2032-01-02T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1216", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMDowMCBQTSBVVEMrMDE6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2032-01-02T10:30:00.000Z" - } - }, - { - "_sort": "2032-01-02T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1217", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMDowMCBQTSBFU1QifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2032-01-02T17:00:00.000Z" - } - }, - { - "_sort": "2032-01-02T17:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T17:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1218", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMDowMCBQTSArMDEzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2032-01-02T10:30:00.000Z" - } - }, - { - "_sort": "2032-01-02T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1219", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMTM6MDAgUE0ifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1220", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMTM6MDAgUE0gR01UIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1221", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMTM6MDAgUE0gVVRDKzAxOjMwIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1222", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMTM6MDAgUE0gRVNUIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1223", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMzIvMDEvMDIgMTM6MDAgUE0gKzAxMzAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1224", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-05T00:00:00.000Z" - } - }, - { - "_sort": "2001-01-05T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1225", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-05T00:00:00.000Z" - } - }, - { - "_sort": "2001-01-05T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1226", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-04T22:30:00.000Z" - } - }, - { - "_sort": "2001-01-04T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-04T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1227", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-05T05:00:00.000Z" - } - }, - { - "_sort": "2001-01-05T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1228", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgKzAxMzAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1229", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMTI6MzQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-05T12:34:00.000Z" - } - }, - { - "_sort": "2001-01-05T12:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T12:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1230", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMTI6MzQgR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-05T12:34:00.000Z" - } - }, - { - "_sort": "2001-01-05T12:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T12:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1231", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMTI6MzQgVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-05T11:04:00.000Z" - } - }, - { - "_sort": "2001-01-05T11:04:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T11:04:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1232", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMTI6MzQgRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-05T17:34:00.000Z" - } - }, - { - "_sort": "2001-01-05T17:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T17:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1233", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMTI6MzQgKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-05T11:04:00.000Z" - } - }, - { - "_sort": "2001-01-05T11:04:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T11:04:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1234", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMTI6MzQ6NTYuMDAwMTIzIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-05T12:34:56.000Z" - } - }, - { - "_sort": "2001-01-05T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1235", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMTI6MzQ6NTYuMDAwMTIzIEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-05T12:34:56.000Z" - } - }, - { - "_sort": "2001-01-05T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1236", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMTI6MzQ6NTYuMDAwMTIzIFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-05T11:04:56.000Z" - } - }, - { - "_sort": "2001-01-05T11:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T11:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1237", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMTI6MzQ6NTYuMDAwMTIzIEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-05T17:34:56.000Z" - } - }, - { - "_sort": "2001-01-05T17:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T17:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1238", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMTI6MzQ6NTYuMDAwMTIzICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-05T11:04:56.000Z" - } - }, - { - "_sort": "2001-01-05T11:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T11:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1239", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5In0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-05T12:34:56.999Z" - } - }, - { - "_sort": "2001-01-05T12:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T12:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1240", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-05T12:34:56.999Z" - } - }, - { - "_sort": "2001-01-05T12:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T12:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1241", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-05T11:04:56.999Z" - } - }, - { - "_sort": "2001-01-05T11:04:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T11:04:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1242", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-05T17:34:56.999Z" - } - }, - { - "_sort": "2001-01-05T17:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T17:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1243", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5ICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-05T11:04:56.999Z" - } - }, - { - "_sort": "2001-01-05T11:04:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T11:04:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1244", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMjQ6MDAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-06T00:00:00.000Z" - } - }, - { - "_sort": "2001-01-06T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-06T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1245", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMjQ6MDAgR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-06T00:00:00.000Z" - } - }, - { - "_sort": "2001-01-06T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-06T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1246", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMjQ6MDAgVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-05T22:30:00.000Z" - } - }, - { - "_sort": "2001-01-05T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1247", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMjQ6MDAgRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-06T05:00:00.000Z" - } - }, - { - "_sort": "2001-01-06T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-06T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1248", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMjQ6MDAgKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-05T22:30:00.000Z" - } - }, - { - "_sort": "2001-01-05T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1249", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMTI6MDAgQU0ifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-05T00:00:00.000Z" - } - }, - { - "_sort": "2001-01-05T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1250", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMTI6MDAgQU0gR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-05T00:00:00.000Z" - } - }, - { - "_sort": "2001-01-05T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1251", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMTI6MDAgQU0gVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-04T22:30:00.000Z" - } - }, - { - "_sort": "2001-01-04T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-04T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1252", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMTI6MDAgQU0gRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-05T05:00:00.000Z" - } - }, - { - "_sort": "2001-01-05T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1253", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMTI6MDAgQU0gKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-04T22:30:00.000Z" - } - }, - { - "_sort": "2001-01-04T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-04T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1254", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMTI6MDAgUE0ifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-05T12:00:00.000Z" - } - }, - { - "_sort": "2001-01-05T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1255", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMTI6MDAgUE0gR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-05T12:00:00.000Z" - } - }, - { - "_sort": "2001-01-05T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1256", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMTI6MDAgUE0gVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-05T10:30:00.000Z" - } - }, - { - "_sort": "2001-01-05T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1257", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMTI6MDAgUE0gRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-05T17:00:00.000Z" - } - }, - { - "_sort": "2001-01-05T17:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T17:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1258", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMTI6MDAgUE0gKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-05T10:30:00.000Z" - } - }, - { - "_sort": "2001-01-05T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1259", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMDowMCBQTSJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-05T12:00:00.000Z" - } - }, - { - "_sort": "2001-01-05T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1260", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMDowMCBQTSBHTVQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-05T12:00:00.000Z" - } - }, - { - "_sort": "2001-01-05T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1261", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMDowMCBQTSBVVEMrMDE6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-05T10:30:00.000Z" - } - }, - { - "_sort": "2001-01-05T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1262", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMDowMCBQTSBFU1QifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-05T17:00:00.000Z" - } - }, - { - "_sort": "2001-01-05T17:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T17:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1263", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMDowMCBQTSArMDEzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-01-05T10:30:00.000Z" - } - }, - { - "_sort": "2001-01-05T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1264", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMTM6MDAgUE0ifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1265", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMTM6MDAgUE0gR01UIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1266", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMTM6MDAgUE0gVVRDKzAxOjMwIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1267", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMTM6MDAgUE0gRVNUIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1268", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiSmFuIDUgMTM6MDAgUE0gKzAxMzAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1269", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2049-03-05T00:00:00.000Z" - } - }, - { - "_sort": "2049-03-05T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1270", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSBHTVQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2049-03-05T00:00:00.000Z" - } - }, - { - "_sort": "2049-03-05T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1271", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSBVVEMrMDE6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2049-03-04T22:30:00.000Z" - } - }, - { - "_sort": "2049-03-04T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-04T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1272", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSBFU1QifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2049-03-05T05:00:00.000Z" - } - }, - { - "_sort": "2049-03-05T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1273", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSArMDEzMCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1274", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAxMjozNCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2049-03-05T12:34:00.000Z" - } - }, - { - "_sort": "2049-03-05T12:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T12:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1275", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAxMjozNCBHTVQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2049-03-05T12:34:00.000Z" - } - }, - { - "_sort": "2049-03-05T12:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T12:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1276", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAxMjozNCBVVEMrMDE6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2049-03-05T11:04:00.000Z" - } - }, - { - "_sort": "2049-03-05T11:04:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T11:04:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1277", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAxMjozNCBFU1QifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2049-03-05T17:34:00.000Z" - } - }, - { - "_sort": "2049-03-05T17:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T17:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1278", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAxMjozNCArMDEzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2049-03-05T11:04:00.000Z" - } - }, - { - "_sort": "2049-03-05T11:04:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T11:04:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1279", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAxMjozNDo1Ni4wMDAxMjMifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2049-03-05T12:34:56.000Z" - } - }, - { - "_sort": "2049-03-05T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1280", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAxMjozNDo1Ni4wMDAxMjMgR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2049-03-05T12:34:56.000Z" - } - }, - { - "_sort": "2049-03-05T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1281", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAxMjozNDo1Ni4wMDAxMjMgVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2049-03-05T11:04:56.000Z" - } - }, - { - "_sort": "2049-03-05T11:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T11:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1282", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAxMjozNDo1Ni4wMDAxMjMgRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2049-03-05T17:34:56.000Z" - } - }, - { - "_sort": "2049-03-05T17:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T17:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1283", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAxMjozNDo1Ni4wMDAxMjMgKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2049-03-05T11:04:56.000Z" - } - }, - { - "_sort": "2049-03-05T11:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T11:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1284", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAxMjozNDo1Ni45OTk5OTk5OTk5OTkifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2049-03-05T12:34:56.999Z" - } - }, - { - "_sort": "2049-03-05T12:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T12:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1285", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAxMjozNDo1Ni45OTk5OTk5OTk5OTkgR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2049-03-05T12:34:56.999Z" - } - }, - { - "_sort": "2049-03-05T12:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T12:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1286", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAxMjozNDo1Ni45OTk5OTk5OTk5OTkgVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2049-03-05T11:04:56.999Z" - } - }, - { - "_sort": "2049-03-05T11:04:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T11:04:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1287", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAxMjozNDo1Ni45OTk5OTk5OTk5OTkgRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2049-03-05T17:34:56.999Z" - } - }, - { - "_sort": "2049-03-05T17:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T17:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1288", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAxMjozNDo1Ni45OTk5OTk5OTk5OTkgKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2049-03-05T11:04:56.999Z" - } - }, - { - "_sort": "2049-03-05T11:04:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T11:04:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1289", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAyNDowMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2049-03-06T00:00:00.000Z" - } - }, - { - "_sort": "2049-03-06T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-06T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1290", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAyNDowMCBHTVQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2049-03-06T00:00:00.000Z" - } - }, - { - "_sort": "2049-03-06T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-06T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1291", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAyNDowMCBVVEMrMDE6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2049-03-05T22:30:00.000Z" - } - }, - { - "_sort": "2049-03-05T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1292", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAyNDowMCBFU1QifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2049-03-06T05:00:00.000Z" - } - }, - { - "_sort": "2049-03-06T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-06T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1293", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAyNDowMCArMDEzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2049-03-05T22:30:00.000Z" - } - }, - { - "_sort": "2049-03-05T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1294", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAxMjowMCBBTSJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2049-03-05T00:00:00.000Z" - } - }, - { - "_sort": "2049-03-05T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1295", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAxMjowMCBBTSBHTVQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2049-03-05T00:00:00.000Z" - } - }, - { - "_sort": "2049-03-05T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1296", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAxMjowMCBBTSBVVEMrMDE6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2049-03-04T22:30:00.000Z" - } - }, - { - "_sort": "2049-03-04T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-04T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1297", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAxMjowMCBBTSBFU1QifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2049-03-05T05:00:00.000Z" - } - }, - { - "_sort": "2049-03-05T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1298", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAxMjowMCBBTSArMDEzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2049-03-04T22:30:00.000Z" - } - }, - { - "_sort": "2049-03-04T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-04T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1299", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAxMjowMCBQTSJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2049-03-05T12:00:00.000Z" - } - }, - { - "_sort": "2049-03-05T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1300", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAxMjowMCBQTSBHTVQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2049-03-05T12:00:00.000Z" - } - }, - { - "_sort": "2049-03-05T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1301", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAxMjowMCBQTSBVVEMrMDE6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2049-03-05T10:30:00.000Z" - } - }, - { - "_sort": "2049-03-05T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1302", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAxMjowMCBQTSBFU1QifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2049-03-05T17:00:00.000Z" - } - }, - { - "_sort": "2049-03-05T17:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T17:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1303", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAxMjowMCBQTSArMDEzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2049-03-05T10:30:00.000Z" - } - }, - { - "_sort": "2049-03-05T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1304", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAwOjAwIFBNIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2049-03-05T12:00:00.000Z" - } - }, - { - "_sort": "2049-03-05T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1305", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAwOjAwIFBNIEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2049-03-05T12:00:00.000Z" - } - }, - { - "_sort": "2049-03-05T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1306", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAwOjAwIFBNIFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2049-03-05T10:30:00.000Z" - } - }, - { - "_sort": "2049-03-05T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1307", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAwOjAwIFBNIEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2049-03-05T17:00:00.000Z" - } - }, - { - "_sort": "2049-03-05T17:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T17:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1308", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAwOjAwIFBNICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2049-03-05T10:30:00.000Z" - } - }, - { - "_sort": "2049-03-05T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1309", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAxMzowMCBQTSJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1310", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAxMzowMCBQTSBHTVQifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1311", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAxMzowMCBQTSBVVEMrMDE6MzAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1312", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAxMzowMCBQTSBFU1QifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1313", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiNSBNYXJjaCA0OSAxMzowMCBQTSArMDEzMCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1314", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "1999-12-31T00:00:00.000Z" - } - }, - { - "_sort": "1999-12-31T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1315", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "1999-12-31T00:00:00.000Z" - } - }, - { - "_sort": "1999-12-31T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1316", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "1999-12-30T22:30:00.000Z" - } - }, - { - "_sort": "1999-12-30T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-30T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1317", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "1999-12-31T05:00:00.000Z" - } - }, - { - "_sort": "1999-12-31T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1318", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgKzAxMzAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1319", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMTI6MzQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "1999-12-31T12:34:00.000Z" - } - }, - { - "_sort": "1999-12-31T12:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T12:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1320", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMTI6MzQgR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "1999-12-31T12:34:00.000Z" - } - }, - { - "_sort": "1999-12-31T12:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T12:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1321", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMTI6MzQgVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "1999-12-31T11:04:00.000Z" - } - }, - { - "_sort": "1999-12-31T11:04:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T11:04:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1322", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMTI6MzQgRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "1999-12-31T17:34:00.000Z" - } - }, - { - "_sort": "1999-12-31T17:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T17:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1323", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMTI6MzQgKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "1999-12-31T11:04:00.000Z" - } - }, - { - "_sort": "1999-12-31T11:04:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T11:04:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1324", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMTI6MzQ6NTYuMDAwMTIzIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "1999-12-31T12:34:56.000Z" - } - }, - { - "_sort": "1999-12-31T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1325", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMTI6MzQ6NTYuMDAwMTIzIEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "1999-12-31T12:34:56.000Z" - } - }, - { - "_sort": "1999-12-31T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1326", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMTI6MzQ6NTYuMDAwMTIzIFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "1999-12-31T11:04:56.000Z" - } - }, - { - "_sort": "1999-12-31T11:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T11:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1327", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMTI6MzQ6NTYuMDAwMTIzIEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "1999-12-31T17:34:56.000Z" - } - }, - { - "_sort": "1999-12-31T17:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T17:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1328", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMTI6MzQ6NTYuMDAwMTIzICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "1999-12-31T11:04:56.000Z" - } - }, - { - "_sort": "1999-12-31T11:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T11:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1329", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5In0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "1999-12-31T12:34:56.999Z" - } - }, - { - "_sort": "1999-12-31T12:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T12:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1330", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "1999-12-31T12:34:56.999Z" - } - }, - { - "_sort": "1999-12-31T12:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T12:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1331", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "1999-12-31T11:04:56.999Z" - } - }, - { - "_sort": "1999-12-31T11:04:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T11:04:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1332", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "1999-12-31T17:34:56.999Z" - } - }, - { - "_sort": "1999-12-31T17:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T17:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1333", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5ICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "1999-12-31T11:04:56.999Z" - } - }, - { - "_sort": "1999-12-31T11:04:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T11:04:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1334", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMjQ6MDAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2000-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2000-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2000-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1335", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMjQ6MDAgR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2000-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2000-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2000-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1336", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMjQ6MDAgVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "1999-12-31T22:30:00.000Z" - } - }, - { - "_sort": "1999-12-31T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1337", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMjQ6MDAgRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2000-01-01T05:00:00.000Z" - } - }, - { - "_sort": "2000-01-01T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2000-01-01T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1338", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMjQ6MDAgKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "1999-12-31T22:30:00.000Z" - } - }, - { - "_sort": "1999-12-31T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1339", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMTI6MDAgQU0ifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "1999-12-31T00:00:00.000Z" - } - }, - { - "_sort": "1999-12-31T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1340", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMTI6MDAgQU0gR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "1999-12-31T00:00:00.000Z" - } - }, - { - "_sort": "1999-12-31T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1341", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMTI6MDAgQU0gVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "1999-12-30T22:30:00.000Z" - } - }, - { - "_sort": "1999-12-30T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-30T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1342", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMTI6MDAgQU0gRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "1999-12-31T05:00:00.000Z" - } - }, - { - "_sort": "1999-12-31T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1343", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMTI6MDAgQU0gKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "1999-12-30T22:30:00.000Z" - } - }, - { - "_sort": "1999-12-30T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-30T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1344", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMTI6MDAgUE0ifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "1999-12-31T12:00:00.000Z" - } - }, - { - "_sort": "1999-12-31T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1345", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMTI6MDAgUE0gR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "1999-12-31T12:00:00.000Z" - } - }, - { - "_sort": "1999-12-31T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1346", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMTI6MDAgUE0gVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "1999-12-31T10:30:00.000Z" - } - }, - { - "_sort": "1999-12-31T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1347", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMTI6MDAgUE0gRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "1999-12-31T17:00:00.000Z" - } - }, - { - "_sort": "1999-12-31T17:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T17:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1348", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMTI6MDAgUE0gKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "1999-12-31T10:30:00.000Z" - } - }, - { - "_sort": "1999-12-31T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1349", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMDowMCBQTSJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "1999-12-31T12:00:00.000Z" - } - }, - { - "_sort": "1999-12-31T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1350", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMDowMCBQTSBHTVQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "1999-12-31T12:00:00.000Z" - } - }, - { - "_sort": "1999-12-31T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1351", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMDowMCBQTSBVVEMrMDE6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "1999-12-31T10:30:00.000Z" - } - }, - { - "_sort": "1999-12-31T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1352", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMDowMCBQTSBFU1QifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "1999-12-31T17:00:00.000Z" - } - }, - { - "_sort": "1999-12-31T17:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T17:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1353", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMDowMCBQTSArMDEzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "1999-12-31T10:30:00.000Z" - } - }, - { - "_sort": "1999-12-31T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1354", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMTM6MDAgUE0ifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1355", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMTM6MDAgUE0gR01UIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1356", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMTM6MDAgUE0gVVRDKzAxOjMwIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1357", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMTM6MDAgUE0gRVNUIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1358", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiRGVjZW1iZXIgMzEgOTkgMTM6MDAgUE0gKzAxMzAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1359", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-01-02T00:00:00.000Z" - } - }, - { - "_sort": "2024-01-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1360", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-01-02T00:00:00.000Z" - } - }, - { - "_sort": "2024-01-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1361", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-01-01T22:30:00.000Z" - } - }, - { - "_sort": "2024-01-01T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-01T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1362", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-01-02T05:00:00.000Z" - } - }, - { - "_sort": "2024-01-02T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1363", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgKzAxMzAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1364", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMTI6MzQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-01-02T12:34:00.000Z" - } - }, - { - "_sort": "2024-01-02T12:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T12:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1365", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMTI6MzQgR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-01-02T12:34:00.000Z" - } - }, - { - "_sort": "2024-01-02T12:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T12:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1366", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMTI6MzQgVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-01-02T11:04:00.000Z" - } - }, - { - "_sort": "2024-01-02T11:04:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T11:04:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1367", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMTI6MzQgRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-01-02T17:34:00.000Z" - } - }, - { - "_sort": "2024-01-02T17:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T17:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1368", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMTI6MzQgKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-01-02T11:04:00.000Z" - } - }, - { - "_sort": "2024-01-02T11:04:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T11:04:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1369", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMTI6MzQ6NTYuMDAwMTIzIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-01-02T12:34:56.000Z" - } - }, - { - "_sort": "2024-01-02T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1370", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMTI6MzQ6NTYuMDAwMTIzIEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-01-02T12:34:56.000Z" - } - }, - { - "_sort": "2024-01-02T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1371", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMTI6MzQ6NTYuMDAwMTIzIFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-01-02T11:04:56.000Z" - } - }, - { - "_sort": "2024-01-02T11:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T11:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1372", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMTI6MzQ6NTYuMDAwMTIzIEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-01-02T17:34:56.000Z" - } - }, - { - "_sort": "2024-01-02T17:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T17:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1373", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMTI6MzQ6NTYuMDAwMTIzICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-01-02T11:04:56.000Z" - } - }, - { - "_sort": "2024-01-02T11:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T11:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1374", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5In0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-01-02T12:34:56.999Z" - } - }, - { - "_sort": "2024-01-02T12:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T12:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1375", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-01-02T12:34:56.999Z" - } - }, - { - "_sort": "2024-01-02T12:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T12:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1376", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-01-02T11:04:56.999Z" - } - }, - { - "_sort": "2024-01-02T11:04:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T11:04:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1377", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-01-02T17:34:56.999Z" - } - }, - { - "_sort": "2024-01-02T17:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T17:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1378", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5ICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-01-02T11:04:56.999Z" - } - }, - { - "_sort": "2024-01-02T11:04:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T11:04:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1379", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMjQ6MDAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-01-03T00:00:00.000Z" - } - }, - { - "_sort": "2024-01-03T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-03T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1380", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMjQ6MDAgR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-01-03T00:00:00.000Z" - } - }, - { - "_sort": "2024-01-03T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-03T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1381", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMjQ6MDAgVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-01-02T22:30:00.000Z" - } - }, - { - "_sort": "2024-01-02T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1382", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMjQ6MDAgRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-01-03T05:00:00.000Z" - } - }, - { - "_sort": "2024-01-03T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-03T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1383", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMjQ6MDAgKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-01-02T22:30:00.000Z" - } - }, - { - "_sort": "2024-01-02T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1384", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMTI6MDAgQU0ifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-01-02T00:00:00.000Z" - } - }, - { - "_sort": "2024-01-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1385", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMTI6MDAgQU0gR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-01-02T00:00:00.000Z" - } - }, - { - "_sort": "2024-01-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1386", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMTI6MDAgQU0gVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-01-01T22:30:00.000Z" - } - }, - { - "_sort": "2024-01-01T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-01T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1387", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMTI6MDAgQU0gRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-01-02T05:00:00.000Z" - } - }, - { - "_sort": "2024-01-02T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1388", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMTI6MDAgQU0gKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-01-01T22:30:00.000Z" - } - }, - { - "_sort": "2024-01-01T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-01T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1389", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMTI6MDAgUE0ifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-01-02T12:00:00.000Z" - } - }, - { - "_sort": "2024-01-02T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1390", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMTI6MDAgUE0gR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-01-02T12:00:00.000Z" - } - }, - { - "_sort": "2024-01-02T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1391", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMTI6MDAgUE0gVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-01-02T10:30:00.000Z" - } - }, - { - "_sort": "2024-01-02T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1392", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMTI6MDAgUE0gRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-01-02T17:00:00.000Z" - } - }, - { - "_sort": "2024-01-02T17:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T17:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1393", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMTI6MDAgUE0gKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-01-02T10:30:00.000Z" - } - }, - { - "_sort": "2024-01-02T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1394", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMDowMCBQTSJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-01-02T12:00:00.000Z" - } - }, - { - "_sort": "2024-01-02T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1395", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMDowMCBQTSBHTVQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-01-02T12:00:00.000Z" - } - }, - { - "_sort": "2024-01-02T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1396", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMDowMCBQTSBVVEMrMDE6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-01-02T10:30:00.000Z" - } - }, - { - "_sort": "2024-01-02T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1397", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMDowMCBQTSBFU1QifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-01-02T17:00:00.000Z" - } - }, - { - "_sort": "2024-01-02T17:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T17:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1398", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMDowMCBQTSArMDEzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-01-02T10:30:00.000Z" - } - }, - { - "_sort": "2024-01-02T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1399", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMTM6MDAgUE0ifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1400", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMTM6MDAgUE0gR01UIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1401", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMTM6MDAgUE0gVVRDKzAxOjMwIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1402", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMTM6MDAgUE0gRVNUIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1403", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNCwxLDIgMTM6MDAgUE0gKzAxMzAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1404", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMS0wMSAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1405", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMS0wMVx0In0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1406", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMS0wMVxuIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1407", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMS0wMe-7vyJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1408", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMS0wMSAoaWdub3JlZCkifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1409", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMS0wMSBnYXJiYWdlIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1410", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMS0wMVx1MDAwMGlnbm9yZWQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1411", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjpbIjIwMjQtMDItMjkiXX0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-02-29T00:00:00.000Z" - } - }, - { - "_sort": "2024-02-29T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1412", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjpbIjIwMjQtMDItMjkiXX0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-02-29T00:00:00.000Z" - } - }, - { - "_sort": "2024-02-29T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1413", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjpbIjIwMjQtMDItMjkiLCIyMDI0LTAzLTAxIl19" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1414", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjpbIiJdfQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1415", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjp7IngiOiJ4In19" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1416", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjp7InRvU3RyaW5nIjoieCJ9fQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1417", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiaW52YWxpZCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1418", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjp7InRvU3RyaW5nIjoieCJ9fQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1419", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiTWFyY2ggMSAyMDI0In0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-03-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1420", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0zMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-03-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1421", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMi0yOVQyNDowMDowMFoifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-03-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1422", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiLTAwMDAwMC0wMi0wMyJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2001-02-03T00:00:00.000Z" - } - }, - { - "_sort": "2001-02-03T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1423", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjpbIjIwMjQiLCIzIiwiMSJdfQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-03-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1424", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMy0wMVQwMTowMDowMCswMjowMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-02-29T23:00:00.000Z" - } - }, - { - "_sort": "2024-02-29T23:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T23:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1425", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMy0wMXQwMDowMHoifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-03-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1426", - "query": { - "sort": "-lastView", - "cursor": "eyJzb3J0IjoiLWxhc3RWaWV3IiwidHlwZSI6InJlcG8iLCJpZCI6IjExMTExMTExMTExMTExMTExMTExMTExMSIsInZhbHVlIjoiMjAyNC0wMy0wMVQwMDowMFpcdTAwMDBpZ25vcmVkIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$lastView", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$lt": "2024-03-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1427", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IiJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1428", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6ImludmFsaWQifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1429", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "0000-01-01T00:00:00.000Z" - } - }, - { - "_sort": "0000-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "0000-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1430", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "0001-01-01T00:00:00.000Z" - } - }, - { - "_sort": "0001-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "0001-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1431", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1432", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDIifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-02-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1433", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjkifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-01T00:00:00.000Z" - } - }, - { - "_sort": "2023-03-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1434", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1435", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzEifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-02T00:00:00.000Z" - } - }, - { - "_sort": "2024-03-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1436", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzIifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1437", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDAtMDEifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1438", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMTMtMDEifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1439", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1440", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDEifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1441", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjRUMDA6MDAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1442", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDJUMDA6MDAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-02-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1443", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDF0MDA6MDB6In0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1444", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IiAyMDI0LTAxLTAxICJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1445", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDFUMDA6MDBaICJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1446", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDFUMDA6MDBaXHUwMDAwaWdub3JlZCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1447", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IiswMTAwMDAtMDEtMDEifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "+010000-01-01T00:00:00.000Z" - } - }, - { - "_sort": "+010000-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "+010000-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1448", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDEtMDEtMDEifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "-000001-01-01T00:00:00.000Z" - } - }, - { - "_sort": "-000001-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "-000001-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1449", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDEtMDEifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2001-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1450", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IisyNzU3NjAtMDktMTMifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "+275760-09-13T00:00:00.000Z" - } - }, - { - "_sort": "+275760-09-13T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "+275760-09-13T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1451", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IisyNzU3NjAtMDktMTQifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1452", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0yNzE4MjEtMDQtMjAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "-271821-04-20T00:00:00.000Z" - } - }, - { - "_sort": "-271821-04-20T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "-271821-04-20T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1453", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0yNzE4MjEtMDQtMTkifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1454", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMDA6MDBaIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T00:00:00.000Z" - } - }, - { - "_sort": "2024-02-29T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1455", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMDA6MDArMDI6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-28T21:30:00.000Z" - } - }, - { - "_sort": "2024-02-28T21:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-28T21:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1456", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMDA6MDAtMDMzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T03:30:00.000Z" - } - }, - { - "_sort": "2024-02-29T03:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T03:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1457", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMDA6MDAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T00:00:00.000Z" - } - }, - { - "_sort": "2024-02-29T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1458", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6MzQ6NTZaIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T12:34:56.000Z" - } - }, - { - "_sort": "2024-02-29T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1459", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6MzQ6NTYrMDI6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T10:04:56.000Z" - } - }, - { - "_sort": "2024-02-29T10:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T10:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1460", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6MzQ6NTYtMDMzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T16:04:56.000Z" - } - }, - { - "_sort": "2024-02-29T16:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T16:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1461", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6MzQ6NTYifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T12:34:56.000Z" - } - }, - { - "_sort": "2024-02-29T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1462", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6MzQ6NTYuMVoifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T12:34:56.100Z" - } - }, - { - "_sort": "2024-02-29T12:34:56.100Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T12:34:56.100Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1463", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6MzQ6NTYuMSswMjozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T10:04:56.100Z" - } - }, - { - "_sort": "2024-02-29T10:04:56.100Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T10:04:56.100Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1464", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6MzQ6NTYuMS0wMzMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T16:04:56.100Z" - } - }, - { - "_sort": "2024-02-29T16:04:56.100Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T16:04:56.100Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1465", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6MzQ6NTYuMSJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T12:34:56.100Z" - } - }, - { - "_sort": "2024-02-29T12:34:56.100Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T12:34:56.100Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1466", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6MzQ6NTYuMTIzNDU2Nzg5WiJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T12:34:56.123Z" - } - }, - { - "_sort": "2024-02-29T12:34:56.123Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T12:34:56.123Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1467", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6MzQ6NTYuMTIzNDU2Nzg5KzAyOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T10:04:56.123Z" - } - }, - { - "_sort": "2024-02-29T10:04:56.123Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T10:04:56.123Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1468", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6MzQ6NTYuMTIzNDU2Nzg5LTAzMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T16:04:56.123Z" - } - }, - { - "_sort": "2024-02-29T16:04:56.123Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T16:04:56.123Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1469", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6MzQ6NTYuMTIzNDU2Nzg5In0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T12:34:56.123Z" - } - }, - { - "_sort": "2024-02-29T12:34:56.123Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T12:34:56.123Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1470", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMjQ6MDBaIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1471", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMjQ6MDArMDI6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T21:30:00.000Z" - } - }, - { - "_sort": "2024-02-29T21:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T21:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1472", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMjQ6MDAtMDMzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-01T03:30:00.000Z" - } - }, - { - "_sort": "2024-03-01T03:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T03:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1473", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMjQ6MDAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1474", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMjQ6MDA6MDAuMDAxWiJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1475", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMjQ6MDA6MDAuMDAxKzAyOjMwIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1476", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMjQ6MDA6MDAuMDAxLTAzMzAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1477", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMjQ6MDA6MDAuMDAxIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1478", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMjU6MDBaIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1479", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMjU6MDArMDI6MzAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1480", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMjU6MDAtMDMzMCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1481", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMjU6MDAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1482", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6NjBaIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1483", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6NjArMDI6MzAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1484", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6NjAtMDMzMCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1485", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6NjAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1486", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6MzQ6NjBaIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1487", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6MzQ6NjArMDI6MzAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1488", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6MzQ6NjAtMDMzMCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1489", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMTI6MzQ6NjAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1490", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMDA6MDBaIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-01T00:00:00.000Z" - } - }, - { - "_sort": "2023-03-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1491", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMDA6MDArMDI6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-02-28T21:30:00.000Z" - } - }, - { - "_sort": "2023-02-28T21:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-02-28T21:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1492", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMDA6MDAtMDMzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-01T03:30:00.000Z" - } - }, - { - "_sort": "2023-03-01T03:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-01T03:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1493", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMDA6MDAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-01T00:00:00.000Z" - } - }, - { - "_sort": "2023-03-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1494", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6MzQ6NTZaIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-01T12:34:56.000Z" - } - }, - { - "_sort": "2023-03-01T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-01T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1495", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6MzQ6NTYrMDI6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-01T10:04:56.000Z" - } - }, - { - "_sort": "2023-03-01T10:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-01T10:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1496", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6MzQ6NTYtMDMzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-01T16:04:56.000Z" - } - }, - { - "_sort": "2023-03-01T16:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-01T16:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1497", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6MzQ6NTYifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-01T12:34:56.000Z" - } - }, - { - "_sort": "2023-03-01T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-01T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1498", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6MzQ6NTYuMVoifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-01T12:34:56.100Z" - } - }, - { - "_sort": "2023-03-01T12:34:56.100Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-01T12:34:56.100Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1499", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6MzQ6NTYuMSswMjozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-01T10:04:56.100Z" - } - }, - { - "_sort": "2023-03-01T10:04:56.100Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-01T10:04:56.100Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1500", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6MzQ6NTYuMS0wMzMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-01T16:04:56.100Z" - } - }, - { - "_sort": "2023-03-01T16:04:56.100Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-01T16:04:56.100Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1501", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6MzQ6NTYuMSJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-01T12:34:56.100Z" - } - }, - { - "_sort": "2023-03-01T12:34:56.100Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-01T12:34:56.100Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1502", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6MzQ6NTYuMTIzNDU2Nzg5WiJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-01T12:34:56.123Z" - } - }, - { - "_sort": "2023-03-01T12:34:56.123Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-01T12:34:56.123Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1503", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6MzQ6NTYuMTIzNDU2Nzg5KzAyOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-01T10:04:56.123Z" - } - }, - { - "_sort": "2023-03-01T10:04:56.123Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-01T10:04:56.123Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1504", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6MzQ6NTYuMTIzNDU2Nzg5LTAzMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-01T16:04:56.123Z" - } - }, - { - "_sort": "2023-03-01T16:04:56.123Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-01T16:04:56.123Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1505", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6MzQ6NTYuMTIzNDU2Nzg5In0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-01T12:34:56.123Z" - } - }, - { - "_sort": "2023-03-01T12:34:56.123Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-01T12:34:56.123Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1506", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMjQ6MDBaIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T00:00:00.000Z" - } - }, - { - "_sort": "2023-03-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1507", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMjQ6MDArMDI6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-01T21:30:00.000Z" - } - }, - { - "_sort": "2023-03-01T21:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-01T21:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1508", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMjQ6MDAtMDMzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T03:30:00.000Z" - } - }, - { - "_sort": "2023-03-02T03:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T03:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1509", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMjQ6MDAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T00:00:00.000Z" - } - }, - { - "_sort": "2023-03-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1510", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMjQ6MDA6MDAuMDAxWiJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1511", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMjQ6MDA6MDAuMDAxKzAyOjMwIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1512", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMjQ6MDA6MDAuMDAxLTAzMzAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1513", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMjQ6MDA6MDAuMDAxIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1514", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMjU6MDBaIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1515", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMjU6MDArMDI6MzAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1516", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMjU6MDAtMDMzMCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1517", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMjU6MDAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1518", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6NjBaIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1519", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6NjArMDI6MzAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1520", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6NjAtMDMzMCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1521", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6NjAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1522", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6MzQ6NjBaIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1523", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6MzQ6NjArMDI6MzAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1524", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6MzQ6NjAtMDMzMCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1525", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMjlUMTI6MzQ6NjAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1526", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMDA6MDBaIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1527", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMDA6MDArMDI6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T21:30:00.000Z" - } - }, - { - "_sort": "2024-02-29T21:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T21:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1528", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMDA6MDAtMDMzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-01T03:30:00.000Z" - } - }, - { - "_sort": "2024-03-01T03:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T03:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1529", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMDA6MDAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1530", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6MzQ6NTZaIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-01T12:34:56.000Z" - } - }, - { - "_sort": "2024-03-01T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1531", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6MzQ6NTYrMDI6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-01T10:04:56.000Z" - } - }, - { - "_sort": "2024-03-01T10:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T10:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1532", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6MzQ6NTYtMDMzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-01T16:04:56.000Z" - } - }, - { - "_sort": "2024-03-01T16:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T16:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1533", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6MzQ6NTYifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-01T12:34:56.000Z" - } - }, - { - "_sort": "2024-03-01T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1534", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6MzQ6NTYuMVoifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-01T12:34:56.100Z" - } - }, - { - "_sort": "2024-03-01T12:34:56.100Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T12:34:56.100Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1535", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6MzQ6NTYuMSswMjozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-01T10:04:56.100Z" - } - }, - { - "_sort": "2024-03-01T10:04:56.100Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T10:04:56.100Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1536", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6MzQ6NTYuMS0wMzMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-01T16:04:56.100Z" - } - }, - { - "_sort": "2024-03-01T16:04:56.100Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T16:04:56.100Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1537", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6MzQ6NTYuMSJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-01T12:34:56.100Z" - } - }, - { - "_sort": "2024-03-01T12:34:56.100Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T12:34:56.100Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1538", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6MzQ6NTYuMTIzNDU2Nzg5WiJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-01T12:34:56.123Z" - } - }, - { - "_sort": "2024-03-01T12:34:56.123Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T12:34:56.123Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1539", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6MzQ6NTYuMTIzNDU2Nzg5KzAyOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-01T10:04:56.123Z" - } - }, - { - "_sort": "2024-03-01T10:04:56.123Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T10:04:56.123Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1540", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6MzQ6NTYuMTIzNDU2Nzg5LTAzMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-01T16:04:56.123Z" - } - }, - { - "_sort": "2024-03-01T16:04:56.123Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T16:04:56.123Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1541", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6MzQ6NTYuMTIzNDU2Nzg5In0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-01T12:34:56.123Z" - } - }, - { - "_sort": "2024-03-01T12:34:56.123Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T12:34:56.123Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1542", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMjQ6MDBaIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-02T00:00:00.000Z" - } - }, - { - "_sort": "2024-03-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1543", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMjQ6MDArMDI6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-01T21:30:00.000Z" - } - }, - { - "_sort": "2024-03-01T21:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T21:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1544", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMjQ6MDAtMDMzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-02T03:30:00.000Z" - } - }, - { - "_sort": "2024-03-02T03:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-02T03:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1545", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMjQ6MDAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-02T00:00:00.000Z" - } - }, - { - "_sort": "2024-03-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1546", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMjQ6MDA6MDAuMDAxWiJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1547", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMjQ6MDA6MDAuMDAxKzAyOjMwIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1548", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMjQ6MDA6MDAuMDAxLTAzMzAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1549", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMjQ6MDA6MDAuMDAxIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1550", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMjU6MDBaIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1551", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMjU6MDArMDI6MzAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1552", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMjU6MDAtMDMzMCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1553", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMjU6MDAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1554", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6NjBaIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1555", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6NjArMDI6MzAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1556", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6NjAtMDMzMCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1557", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6NjAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1558", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6MzQ6NjBaIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1559", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6MzQ6NjArMDI6MzAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1560", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6MzQ6NjAtMDMzMCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1561", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzBUMTI6MzQ6NjAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1562", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2000-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2000-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2000-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1563", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjEifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2001-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1564", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjEyIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-12-01T00:00:00.000Z" - } - }, - { - "_sort": "2001-12-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-12-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1565", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjEzIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1566", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMxIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1567", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2032-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1568", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjQ5In0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2049-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1569", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1950-01-01T00:00:00.000Z" - } - }, - { - "_sort": "1950-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1950-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1570", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ijk5In0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-01-01T00:00:00.000Z" - } - }, - { - "_sort": "1999-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1571", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjEwMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "0100-01-01T00:00:00.000Z" - } - }, - { - "_sort": "0100-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "0100-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1572", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDAwMC0wMS0wMSJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2000-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2000-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2000-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1573", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T00:00:00.000Z" - } - }, - { - "_sort": "2001-02-03T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1574", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDEtMDFUMDA6MDBaIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1575", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjEvMi8wMyJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-02T00:00:00.000Z" - } - }, - { - "_sort": "2003-01-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1576", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQvMDIvMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1577", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQuMDIuMjkifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T00:00:00.000Z" - } - }, - { - "_sort": "2024-02-29T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1578", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1In0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-05T00:00:00.000Z" - } - }, - { - "_sort": "2001-01-05T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1579", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgSmFudWFyeSAyMDI0In0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-05T00:00:00.000Z" - } - }, - { - "_sort": "2024-01-05T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-05T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1580", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IlR1ZSwgMDUgTWFyIDIwMjQgMTI6MzQ6NTYgR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-05T12:34:56.000Z" - } - }, - { - "_sort": "2024-03-05T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-05T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1581", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ik1hcmNoIDUsIDIwMjQgMTI6MzAgUE0ifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-05T12:30:00.000Z" - } - }, - { - "_sort": "2024-03-05T12:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-05T12:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1582", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDEgMTI6MzQ6NTYifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-01T12:34:56.000Z" - } - }, - { - "_sort": "2024-01-01T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-01T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1583", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDEgMTI6MzQ6NTYuMTIzNCBHTVQrMDIwMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-01T10:34:56.123Z" - } - }, - { - "_sort": "2024-01-01T10:34:56.123Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-01T10:34:56.123Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1584", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDEgKGNvbW1lbnQpIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1585", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Iihjb21tZW50KSAyMDI0LTAxLTAxIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1586", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6ImdhcmJhZ2UgMjAyNC0wMS0wMSJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1587", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6ImdhcmJhZ2UyMDI0LTAxLTAxIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1588", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDEgZ2FyYmFnZSJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1589", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDEgR01ULTgifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-01T08:00:00.000Z" - } - }, - { - "_sort": "2024-01-01T08:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-01T08:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1590", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDEgMTI6OjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-01T12:00:30.000Z" - } - }, - { - "_sort": "2024-01-01T12:00:30.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-01T12:00:30.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1591", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDEgMTI6MzA6NDAgRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-01T17:30:40.000Z" - } - }, - { - "_sort": "2024-01-01T17:30:40.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-01T17:30:40.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1592", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ijk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OSJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1593", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T00:00:00.000Z" - } - }, - { - "_sort": "2024-02-29T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1594", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T00:00:00.000Z" - } - }, - { - "_sort": "2024-02-29T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1595", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-28T22:30:00.000Z" - } - }, - { - "_sort": "2024-02-28T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-28T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1596", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T05:00:00.000Z" - } - }, - { - "_sort": "2024-02-29T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1597", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgKzAxMzAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1598", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MzQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T12:34:00.000Z" - } - }, - { - "_sort": "2024-02-29T12:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T12:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1599", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MzQgR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T12:34:00.000Z" - } - }, - { - "_sort": "2024-02-29T12:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T12:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1600", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MzQgVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T11:04:00.000Z" - } - }, - { - "_sort": "2024-02-29T11:04:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T11:04:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1601", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MzQgRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T17:34:00.000Z" - } - }, - { - "_sort": "2024-02-29T17:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T17:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1602", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MzQgKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T11:04:00.000Z" - } - }, - { - "_sort": "2024-02-29T11:04:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T11:04:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1603", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MzQ6NTYuMDAwMTIzIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T12:34:56.000Z" - } - }, - { - "_sort": "2024-02-29T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1604", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MzQ6NTYuMDAwMTIzIEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T12:34:56.000Z" - } - }, - { - "_sort": "2024-02-29T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1605", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MzQ6NTYuMDAwMTIzIFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T11:04:56.000Z" - } - }, - { - "_sort": "2024-02-29T11:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T11:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1606", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MzQ6NTYuMDAwMTIzIEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T17:34:56.000Z" - } - }, - { - "_sort": "2024-02-29T17:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T17:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1607", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MzQ6NTYuMDAwMTIzICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T11:04:56.000Z" - } - }, - { - "_sort": "2024-02-29T11:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T11:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1608", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5In0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T12:34:56.999Z" - } - }, - { - "_sort": "2024-02-29T12:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T12:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1609", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T12:34:56.999Z" - } - }, - { - "_sort": "2024-02-29T12:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T12:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1610", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T11:04:56.999Z" - } - }, - { - "_sort": "2024-02-29T11:04:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T11:04:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1611", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T17:34:56.999Z" - } - }, - { - "_sort": "2024-02-29T17:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T17:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1612", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5ICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T11:04:56.999Z" - } - }, - { - "_sort": "2024-02-29T11:04:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T11:04:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1613", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMjQ6MDAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1614", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMjQ6MDAgR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1615", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMjQ6MDAgVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T22:30:00.000Z" - } - }, - { - "_sort": "2024-02-29T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1616", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMjQ6MDAgRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-01T05:00:00.000Z" - } - }, - { - "_sort": "2024-03-01T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1617", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMjQ6MDAgKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T22:30:00.000Z" - } - }, - { - "_sort": "2024-02-29T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1618", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MDAgQU0ifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T00:00:00.000Z" - } - }, - { - "_sort": "2024-02-29T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1619", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MDAgQU0gR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T00:00:00.000Z" - } - }, - { - "_sort": "2024-02-29T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1620", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MDAgQU0gVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-28T22:30:00.000Z" - } - }, - { - "_sort": "2024-02-28T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-28T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1621", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MDAgQU0gRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T05:00:00.000Z" - } - }, - { - "_sort": "2024-02-29T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1622", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MDAgQU0gKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-28T22:30:00.000Z" - } - }, - { - "_sort": "2024-02-28T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-28T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1623", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MDAgUE0ifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T12:00:00.000Z" - } - }, - { - "_sort": "2024-02-29T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1624", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MDAgUE0gR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T12:00:00.000Z" - } - }, - { - "_sort": "2024-02-29T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1625", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MDAgUE0gVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T10:30:00.000Z" - } - }, - { - "_sort": "2024-02-29T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1626", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MDAgUE0gRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T17:00:00.000Z" - } - }, - { - "_sort": "2024-02-29T17:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T17:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1627", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTI6MDAgUE0gKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T10:30:00.000Z" - } - }, - { - "_sort": "2024-02-29T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1628", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMDowMCBQTSJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T12:00:00.000Z" - } - }, - { - "_sort": "2024-02-29T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1629", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMDowMCBQTSBHTVQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T12:00:00.000Z" - } - }, - { - "_sort": "2024-02-29T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1630", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMDowMCBQTSBVVEMrMDE6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T10:30:00.000Z" - } - }, - { - "_sort": "2024-02-29T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1631", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMDowMCBQTSBFU1QifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T17:00:00.000Z" - } - }, - { - "_sort": "2024-02-29T17:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T17:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1632", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMDowMCBQTSArMDEzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T10:30:00.000Z" - } - }, - { - "_sort": "2024-02-29T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1633", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTM6MDAgUE0ifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1634", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTM6MDAgUE0gR01UIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1635", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTM6MDAgUE0gVVRDKzAxOjMwIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1636", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTM6MDAgUE0gRVNUIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1637", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjkgMTM6MDAgUE0gKzAxMzAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1638", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T00:00:00.000Z" - } - }, - { - "_sort": "2023-03-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1639", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T00:00:00.000Z" - } - }, - { - "_sort": "2023-03-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1640", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-01T22:30:00.000Z" - } - }, - { - "_sort": "2023-03-01T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-01T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1641", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T05:00:00.000Z" - } - }, - { - "_sort": "2023-03-02T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1642", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgKzAxMzAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1643", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MzQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T12:34:00.000Z" - } - }, - { - "_sort": "2023-03-02T12:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T12:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1644", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MzQgR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T12:34:00.000Z" - } - }, - { - "_sort": "2023-03-02T12:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T12:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1645", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MzQgVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T11:04:00.000Z" - } - }, - { - "_sort": "2023-03-02T11:04:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T11:04:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1646", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MzQgRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T17:34:00.000Z" - } - }, - { - "_sort": "2023-03-02T17:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T17:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1647", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MzQgKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T11:04:00.000Z" - } - }, - { - "_sort": "2023-03-02T11:04:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T11:04:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1648", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MzQ6NTYuMDAwMTIzIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T12:34:56.000Z" - } - }, - { - "_sort": "2023-03-02T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1649", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MzQ6NTYuMDAwMTIzIEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T12:34:56.000Z" - } - }, - { - "_sort": "2023-03-02T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1650", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MzQ6NTYuMDAwMTIzIFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T11:04:56.000Z" - } - }, - { - "_sort": "2023-03-02T11:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T11:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1651", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MzQ6NTYuMDAwMTIzIEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T17:34:56.000Z" - } - }, - { - "_sort": "2023-03-02T17:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T17:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1652", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MzQ6NTYuMDAwMTIzICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T11:04:56.000Z" - } - }, - { - "_sort": "2023-03-02T11:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T11:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1653", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5In0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T12:34:56.999Z" - } - }, - { - "_sort": "2023-03-02T12:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T12:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1654", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T12:34:56.999Z" - } - }, - { - "_sort": "2023-03-02T12:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T12:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1655", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T11:04:56.999Z" - } - }, - { - "_sort": "2023-03-02T11:04:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T11:04:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1656", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T17:34:56.999Z" - } - }, - { - "_sort": "2023-03-02T17:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T17:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1657", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5ICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T11:04:56.999Z" - } - }, - { - "_sort": "2023-03-02T11:04:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T11:04:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1658", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMjQ6MDAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-03T00:00:00.000Z" - } - }, - { - "_sort": "2023-03-03T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-03T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1659", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMjQ6MDAgR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-03T00:00:00.000Z" - } - }, - { - "_sort": "2023-03-03T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-03T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1660", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMjQ6MDAgVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T22:30:00.000Z" - } - }, - { - "_sort": "2023-03-02T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1661", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMjQ6MDAgRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-03T05:00:00.000Z" - } - }, - { - "_sort": "2023-03-03T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-03T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1662", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMjQ6MDAgKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T22:30:00.000Z" - } - }, - { - "_sort": "2023-03-02T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1663", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MDAgQU0ifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T00:00:00.000Z" - } - }, - { - "_sort": "2023-03-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1664", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MDAgQU0gR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T00:00:00.000Z" - } - }, - { - "_sort": "2023-03-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1665", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MDAgQU0gVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-01T22:30:00.000Z" - } - }, - { - "_sort": "2023-03-01T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-01T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1666", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MDAgQU0gRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T05:00:00.000Z" - } - }, - { - "_sort": "2023-03-02T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1667", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MDAgQU0gKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-01T22:30:00.000Z" - } - }, - { - "_sort": "2023-03-01T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-01T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1668", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MDAgUE0ifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T12:00:00.000Z" - } - }, - { - "_sort": "2023-03-02T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1669", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MDAgUE0gR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T12:00:00.000Z" - } - }, - { - "_sort": "2023-03-02T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1670", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MDAgUE0gVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T10:30:00.000Z" - } - }, - { - "_sort": "2023-03-02T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1671", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MDAgUE0gRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T17:00:00.000Z" - } - }, - { - "_sort": "2023-03-02T17:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T17:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1672", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTI6MDAgUE0gKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T10:30:00.000Z" - } - }, - { - "_sort": "2023-03-02T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1673", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMDowMCBQTSJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T12:00:00.000Z" - } - }, - { - "_sort": "2023-03-02T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1674", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMDowMCBQTSBHTVQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T12:00:00.000Z" - } - }, - { - "_sort": "2023-03-02T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1675", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMDowMCBQTSBVVEMrMDE6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T10:30:00.000Z" - } - }, - { - "_sort": "2023-03-02T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1676", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMDowMCBQTSBFU1QifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T17:00:00.000Z" - } - }, - { - "_sort": "2023-03-02T17:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T17:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1677", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMDowMCBQTSArMDEzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2023-03-02T10:30:00.000Z" - } - }, - { - "_sort": "2023-03-02T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2023-03-02T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1678", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTM6MDAgUE0ifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1679", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTM6MDAgUE0gR01UIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1680", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTM6MDAgUE0gVVRDKzAxOjMwIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1681", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTM6MDAgUE0gRVNUIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1682", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjMtMDItMzAgMTM6MDAgUE0gKzAxMzAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1683", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "0001-01-01T00:00:00.000Z" - } - }, - { - "_sort": "0001-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "0001-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1684", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2001-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1685", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2000-12-31T22:30:00.000Z" - } - }, - { - "_sort": "2000-12-31T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2000-12-31T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1686", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-01T05:00:00.000Z" - } - }, - { - "_sort": "2001-01-01T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1687", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgKzAxMzAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1688", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MzQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-01T12:34:00.000Z" - } - }, - { - "_sort": "2001-01-01T12:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T12:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1689", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MzQgR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-01T12:34:00.000Z" - } - }, - { - "_sort": "2001-01-01T12:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T12:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1690", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MzQgVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-01T11:04:00.000Z" - } - }, - { - "_sort": "2001-01-01T11:04:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T11:04:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1691", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MzQgRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-01T17:34:00.000Z" - } - }, - { - "_sort": "2001-01-01T17:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T17:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1692", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MzQgKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-01T11:04:00.000Z" - } - }, - { - "_sort": "2001-01-01T11:04:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T11:04:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1693", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MzQ6NTYuMDAwMTIzIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-01T12:34:56.000Z" - } - }, - { - "_sort": "2001-01-01T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1694", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MzQ6NTYuMDAwMTIzIEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-01T12:34:56.000Z" - } - }, - { - "_sort": "2001-01-01T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1695", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MzQ6NTYuMDAwMTIzIFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-01T11:04:56.000Z" - } - }, - { - "_sort": "2001-01-01T11:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T11:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1696", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MzQ6NTYuMDAwMTIzIEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-01T17:34:56.000Z" - } - }, - { - "_sort": "2001-01-01T17:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T17:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1697", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MzQ6NTYuMDAwMTIzICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-01T11:04:56.000Z" - } - }, - { - "_sort": "2001-01-01T11:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T11:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1698", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5In0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-01T12:34:56.999Z" - } - }, - { - "_sort": "2001-01-01T12:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T12:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1699", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-01T12:34:56.999Z" - } - }, - { - "_sort": "2001-01-01T12:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T12:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1700", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-01T11:04:56.999Z" - } - }, - { - "_sort": "2001-01-01T11:04:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T11:04:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1701", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-01T17:34:56.999Z" - } - }, - { - "_sort": "2001-01-01T17:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T17:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1702", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5ICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-01T11:04:56.999Z" - } - }, - { - "_sort": "2001-01-01T11:04:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T11:04:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1703", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMjQ6MDAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-02T00:00:00.000Z" - } - }, - { - "_sort": "2001-01-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1704", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMjQ6MDAgR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-02T00:00:00.000Z" - } - }, - { - "_sort": "2001-01-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1705", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMjQ6MDAgVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-01T22:30:00.000Z" - } - }, - { - "_sort": "2001-01-01T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1706", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMjQ6MDAgRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-02T05:00:00.000Z" - } - }, - { - "_sort": "2001-01-02T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-02T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1707", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMjQ6MDAgKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-01T22:30:00.000Z" - } - }, - { - "_sort": "2001-01-01T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1708", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MDAgQU0ifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2001-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1709", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MDAgQU0gR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2001-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1710", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MDAgQU0gVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2000-12-31T22:30:00.000Z" - } - }, - { - "_sort": "2000-12-31T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2000-12-31T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1711", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MDAgQU0gRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-01T05:00:00.000Z" - } - }, - { - "_sort": "2001-01-01T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1712", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MDAgQU0gKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2000-12-31T22:30:00.000Z" - } - }, - { - "_sort": "2000-12-31T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2000-12-31T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1713", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MDAgUE0ifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-01T12:00:00.000Z" - } - }, - { - "_sort": "2001-01-01T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1714", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MDAgUE0gR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-01T12:00:00.000Z" - } - }, - { - "_sort": "2001-01-01T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1715", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MDAgUE0gVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-01T10:30:00.000Z" - } - }, - { - "_sort": "2001-01-01T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1716", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MDAgUE0gRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-01T17:00:00.000Z" - } - }, - { - "_sort": "2001-01-01T17:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T17:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1717", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTI6MDAgUE0gKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-01T10:30:00.000Z" - } - }, - { - "_sort": "2001-01-01T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1718", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMDowMCBQTSJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-01T12:00:00.000Z" - } - }, - { - "_sort": "2001-01-01T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1719", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMDowMCBQTSBHTVQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-01T12:00:00.000Z" - } - }, - { - "_sort": "2001-01-01T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1720", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMDowMCBQTSBVVEMrMDE6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-01T10:30:00.000Z" - } - }, - { - "_sort": "2001-01-01T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1721", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMDowMCBQTSBFU1QifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-01T17:00:00.000Z" - } - }, - { - "_sort": "2001-01-01T17:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T17:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1722", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMDowMCBQTSArMDEzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-01T10:30:00.000Z" - } - }, - { - "_sort": "2001-01-01T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-01T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1723", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTM6MDAgUE0ifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1724", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTM6MDAgUE0gR01UIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1725", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTM6MDAgUE0gVVRDKzAxOjMwIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1726", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTM6MDAgUE0gRVNUIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1727", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAwMDEtMDEtMDEgMTM6MDAgUE0gKzAxMzAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1728", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T00:00:00.000Z" - } - }, - { - "_sort": "2001-02-03T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1729", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T00:00:00.000Z" - } - }, - { - "_sort": "2001-02-03T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1730", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-02T22:30:00.000Z" - } - }, - { - "_sort": "2001-02-02T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-02T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1731", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T05:00:00.000Z" - } - }, - { - "_sort": "2001-02-03T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1732", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgKzAxMzAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1733", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MzQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T12:34:00.000Z" - } - }, - { - "_sort": "2001-02-03T12:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T12:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1734", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MzQgR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T12:34:00.000Z" - } - }, - { - "_sort": "2001-02-03T12:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T12:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1735", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MzQgVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T11:04:00.000Z" - } - }, - { - "_sort": "2001-02-03T11:04:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T11:04:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1736", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MzQgRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T17:34:00.000Z" - } - }, - { - "_sort": "2001-02-03T17:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T17:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1737", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MzQgKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T11:04:00.000Z" - } - }, - { - "_sort": "2001-02-03T11:04:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T11:04:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1738", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MzQ6NTYuMDAwMTIzIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T12:34:56.000Z" - } - }, - { - "_sort": "2001-02-03T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1739", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MzQ6NTYuMDAwMTIzIEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T12:34:56.000Z" - } - }, - { - "_sort": "2001-02-03T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1740", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MzQ6NTYuMDAwMTIzIFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T11:04:56.000Z" - } - }, - { - "_sort": "2001-02-03T11:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T11:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1741", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MzQ6NTYuMDAwMTIzIEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T17:34:56.000Z" - } - }, - { - "_sort": "2001-02-03T17:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T17:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1742", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MzQ6NTYuMDAwMTIzICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T11:04:56.000Z" - } - }, - { - "_sort": "2001-02-03T11:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T11:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1743", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5In0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T12:34:56.999Z" - } - }, - { - "_sort": "2001-02-03T12:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T12:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1744", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T12:34:56.999Z" - } - }, - { - "_sort": "2001-02-03T12:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T12:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1745", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T11:04:56.999Z" - } - }, - { - "_sort": "2001-02-03T11:04:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T11:04:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1746", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T17:34:56.999Z" - } - }, - { - "_sort": "2001-02-03T17:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T17:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1747", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5ICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T11:04:56.999Z" - } - }, - { - "_sort": "2001-02-03T11:04:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T11:04:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1748", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMjQ6MDAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-04T00:00:00.000Z" - } - }, - { - "_sort": "2001-02-04T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-04T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1749", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMjQ6MDAgR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-04T00:00:00.000Z" - } - }, - { - "_sort": "2001-02-04T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-04T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1750", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMjQ6MDAgVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T22:30:00.000Z" - } - }, - { - "_sort": "2001-02-03T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1751", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMjQ6MDAgRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-04T05:00:00.000Z" - } - }, - { - "_sort": "2001-02-04T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-04T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1752", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMjQ6MDAgKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T22:30:00.000Z" - } - }, - { - "_sort": "2001-02-03T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1753", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MDAgQU0ifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T00:00:00.000Z" - } - }, - { - "_sort": "2001-02-03T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1754", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MDAgQU0gR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T00:00:00.000Z" - } - }, - { - "_sort": "2001-02-03T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1755", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MDAgQU0gVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-02T22:30:00.000Z" - } - }, - { - "_sort": "2001-02-02T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-02T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1756", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MDAgQU0gRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T05:00:00.000Z" - } - }, - { - "_sort": "2001-02-03T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1757", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MDAgQU0gKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-02T22:30:00.000Z" - } - }, - { - "_sort": "2001-02-02T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-02T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1758", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MDAgUE0ifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T12:00:00.000Z" - } - }, - { - "_sort": "2001-02-03T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1759", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MDAgUE0gR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T12:00:00.000Z" - } - }, - { - "_sort": "2001-02-03T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1760", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MDAgUE0gVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T10:30:00.000Z" - } - }, - { - "_sort": "2001-02-03T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1761", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MDAgUE0gRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T17:00:00.000Z" - } - }, - { - "_sort": "2001-02-03T17:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T17:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1762", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTI6MDAgUE0gKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T10:30:00.000Z" - } - }, - { - "_sort": "2001-02-03T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1763", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMDowMCBQTSJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T12:00:00.000Z" - } - }, - { - "_sort": "2001-02-03T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1764", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMDowMCBQTSBHTVQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T12:00:00.000Z" - } - }, - { - "_sort": "2001-02-03T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1765", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMDowMCBQTSBVVEMrMDE6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T10:30:00.000Z" - } - }, - { - "_sort": "2001-02-03T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1766", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMDowMCBQTSBFU1QifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T17:00:00.000Z" - } - }, - { - "_sort": "2001-02-03T17:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T17:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1767", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMDowMCBQTSArMDEzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T10:30:00.000Z" - } - }, - { - "_sort": "2001-02-03T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1768", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTM6MDAgUE0ifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1769", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTM6MDAgUE0gR01UIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1770", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTM6MDAgUE0gVVRDKzAxOjMwIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1771", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTM6MDAgUE0gRVNUIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1772", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMgMTM6MDAgUE0gKzAxMzAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1773", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-02T00:00:00.000Z" - } - }, - { - "_sort": "2003-01-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1774", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-02T00:00:00.000Z" - } - }, - { - "_sort": "2003-01-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1775", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-01T22:30:00.000Z" - } - }, - { - "_sort": "2003-01-01T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-01T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1776", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-02T05:00:00.000Z" - } - }, - { - "_sort": "2003-01-02T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1777", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzICswMTMwIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1778", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjM0In0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-02T12:34:00.000Z" - } - }, - { - "_sort": "2003-01-02T12:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T12:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1779", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjM0IEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-02T12:34:00.000Z" - } - }, - { - "_sort": "2003-01-02T12:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T12:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1780", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjM0IFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-02T11:04:00.000Z" - } - }, - { - "_sort": "2003-01-02T11:04:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T11:04:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1781", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjM0IEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-02T17:34:00.000Z" - } - }, - { - "_sort": "2003-01-02T17:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T17:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1782", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjM0ICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-02T11:04:00.000Z" - } - }, - { - "_sort": "2003-01-02T11:04:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T11:04:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1783", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjM0OjU2LjAwMDEyMyJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-02T12:34:56.000Z" - } - }, - { - "_sort": "2003-01-02T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1784", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjM0OjU2LjAwMDEyMyBHTVQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-02T12:34:56.000Z" - } - }, - { - "_sort": "2003-01-02T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1785", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjM0OjU2LjAwMDEyMyBVVEMrMDE6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-02T11:04:56.000Z" - } - }, - { - "_sort": "2003-01-02T11:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T11:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1786", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjM0OjU2LjAwMDEyMyBFU1QifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-02T17:34:56.000Z" - } - }, - { - "_sort": "2003-01-02T17:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T17:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1787", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjM0OjU2LjAwMDEyMyArMDEzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-02T11:04:56.000Z" - } - }, - { - "_sort": "2003-01-02T11:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T11:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1788", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-02T12:34:56.999Z" - } - }, - { - "_sort": "2003-01-02T12:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T12:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1789", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSBHTVQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-02T12:34:56.999Z" - } - }, - { - "_sort": "2003-01-02T12:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T12:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1790", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSBVVEMrMDE6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-02T11:04:56.999Z" - } - }, - { - "_sort": "2003-01-02T11:04:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T11:04:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1791", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSBFU1QifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-02T17:34:56.999Z" - } - }, - { - "_sort": "2003-01-02T17:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T17:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1792", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSArMDEzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-02T11:04:56.999Z" - } - }, - { - "_sort": "2003-01-02T11:04:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T11:04:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1793", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDI0OjAwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-03T00:00:00.000Z" - } - }, - { - "_sort": "2003-01-03T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-03T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1794", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDI0OjAwIEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-03T00:00:00.000Z" - } - }, - { - "_sort": "2003-01-03T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-03T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1795", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDI0OjAwIFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-02T22:30:00.000Z" - } - }, - { - "_sort": "2003-01-02T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1796", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDI0OjAwIEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-03T05:00:00.000Z" - } - }, - { - "_sort": "2003-01-03T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-03T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1797", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDI0OjAwICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-02T22:30:00.000Z" - } - }, - { - "_sort": "2003-01-02T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1798", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjAwIEFNIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-02T00:00:00.000Z" - } - }, - { - "_sort": "2003-01-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1799", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjAwIEFNIEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-02T00:00:00.000Z" - } - }, - { - "_sort": "2003-01-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1800", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjAwIEFNIFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-01T22:30:00.000Z" - } - }, - { - "_sort": "2003-01-01T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-01T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1801", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjAwIEFNIEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-02T05:00:00.000Z" - } - }, - { - "_sort": "2003-01-02T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1802", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjAwIEFNICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-01T22:30:00.000Z" - } - }, - { - "_sort": "2003-01-01T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-01T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1803", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjAwIFBNIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-02T12:00:00.000Z" - } - }, - { - "_sort": "2003-01-02T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1804", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjAwIFBNIEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-02T12:00:00.000Z" - } - }, - { - "_sort": "2003-01-02T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1805", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjAwIFBNIFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-02T10:30:00.000Z" - } - }, - { - "_sort": "2003-01-02T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1806", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjAwIFBNIEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-02T17:00:00.000Z" - } - }, - { - "_sort": "2003-01-02T17:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T17:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1807", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEyOjAwIFBNICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-02T10:30:00.000Z" - } - }, - { - "_sort": "2003-01-02T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1808", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDA6MDAgUE0ifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-02T12:00:00.000Z" - } - }, - { - "_sort": "2003-01-02T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1809", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDA6MDAgUE0gR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-02T12:00:00.000Z" - } - }, - { - "_sort": "2003-01-02T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1810", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDA6MDAgUE0gVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-02T10:30:00.000Z" - } - }, - { - "_sort": "2003-01-02T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1811", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDA6MDAgUE0gRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-02T17:00:00.000Z" - } - }, - { - "_sort": "2003-01-02T17:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T17:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1812", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDA6MDAgUE0gKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2003-01-02T10:30:00.000Z" - } - }, - { - "_sort": "2003-01-02T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2003-01-02T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1813", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEzOjAwIFBNIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1814", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEzOjAwIFBNIEdNVCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1815", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEzOjAwIFBNIFVUQyswMTozMCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1816", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEzOjAwIFBNIEVTVCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1817", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjAxLzAyLzAzIDEzOjAwIFBNICswMTMwIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1818", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-02T00:00:00.000Z" - } - }, - { - "_sort": "2032-01-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1819", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-02T00:00:00.000Z" - } - }, - { - "_sort": "2032-01-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1820", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-01T22:30:00.000Z" - } - }, - { - "_sort": "2032-01-01T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-01T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1821", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-02T05:00:00.000Z" - } - }, - { - "_sort": "2032-01-02T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1822", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyICswMTMwIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1823", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjM0In0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-02T12:34:00.000Z" - } - }, - { - "_sort": "2032-01-02T12:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T12:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1824", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjM0IEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-02T12:34:00.000Z" - } - }, - { - "_sort": "2032-01-02T12:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T12:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1825", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjM0IFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-02T11:04:00.000Z" - } - }, - { - "_sort": "2032-01-02T11:04:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T11:04:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1826", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjM0IEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-02T17:34:00.000Z" - } - }, - { - "_sort": "2032-01-02T17:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T17:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1827", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjM0ICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-02T11:04:00.000Z" - } - }, - { - "_sort": "2032-01-02T11:04:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T11:04:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1828", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjM0OjU2LjAwMDEyMyJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-02T12:34:56.000Z" - } - }, - { - "_sort": "2032-01-02T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1829", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjM0OjU2LjAwMDEyMyBHTVQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-02T12:34:56.000Z" - } - }, - { - "_sort": "2032-01-02T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1830", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjM0OjU2LjAwMDEyMyBVVEMrMDE6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-02T11:04:56.000Z" - } - }, - { - "_sort": "2032-01-02T11:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T11:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1831", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjM0OjU2LjAwMDEyMyBFU1QifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-02T17:34:56.000Z" - } - }, - { - "_sort": "2032-01-02T17:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T17:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1832", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjM0OjU2LjAwMDEyMyArMDEzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-02T11:04:56.000Z" - } - }, - { - "_sort": "2032-01-02T11:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T11:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1833", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-02T12:34:56.999Z" - } - }, - { - "_sort": "2032-01-02T12:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T12:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1834", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSBHTVQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-02T12:34:56.999Z" - } - }, - { - "_sort": "2032-01-02T12:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T12:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1835", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSBVVEMrMDE6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-02T11:04:56.999Z" - } - }, - { - "_sort": "2032-01-02T11:04:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T11:04:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1836", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSBFU1QifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-02T17:34:56.999Z" - } - }, - { - "_sort": "2032-01-02T17:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T17:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1837", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSArMDEzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-02T11:04:56.999Z" - } - }, - { - "_sort": "2032-01-02T11:04:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T11:04:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1838", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDI0OjAwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-03T00:00:00.000Z" - } - }, - { - "_sort": "2032-01-03T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-03T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1839", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDI0OjAwIEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-03T00:00:00.000Z" - } - }, - { - "_sort": "2032-01-03T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-03T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1840", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDI0OjAwIFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-02T22:30:00.000Z" - } - }, - { - "_sort": "2032-01-02T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1841", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDI0OjAwIEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-03T05:00:00.000Z" - } - }, - { - "_sort": "2032-01-03T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-03T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1842", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDI0OjAwICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-02T22:30:00.000Z" - } - }, - { - "_sort": "2032-01-02T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1843", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjAwIEFNIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-02T00:00:00.000Z" - } - }, - { - "_sort": "2032-01-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1844", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjAwIEFNIEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-02T00:00:00.000Z" - } - }, - { - "_sort": "2032-01-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1845", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjAwIEFNIFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-01T22:30:00.000Z" - } - }, - { - "_sort": "2032-01-01T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-01T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1846", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjAwIEFNIEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-02T05:00:00.000Z" - } - }, - { - "_sort": "2032-01-02T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1847", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjAwIEFNICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-01T22:30:00.000Z" - } - }, - { - "_sort": "2032-01-01T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-01T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1848", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjAwIFBNIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-02T12:00:00.000Z" - } - }, - { - "_sort": "2032-01-02T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1849", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjAwIFBNIEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-02T12:00:00.000Z" - } - }, - { - "_sort": "2032-01-02T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1850", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjAwIFBNIFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-02T10:30:00.000Z" - } - }, - { - "_sort": "2032-01-02T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1851", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjAwIFBNIEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-02T17:00:00.000Z" - } - }, - { - "_sort": "2032-01-02T17:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T17:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1852", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEyOjAwIFBNICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-02T10:30:00.000Z" - } - }, - { - "_sort": "2032-01-02T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1853", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDA6MDAgUE0ifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-02T12:00:00.000Z" - } - }, - { - "_sort": "2032-01-02T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1854", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDA6MDAgUE0gR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-02T12:00:00.000Z" - } - }, - { - "_sort": "2032-01-02T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1855", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDA6MDAgUE0gVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-02T10:30:00.000Z" - } - }, - { - "_sort": "2032-01-02T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1856", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDA6MDAgUE0gRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-02T17:00:00.000Z" - } - }, - { - "_sort": "2032-01-02T17:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T17:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1857", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDA6MDAgUE0gKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2032-01-02T10:30:00.000Z" - } - }, - { - "_sort": "2032-01-02T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2032-01-02T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1858", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEzOjAwIFBNIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1859", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEzOjAwIFBNIEdNVCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1860", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEzOjAwIFBNIFVUQyswMTozMCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1861", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEzOjAwIFBNIEVTVCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1862", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjMyLzAxLzAyIDEzOjAwIFBNICswMTMwIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1863", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1In0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-05T00:00:00.000Z" - } - }, - { - "_sort": "2001-01-05T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1864", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-05T00:00:00.000Z" - } - }, - { - "_sort": "2001-01-05T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1865", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-04T22:30:00.000Z" - } - }, - { - "_sort": "2001-01-04T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-04T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1866", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-05T05:00:00.000Z" - } - }, - { - "_sort": "2001-01-05T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1867", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1ICswMTMwIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1868", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjM0In0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-05T12:34:00.000Z" - } - }, - { - "_sort": "2001-01-05T12:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T12:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1869", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjM0IEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-05T12:34:00.000Z" - } - }, - { - "_sort": "2001-01-05T12:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T12:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1870", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjM0IFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-05T11:04:00.000Z" - } - }, - { - "_sort": "2001-01-05T11:04:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T11:04:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1871", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjM0IEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-05T17:34:00.000Z" - } - }, - { - "_sort": "2001-01-05T17:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T17:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1872", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjM0ICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-05T11:04:00.000Z" - } - }, - { - "_sort": "2001-01-05T11:04:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T11:04:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1873", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjM0OjU2LjAwMDEyMyJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-05T12:34:56.000Z" - } - }, - { - "_sort": "2001-01-05T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1874", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjM0OjU2LjAwMDEyMyBHTVQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-05T12:34:56.000Z" - } - }, - { - "_sort": "2001-01-05T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1875", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjM0OjU2LjAwMDEyMyBVVEMrMDE6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-05T11:04:56.000Z" - } - }, - { - "_sort": "2001-01-05T11:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T11:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1876", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjM0OjU2LjAwMDEyMyBFU1QifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-05T17:34:56.000Z" - } - }, - { - "_sort": "2001-01-05T17:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T17:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1877", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjM0OjU2LjAwMDEyMyArMDEzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-05T11:04:56.000Z" - } - }, - { - "_sort": "2001-01-05T11:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T11:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1878", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-05T12:34:56.999Z" - } - }, - { - "_sort": "2001-01-05T12:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T12:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1879", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSBHTVQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-05T12:34:56.999Z" - } - }, - { - "_sort": "2001-01-05T12:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T12:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1880", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSBVVEMrMDE6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-05T11:04:56.999Z" - } - }, - { - "_sort": "2001-01-05T11:04:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T11:04:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1881", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSBFU1QifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-05T17:34:56.999Z" - } - }, - { - "_sort": "2001-01-05T17:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T17:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1882", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSArMDEzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-05T11:04:56.999Z" - } - }, - { - "_sort": "2001-01-05T11:04:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T11:04:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1883", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDI0OjAwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-06T00:00:00.000Z" - } - }, - { - "_sort": "2001-01-06T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-06T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1884", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDI0OjAwIEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-06T00:00:00.000Z" - } - }, - { - "_sort": "2001-01-06T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-06T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1885", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDI0OjAwIFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-05T22:30:00.000Z" - } - }, - { - "_sort": "2001-01-05T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1886", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDI0OjAwIEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-06T05:00:00.000Z" - } - }, - { - "_sort": "2001-01-06T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-06T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1887", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDI0OjAwICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-05T22:30:00.000Z" - } - }, - { - "_sort": "2001-01-05T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1888", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjAwIEFNIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-05T00:00:00.000Z" - } - }, - { - "_sort": "2001-01-05T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1889", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjAwIEFNIEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-05T00:00:00.000Z" - } - }, - { - "_sort": "2001-01-05T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1890", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjAwIEFNIFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-04T22:30:00.000Z" - } - }, - { - "_sort": "2001-01-04T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-04T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1891", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjAwIEFNIEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-05T05:00:00.000Z" - } - }, - { - "_sort": "2001-01-05T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1892", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjAwIEFNICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-04T22:30:00.000Z" - } - }, - { - "_sort": "2001-01-04T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-04T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1893", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjAwIFBNIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-05T12:00:00.000Z" - } - }, - { - "_sort": "2001-01-05T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1894", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjAwIFBNIEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-05T12:00:00.000Z" - } - }, - { - "_sort": "2001-01-05T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1895", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjAwIFBNIFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-05T10:30:00.000Z" - } - }, - { - "_sort": "2001-01-05T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1896", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjAwIFBNIEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-05T17:00:00.000Z" - } - }, - { - "_sort": "2001-01-05T17:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T17:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1897", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEyOjAwIFBNICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-05T10:30:00.000Z" - } - }, - { - "_sort": "2001-01-05T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1898", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDA6MDAgUE0ifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-05T12:00:00.000Z" - } - }, - { - "_sort": "2001-01-05T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1899", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDA6MDAgUE0gR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-05T12:00:00.000Z" - } - }, - { - "_sort": "2001-01-05T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1900", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDA6MDAgUE0gVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-05T10:30:00.000Z" - } - }, - { - "_sort": "2001-01-05T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1901", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDA6MDAgUE0gRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-05T17:00:00.000Z" - } - }, - { - "_sort": "2001-01-05T17:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T17:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1902", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDA6MDAgUE0gKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-01-05T10:30:00.000Z" - } - }, - { - "_sort": "2001-01-05T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-01-05T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1903", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEzOjAwIFBNIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1904", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEzOjAwIFBNIEdNVCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1905", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEzOjAwIFBNIFVUQyswMTozMCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1906", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEzOjAwIFBNIEVTVCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1907", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkphbiA1IDEzOjAwIFBNICswMTMwIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1908", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-05T00:00:00.000Z" - } - }, - { - "_sort": "2049-03-05T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1909", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-05T00:00:00.000Z" - } - }, - { - "_sort": "2049-03-05T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1910", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-04T22:30:00.000Z" - } - }, - { - "_sort": "2049-03-04T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-04T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1911", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-05T05:00:00.000Z" - } - }, - { - "_sort": "2049-03-05T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1912", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgKzAxMzAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1913", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MzQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-05T12:34:00.000Z" - } - }, - { - "_sort": "2049-03-05T12:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T12:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1914", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MzQgR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-05T12:34:00.000Z" - } - }, - { - "_sort": "2049-03-05T12:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T12:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1915", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MzQgVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-05T11:04:00.000Z" - } - }, - { - "_sort": "2049-03-05T11:04:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T11:04:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1916", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MzQgRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-05T17:34:00.000Z" - } - }, - { - "_sort": "2049-03-05T17:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T17:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1917", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MzQgKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-05T11:04:00.000Z" - } - }, - { - "_sort": "2049-03-05T11:04:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T11:04:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1918", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MzQ6NTYuMDAwMTIzIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-05T12:34:56.000Z" - } - }, - { - "_sort": "2049-03-05T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1919", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MzQ6NTYuMDAwMTIzIEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-05T12:34:56.000Z" - } - }, - { - "_sort": "2049-03-05T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1920", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MzQ6NTYuMDAwMTIzIFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-05T11:04:56.000Z" - } - }, - { - "_sort": "2049-03-05T11:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T11:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1921", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MzQ6NTYuMDAwMTIzIEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-05T17:34:56.000Z" - } - }, - { - "_sort": "2049-03-05T17:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T17:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1922", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MzQ6NTYuMDAwMTIzICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-05T11:04:56.000Z" - } - }, - { - "_sort": "2049-03-05T11:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T11:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1923", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5In0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-05T12:34:56.999Z" - } - }, - { - "_sort": "2049-03-05T12:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T12:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1924", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-05T12:34:56.999Z" - } - }, - { - "_sort": "2049-03-05T12:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T12:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1925", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-05T11:04:56.999Z" - } - }, - { - "_sort": "2049-03-05T11:04:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T11:04:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1926", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5IEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-05T17:34:56.999Z" - } - }, - { - "_sort": "2049-03-05T17:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T17:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1927", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MzQ6NTYuOTk5OTk5OTk5OTk5ICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-05T11:04:56.999Z" - } - }, - { - "_sort": "2049-03-05T11:04:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T11:04:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1928", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMjQ6MDAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-06T00:00:00.000Z" - } - }, - { - "_sort": "2049-03-06T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-06T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1929", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMjQ6MDAgR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-06T00:00:00.000Z" - } - }, - { - "_sort": "2049-03-06T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-06T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1930", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMjQ6MDAgVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-05T22:30:00.000Z" - } - }, - { - "_sort": "2049-03-05T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1931", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMjQ6MDAgRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-06T05:00:00.000Z" - } - }, - { - "_sort": "2049-03-06T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-06T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1932", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMjQ6MDAgKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-05T22:30:00.000Z" - } - }, - { - "_sort": "2049-03-05T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1933", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MDAgQU0ifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-05T00:00:00.000Z" - } - }, - { - "_sort": "2049-03-05T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1934", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MDAgQU0gR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-05T00:00:00.000Z" - } - }, - { - "_sort": "2049-03-05T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1935", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MDAgQU0gVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-04T22:30:00.000Z" - } - }, - { - "_sort": "2049-03-04T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-04T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1936", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MDAgQU0gRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-05T05:00:00.000Z" - } - }, - { - "_sort": "2049-03-05T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1937", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MDAgQU0gKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-04T22:30:00.000Z" - } - }, - { - "_sort": "2049-03-04T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-04T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1938", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MDAgUE0ifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-05T12:00:00.000Z" - } - }, - { - "_sort": "2049-03-05T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1939", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MDAgUE0gR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-05T12:00:00.000Z" - } - }, - { - "_sort": "2049-03-05T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1940", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MDAgUE0gVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-05T10:30:00.000Z" - } - }, - { - "_sort": "2049-03-05T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1941", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MDAgUE0gRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-05T17:00:00.000Z" - } - }, - { - "_sort": "2049-03-05T17:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T17:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1942", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTI6MDAgUE0gKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-05T10:30:00.000Z" - } - }, - { - "_sort": "2049-03-05T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1943", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMDowMCBQTSJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-05T12:00:00.000Z" - } - }, - { - "_sort": "2049-03-05T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1944", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMDowMCBQTSBHTVQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-05T12:00:00.000Z" - } - }, - { - "_sort": "2049-03-05T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1945", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMDowMCBQTSBVVEMrMDE6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-05T10:30:00.000Z" - } - }, - { - "_sort": "2049-03-05T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1946", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMDowMCBQTSBFU1QifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-05T17:00:00.000Z" - } - }, - { - "_sort": "2049-03-05T17:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T17:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1947", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMDowMCBQTSArMDEzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2049-03-05T10:30:00.000Z" - } - }, - { - "_sort": "2049-03-05T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2049-03-05T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1948", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTM6MDAgUE0ifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1949", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTM6MDAgUE0gR01UIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1950", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTM6MDAgUE0gVVRDKzAxOjMwIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1951", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTM6MDAgUE0gRVNUIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1952", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjUgTWFyY2ggNDkgMTM6MDAgUE0gKzAxMzAifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1953", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5In0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-31T00:00:00.000Z" - } - }, - { - "_sort": "1999-12-31T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1954", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-31T00:00:00.000Z" - } - }, - { - "_sort": "1999-12-31T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1955", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-30T22:30:00.000Z" - } - }, - { - "_sort": "1999-12-30T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-30T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1956", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-31T05:00:00.000Z" - } - }, - { - "_sort": "1999-12-31T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1957", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5ICswMTMwIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1958", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjM0In0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-31T12:34:00.000Z" - } - }, - { - "_sort": "1999-12-31T12:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T12:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1959", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjM0IEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-31T12:34:00.000Z" - } - }, - { - "_sort": "1999-12-31T12:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T12:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1960", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjM0IFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-31T11:04:00.000Z" - } - }, - { - "_sort": "1999-12-31T11:04:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T11:04:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1961", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjM0IEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-31T17:34:00.000Z" - } - }, - { - "_sort": "1999-12-31T17:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T17:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1962", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjM0ICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-31T11:04:00.000Z" - } - }, - { - "_sort": "1999-12-31T11:04:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T11:04:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1963", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjM0OjU2LjAwMDEyMyJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-31T12:34:56.000Z" - } - }, - { - "_sort": "1999-12-31T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1964", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjM0OjU2LjAwMDEyMyBHTVQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-31T12:34:56.000Z" - } - }, - { - "_sort": "1999-12-31T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1965", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjM0OjU2LjAwMDEyMyBVVEMrMDE6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-31T11:04:56.000Z" - } - }, - { - "_sort": "1999-12-31T11:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T11:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1966", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjM0OjU2LjAwMDEyMyBFU1QifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-31T17:34:56.000Z" - } - }, - { - "_sort": "1999-12-31T17:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T17:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1967", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjM0OjU2LjAwMDEyMyArMDEzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-31T11:04:56.000Z" - } - }, - { - "_sort": "1999-12-31T11:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T11:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1968", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-31T12:34:56.999Z" - } - }, - { - "_sort": "1999-12-31T12:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T12:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1969", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSBHTVQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-31T12:34:56.999Z" - } - }, - { - "_sort": "1999-12-31T12:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T12:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1970", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSBVVEMrMDE6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-31T11:04:56.999Z" - } - }, - { - "_sort": "1999-12-31T11:04:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T11:04:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1971", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSBFU1QifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-31T17:34:56.999Z" - } - }, - { - "_sort": "1999-12-31T17:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T17:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1972", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSArMDEzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-31T11:04:56.999Z" - } - }, - { - "_sort": "1999-12-31T11:04:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T11:04:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1973", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDI0OjAwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2000-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2000-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2000-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1974", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDI0OjAwIEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2000-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2000-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2000-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1975", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDI0OjAwIFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-31T22:30:00.000Z" - } - }, - { - "_sort": "1999-12-31T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1976", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDI0OjAwIEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2000-01-01T05:00:00.000Z" - } - }, - { - "_sort": "2000-01-01T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2000-01-01T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1977", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDI0OjAwICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-31T22:30:00.000Z" - } - }, - { - "_sort": "1999-12-31T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1978", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjAwIEFNIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-31T00:00:00.000Z" - } - }, - { - "_sort": "1999-12-31T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1979", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjAwIEFNIEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-31T00:00:00.000Z" - } - }, - { - "_sort": "1999-12-31T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1980", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjAwIEFNIFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-30T22:30:00.000Z" - } - }, - { - "_sort": "1999-12-30T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-30T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1981", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjAwIEFNIEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-31T05:00:00.000Z" - } - }, - { - "_sort": "1999-12-31T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1982", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjAwIEFNICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-30T22:30:00.000Z" - } - }, - { - "_sort": "1999-12-30T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-30T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1983", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjAwIFBNIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-31T12:00:00.000Z" - } - }, - { - "_sort": "1999-12-31T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1984", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjAwIFBNIEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-31T12:00:00.000Z" - } - }, - { - "_sort": "1999-12-31T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1985", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjAwIFBNIFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-31T10:30:00.000Z" - } - }, - { - "_sort": "1999-12-31T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1986", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjAwIFBNIEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-31T17:00:00.000Z" - } - }, - { - "_sort": "1999-12-31T17:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T17:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1987", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEyOjAwIFBNICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-31T10:30:00.000Z" - } - }, - { - "_sort": "1999-12-31T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1988", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDA6MDAgUE0ifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-31T12:00:00.000Z" - } - }, - { - "_sort": "1999-12-31T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1989", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDA6MDAgUE0gR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-31T12:00:00.000Z" - } - }, - { - "_sort": "1999-12-31T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1990", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDA6MDAgUE0gVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-31T10:30:00.000Z" - } - }, - { - "_sort": "1999-12-31T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1991", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDA6MDAgUE0gRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-31T17:00:00.000Z" - } - }, - { - "_sort": "1999-12-31T17:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T17:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1992", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDA6MDAgUE0gKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "1999-12-31T10:30:00.000Z" - } - }, - { - "_sort": "1999-12-31T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "1999-12-31T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1993", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEzOjAwIFBNIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1994", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEzOjAwIFBNIEdNVCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1995", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEzOjAwIFBNIFVUQyswMTozMCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1996", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEzOjAwIFBNIEVTVCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1997", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IkRlY2VtYmVyIDMxIDk5IDEzOjAwIFBNICswMTMwIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-1998", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-02T00:00:00.000Z" - } - }, - { - "_sort": "2024-01-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-1999", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-02T00:00:00.000Z" - } - }, - { - "_sort": "2024-01-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2000", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-01T22:30:00.000Z" - } - }, - { - "_sort": "2024-01-01T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-01T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2001", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-02T05:00:00.000Z" - } - }, - { - "_sort": "2024-01-02T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2002", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyICswMTMwIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-2003", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjM0In0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-02T12:34:00.000Z" - } - }, - { - "_sort": "2024-01-02T12:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T12:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2004", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjM0IEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-02T12:34:00.000Z" - } - }, - { - "_sort": "2024-01-02T12:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T12:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2005", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjM0IFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-02T11:04:00.000Z" - } - }, - { - "_sort": "2024-01-02T11:04:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T11:04:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2006", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjM0IEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-02T17:34:00.000Z" - } - }, - { - "_sort": "2024-01-02T17:34:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T17:34:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2007", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjM0ICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-02T11:04:00.000Z" - } - }, - { - "_sort": "2024-01-02T11:04:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T11:04:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2008", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjM0OjU2LjAwMDEyMyJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-02T12:34:56.000Z" - } - }, - { - "_sort": "2024-01-02T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2009", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjM0OjU2LjAwMDEyMyBHTVQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-02T12:34:56.000Z" - } - }, - { - "_sort": "2024-01-02T12:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T12:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2010", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjM0OjU2LjAwMDEyMyBVVEMrMDE6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-02T11:04:56.000Z" - } - }, - { - "_sort": "2024-01-02T11:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T11:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2011", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjM0OjU2LjAwMDEyMyBFU1QifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-02T17:34:56.000Z" - } - }, - { - "_sort": "2024-01-02T17:34:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T17:34:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2012", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjM0OjU2LjAwMDEyMyArMDEzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-02T11:04:56.000Z" - } - }, - { - "_sort": "2024-01-02T11:04:56.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T11:04:56.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2013", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-02T12:34:56.999Z" - } - }, - { - "_sort": "2024-01-02T12:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T12:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2014", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSBHTVQifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-02T12:34:56.999Z" - } - }, - { - "_sort": "2024-01-02T12:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T12:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2015", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSBVVEMrMDE6MzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-02T11:04:56.999Z" - } - }, - { - "_sort": "2024-01-02T11:04:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T11:04:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2016", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSBFU1QifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-02T17:34:56.999Z" - } - }, - { - "_sort": "2024-01-02T17:34:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T17:34:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2017", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjM0OjU2Ljk5OTk5OTk5OTk5OSArMDEzMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-02T11:04:56.999Z" - } - }, - { - "_sort": "2024-01-02T11:04:56.999Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T11:04:56.999Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2018", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDI0OjAwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-03T00:00:00.000Z" - } - }, - { - "_sort": "2024-01-03T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-03T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2019", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDI0OjAwIEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-03T00:00:00.000Z" - } - }, - { - "_sort": "2024-01-03T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-03T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2020", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDI0OjAwIFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-02T22:30:00.000Z" - } - }, - { - "_sort": "2024-01-02T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2021", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDI0OjAwIEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-03T05:00:00.000Z" - } - }, - { - "_sort": "2024-01-03T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-03T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2022", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDI0OjAwICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-02T22:30:00.000Z" - } - }, - { - "_sort": "2024-01-02T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2023", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjAwIEFNIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-02T00:00:00.000Z" - } - }, - { - "_sort": "2024-01-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2024", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjAwIEFNIEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-02T00:00:00.000Z" - } - }, - { - "_sort": "2024-01-02T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2025", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjAwIEFNIFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-01T22:30:00.000Z" - } - }, - { - "_sort": "2024-01-01T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-01T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2026", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjAwIEFNIEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-02T05:00:00.000Z" - } - }, - { - "_sort": "2024-01-02T05:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T05:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2027", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjAwIEFNICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-01T22:30:00.000Z" - } - }, - { - "_sort": "2024-01-01T22:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-01T22:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2028", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjAwIFBNIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-02T12:00:00.000Z" - } - }, - { - "_sort": "2024-01-02T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2029", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjAwIFBNIEdNVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-02T12:00:00.000Z" - } - }, - { - "_sort": "2024-01-02T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2030", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjAwIFBNIFVUQyswMTozMCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-02T10:30:00.000Z" - } - }, - { - "_sort": "2024-01-02T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2031", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjAwIFBNIEVTVCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-02T17:00:00.000Z" - } - }, - { - "_sort": "2024-01-02T17:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T17:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2032", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEyOjAwIFBNICswMTMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-02T10:30:00.000Z" - } - }, - { - "_sort": "2024-01-02T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2033", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDA6MDAgUE0ifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-02T12:00:00.000Z" - } - }, - { - "_sort": "2024-01-02T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2034", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDA6MDAgUE0gR01UIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-02T12:00:00.000Z" - } - }, - { - "_sort": "2024-01-02T12:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T12:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2035", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDA6MDAgUE0gVVRDKzAxOjMwIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-02T10:30:00.000Z" - } - }, - { - "_sort": "2024-01-02T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2036", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDA6MDAgUE0gRVNUIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-02T17:00:00.000Z" - } - }, - { - "_sort": "2024-01-02T17:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T17:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2037", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDA6MDAgUE0gKzAxMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-02T10:30:00.000Z" - } - }, - { - "_sort": "2024-01-02T10:30:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-02T10:30:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2038", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEzOjAwIFBNIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-2039", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEzOjAwIFBNIEdNVCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-2040", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEzOjAwIFBNIFVUQyswMTozMCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-2041", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEzOjAwIFBNIEVTVCJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-2042", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQsMSwyIDEzOjAwIFBNICswMTMwIn0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-2043", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDEgIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2044", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDFcdCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2045", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDFcbiJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2046", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDHvu78ifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2047", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDEgKGlnbm9yZWQpIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2048", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDEgZ2FyYmFnZSJ9" - }, - "error": "invalid_cursor" - }, - { - "name": "case-2049", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDEtMDFcdTAwMDBpZ25vcmVkIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-01-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-01-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2050", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6WyIyMDI0LTAyLTI5Il19" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T00:00:00.000Z" - } - }, - { - "_sort": "2024-02-29T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2051", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6WyIyMDI0LTAyLTI5Il19" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T00:00:00.000Z" - } - }, - { - "_sort": "2024-02-29T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2052", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6WyIyMDI0LTAyLTI5IiwiMjAyNC0wMy0wMSJdfQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-2053", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6WyIiXX0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-2054", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6eyJ4IjoieCJ9fQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-2055", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6eyJ0b1N0cmluZyI6IngifX0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-2056", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6ImludmFsaWQifQ" - }, - "error": "invalid_cursor" - }, - { - "name": "case-2057", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6eyJ0b1N0cmluZyI6IngifX0" - }, - "error": "invalid_cursor" - }, - { - "name": "case-2058", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ik1hcmNoIDEgMjAyNCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2059", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMzAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2060", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMjQ6MDA6MDBaIn0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2061", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6Ii0wMDAwMDAtMDItMDMifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2001-02-03T00:00:00.000Z" - } - }, - { - "_sort": "2001-02-03T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2001-02-03T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2062", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6WyIyMDI0IiwiMyIsIjEiXX0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2063", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDMtMDFUMDE6MDA6MDArMDI6MDAifQ" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-02-29T23:00:00.000Z" - } - }, - { - "_sort": "2024-02-29T23:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-02-29T23:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2064", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDMtMDF0MDA6MDB6In0" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2065", - "query": { - "sort": "options.expirationDate", - "cursor": "eyJzb3J0Ijoib3B0aW9ucy5leHBpcmF0aW9uRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIxMTExMTExMTExMTExMTExMTExMTExMTEiLCJ2YWx1ZSI6IjIwMjQtMDMtMDFUMDA6MDBaXHUwMDAwaWdub3JlZCJ9" - }, - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$options.expirationDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "2024-03-01T00:00:00.000Z" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "2024-03-01T00:00:00.000Z", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2066", - "query": { - "type": [ - "repo" - ] - }, - "rawQuery": "type[]=repo", - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_type": [ - "repo" - ], - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_type": [ - "repo" - ], - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2067", - "query": { - "type": [ - "repo" - ] - }, - "rawQuery": "type[0]=repo", - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_type": [ - "repo" - ], - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_type": [ - "repo" - ], - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2068", - "query": { - "type": [ - "repo", - "gist" - ] - }, - "rawQuery": "type[]=repo&type[]=gist", - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2069", - "query": { - "type": { - "x": "repo" - } - }, - "rawQuery": "type[x]=repo", - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2070", - "query": { - "attention": [ - "true" - ] - }, - "rawQuery": "attention[]=true", - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2071", - "query": { - "attention": "true" - }, - "rawQuery": "attention=true", - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_attention": true, - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_attention": true, - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2072", - "query": { - "statuses": [ - "" - ] - }, - "rawQuery": "statuses[]=", - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2073", - "query": { - "statuses": [ - "ready", - "removed" - ] - }, - "rawQuery": "statuses[]=ready&statuses[]=removed", - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "removed" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "removed" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2074", - "query": { - "statuses": [ - "error", - "ready" - ] - }, - "rawQuery": "statuses[1]=ready&statuses[0]=error", - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "error", - "ready" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "error", - "ready" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2075", - "query": { - "statuses": { - "x": "ready" - } - }, - "rawQuery": "statuses[x]=ready", - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2076", - "query": { - "q": [ - "first", - "second" - ] - }, - "rawQuery": "q[]=first&q[]=second", - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - }, - "$or": [ - { - "_anonymousId": { - "$regex": "first,second", - "$options": "i" - } - }, - { - "_label": { - "$regex": "first,second", - "$options": "i" - } - }, - { - "_source": { - "$regex": "first,second", - "$options": "i" - } - }, - { - "conference": { - "$regex": "first,second", - "$options": "i" - } - } - ] - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - }, - "$or": [ - { - "_anonymousId": { - "$regex": "first,second", - "$options": "i" - } - }, - { - "_label": { - "$regex": "first,second", - "$options": "i" - } - }, - { - "_source": { - "$regex": "first,second", - "$options": "i" - } - }, - { - "conference": { - "$regex": "first,second", - "$options": "i" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2077", - "query": { - "q": { - "x": "text" - } - }, - "rawQuery": "q[x]=text", - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - }, - "$or": [ - { - "_anonymousId": { - "$regex": "\\[object Object\\]", - "$options": "i" - } - }, - { - "_label": { - "$regex": "\\[object Object\\]", - "$options": "i" - } - }, - { - "_source": { - "$regex": "\\[object Object\\]", - "$options": "i" - } - }, - { - "conference": { - "$regex": "\\[object Object\\]", - "$options": "i" - } - } - ] - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - }, - "$or": [ - { - "_anonymousId": { - "$regex": "\\[object Object\\]", - "$options": "i" - } - }, - { - "_label": { - "$regex": "\\[object Object\\]", - "$options": "i" - } - }, - { - "_source": { - "$regex": "\\[object Object\\]", - "$options": "i" - } - }, - { - "conference": { - "$regex": "\\[object Object\\]", - "$options": "i" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2078", - "query": { - "q": "%FF" - }, - "rawQuery": "q=%FF", - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - }, - "$or": [ - { - "_anonymousId": { - "$regex": "%FF", - "$options": "i" - } - }, - { - "_label": { - "$regex": "%FF", - "$options": "i" - } - }, - { - "_source": { - "$regex": "%FF", - "$options": "i" - } - }, - { - "conference": { - "$regex": "%FF", - "$options": "i" - } - } - ] - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - }, - "$or": [ - { - "_anonymousId": { - "$regex": "%FF", - "$options": "i" - } - }, - { - "_label": { - "$regex": "%FF", - "$options": "i" - } - }, - { - "_source": { - "$regex": "%FF", - "$options": "i" - } - }, - { - "conference": { - "$regex": "%FF", - "$options": "i" - } - } - ] - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2079", - "query": { - "sort": [ - "" - ] - }, - "rawQuery": "sort[]=", - "error": "invalid_sort" - }, - { - "name": "case-2080", - "query": { - "sort": [ - "_name" - ] - }, - "rawQuery": "sort[]=_name", - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$_anonymousId", - "" - ] - } - } - }, - { - "$set": { - "_sort": { - "$toLower": "$_sort" - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2081", - "query": { - "sort": [ - "status", - "_name" - ] - }, - "rawQuery": "sort[1]=_name&sort[0]=status", - "error": "invalid_sort" - }, - { - "name": "case-2082", - "query": { - "sort": { - "x": "_name" - } - }, - "rawQuery": "sort[x]=_name", - "error": "invalid_sort" - }, - { - "name": "case-2083", - "query": { - "limit": [ - "2" - ] - }, - "rawQuery": "limit[]=2", - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 3 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2084", - "query": { - "limit": [ - "2" - ] - }, - "rawQuery": "limit[0]=2", - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 3 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2085", - "query": { - "limit": [ - "1", - "2" - ] - }, - "rawQuery": "limit[1]=2&limit[0]=1", - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2086", - "query": { - "limit": { - "x": "2" - } - }, - "rawQuery": "limit[x]=2", - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$anonymizeDate", - "1970-01-01T00:00:00.000Z" - ] - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$sort": { - "_sort": -1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2087", - "query": { - "cursor": [ - "" - ] - }, - "rawQuery": "cursor[]=", - "error": "invalid_cursor" - }, - { - "name": "case-2088", - "query": { - "cursor": { - "x": "3" - } - }, - "rawQuery": "cursor[x]=3", - "error": "invalid_cursor" - }, - { - "name": "case-2089", - "query": { - "cursor": { - "toString": "3" - } - }, - "rawQuery": "cursor[toString]=3", - "error": "invalid_cursor" - }, - { - "name": "case-2090", - "query": { - "sort": { - "toString": "3" - } - }, - "rawQuery": "sort[toString]=3", - "error": "invalid_query_value" - }, - { - "name": "case-2091", - "query": { - "limit": { - "toString": "3" - } - }, - "rawQuery": "limit[toString]=3", - "error": "invalid_query_value" - }, - { - "name": "case-2092", - "query": { - "type": { - "toString": "3" - } - }, - "rawQuery": "type[toString]=3", - "error": "invalid_query_value" - }, - { - "name": "case-2093", - "query": { - "statuses": { - "toString": "3" - } - }, - "rawQuery": "statuses[toString]=3", - "error": "invalid_query_value" - }, - { - "name": "case-2094", - "query": { - "q": { - "toString": "3" - } - }, - "rawQuery": "q[toString]=3", - "error": "invalid_query_value" - }, - { - "name": "case-2095", - "query": { - "sort": "_name", - "cursor": [ - "eyJzb3J0IjoiX25hbWUiLCJ0eXBlIjoicmVwbyIsImlkIjoiMTExMTExMTExMTExMTExMTExMTExMTExIiwidmFsdWUiOiJhYmMifQ" - ] - }, - "rawQuery": "sort=_name&cursor[]=eyJzb3J0IjoiX25hbWUiLCJ0eXBlIjoicmVwbyIsImlkIjoiMTExMTExMTExMTExMTExMTExMTExMTExIiwidmFsdWUiOiJhYmMifQ", - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$_anonymousId", - "" - ] - } - } - }, - { - "$set": { - "_sort": { - "$toLower": "$_sort" - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": "abc" - } - }, - { - "_sort": "abc", - "_type": { - "$gt": "repo" - } - }, - { - "_sort": "abc", - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2096", - "query": { - "sort": "_name", - "cursor": [ - "eyJzb3J0IjoiX25hbWUiLCJ0eXBlIjoicmVwbyIsImlkIjoiMTExMTExMTExMTExMTExMTExMTExMTExIiwidmFsdWUiOjQyfQ" - ] - }, - "rawQuery": "sort=_name&cursor[]=eyJzb3J0IjoiX25hbWUiLCJ0eXBlIjoicmVwbyIsImlkIjoiMTExMTExMTExMTExMTExMTExMTExMTExIiwidmFsdWUiOjQyfQ", - "expected": [ - { - "$match": { - "$or": [ - { - "owner": "111111111111111111111111" - } - ] - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "repoId": 1, - "source": { - "fullName": "$source.repositoryName", - "commit": "$source.commit" - }, - "coauthors": 1, - "size": 1, - "role": { - "$cond": [ - { - "$eq": [ - "$owner", - "111111111111111111111111" - ] - }, - "owner", - "coauthor" - ] - }, - "_type": { - "$literal": "repo" - }, - "_anonymousId": { - "$ifNull": [ - "$repoId", - "" - ] - }, - "_source": "$source.repositoryName", - "_fallbackLabel": "$source.repositoryName" - } - }, - { - "$unionWith": { - "coll": "anonymizedpullrequests", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "pullRequestId": 1, - "source": { - "repositoryFullName": "$source.repositoryFullName", - "pullRequestId": "$source.pullRequestId" - }, - "_type": { - "$literal": "pr" - }, - "_anonymousId": { - "$ifNull": [ - "$pullRequestId", - "" - ] - }, - "_source": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - }, - "_fallbackLabel": { - "$concat": [ - { - "$ifNull": [ - "$source.repositoryFullName", - "" - ] - }, - "#", - { - "$toString": "$source.pullRequestId" - } - ] - } - } - } - ] - } - }, - { - "$unionWith": { - "coll": "anonymizedgists", - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111" - } - }, - { - "$project": { - "_id": 1, - "status": 1, - "statusMessage": 1, - "anonymizeDate": 1, - "lastView": 1, - "pageView": { - "$ifNull": [ - "$pageView", - 0 - ] - }, - "options": 1, - "conference": 1, - "gistId": 1, - "source": { - "gistId": "$source.gistId" - }, - "isPublic": "$gist.isPublic", - "_type": { - "$literal": "gist" - }, - "_anonymousId": { - "$ifNull": [ - "$gistId", - "" - ] - }, - "_source": "$source.gistId", - "_fallbackLabel": { - "$concat": [ - "Gist ", - { - "$ifNull": [ - "$gistId", - "$source.gistId" - ] - } - ] - } - } - } - ] - } - }, - { - "$lookup": { - "from": "dashboardnames", - "let": { - "type": "$_type", - "id": "$_anonymousId" - }, - "pipeline": [ - { - "$match": { - "owner": "111111111111111111111111", - "$expr": { - "$and": [ - { - "$eq": [ - "$type", - "$$type" - ] - }, - { - "$eq": [ - "$artifactId", - "$$id" - ] - } - ] - } - } - }, - { - "$project": { - "name": 1 - } - } - ], - "as": "_privateName" - } - }, - { - "$set": { - "projectName": { - "$ifNull": [ - { - "$arrayElemAt": [ - "$_privateName.name", - 0 - ] - }, - "" - ] - } - } - }, - { - "$unset": "_privateName" - }, - { - "$set": { - "status": { - "$cond": [ - { - "$and": [ - { - "$eq": [ - "$status", - "ready" - ] - }, - { - "$ne": [ - "$options.expirationMode", - "never" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$options.expirationDate", - null - ] - }, - null - ] - }, - { - "$lte": [ - "$options.expirationDate", - "2026-01-02T03:04:05.000Z" - ] - } - ] - }, - "expired", - "$status" - ] - }, - "_label": { - "$cond": [ - { - "$ne": [ - "$projectName", - "" - ] - }, - "$projectName", - { - "$ifNull": [ - "$_fallbackLabel", - "$_anonymousId" - ] - } - ] - } - } - }, - { - "$set": { - "_statusKey": { - "$switch": { - "branches": [ - { - "case": { - "$in": [ - "$status", - [ - "ready", - "error" - ] - ] - }, - "then": "$status" - }, - { - "case": { - "$in": [ - "$status", - [ - "expired", - "expiring" - ] - ] - }, - "then": "expired" - }, - { - "case": { - "$in": [ - "$status", - [ - "removed", - "removing" - ] - ] - }, - "then": "removed" - } - ], - "default": "progress" - } - } - } - }, - { - "$set": { - "_attention": { - "$or": [ - { - "$eq": [ - "$status", - "error" - ] - }, - { - "$eq": [ - "$_anonymousId", - "" - ] - }, - { - "$and": [ - { - "$eq": [ - "$_statusKey", - "progress" - ] - }, - { - "$ne": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - null - ] - }, - { - "$lt": [ - { - "$ifNull": [ - "$anonymizeDate", - "$lastView" - ] - }, - "2026-01-02T01:04:05.000Z" - ] - } - ] - } - ] - }, - "_sort": { - "$ifNull": [ - "$_anonymousId", - "" - ] - } - } - }, - { - "$set": { - "_sort": { - "$toLower": "$_sort" - } - } - }, - { - "$facet": { - "totals": [ - { - "$group": { - "_id": null, - "total": { - "$sum": 1 - }, - "attention": { - "$sum": { - "$cond": [ - "$_attention", - 1, - 0 - ] - } - } - } - } - ], - "filtered": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$count": "count" - } - ], - "items": [ - { - "$match": { - "_statusKey": { - "$in": [ - "ready", - "progress", - "error", - "expired" - ] - } - } - }, - { - "$match": { - "$or": [ - { - "_sort": { - "$gt": 42 - } - }, - { - "_sort": 42, - "_type": { - "$gt": "repo" - } - }, - { - "_sort": 42, - "_type": "repo", - "_id": { - "$gt": "111111111111111111111111" - } - } - ] - } - }, - { - "$sort": { - "_sort": 1, - "_type": 1, - "_id": 1 - } - }, - { - "$limit": 51 - } - ] - } - } - ], - "sortOrder": [ - "_sort", - "_type", - "_id" - ] - }, - { - "name": "case-2097", - "query": { - "sort": "_name", - "cursor": [ - "eyJzb3J0IjoiX25hbWUiLCJ0eXBlIjoicmVwbyIsImlkIjoiMTExMTExMTExMTExMTExMTExMTExMTExIiwidmFsdWUiOm51bGx9" - ] - }, - "rawQuery": "sort=_name&cursor[]=eyJzb3J0IjoiX25hbWUiLCJ0eXBlIjoicmVwbyIsImlkIjoiMTExMTExMTExMTExMTExMTExMTExMTExIiwidmFsdWUiOm51bGx9", - "error": "invalid_cursor" - }, - { - "name": "case-2098", - "query": { - "sort": "_name", - "cursor": [ - "eyJzb3J0IjoiX25hbWUiLCJ0eXBlIjoicmVwbyIsImlkIjoiMTExMTExMTExMTExMTExMTExMTExMTExIiwidmFsdWUiOnRydWV9" - ] - }, - "rawQuery": "sort=_name&cursor[]=eyJzb3J0IjoiX25hbWUiLCJ0eXBlIjoicmVwbyIsImlkIjoiMTExMTExMTExMTExMTExMTExMTExMTExIiwidmFsdWUiOnRydWV9", - "error": "invalid_cursor" - }, - { - "name": "case-2099", - "query": { - "sort": "_name", - "cursor": [ - "eyJzb3J0IjoiX25hbWUiLCJ0eXBlIjoicmVwbyIsImlkIjoiMTExMTExMTExMTExMTExMTExMTExMTExIiwidmFsdWUiOmZhbHNlfQ" - ] - }, - "rawQuery": "sort=_name&cursor[]=eyJzb3J0IjoiX25hbWUiLCJ0eXBlIjoicmVwbyIsImlkIjoiMTExMTExMTExMTExMTExMTExMTExMTExIiwidmFsdWUiOmZhbHNlfQ", - "error": "invalid_cursor" - }, - { - "name": "case-2100", - "query": { - "sort": "_name", - "cursor": [ - "eyJzb3J0IjoiX25hbWUiLCJ0eXBlIjoicmVwbyIsImlkIjoiMTExMTExMTExMTExMTExMTExMTExMTExIiwidmFsdWUiOnt9fQ" - ] - }, - "rawQuery": "sort=_name&cursor[]=eyJzb3J0IjoiX25hbWUiLCJ0eXBlIjoicmVwbyIsImlkIjoiMTExMTExMTExMTExMTExMTExMTExMTExIiwidmFsdWUiOnt9fQ", - "error": "invalid_cursor" - }, - { - "name": "case-2101", - "query": { - "sort": "_name", - "cursor": [ - "eyJzb3J0IjoiX25hbWUiLCJ0eXBlIjoicmVwbyIsImlkIjoiMTExMTExMTExMTExMTExMTExMTExMTExIiwidmFsdWUiOnsiJG5lIjpudWxsfX0" - ] - }, - "rawQuery": "sort=_name&cursor[]=eyJzb3J0IjoiX25hbWUiLCJ0eXBlIjoicmVwbyIsImlkIjoiMTExMTExMTExMTExMTExMTExMTExMTExIiwidmFsdWUiOnsiJG5lIjpudWxsfX0", - "error": "invalid_cursor" - }, - { - "name": "case-2102", - "query": { - "sort": "_name", - "cursor": [ - "eyJzb3J0IjoiX25hbWUiLCJ0eXBlIjoicmVwbyIsImlkIjoiMTExMTExMTExMTExMTExMTExMTExMTExIiwidmFsdWUiOltdfQ" - ] - }, - "rawQuery": "sort=_name&cursor[]=eyJzb3J0IjoiX25hbWUiLCJ0eXBlIjoicmVwbyIsImlkIjoiMTExMTExMTExMTExMTExMTExMTExMTExIiwidmFsdWUiOltdfQ", - "error": "invalid_cursor" - } - ] -} diff --git a/backend/internal/server/testdata/dates.json b/backend/internal/server/testdata/dates.json deleted file mode 100644 index b20ebeb..0000000 --- a/backend/internal/server/testdata/dates.json +++ /dev/null @@ -1,854 +0,0 @@ -[ - { - "milliseconds": 0, - "expected": "1970-01-01T00:00:00.000Z" - }, - { - "milliseconds": 1, - "expected": "1970-01-01T00:00:00.001Z" - }, - { - "milliseconds": -1, - "expected": "1969-12-31T23:59:59.999Z" - }, - { - "milliseconds": 1000, - "expected": "1970-01-01T00:00:01.000Z" - }, - { - "milliseconds": -1000, - "expected": "1969-12-31T23:59:59.000Z" - }, - { - "milliseconds": 1700000000123, - "expected": "2023-11-14T22:13:20.123Z" - }, - { - "milliseconds": -62167219200000, - "expected": "0000-01-01T00:00:00.000Z" - }, - { - "milliseconds": -62167219200001, - "expected": "-000001-12-31T23:59:59.999Z" - }, - { - "milliseconds": 253402300800000, - "expected": "+010000-01-01T00:00:00.000Z" - }, - { - "milliseconds": -8640000000000000, - "expected": "-271821-04-20T00:00:00.000Z" - }, - { - "milliseconds": 8640000000000000, - "expected": "+275760-09-13T00:00:00.000Z" - }, - { - "milliseconds": -8640000000000001, - "expected": null - }, - { - "milliseconds": 8640000000000001, - "expected": null - }, - { - "milliseconds": -4279475379735231, - "expected": "-133642-10-28T22:57:44.769Z" - }, - { - "milliseconds": -7117199215292931, - "expected": "-223566-12-08T01:58:27.069Z" - }, - { - "milliseconds": 1335419105440378, - "expected": "+044287-09-30T15:30:40.378Z" - }, - { - "milliseconds": -4794262283742428, - "expected": "-149955-11-16T04:44:17.572Z" - }, - { - "milliseconds": -2148591793924570, - "expected": "-066117-11-02T10:07:55.430Z" - }, - { - "milliseconds": -8196527724266052, - "expected": "-257768-05-17T23:15:33.948Z" - }, - { - "milliseconds": -910979379862546, - "expected": "-026898-03-20T04:15:37.454Z" - }, - { - "milliseconds": -6593011135160923, - "expected": "-206955-10-17T18:00:39.077Z" - }, - { - "milliseconds": 6459500835388899, - "expected": "+206663-06-08T03:36:28.899Z" - }, - { - "milliseconds": 8547280277609825, - "expected": "+272822-07-13T01:33:29.825Z" - }, - { - "milliseconds": 6103343064934015, - "expected": "+195377-03-29T17:35:34.015Z" - }, - { - "milliseconds": -5586137473583, - "expected": "1792-12-24T15:08:46.417Z" - }, - { - "milliseconds": 2453776354640722, - "expected": "+079727-01-29T06:57:20.722Z" - }, - { - "milliseconds": 6245962918996811, - "expected": "+199896-09-07T11:43:16.811Z" - }, - { - "milliseconds": 1666997737437486, - "expected": "+054795-01-21T07:03:57.486Z" - }, - { - "milliseconds": -7071837296783924, - "expected": "-222128-05-25T06:53:36.076Z" - }, - { - "milliseconds": -6217174690514803, - "expected": "-195045-07-30T14:24:45.197Z" - }, - { - "milliseconds": 7777525418400764, - "expected": "+248429-12-20T07:20:00.764Z" - }, - { - "milliseconds": 7336318103224039, - "expected": "+234448-08-31T03:47:04.039Z" - }, - { - "milliseconds": 6730023564398289, - "expected": "+215235-12-16T06:06:38.289Z" - }, - { - "milliseconds": 872784632295370, - "expected": "+029627-06-11T23:38:15.370Z" - }, - { - "milliseconds": -5520673978328705, - "expected": "-172974-10-22T10:27:51.295Z" - }, - { - "milliseconds": 865476983338594, - "expected": "+029395-11-15T17:08:58.594Z" - }, - { - "milliseconds": -4165053755342960, - "expected": "-130016-09-13T07:30:57.040Z" - }, - { - "milliseconds": 7657142329663038, - "expected": "+244615-03-08T12:27:43.038Z" - }, - { - "milliseconds": 5555536939501762, - "expected": "+178017-12-16T01:25:01.762Z" - }, - { - "milliseconds": -5956521258205175, - "expected": "-186785-05-10T17:36:34.825Z" - }, - { - "milliseconds": 5691940601170063, - "expected": "+182340-06-02T03:26:10.063Z" - }, - { - "milliseconds": -571582830101251, - "expected": "-016143-04-05T23:38:18.749Z" - }, - { - "milliseconds": -7591019715070724, - "expected": "-238580-02-29T12:28:49.276Z" - }, - { - "milliseconds": -8251973526924849, - "expected": "-259525-05-15T03:24:35.151Z" - }, - { - "milliseconds": 644349987208843, - "expected": "+022388-08-21T11:33:28.843Z" - }, - { - "milliseconds": 5701713370531797, - "expected": "+182650-02-07T21:35:31.797Z" - }, - { - "milliseconds": 5967339010834694, - "expected": "+191067-06-12T17:40:34.694Z" - }, - { - "milliseconds": 3126264189630747, - "expected": "+101037-05-15T07:20:30.747Z" - }, - { - "milliseconds": -2060500310361385, - "expected": "-063325-05-06T18:40:38.615Z" - }, - { - "milliseconds": 1480150285810232, - "expected": "+048874-02-04T01:10:10.232Z" - }, - { - "milliseconds": 3393742847442627, - "expected": "+109513-06-07T02:30:42.627Z" - }, - { - "milliseconds": 3652394009381532, - "expected": "+117709-10-04T19:29:41.532Z" - }, - { - "milliseconds": 3777720366418361, - "expected": "+121681-03-11T08:26:58.361Z" - }, - { - "milliseconds": 8472167094200850, - "expected": "+270442-04-15T12:23:20.850Z" - }, - { - "milliseconds": -868270760178566, - "expected": "-025545-08-05T21:43:41.434Z" - }, - { - "milliseconds": -6947831656783819, - "expected": "-218199-12-24T18:00:16.181Z" - }, - { - "milliseconds": -5329253515899181, - "expected": "-166908-09-05T01:08:20.819Z" - }, - { - "milliseconds": -909297514110803, - "expected": "-026845-07-06T05:11:29.197Z" - }, - { - "milliseconds": -6445420714616776, - "expected": "-202278-10-01T05:03:03.224Z" - }, - { - "milliseconds": 4644257082492113, - "expected": "+149140-08-25T11:48:12.113Z" - }, - { - "milliseconds": 1619489755332470, - "expected": "+053289-08-02T09:22:12.470Z" - }, - { - "milliseconds": 5264249350279570, - "expected": "+168787-06-03T22:11:19.570Z" - }, - { - "milliseconds": -1910971328616142, - "expected": "-058587-09-24T06:56:23.858Z" - }, - { - "milliseconds": -4911510213464499, - "expected": "-153670-06-09T23:22:15.501Z" - }, - { - "milliseconds": -3938812423646450, - "expected": "-122846-01-02T05:52:33.550Z" - }, - { - "milliseconds": -8310215536504984, - "expected": "-261371-10-02T19:24:55.016Z" - }, - { - "milliseconds": -3836646387577057, - "expected": "-119609-07-08T12:20:22.943Z" - }, - { - "milliseconds": -2869027129858732, - "expected": "-088946-02-24T11:29:01.268Z" - }, - { - "milliseconds": 6615926464498043, - "expected": "+211620-05-12T23:14:58.043Z" - }, - { - "milliseconds": 7877573175877333, - "expected": "+251600-05-10T11:04:37.333Z" - }, - { - "milliseconds": -5310168212056160, - "expected": "-166303-06-19T18:25:43.840Z" - }, - { - "milliseconds": 6416081791073084, - "expected": "+205287-07-15T21:57:53.084Z" - }, - { - "milliseconds": 1422540495693683, - "expected": "+047048-07-07T01:41:33.683Z" - }, - { - "milliseconds": -2822150900512933, - "expected": "-087461-08-07T10:18:07.067Z" - }, - { - "milliseconds": -3208421720266342, - "expected": "-099701-03-01T08:22:13.658Z" - }, - { - "milliseconds": -6404671762436628, - "expected": "-200986-01-12T14:26:03.372Z" - }, - { - "milliseconds": 8293884741961956, - "expected": "+264792-09-29T08:46:01.956Z" - }, - { - "milliseconds": -6860631204396486, - "expected": "-215435-04-02T05:53:23.514Z" - }, - { - "milliseconds": 7283756509423256, - "expected": "+232783-01-21T09:03:43.256Z" - }, - { - "milliseconds": 5283102315813303, - "expected": "+169384-11-05T13:03:33.303Z" - }, - { - "milliseconds": -1158516291081905, - "expected": "-034742-01-29T15:08:38.095Z" - }, - { - "milliseconds": 3629841462224722, - "expected": "+116995-02-04T23:03:44.722Z" - }, - { - "milliseconds": -3340835824012756, - "expected": "-103897-02-16T16:53:07.244Z" - }, - { - "milliseconds": -6590710262507200, - "expected": "-206882-09-16T05:18:12.800Z" - }, - { - "milliseconds": 159554773271083, - "expected": "7026-02-02T18:21:11.083Z" - }, - { - "milliseconds": -6611766378432512, - "expected": "-207549-06-19T04:12:47.488Z" - }, - { - "milliseconds": -4431805806756019, - "expected": "-138469-09-01T07:27:23.981Z" - }, - { - "milliseconds": 1798764007240533, - "expected": "+058970-07-24T20:40:40.533Z" - }, - { - "milliseconds": 3418406620323658, - "expected": "+110294-12-29T10:32:03.658Z" - }, - { - "milliseconds": -161051192432641, - "expected": "-003134-06-28T13:39:27.359Z" - }, - { - "milliseconds": -5016829372644424, - "expected": "-157007-01-02T05:22:35.576Z" - }, - { - "milliseconds": -4712246389836073, - "expected": "-147356-11-09T05:29:23.927Z" - }, - { - "milliseconds": 3357212681472301, - "expected": "+108355-11-02T06:11:12.301Z" - }, - { - "milliseconds": 6597882253378630, - "expected": "+211048-07-25T22:22:58.630Z" - }, - { - "milliseconds": 5477059634327888, - "expected": "+175531-02-10T21:58:47.888Z" - }, - { - "milliseconds": 3407084199339151, - "expected": "+109936-03-14T21:35:39.151Z" - }, - { - "milliseconds": 5866159571707249, - "expected": "+187861-03-13T09:55:07.249Z" - }, - { - "milliseconds": -1699649421125650, - "expected": "-051890-04-03T16:47:54.350Z" - }, - { - "milliseconds": -5993444602489471, - "expected": "-187955-04-20T05:05:10.529Z" - }, - { - "milliseconds": -6457704216688871, - "expected": "-202667-07-02T01:08:31.129Z" - }, - { - "milliseconds": 687970527112484, - "expected": "+023770-12-01T20:11:52.484Z" - }, - { - "milliseconds": 2620896478146314, - "expected": "+085022-11-26T23:29:06.314Z" - }, - { - "milliseconds": 8429541065096855, - "expected": "+269091-07-10T16:44:56.855Z" - }, - { - "milliseconds": -1279365086406469, - "expected": "-038572-07-14T17:19:53.531Z" - }, - { - "milliseconds": 4268803842365741, - "expected": "+137243-01-03T21:06:05.741Z" - }, - { - "milliseconds": -1205031592994928, - "expected": "-036216-01-26T01:56:45.072Z" - }, - { - "milliseconds": -7853075312376022, - "expected": "-246885-12-14T15:00:23.978Z" - }, - { - "milliseconds": -7305078127831221, - "expected": "-229519-04-15T15:09:28.779Z" - }, - { - "milliseconds": 5628526308238506, - "expected": "+180330-11-25T10:03:58.506Z" - }, - { - "milliseconds": 8272475270479918, - "expected": "+264114-04-22T13:21:19.918Z" - }, - { - "milliseconds": 5178850155472755, - "expected": "+166081-03-24T07:37:52.755Z" - }, - { - "milliseconds": -5725707141011953, - "expected": "-179471-07-25T10:09:48.047Z" - }, - { - "milliseconds": -1959638350903988, - "expected": "-060129-07-14T13:38:16.012Z" - }, - { - "milliseconds": -3746783889681101, - "expected": "-116761-02-22T17:18:38.899Z" - }, - { - "milliseconds": -174716863632202, - "expected": "-003567-06-11T01:52:47.798Z" - }, - { - "milliseconds": 5891817179471254, - "expected": "+188674-04-03T11:11:11.254Z" - }, - { - "milliseconds": 7149913960397243, - "expected": "+228541-10-02T19:13:17.243Z" - }, - { - "milliseconds": -5225815207511187, - "expected": "-163630-07-05T16:34:48.813Z" - }, - { - "milliseconds": -3179027987122535, - "expected": "-098770-08-12T14:14:37.465Z" - }, - { - "milliseconds": 518989432007074, - "expected": "+018416-02-14T03:06:47.074Z" - }, - { - "milliseconds": -4076433853805065, - "expected": "-127208-12-14T14:49:54.935Z" - }, - { - "milliseconds": -1661250305324792, - "expected": "-050673-01-27T21:51:15.208Z" - }, - { - "milliseconds": -8425216180086136, - "expected": "-265015-07-11T20:11:53.864Z" - }, - { - "milliseconds": 2557096695452928, - "expected": "+083001-03-03T13:37:32.928Z" - }, - { - "milliseconds": -2303746643364429, - "expected": "-071033-03-05T16:50:35.571Z" - }, - { - "milliseconds": -442291606217622, - "expected": "-012046-05-04T04:29:42.378Z" - }, - { - "milliseconds": -4236584817767143, - "expected": "-132283-12-21T11:57:12.857Z" - }, - { - "milliseconds": 1615460716634988, - "expected": "+053161-11-29T23:57:14.988Z" - }, - { - "milliseconds": 3468611425459385, - "expected": "+111885-12-02T13:44:19.385Z" - }, - { - "milliseconds": 912217353433370, - "expected": "+030877-01-06T05:17:13.370Z" - }, - { - "milliseconds": 1789478251934051, - "expected": "+058676-04-22T20:12:14.051Z" - }, - { - "milliseconds": -4633444902151823, - "expected": "-144859-12-23T11:37:28.177Z" - }, - { - "milliseconds": -2076499692499637, - "expected": "-063832-05-05T17:51:40.363Z" - }, - { - "milliseconds": -1411403388530016, - "expected": "-042756-05-28T15:11:09.984Z" - }, - { - "milliseconds": 7533961645960808, - "expected": "+240711-09-29T03:52:40.808Z" - }, - { - "milliseconds": -4572002515643835, - "expected": "-142911-01-03T05:12:36.165Z" - }, - { - "milliseconds": 7271902516186237, - "expected": "+232407-06-02T09:09:46.237Z" - }, - { - "milliseconds": 7775009467452765, - "expected": "+248350-03-30T12:04:12.765Z" - }, - { - "milliseconds": 1233066383600235, - "expected": "+041044-04-26T15:53:20.235Z" - }, - { - "milliseconds": 7341416751891375, - "expected": "+234610-03-28T07:04:51.375Z" - }, - { - "milliseconds": -8201803438961506, - "expected": "-257935-03-12T10:57:18.494Z" - }, - { - "milliseconds": -4229982829838991, - "expected": "-132073-03-08T09:29:21.009Z" - }, - { - "milliseconds": 709416823983192, - "expected": "+024450-07-10T20:53:03.192Z" - }, - { - "milliseconds": 38195194154977, - "expected": "3180-05-11T00:09:14.977Z" - }, - { - "milliseconds": 7814805385172367, - "expected": "+249611-04-29T09:39:32.367Z" - }, - { - "milliseconds": 8293008605092764, - "expected": "+264764-12-24T21:24:52.764Z" - }, - { - "milliseconds": 3587646603584289, - "expected": "+115657-12-29T12:59:44.289Z" - }, - { - "milliseconds": 5462085710316896, - "expected": "+175056-08-09T14:38:36.896Z" - }, - { - "milliseconds": -3303780197203159, - "expected": "-102723-05-16T06:33:16.841Z" - }, - { - "milliseconds": 1106504981964826, - "expected": "+037033-09-30T14:59:24.826Z" - }, - { - "milliseconds": 3204359573721885, - "expected": "+103512-02-12T01:35:21.885Z" - }, - { - "milliseconds": -7781296007484198, - "expected": "-244610-07-18T14:48:35.802Z" - }, - { - "milliseconds": -2777603063285351, - "expected": "-086049-04-07T09:31:54.649Z" - }, - { - "milliseconds": -699660477787256, - "expected": "-020202-08-22T19:16:52.744Z" - }, - { - "milliseconds": 4602465738058090, - "expected": "+147816-05-02T09:00:58.090Z" - }, - { - "milliseconds": 8161895713359118, - "expected": "+260610-03-07T13:42:39.118Z" - }, - { - "milliseconds": -7978466344177723, - "expected": "-250858-06-20T12:50:22.277Z" - }, - { - "milliseconds": 1307712146490812, - "expected": "+043409-10-01T06:01:30.812Z" - }, - { - "milliseconds": -3400107809901237, - "expected": "-105776-11-15T08:21:38.763Z" - }, - { - "milliseconds": 2506978713423013, - "expected": "+081412-12-29T07:57:03.013Z" - }, - { - "milliseconds": 2902215012609958, - "expected": "+093937-07-14T12:50:09.958Z" - }, - { - "milliseconds": -556880837827920, - "expected": "-015677-02-24T22:22:52.080Z" - }, - { - "milliseconds": -4237330949306488, - "expected": "-132306-04-29T17:11:33.512Z" - }, - { - "milliseconds": 3820860188752413, - "expected": "+123048-03-28T20:25:52.413Z" - }, - { - "milliseconds": 104937680661678, - "expected": "5295-05-05T11:44:21.678Z" - }, - { - "milliseconds": -8047842049151659, - "expected": "-253056-01-14T23:40:48.341Z" - }, - { - "milliseconds": 5952390405535698, - "expected": "+190593-09-28T11:18:55.698Z" - }, - { - "milliseconds": 3999028878360986, - "expected": "+128694-03-07T11:06:00.986Z" - }, - { - "milliseconds": 6983008392155170, - "expected": "+223252-09-22T09:22:35.170Z" - }, - { - "milliseconds": 4123206655830145, - "expected": "+132629-03-21T06:10:30.145Z" - }, - { - "milliseconds": 638050242662429, - "expected": "+022189-01-02T18:31:02.429Z" - }, - { - "milliseconds": 8579422251731157, - "expected": "+273841-01-25T15:42:11.157Z" - }, - { - "milliseconds": 8342817375361919, - "expected": "+266343-05-12T06:56:01.919Z" - }, - { - "milliseconds": 2090978869646787, - "expected": "+068230-06-26T07:47:26.787Z" - }, - { - "milliseconds": 4922253389954567, - "expected": "+157950-01-01T08:19:14.567Z" - }, - { - "milliseconds": -7696831303685904, - "expected": "-241933-02-15T08:31:54.096Z" - }, - { - "milliseconds": 753486792147159, - "expected": "+025847-01-17T22:42:27.159Z" - }, - { - "milliseconds": 2001953321546316, - "expected": "+065409-05-18T00:52:26.316Z" - }, - { - "milliseconds": -4328198547363281, - "expected": "-135186-11-06T09:43:56.719Z" - }, - { - "milliseconds": 4272204705029726, - "expected": "+137350-10-11T17:10:29.726Z" - }, - { - "milliseconds": -8224105824530125, - "expected": "-258642-06-17T23:51:09.875Z" - }, - { - "milliseconds": 7611678564995527, - "expected": "+243174-06-29T12:56:35.527Z" - }, - { - "milliseconds": -897346249222755, - "expected": "-026466-03-26T00:59:37.245Z" - }, - { - "milliseconds": -2546232936233282, - "expected": "-078717-02-02T09:16:06.718Z" - }, - { - "milliseconds": 1301070866882801, - "expected": "+043199-04-18T14:08:02.801Z" - }, - { - "milliseconds": 1223952665179968, - "expected": "+040755-07-08T19:26:19.968Z" - }, - { - "milliseconds": -8110736743211746, - "expected": "-255050-12-26T03:19:48.254Z" - }, - { - "milliseconds": -1598239961117506, - "expected": "-048677-10-17T07:14:42.494Z" - }, - { - "milliseconds": 1547975454032421, - "expected": "+051023-05-23T13:40:32.421Z" - }, - { - "milliseconds": -7438122113496065, - "expected": "-233735-04-17T16:28:23.935Z" - }, - { - "milliseconds": -6211712467074394, - "expected": "-194872-09-01T18:42:05.606Z" - }, - { - "milliseconds": -6775002435296774, - "expected": "-212722-09-19T23:05:03.226Z" - }, - { - "milliseconds": -4209357791841030, - "expected": "-131420-10-05T02:42:38.970Z" - }, - { - "milliseconds": -3759209619909525, - "expected": "-117155-05-22T09:34:50.475Z" - }, - { - "milliseconds": 1046674668788909, - "expected": "+035137-10-20T03:33:08.909Z" - }, - { - "milliseconds": -1207679568976163, - "expected": "-036300-02-27T05:03:43.837Z" - }, - { - "milliseconds": 8204704521596432, - "expected": "+261966-09-26T21:19:56.432Z" - }, - { - "milliseconds": 2913064871281385, - "expected": "+094281-05-08T14:28:01.385Z" - }, - { - "milliseconds": 1704124218821525, - "expected": "+055971-07-19T22:33:41.525Z" - }, - { - "milliseconds": -2395411529392004, - "expected": "-073938-06-06T12:30:07.996Z" - }, - { - "milliseconds": 3463293345272541, - "expected": "+111717-05-25T17:14:32.541Z" - }, - { - "milliseconds": -3805205652862787, - "expected": "-118613-10-31T21:45:37.213Z" - }, - { - "milliseconds": 7179923139810562, - "expected": "+229492-09-15T06:23:30.562Z" - }, - { - "milliseconds": 6603547746688128, - "expected": "+211228-02-05T18:31:28.128Z" - }, - { - "milliseconds": 952310626208782, - "expected": "+032147-07-10T17:30:08.782Z" - }, - { - "milliseconds": 2684344743937254, - "expected": "+087033-07-01T21:45:37.254Z" - }, - { - "milliseconds": 4294156728386879, - "expected": "+138046-05-30T01:26:26.879Z" - }, - { - "milliseconds": 1547572740465402, - "expected": "+051010-08-18T12:47:45.402Z" - }, - { - "milliseconds": -3844922254979610, - "expected": "-119871-04-07T00:17:00.390Z" - }, - { - "milliseconds": -6097215365320444, - "expected": "-191244-12-08T17:11:19.556Z" - }, - { - "milliseconds": -4606705441474915, - "expected": "-144011-04-25T23:35:25.085Z" - }, - { - "milliseconds": -6855716461390257, - "expected": "-215280-12-29T20:16:49.743Z" - }, - { - "milliseconds": -2723641046583652, - "expected": "-084339-04-01T18:36:56.348Z" - } -] diff --git a/backend/internal/server/testdata/document-cleanup.json b/backend/internal/server/testdata/document-cleanup.json deleted file mode 100644 index 113048c..0000000 --- a/backend/internal/server/testdata/document-cleanup.json +++ /dev/null @@ -1,265 +0,0 @@ -[ - { - "kind": "gist", - "input": {}, - "expected": { - "comments": [], - "description": "", - "files": [], - "ownerLogin": "" - } - }, - { - "kind": "gist", - "input": { - "creationDate": "2020-01-01T00:00:00.000Z", - "updatedDate": "2026-01-02T03:04:05.000Z", - "providerMetadata": { - "revision": "opaque:1" - }, - "comments": [ - { - "author": "Private author", - "body": "Private comment" - } - ], - "description": "Private description", - "ownerLogin": "Private owner", - "files": [ - { - "filename": "private", - "content": "Private file" - } - ], - "isPublic": true - }, - "expected": { - "creationDate": "2020-01-01T00:00:00.000Z", - "updatedDate": "2026-01-02T03:04:05.000Z", - "providerMetadata": { - "revision": "opaque:1" - }, - "comments": [], - "description": "", - "ownerLogin": "", - "files": [], - "isPublic": true - } - }, - { - "kind": "gist", - "input": { - "creationDate": "2020-01-01T00:00:00.000Z", - "updatedDate": "2026-01-02T03:04:05.000Z", - "providerMetadata": { - "revision": "opaque:1" - }, - "comments": [ - { - "author": "Private author", - "body": "Private comment" - } - ], - "description": "Private description", - "ownerLogin": "Private owner", - "files": [ - { - "filename": "private", - "content": "Private file" - } - ], - "isPublic": false, - "mergedDate": null - }, - "expected": { - "creationDate": "2020-01-01T00:00:00.000Z", - "updatedDate": "2026-01-02T03:04:05.000Z", - "providerMetadata": { - "revision": "opaque:1" - }, - "comments": [], - "description": "", - "ownerLogin": "", - "files": [], - "isPublic": false, - "mergedDate": null - } - }, - { - "kind": "gist", - "input": { - "creationDate": null, - "updatedDate": null, - "providerMetadata": { - "revision": "opaque:1" - }, - "comments": [ - { - "author": "Private author", - "body": "Private comment" - } - ], - "description": "Private description", - "ownerLogin": "Private owner", - "files": [ - { - "filename": "private", - "content": "Private file" - } - ], - "isPublic": true - }, - "expected": { - "creationDate": null, - "updatedDate": null, - "providerMetadata": { - "revision": "opaque:1" - }, - "comments": [], - "description": "", - "ownerLogin": "", - "files": [], - "isPublic": true - } - }, - { - "kind": "pr", - "input": {}, - "expected": { - "comments": [], - "body": "", - "title": "", - "diff": "", - "baseRepositoryFullName": "", - "headRepositoryFullName": "", - "merged": false, - "state": "closed", - "draft": false - } - }, - { - "kind": "pr", - "input": { - "creationDate": "2020-01-01T00:00:00.000Z", - "updatedDate": "2026-01-02T03:04:05.000Z", - "providerMetadata": { - "revision": "opaque:1" - }, - "comments": [ - { - "author": "Private author", - "body": "Private comment" - } - ], - "body": "Private body", - "title": "Private title", - "diff": "Private diff", - "baseRepositoryFullName": "private/base", - "headRepositoryFullName": "private/head", - "state": "open", - "draft": true, - "merged": true, - "mergedDate": "2025-01-01T00:00:00.000Z" - }, - "expected": { - "creationDate": "2020-01-01T00:00:00.000Z", - "updatedDate": "2026-01-02T03:04:05.000Z", - "providerMetadata": { - "revision": "opaque:1" - }, - "comments": [], - "body": "", - "title": "", - "diff": "", - "baseRepositoryFullName": "", - "headRepositoryFullName": "", - "state": "closed", - "draft": false, - "merged": false - } - }, - { - "kind": "pr", - "input": { - "creationDate": "2020-01-01T00:00:00.000Z", - "updatedDate": "2026-01-02T03:04:05.000Z", - "providerMetadata": { - "revision": "opaque:1" - }, - "comments": [ - { - "author": "Private author", - "body": "Private comment" - } - ], - "body": "Private body", - "title": "Private title", - "diff": "Private diff", - "baseRepositoryFullName": "private/base", - "headRepositoryFullName": "private/head", - "state": "open", - "draft": true, - "merged": true, - "mergedDate": null, - "isPublic": false - }, - "expected": { - "creationDate": "2020-01-01T00:00:00.000Z", - "updatedDate": "2026-01-02T03:04:05.000Z", - "providerMetadata": { - "revision": "opaque:1" - }, - "comments": [], - "body": "", - "title": "", - "diff": "", - "baseRepositoryFullName": "", - "headRepositoryFullName": "", - "state": "closed", - "draft": false, - "merged": false, - "isPublic": false - } - }, - { - "kind": "pr", - "input": { - "creationDate": null, - "updatedDate": null, - "providerMetadata": { - "revision": "opaque:1" - }, - "comments": [ - { - "author": "Private author", - "body": "Private comment" - } - ], - "body": "Private body", - "title": "Private title", - "diff": "Private diff", - "baseRepositoryFullName": "private/base", - "headRepositoryFullName": "private/head", - "state": "open", - "draft": true, - "merged": true, - "mergedDate": "2025-01-01T00:00:00.000Z" - }, - "expected": { - "creationDate": null, - "updatedDate": null, - "providerMetadata": { - "revision": "opaque:1" - }, - "comments": [], - "body": "", - "title": "", - "diff": "", - "baseRepositoryFullName": "", - "headRepositoryFullName": "", - "state": "closed", - "draft": false, - "merged": false - } - } -] diff --git a/backend/internal/server/testdata/download-headers.json b/backend/internal/server/testdata/download-headers.json deleted file mode 100644 index 99e7489..0000000 --- a/backend/internal/server/testdata/download-headers.json +++ /dev/null @@ -1,1110 +0,0 @@ -[ - { - "name": "report.txt", - "expected": "attachment; filename=report.txt" - }, - { - "name": "report with spaces.txt", - "expected": "attachment; filename=\"report with spaces.txt\"" - }, - { - "name": "résumé.pdf", - "expected": "attachment; filename=\"r?sum?.pdf\"; filename*=UTF-8''r%C3%A9sum%C3%A9.pdf" - }, - { - "name": "研究.txt", - "expected": "attachment; filename=\"??.txt\"; filename*=UTF-8''%E7%A0%94%E7%A9%B6.txt" - }, - { - "name": "😀.txt", - "expected": "attachment; filename=\"??.txt\"; filename*=UTF-8''%F0%9F%98%80.txt" - }, - { - "name": "a%20b.txt", - "expected": "attachment; filename=a%20b.txt; filename*=UTF-8''a%2520b.txt" - }, - { - "name": "a%2Gb.txt", - "expected": "attachment; filename=a%2Gb.txt" - }, - { - "name": "a%ab.txt", - "expected": "attachment; filename=a%ab.txt; filename*=UTF-8''a%25ab.txt" - }, - { - "name": "a%FF.txt", - "expected": "attachment; filename=a%FF.txt; filename*=UTF-8''a%25FF.txt" - }, - { - "name": "a%.txt", - "expected": "attachment; filename=a%.txt" - }, - { - "name": "a\"b.txt", - "expected": "attachment; filename=\"a\\\"b.txt\"" - }, - { - "name": "a\\b.txt", - "expected": "attachment; filename=\"a\\\\b.txt\"" - }, - { - "name": "a;b.txt", - "expected": "attachment; filename=\"a;b.txt\"" - }, - { - "name": "a\r\nb.txt", - "expected": "attachment; filename=\"a??b.txt\"; filename*=UTF-8''a%0D%0Ab.txt" - }, - { - "name": "a\u0000b.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%00b.txt" - }, - { - "name": "a\tb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%09b.txt" - }, - { - "name": "!#$&+-.^_`|~.txt", - "expected": "attachment; filename=!#$&+-.^_`|~.txt" - }, - { - "name": "quote'paren().txt", - "expected": "attachment; filename=\"quote'paren().txt\"" - }, - { - "name": "é.txt", - "expected": "attachment; filename=\"e?.txt\"; filename*=UTF-8''e%CC%81.txt" - }, - { - "name": "repo-name.zip", - "expected": "attachment; filename=repo-name.zip" - }, - { - "name": "", - "expected": "attachment; filename=\"\"" - }, - { - "name": "a\u0000b.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%00b.txt" - }, - { - "name": "a\u0001b.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%01b.txt" - }, - { - "name": "a\u0002b.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%02b.txt" - }, - { - "name": "a\u0003b.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%03b.txt" - }, - { - "name": "a\u0004b.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%04b.txt" - }, - { - "name": "a\u0005b.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%05b.txt" - }, - { - "name": "a\u0006b.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%06b.txt" - }, - { - "name": "a\u0007b.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%07b.txt" - }, - { - "name": "a\bb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%08b.txt" - }, - { - "name": "a\tb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%09b.txt" - }, - { - "name": "a\nb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%0Ab.txt" - }, - { - "name": "a\u000bb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%0Bb.txt" - }, - { - "name": "a\fb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%0Cb.txt" - }, - { - "name": "a\rb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%0Db.txt" - }, - { - "name": "a\u000eb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%0Eb.txt" - }, - { - "name": "a\u000fb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%0Fb.txt" - }, - { - "name": "a\u0010b.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%10b.txt" - }, - { - "name": "a\u0011b.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%11b.txt" - }, - { - "name": "a\u0012b.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%12b.txt" - }, - { - "name": "a\u0013b.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%13b.txt" - }, - { - "name": "a\u0014b.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%14b.txt" - }, - { - "name": "a\u0015b.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%15b.txt" - }, - { - "name": "a\u0016b.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%16b.txt" - }, - { - "name": "a\u0017b.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%17b.txt" - }, - { - "name": "a\u0018b.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%18b.txt" - }, - { - "name": "a\u0019b.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%19b.txt" - }, - { - "name": "a\u001ab.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%1Ab.txt" - }, - { - "name": "a\u001bb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%1Bb.txt" - }, - { - "name": "a\u001cb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%1Cb.txt" - }, - { - "name": "a\u001db.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%1Db.txt" - }, - { - "name": "a\u001eb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%1Eb.txt" - }, - { - "name": "a\u001fb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%1Fb.txt" - }, - { - "name": "a b.txt", - "expected": "attachment; filename=\"a b.txt\"" - }, - { - "name": "a!b.txt", - "expected": "attachment; filename=a!b.txt" - }, - { - "name": "a\"b.txt", - "expected": "attachment; filename=\"a\\\"b.txt\"" - }, - { - "name": "a#b.txt", - "expected": "attachment; filename=a#b.txt" - }, - { - "name": "a$b.txt", - "expected": "attachment; filename=a$b.txt" - }, - { - "name": "a%b.txt", - "expected": "attachment; filename=a%b.txt" - }, - { - "name": "a&b.txt", - "expected": "attachment; filename=a&b.txt" - }, - { - "name": "a'b.txt", - "expected": "attachment; filename=a'b.txt" - }, - { - "name": "a(b.txt", - "expected": "attachment; filename=\"a(b.txt\"" - }, - { - "name": "a)b.txt", - "expected": "attachment; filename=\"a)b.txt\"" - }, - { - "name": "a*b.txt", - "expected": "attachment; filename=a*b.txt" - }, - { - "name": "a+b.txt", - "expected": "attachment; filename=a+b.txt" - }, - { - "name": "a,b.txt", - "expected": "attachment; filename=\"a,b.txt\"" - }, - { - "name": "a-b.txt", - "expected": "attachment; filename=a-b.txt" - }, - { - "name": "a.b.txt", - "expected": "attachment; filename=a.b.txt" - }, - { - "name": "a/b.txt", - "expected": "attachment; filename=b.txt" - }, - { - "name": "a0b.txt", - "expected": "attachment; filename=a0b.txt" - }, - { - "name": "a1b.txt", - "expected": "attachment; filename=a1b.txt" - }, - { - "name": "a2b.txt", - "expected": "attachment; filename=a2b.txt" - }, - { - "name": "a3b.txt", - "expected": "attachment; filename=a3b.txt" - }, - { - "name": "a4b.txt", - "expected": "attachment; filename=a4b.txt" - }, - { - "name": "a5b.txt", - "expected": "attachment; filename=a5b.txt" - }, - { - "name": "a6b.txt", - "expected": "attachment; filename=a6b.txt" - }, - { - "name": "a7b.txt", - "expected": "attachment; filename=a7b.txt" - }, - { - "name": "a8b.txt", - "expected": "attachment; filename=a8b.txt" - }, - { - "name": "a9b.txt", - "expected": "attachment; filename=a9b.txt" - }, - { - "name": "a:b.txt", - "expected": "attachment; filename=\"a:b.txt\"" - }, - { - "name": "a;b.txt", - "expected": "attachment; filename=\"a;b.txt\"" - }, - { - "name": "ab.txt", - "expected": "attachment; filename=\"a>b.txt\"" - }, - { - "name": "a?b.txt", - "expected": "attachment; filename=\"a?b.txt\"" - }, - { - "name": "a@b.txt", - "expected": "attachment; filename=\"a@b.txt\"" - }, - { - "name": "aAb.txt", - "expected": "attachment; filename=aAb.txt" - }, - { - "name": "aBb.txt", - "expected": "attachment; filename=aBb.txt" - }, - { - "name": "aCb.txt", - "expected": "attachment; filename=aCb.txt" - }, - { - "name": "aDb.txt", - "expected": "attachment; filename=aDb.txt" - }, - { - "name": "aEb.txt", - "expected": "attachment; filename=aEb.txt" - }, - { - "name": "aFb.txt", - "expected": "attachment; filename=aFb.txt" - }, - { - "name": "aGb.txt", - "expected": "attachment; filename=aGb.txt" - }, - { - "name": "aHb.txt", - "expected": "attachment; filename=aHb.txt" - }, - { - "name": "aIb.txt", - "expected": "attachment; filename=aIb.txt" - }, - { - "name": "aJb.txt", - "expected": "attachment; filename=aJb.txt" - }, - { - "name": "aKb.txt", - "expected": "attachment; filename=aKb.txt" - }, - { - "name": "aLb.txt", - "expected": "attachment; filename=aLb.txt" - }, - { - "name": "aMb.txt", - "expected": "attachment; filename=aMb.txt" - }, - { - "name": "aNb.txt", - "expected": "attachment; filename=aNb.txt" - }, - { - "name": "aOb.txt", - "expected": "attachment; filename=aOb.txt" - }, - { - "name": "aPb.txt", - "expected": "attachment; filename=aPb.txt" - }, - { - "name": "aQb.txt", - "expected": "attachment; filename=aQb.txt" - }, - { - "name": "aRb.txt", - "expected": "attachment; filename=aRb.txt" - }, - { - "name": "aSb.txt", - "expected": "attachment; filename=aSb.txt" - }, - { - "name": "aTb.txt", - "expected": "attachment; filename=aTb.txt" - }, - { - "name": "aUb.txt", - "expected": "attachment; filename=aUb.txt" - }, - { - "name": "aVb.txt", - "expected": "attachment; filename=aVb.txt" - }, - { - "name": "aWb.txt", - "expected": "attachment; filename=aWb.txt" - }, - { - "name": "aXb.txt", - "expected": "attachment; filename=aXb.txt" - }, - { - "name": "aYb.txt", - "expected": "attachment; filename=aYb.txt" - }, - { - "name": "aZb.txt", - "expected": "attachment; filename=aZb.txt" - }, - { - "name": "a[b.txt", - "expected": "attachment; filename=\"a[b.txt\"" - }, - { - "name": "a\\b.txt", - "expected": "attachment; filename=\"a\\\\b.txt\"" - }, - { - "name": "a]b.txt", - "expected": "attachment; filename=\"a]b.txt\"" - }, - { - "name": "a^b.txt", - "expected": "attachment; filename=a^b.txt" - }, - { - "name": "a_b.txt", - "expected": "attachment; filename=a_b.txt" - }, - { - "name": "a`b.txt", - "expected": "attachment; filename=a`b.txt" - }, - { - "name": "aab.txt", - "expected": "attachment; filename=aab.txt" - }, - { - "name": "abb.txt", - "expected": "attachment; filename=abb.txt" - }, - { - "name": "acb.txt", - "expected": "attachment; filename=acb.txt" - }, - { - "name": "adb.txt", - "expected": "attachment; filename=adb.txt" - }, - { - "name": "aeb.txt", - "expected": "attachment; filename=aeb.txt" - }, - { - "name": "afb.txt", - "expected": "attachment; filename=afb.txt" - }, - { - "name": "agb.txt", - "expected": "attachment; filename=agb.txt" - }, - { - "name": "ahb.txt", - "expected": "attachment; filename=ahb.txt" - }, - { - "name": "aib.txt", - "expected": "attachment; filename=aib.txt" - }, - { - "name": "ajb.txt", - "expected": "attachment; filename=ajb.txt" - }, - { - "name": "akb.txt", - "expected": "attachment; filename=akb.txt" - }, - { - "name": "alb.txt", - "expected": "attachment; filename=alb.txt" - }, - { - "name": "amb.txt", - "expected": "attachment; filename=amb.txt" - }, - { - "name": "anb.txt", - "expected": "attachment; filename=anb.txt" - }, - { - "name": "aob.txt", - "expected": "attachment; filename=aob.txt" - }, - { - "name": "apb.txt", - "expected": "attachment; filename=apb.txt" - }, - { - "name": "aqb.txt", - "expected": "attachment; filename=aqb.txt" - }, - { - "name": "arb.txt", - "expected": "attachment; filename=arb.txt" - }, - { - "name": "asb.txt", - "expected": "attachment; filename=asb.txt" - }, - { - "name": "atb.txt", - "expected": "attachment; filename=atb.txt" - }, - { - "name": "aub.txt", - "expected": "attachment; filename=aub.txt" - }, - { - "name": "avb.txt", - "expected": "attachment; filename=avb.txt" - }, - { - "name": "awb.txt", - "expected": "attachment; filename=awb.txt" - }, - { - "name": "axb.txt", - "expected": "attachment; filename=axb.txt" - }, - { - "name": "ayb.txt", - "expected": "attachment; filename=ayb.txt" - }, - { - "name": "azb.txt", - "expected": "attachment; filename=azb.txt" - }, - { - "name": "a{b.txt", - "expected": "attachment; filename=\"a{b.txt\"" - }, - { - "name": "a|b.txt", - "expected": "attachment; filename=a|b.txt" - }, - { - "name": "a}b.txt", - "expected": "attachment; filename=\"a}b.txt\"" - }, - { - "name": "a~b.txt", - "expected": "attachment; filename=a~b.txt" - }, - { - "name": "ab.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%7Fb.txt" - }, - { - "name": "a€b.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C2%80b.txt" - }, - { - "name": "ab.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C2%81b.txt" - }, - { - "name": "a‚b.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C2%82b.txt" - }, - { - "name": "aƒb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C2%83b.txt" - }, - { - "name": "a„b.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C2%84b.txt" - }, - { - "name": "a…b.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C2%85b.txt" - }, - { - "name": "a†b.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C2%86b.txt" - }, - { - "name": "a‡b.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C2%87b.txt" - }, - { - "name": "aˆb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C2%88b.txt" - }, - { - "name": "a‰b.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C2%89b.txt" - }, - { - "name": "aŠb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C2%8Ab.txt" - }, - { - "name": "a‹b.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C2%8Bb.txt" - }, - { - "name": "aŒb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C2%8Cb.txt" - }, - { - "name": "ab.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C2%8Db.txt" - }, - { - "name": "aŽb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C2%8Eb.txt" - }, - { - "name": "ab.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C2%8Fb.txt" - }, - { - "name": "ab.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C2%90b.txt" - }, - { - "name": "a‘b.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C2%91b.txt" - }, - { - "name": "a’b.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C2%92b.txt" - }, - { - "name": "a“b.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C2%93b.txt" - }, - { - "name": "a”b.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C2%94b.txt" - }, - { - "name": "a•b.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C2%95b.txt" - }, - { - "name": "a–b.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C2%96b.txt" - }, - { - "name": "a—b.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C2%97b.txt" - }, - { - "name": "a˜b.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C2%98b.txt" - }, - { - "name": "a™b.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C2%99b.txt" - }, - { - "name": "ašb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C2%9Ab.txt" - }, - { - "name": "a›b.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C2%9Bb.txt" - }, - { - "name": "aœb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C2%9Cb.txt" - }, - { - "name": "ab.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C2%9Db.txt" - }, - { - "name": "ažb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C2%9Eb.txt" - }, - { - "name": "aŸb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C2%9Fb.txt" - }, - { - "name": "a b.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C2%A0b.txt" - }, - { - "name": "a¡b.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C2%A1b.txt" - }, - { - "name": "a¢b.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C2%A2b.txt" - }, - { - "name": "a£b.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C2%A3b.txt" - }, - { - "name": "a¤b.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C2%A4b.txt" - }, - { - "name": "a¥b.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C2%A5b.txt" - }, - { - "name": "a¦b.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C2%A6b.txt" - }, - { - "name": "a§b.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C2%A7b.txt" - }, - { - "name": "a¨b.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C2%A8b.txt" - }, - { - "name": "a©b.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C2%A9b.txt" - }, - { - "name": "aªb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C2%AAb.txt" - }, - { - "name": "a«b.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C2%ABb.txt" - }, - { - "name": "a¬b.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C2%ACb.txt" - }, - { - "name": "a­b.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C2%ADb.txt" - }, - { - "name": "a®b.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C2%AEb.txt" - }, - { - "name": "a¯b.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C2%AFb.txt" - }, - { - "name": "a°b.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C2%B0b.txt" - }, - { - "name": "a±b.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C2%B1b.txt" - }, - { - "name": "a²b.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C2%B2b.txt" - }, - { - "name": "a³b.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C2%B3b.txt" - }, - { - "name": "a´b.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C2%B4b.txt" - }, - { - "name": "aµb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C2%B5b.txt" - }, - { - "name": "a¶b.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C2%B6b.txt" - }, - { - "name": "a·b.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C2%B7b.txt" - }, - { - "name": "a¸b.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C2%B8b.txt" - }, - { - "name": "a¹b.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C2%B9b.txt" - }, - { - "name": "aºb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C2%BAb.txt" - }, - { - "name": "a»b.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C2%BBb.txt" - }, - { - "name": "a¼b.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C2%BCb.txt" - }, - { - "name": "a½b.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C2%BDb.txt" - }, - { - "name": "a¾b.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C2%BEb.txt" - }, - { - "name": "a¿b.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C2%BFb.txt" - }, - { - "name": "aÀb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C3%80b.txt" - }, - { - "name": "aÁb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C3%81b.txt" - }, - { - "name": "aÂb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C3%82b.txt" - }, - { - "name": "aÃb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C3%83b.txt" - }, - { - "name": "aÄb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C3%84b.txt" - }, - { - "name": "aÅb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C3%85b.txt" - }, - { - "name": "aÆb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C3%86b.txt" - }, - { - "name": "aÇb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C3%87b.txt" - }, - { - "name": "aÈb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C3%88b.txt" - }, - { - "name": "aÉb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C3%89b.txt" - }, - { - "name": "aÊb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C3%8Ab.txt" - }, - { - "name": "aËb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C3%8Bb.txt" - }, - { - "name": "aÌb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C3%8Cb.txt" - }, - { - "name": "aÍb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C3%8Db.txt" - }, - { - "name": "aÎb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C3%8Eb.txt" - }, - { - "name": "aÏb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C3%8Fb.txt" - }, - { - "name": "aÐb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C3%90b.txt" - }, - { - "name": "aÑb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C3%91b.txt" - }, - { - "name": "aÒb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C3%92b.txt" - }, - { - "name": "aÓb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C3%93b.txt" - }, - { - "name": "aÔb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C3%94b.txt" - }, - { - "name": "aÕb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C3%95b.txt" - }, - { - "name": "aÖb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C3%96b.txt" - }, - { - "name": "a×b.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C3%97b.txt" - }, - { - "name": "aØb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C3%98b.txt" - }, - { - "name": "aÙb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C3%99b.txt" - }, - { - "name": "aÚb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C3%9Ab.txt" - }, - { - "name": "aÛb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C3%9Bb.txt" - }, - { - "name": "aÜb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C3%9Cb.txt" - }, - { - "name": "aÝb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C3%9Db.txt" - }, - { - "name": "aÞb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C3%9Eb.txt" - }, - { - "name": "aßb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C3%9Fb.txt" - }, - { - "name": "aàb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C3%A0b.txt" - }, - { - "name": "aáb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C3%A1b.txt" - }, - { - "name": "aâb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C3%A2b.txt" - }, - { - "name": "aãb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C3%A3b.txt" - }, - { - "name": "aäb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C3%A4b.txt" - }, - { - "name": "aåb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C3%A5b.txt" - }, - { - "name": "aæb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C3%A6b.txt" - }, - { - "name": "açb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C3%A7b.txt" - }, - { - "name": "aèb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C3%A8b.txt" - }, - { - "name": "aéb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C3%A9b.txt" - }, - { - "name": "aêb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C3%AAb.txt" - }, - { - "name": "aëb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C3%ABb.txt" - }, - { - "name": "aìb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C3%ACb.txt" - }, - { - "name": "aíb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C3%ADb.txt" - }, - { - "name": "aîb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C3%AEb.txt" - }, - { - "name": "aïb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C3%AFb.txt" - }, - { - "name": "aðb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C3%B0b.txt" - }, - { - "name": "añb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C3%B1b.txt" - }, - { - "name": "aòb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C3%B2b.txt" - }, - { - "name": "aób.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C3%B3b.txt" - }, - { - "name": "aôb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C3%B4b.txt" - }, - { - "name": "aõb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C3%B5b.txt" - }, - { - "name": "aöb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C3%B6b.txt" - }, - { - "name": "a÷b.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C3%B7b.txt" - }, - { - "name": "aøb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C3%B8b.txt" - }, - { - "name": "aùb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C3%B9b.txt" - }, - { - "name": "aúb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C3%BAb.txt" - }, - { - "name": "aûb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C3%BBb.txt" - }, - { - "name": "aüb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C3%BCb.txt" - }, - { - "name": "aýb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C3%BDb.txt" - }, - { - "name": "aþb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C3%BEb.txt" - }, - { - "name": "aÿb.txt", - "expected": "attachment; filename=\"a?b.txt\"; filename*=UTF-8''a%C3%BFb.txt" - } -] diff --git a/backend/internal/server/testdata/error-log.json b/backend/internal/server/testdata/error-log.json deleted file mode 100644 index 19fa43c..0000000 --- a/backend/internal/server/testdata/error-log.json +++ /dev/null @@ -1,214 +0,0 @@ -{ - "max": 5000, - "classification": [ - { - "level": "warn", - "status": 0, - "bucket": "warn" - }, - { - "level": "warn", - "status": 200, - "bucket": "warn" - }, - { - "level": "warn", - "status": 399, - "bucket": "warn" - }, - { - "level": "warn", - "status": 400, - "bucket": "warn" - }, - { - "level": "warn", - "status": 401, - "bucket": "info" - }, - { - "level": "warn", - "status": 403, - "bucket": "info" - }, - { - "level": "warn", - "status": 404, - "bucket": "info" - }, - { - "level": "warn", - "status": 409, - "bucket": "warn" - }, - { - "level": "warn", - "status": 429, - "bucket": "warn" - }, - { - "level": "warn", - "status": 499, - "bucket": "warn" - }, - { - "level": "warn", - "status": 500, - "bucket": "error" - }, - { - "level": "warn", - "status": 503, - "bucket": "error" - }, - { - "level": "error", - "status": 0, - "bucket": "error" - }, - { - "level": "error", - "status": 200, - "bucket": "error" - }, - { - "level": "error", - "status": 399, - "bucket": "error" - }, - { - "level": "error", - "status": 400, - "bucket": "warn" - }, - { - "level": "error", - "status": 401, - "bucket": "info" - }, - { - "level": "error", - "status": 403, - "bucket": "info" - }, - { - "level": "error", - "status": 404, - "bucket": "info" - }, - { - "level": "error", - "status": 409, - "bucket": "warn" - }, - { - "level": "error", - "status": 429, - "bucket": "warn" - }, - { - "level": "error", - "status": 499, - "bucket": "warn" - }, - { - "level": "error", - "status": 500, - "bucket": "error" - }, - { - "level": "error", - "status": 503, - "bucket": "error" - } - ], - "pagination": [ - { - "input": "", - "offset": 0, - "limit": 250 - }, - { - "input": "0", - "offset": 0, - "limit": 250 - }, - { - "input": "-1", - "offset": 0, - "limit": 1 - }, - { - "input": "-22", - "offset": 0, - "limit": 1 - }, - { - "input": "1", - "offset": 1, - "limit": 1 - }, - { - "input": "250", - "offset": 250, - "limit": 250 - }, - { - "input": "5000", - "offset": 5000, - "limit": 5000 - }, - { - "input": "5001", - "offset": 5001, - "limit": 5000 - }, - { - "input": "12suffix", - "offset": 12, - "limit": 12 - }, - { - "input": "1.5", - "offset": 1, - "limit": 1 - }, - { - "input": "1e3", - "offset": 1, - "limit": 1 - }, - { - "input": "0x10", - "offset": 0, - "limit": 250 - }, - { - "input": "+13", - "offset": 13, - "limit": 13 - }, - { - "input": " 25 ", - "offset": 25, - "limit": 25 - }, - { - "input": "nonsense", - "offset": 0, - "limit": 250 - }, - { - "input": "9999999999999999", - "offset": 9007199254740991, - "limit": 5000 - } - ], - "noisy": [ - "repository_expired", - "repository_not_ready", - "repoId_already_used", - "invalid_repoId", - "page_not_supported_on_different_branch" - ] -} diff --git a/backend/internal/server/testdata/file-metadata.json b/backend/internal/server/testdata/file-metadata.json deleted file mode 100644 index a8dc4ab..0000000 --- a/backend/internal/server/testdata/file-metadata.json +++ /dev/null @@ -1,2417 +0,0 @@ -[ - { - "name": "data.txt", - "shared": false, - "mode": "head", - "query": "", - "expected": { - "status": 200, - "type": "text/plain; charset=utf-8", - "encoding": "", - "length": "", - "ranges": "", - "vary": "", - "csp": "", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": false, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "data.txt", - "shared": false, - "mode": "reject-encoding", - "query": "", - "expected": { - "status": 200, - "type": "text/plain; charset=utf-8", - "encoding": "", - "length": "", - "ranges": "", - "vary": "", - "csp": "", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": false, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "data.txt", - "shared": false, - "mode": "fresh", - "query": "", - "expected": { - "status": 304, - "type": "", - "encoding": "", - "length": "", - "ranges": "", - "vary": "", - "csp": "", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": false, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "data.txt", - "shared": true, - "mode": "head", - "query": "", - "expected": { - "status": 200, - "type": "text/plain; charset=utf-8", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "data.txt", - "shared": true, - "mode": "reject-encoding", - "query": "", - "expected": { - "status": 200, - "type": "text/plain; charset=utf-8", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "data.txt", - "shared": true, - "mode": "fresh", - "query": "", - "expected": { - "status": 304, - "type": "", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "script.ts", - "shared": false, - "mode": "head", - "query": "", - "expected": { - "status": 200, - "type": "text/plain; charset=utf-8", - "encoding": "", - "length": "", - "ranges": "", - "vary": "", - "csp": "", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": false, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "script.ts", - "shared": false, - "mode": "reject-encoding", - "query": "", - "expected": { - "status": 200, - "type": "text/plain; charset=utf-8", - "encoding": "", - "length": "", - "ranges": "", - "vary": "", - "csp": "", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": false, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "script.ts", - "shared": false, - "mode": "fresh", - "query": "", - "expected": { - "status": 304, - "type": "", - "encoding": "", - "length": "", - "ranges": "", - "vary": "", - "csp": "", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": false, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "script.ts", - "shared": true, - "mode": "head", - "query": "", - "expected": { - "status": 200, - "type": "text/plain; charset=utf-8", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "script.ts", - "shared": true, - "mode": "reject-encoding", - "query": "", - "expected": { - "status": 200, - "type": "text/plain; charset=utf-8", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "script.ts", - "shared": true, - "mode": "fresh", - "query": "", - "expected": { - "status": 304, - "type": "", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "script.TS", - "shared": false, - "mode": "head", - "query": "", - "expected": { - "status": 200, - "type": "video/mp2t", - "encoding": "", - "length": "", - "ranges": "", - "vary": "", - "csp": "", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": false, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "script.TS", - "shared": false, - "mode": "reject-encoding", - "query": "", - "expected": { - "status": 200, - "type": "video/mp2t", - "encoding": "", - "length": "", - "ranges": "", - "vary": "", - "csp": "", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": false, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "script.TS", - "shared": false, - "mode": "fresh", - "query": "", - "expected": { - "status": 304, - "type": "", - "encoding": "", - "length": "", - "ranges": "", - "vary": "", - "csp": "", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": false, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "script.TS", - "shared": true, - "mode": "head", - "query": "", - "expected": { - "status": 200, - "type": "video/mp2t", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "script.TS", - "shared": true, - "mode": "reject-encoding", - "query": "", - "expected": { - "status": 200, - "type": "video/mp2t", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "script.TS", - "shared": true, - "mode": "fresh", - "query": "", - "expected": { - "status": 304, - "type": "", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "LICENSE", - "shared": false, - "mode": "head", - "query": "", - "expected": { - "status": 200, - "type": "text/plain; charset=utf-8", - "encoding": "", - "length": "", - "ranges": "", - "vary": "", - "csp": "", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": false, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "LICENSE", - "shared": false, - "mode": "reject-encoding", - "query": "", - "expected": { - "status": 200, - "type": "text/plain; charset=utf-8", - "encoding": "", - "length": "", - "ranges": "", - "vary": "", - "csp": "", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": false, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "LICENSE", - "shared": false, - "mode": "fresh", - "query": "", - "expected": { - "status": 304, - "type": "", - "encoding": "", - "length": "", - "ranges": "", - "vary": "", - "csp": "", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": false, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "LICENSE", - "shared": true, - "mode": "head", - "query": "", - "expected": { - "status": 200, - "type": "text/plain; charset=utf-8", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "LICENSE", - "shared": true, - "mode": "reject-encoding", - "query": "", - "expected": { - "status": 200, - "type": "text/plain; charset=utf-8", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "LICENSE", - "shared": true, - "mode": "fresh", - "query": "", - "expected": { - "status": 304, - "type": "", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "Dockerfile", - "shared": false, - "mode": "head", - "query": "", - "expected": { - "status": 200, - "type": "text/plain; charset=utf-8", - "encoding": "", - "length": "", - "ranges": "", - "vary": "", - "csp": "", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": false, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "Dockerfile", - "shared": false, - "mode": "reject-encoding", - "query": "", - "expected": { - "status": 200, - "type": "text/plain; charset=utf-8", - "encoding": "", - "length": "", - "ranges": "", - "vary": "", - "csp": "", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": false, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "Dockerfile", - "shared": false, - "mode": "fresh", - "query": "", - "expected": { - "status": 304, - "type": "", - "encoding": "", - "length": "", - "ranges": "", - "vary": "", - "csp": "", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": false, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "Dockerfile", - "shared": true, - "mode": "head", - "query": "", - "expected": { - "status": 200, - "type": "text/plain; charset=utf-8", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "Dockerfile", - "shared": true, - "mode": "reject-encoding", - "query": "", - "expected": { - "status": 200, - "type": "text/plain; charset=utf-8", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "Dockerfile", - "shared": true, - "mode": "fresh", - "query": "", - "expected": { - "status": 304, - "type": "", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "data.jsonl", - "shared": false, - "mode": "head", - "query": "", - "expected": { - "status": 200, - "type": "text/plain; charset=utf-8", - "encoding": "", - "length": "", - "ranges": "", - "vary": "", - "csp": "", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": false, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "data.jsonl", - "shared": false, - "mode": "reject-encoding", - "query": "", - "expected": { - "status": 200, - "type": "text/plain; charset=utf-8", - "encoding": "", - "length": "", - "ranges": "", - "vary": "", - "csp": "", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": false, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "data.jsonl", - "shared": false, - "mode": "fresh", - "query": "", - "expected": { - "status": 304, - "type": "", - "encoding": "", - "length": "", - "ranges": "", - "vary": "", - "csp": "", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": false, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "data.jsonl", - "shared": true, - "mode": "head", - "query": "", - "expected": { - "status": 200, - "type": "text/plain; charset=utf-8", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "data.jsonl", - "shared": true, - "mode": "reject-encoding", - "query": "", - "expected": { - "status": 200, - "type": "text/plain; charset=utf-8", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "data.jsonl", - "shared": true, - "mode": "fresh", - "query": "", - "expected": { - "status": 304, - "type": "", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "unknown.mystery", - "shared": false, - "mode": "head", - "query": "", - "expected": { - "status": 200, - "type": "", - "encoding": "", - "length": "", - "ranges": "", - "vary": "", - "csp": "", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": false, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "unknown.mystery", - "shared": false, - "mode": "reject-encoding", - "query": "", - "expected": { - "status": 200, - "type": "", - "encoding": "", - "length": "", - "ranges": "", - "vary": "", - "csp": "", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": false, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "unknown.mystery", - "shared": false, - "mode": "fresh", - "query": "", - "expected": { - "status": 304, - "type": "", - "encoding": "", - "length": "", - "ranges": "", - "vary": "", - "csp": "", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": false, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "unknown.mystery", - "shared": true, - "mode": "head", - "query": "", - "expected": { - "status": 200, - "type": "", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "unknown.mystery", - "shared": true, - "mode": "reject-encoding", - "query": "", - "expected": { - "status": 200, - "type": "", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "unknown.mystery", - "shared": true, - "mode": "fresh", - "query": "", - "expected": { - "status": 304, - "type": "", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "page.shtml", - "shared": false, - "mode": "head", - "query": "", - "expected": { - "status": 200, - "type": "text/html; charset=utf-8", - "encoding": "", - "length": "", - "ranges": "", - "vary": "", - "csp": "sandbox allow-popups allow-forms allow-modals", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": false, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "page.shtml", - "shared": false, - "mode": "reject-encoding", - "query": "", - "expected": { - "status": 200, - "type": "text/html; charset=utf-8", - "encoding": "", - "length": "", - "ranges": "", - "vary": "", - "csp": "sandbox allow-popups allow-forms allow-modals", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": false, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "page.shtml", - "shared": false, - "mode": "fresh", - "query": "", - "expected": { - "status": 304, - "type": "", - "encoding": "", - "length": "", - "ranges": "", - "vary": "", - "csp": "sandbox allow-popups allow-forms allow-modals", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": false, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "page.shtml", - "shared": true, - "mode": "head", - "query": "", - "expected": { - "status": 200, - "type": "text/html; charset=utf-8", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "sandbox allow-popups allow-forms allow-modals", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "page.shtml", - "shared": true, - "mode": "reject-encoding", - "query": "", - "expected": { - "status": 200, - "type": "text/html; charset=utf-8", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "sandbox allow-popups allow-forms allow-modals", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "page.shtml", - "shared": true, - "mode": "fresh", - "query": "", - "expected": { - "status": 304, - "type": "", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "sandbox allow-popups allow-forms allow-modals", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "drawing.svgz", - "shared": false, - "mode": "head", - "query": "", - "expected": { - "status": 200, - "type": "image/svg+xml", - "encoding": "", - "length": "", - "ranges": "", - "vary": "", - "csp": "sandbox allow-popups allow-forms allow-modals", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": false, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "drawing.svgz", - "shared": false, - "mode": "reject-encoding", - "query": "", - "expected": { - "status": 200, - "type": "image/svg+xml", - "encoding": "", - "length": "", - "ranges": "", - "vary": "", - "csp": "sandbox allow-popups allow-forms allow-modals", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": false, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "drawing.svgz", - "shared": false, - "mode": "fresh", - "query": "", - "expected": { - "status": 304, - "type": "", - "encoding": "", - "length": "", - "ranges": "", - "vary": "", - "csp": "sandbox allow-popups allow-forms allow-modals", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": false, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "drawing.svgz", - "shared": true, - "mode": "head", - "query": "", - "expected": { - "status": 200, - "type": "image/svg+xml", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "sandbox allow-popups allow-forms allow-modals", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "drawing.svgz", - "shared": true, - "mode": "reject-encoding", - "query": "", - "expected": { - "status": 200, - "type": "image/svg+xml", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "sandbox allow-popups allow-forms allow-modals", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "drawing.svgz", - "shared": true, - "mode": "fresh", - "query": "", - "expected": { - "status": 304, - "type": "", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "sandbox allow-popups allow-forms allow-modals", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "schema.xsd", - "shared": false, - "mode": "head", - "query": "", - "expected": { - "status": 200, - "type": "application/xml", - "encoding": "", - "length": "", - "ranges": "", - "vary": "", - "csp": "sandbox allow-popups allow-forms allow-modals", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": false, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "schema.xsd", - "shared": false, - "mode": "reject-encoding", - "query": "", - "expected": { - "status": 200, - "type": "application/xml", - "encoding": "", - "length": "", - "ranges": "", - "vary": "", - "csp": "sandbox allow-popups allow-forms allow-modals", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": false, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "schema.xsd", - "shared": false, - "mode": "fresh", - "query": "", - "expected": { - "status": 304, - "type": "", - "encoding": "", - "length": "", - "ranges": "", - "vary": "", - "csp": "sandbox allow-popups allow-forms allow-modals", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": false, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "schema.xsd", - "shared": true, - "mode": "head", - "query": "", - "expected": { - "status": 200, - "type": "application/xml", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "sandbox allow-popups allow-forms allow-modals", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "schema.xsd", - "shared": true, - "mode": "reject-encoding", - "query": "", - "expected": { - "status": 200, - "type": "application/xml", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "sandbox allow-popups allow-forms allow-modals", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "schema.xsd", - "shared": true, - "mode": "fresh", - "query": "", - "expected": { - "status": 304, - "type": "", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "sandbox allow-popups allow-forms allow-modals", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "page.xhtml", - "shared": false, - "mode": "head", - "query": "", - "expected": { - "status": 200, - "type": "application/xhtml+xml", - "encoding": "", - "length": "", - "ranges": "", - "vary": "", - "csp": "sandbox allow-popups allow-forms allow-modals", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": false, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "page.xhtml", - "shared": false, - "mode": "reject-encoding", - "query": "", - "expected": { - "status": 200, - "type": "application/xhtml+xml", - "encoding": "", - "length": "", - "ranges": "", - "vary": "", - "csp": "sandbox allow-popups allow-forms allow-modals", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": false, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "page.xhtml", - "shared": false, - "mode": "fresh", - "query": "", - "expected": { - "status": 304, - "type": "", - "encoding": "", - "length": "", - "ranges": "", - "vary": "", - "csp": "sandbox allow-popups allow-forms allow-modals", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": false, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "page.xhtml", - "shared": true, - "mode": "head", - "query": "", - "expected": { - "status": 200, - "type": "application/xhtml+xml", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "sandbox allow-popups allow-forms allow-modals", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "page.xhtml", - "shared": true, - "mode": "reject-encoding", - "query": "", - "expected": { - "status": 200, - "type": "application/xhtml+xml", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "sandbox allow-popups allow-forms allow-modals", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "page.xhtml", - "shared": true, - "mode": "fresh", - "query": "", - "expected": { - "status": 304, - "type": "", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "sandbox allow-popups allow-forms allow-modals", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "style.xsl", - "shared": false, - "mode": "head", - "query": "", - "expected": { - "status": 200, - "type": "application/xml", - "encoding": "", - "length": "", - "ranges": "", - "vary": "", - "csp": "sandbox allow-popups allow-forms allow-modals", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": false, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "style.xsl", - "shared": false, - "mode": "reject-encoding", - "query": "", - "expected": { - "status": 200, - "type": "application/xml", - "encoding": "", - "length": "", - "ranges": "", - "vary": "", - "csp": "sandbox allow-popups allow-forms allow-modals", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": false, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "style.xsl", - "shared": false, - "mode": "fresh", - "query": "", - "expected": { - "status": 304, - "type": "", - "encoding": "", - "length": "", - "ranges": "", - "vary": "", - "csp": "sandbox allow-popups allow-forms allow-modals", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": false, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "style.xsl", - "shared": true, - "mode": "head", - "query": "", - "expected": { - "status": 200, - "type": "application/xml", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "sandbox allow-popups allow-forms allow-modals", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "style.xsl", - "shared": true, - "mode": "reject-encoding", - "query": "", - "expected": { - "status": 200, - "type": "application/xml", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "sandbox allow-popups allow-forms allow-modals", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "style.xsl", - "shared": true, - "mode": "fresh", - "query": "", - "expected": { - "status": 304, - "type": "", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "sandbox allow-popups allow-forms allow-modals", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "mail.mhtml", - "shared": false, - "mode": "head", - "query": "", - "expected": { - "status": 200, - "type": "message/rfc822", - "encoding": "", - "length": "", - "ranges": "", - "vary": "", - "csp": "sandbox allow-popups allow-forms allow-modals", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": false, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "mail.mhtml", - "shared": false, - "mode": "reject-encoding", - "query": "", - "expected": { - "status": 200, - "type": "message/rfc822", - "encoding": "", - "length": "", - "ranges": "", - "vary": "", - "csp": "sandbox allow-popups allow-forms allow-modals", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": false, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "mail.mhtml", - "shared": false, - "mode": "fresh", - "query": "", - "expected": { - "status": 304, - "type": "", - "encoding": "", - "length": "", - "ranges": "", - "vary": "", - "csp": "sandbox allow-popups allow-forms allow-modals", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": false, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "mail.mhtml", - "shared": true, - "mode": "head", - "query": "", - "expected": { - "status": 200, - "type": "message/rfc822", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "sandbox allow-popups allow-forms allow-modals", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "mail.mhtml", - "shared": true, - "mode": "reject-encoding", - "query": "", - "expected": { - "status": 200, - "type": "message/rfc822", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "sandbox allow-popups allow-forms allow-modals", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "mail.mhtml", - "shared": true, - "mode": "fresh", - "query": "", - "expected": { - "status": 304, - "type": "", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "sandbox allow-popups allow-forms allow-modals", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "mail.mht", - "shared": false, - "mode": "head", - "query": "", - "expected": { - "status": 200, - "type": "message/rfc822", - "encoding": "", - "length": "", - "ranges": "", - "vary": "", - "csp": "sandbox allow-popups allow-forms allow-modals", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": false, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "mail.mht", - "shared": false, - "mode": "reject-encoding", - "query": "", - "expected": { - "status": 200, - "type": "message/rfc822", - "encoding": "", - "length": "", - "ranges": "", - "vary": "", - "csp": "sandbox allow-popups allow-forms allow-modals", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": false, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "mail.mht", - "shared": false, - "mode": "fresh", - "query": "", - "expected": { - "status": 304, - "type": "", - "encoding": "", - "length": "", - "ranges": "", - "vary": "", - "csp": "sandbox allow-popups allow-forms allow-modals", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": false, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "mail.mht", - "shared": true, - "mode": "head", - "query": "", - "expected": { - "status": 200, - "type": "message/rfc822", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "sandbox allow-popups allow-forms allow-modals", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "mail.mht", - "shared": true, - "mode": "reject-encoding", - "query": "", - "expected": { - "status": 200, - "type": "message/rfc822", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "sandbox allow-popups allow-forms allow-modals", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "mail.mht", - "shared": true, - "mode": "fresh", - "query": "", - "expected": { - "status": 304, - "type": "", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "sandbox allow-popups allow-forms allow-modals", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "mail.eml", - "shared": false, - "mode": "head", - "query": "", - "expected": { - "status": 200, - "type": "message/rfc822", - "encoding": "", - "length": "", - "ranges": "", - "vary": "", - "csp": "sandbox allow-popups allow-forms allow-modals", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": false, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "mail.eml", - "shared": false, - "mode": "reject-encoding", - "query": "", - "expected": { - "status": 200, - "type": "message/rfc822", - "encoding": "", - "length": "", - "ranges": "", - "vary": "", - "csp": "sandbox allow-popups allow-forms allow-modals", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": false, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "mail.eml", - "shared": false, - "mode": "fresh", - "query": "", - "expected": { - "status": 304, - "type": "", - "encoding": "", - "length": "", - "ranges": "", - "vary": "", - "csp": "sandbox allow-popups allow-forms allow-modals", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": false, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "mail.eml", - "shared": true, - "mode": "head", - "query": "", - "expected": { - "status": 200, - "type": "message/rfc822", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "sandbox allow-popups allow-forms allow-modals", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "mail.eml", - "shared": true, - "mode": "reject-encoding", - "query": "", - "expected": { - "status": 200, - "type": "message/rfc822", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "sandbox allow-popups allow-forms allow-modals", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "mail.eml", - "shared": true, - "mode": "fresh", - "query": "", - "expected": { - "status": 304, - "type": "", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "sandbox allow-popups allow-forms allow-modals", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "page.shtml", - "shared": true, - "mode": "head", - "query": "?download=", - "expected": { - "status": 200, - "type": "text/html; charset=utf-8", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "sandbox allow-popups allow-forms allow-modals", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": false, - "disposition": "", - "bytes": 0 - } - }, - { - "name": "page.shtml", - "shared": true, - "mode": "head", - "query": "?download=0", - "expected": { - "status": 200, - "type": "text/html; charset=utf-8", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": true, - "disposition": "attachment; filename=page.shtml", - "bytes": 0 - } - }, - { - "name": "page.shtml", - "shared": true, - "mode": "head", - "query": "?download=1", - "expected": { - "status": 200, - "type": "text/html; charset=utf-8", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": true, - "disposition": "attachment; filename=page.shtml", - "bytes": 0 - } - }, - { - "name": "page.shtml", - "shared": true, - "mode": "head", - "query": "?download=&download=", - "expected": { - "status": 200, - "type": "text/html; charset=utf-8", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": true, - "disposition": "attachment; filename=page.shtml", - "bytes": 0 - } - }, - { - "name": "page.shtml", - "shared": true, - "mode": "head", - "query": "?download[]=", - "expected": { - "status": 200, - "type": "text/html; charset=utf-8", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": true, - "disposition": "attachment; filename=page.shtml", - "bytes": 0 - } - }, - { - "name": "page.shtml", - "shared": true, - "mode": "head", - "query": "?download[x]=", - "expected": { - "status": 200, - "type": "text/html; charset=utf-8", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": true, - "disposition": "attachment; filename=page.shtml", - "bytes": 0 - } - }, - { - "name": "page.shtml", - "shared": true, - "mode": "head", - "query": "?download[]=0", - "expected": { - "status": 200, - "type": "text/html; charset=utf-8", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": true, - "disposition": "attachment; filename=page.shtml", - "bytes": 0 - } - }, - { - "name": "page.shtml", - "shared": true, - "mode": "head", - "query": "?download[0]=", - "expected": { - "status": 200, - "type": "text/html; charset=utf-8", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": true, - "disposition": "attachment; filename=page.shtml", - "bytes": 0 - } - }, - { - "name": "page.shtml", - "shared": true, - "mode": "head", - "query": "?download=0&download[]=1", - "expected": { - "status": 200, - "type": "text/html; charset=utf-8", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": true, - "disposition": "attachment; filename=page.shtml", - "bytes": 0 - } - }, - { - "name": "résumé.pdf", - "shared": true, - "mode": "head", - "query": "?download=1", - "expected": { - "status": 200, - "type": "application/pdf", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": true, - "disposition": "attachment; filename=\"r?sum?.pdf\"; filename*=UTF-8''r%C3%A9sum%C3%A9.pdf", - "bytes": 0 - } - }, - { - "name": "résumé.pdf", - "shared": true, - "mode": "fresh", - "query": "?download=1", - "expected": { - "status": 304, - "type": "application/pdf", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": true, - "disposition": "attachment; filename=\"r?sum?.pdf\"; filename*=UTF-8''r%C3%A9sum%C3%A9.pdf", - "bytes": 0 - } - }, - { - "name": "研究.txt", - "shared": true, - "mode": "head", - "query": "?download=1", - "expected": { - "status": 200, - "type": "text/plain; charset=utf-8", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": true, - "disposition": "attachment; filename=\"??.txt\"; filename*=UTF-8''%E7%A0%94%E7%A9%B6.txt", - "bytes": 0 - } - }, - { - "name": "研究.txt", - "shared": true, - "mode": "fresh", - "query": "?download=1", - "expected": { - "status": 304, - "type": "text/plain; charset=utf-8", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": true, - "disposition": "attachment; filename=\"??.txt\"; filename*=UTF-8''%E7%A0%94%E7%A9%B6.txt", - "bytes": 0 - } - }, - { - "name": "😀.txt", - "shared": true, - "mode": "head", - "query": "?download=1", - "expected": { - "status": 200, - "type": "text/plain; charset=utf-8", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": true, - "disposition": "attachment; filename=\"??.txt\"; filename*=UTF-8''%F0%9F%98%80.txt", - "bytes": 0 - } - }, - { - "name": "😀.txt", - "shared": true, - "mode": "fresh", - "query": "?download=1", - "expected": { - "status": 304, - "type": "text/plain; charset=utf-8", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": true, - "disposition": "attachment; filename=\"??.txt\"; filename*=UTF-8''%F0%9F%98%80.txt", - "bytes": 0 - } - }, - { - "name": "a%20b.txt", - "shared": true, - "mode": "head", - "query": "?download=1", - "expected": { - "status": 200, - "type": "text/plain; charset=utf-8", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": true, - "disposition": "attachment; filename=a%20b.txt; filename*=UTF-8''a%2520b.txt", - "bytes": 0 - } - }, - { - "name": "a%20b.txt", - "shared": true, - "mode": "fresh", - "query": "?download=1", - "expected": { - "status": 304, - "type": "text/plain; charset=utf-8", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": true, - "disposition": "attachment; filename=a%20b.txt; filename*=UTF-8''a%2520b.txt", - "bytes": 0 - } - }, - { - "name": "a%2Gb.txt", - "shared": true, - "mode": "head", - "query": "?download=1", - "expected": { - "status": 200, - "type": "text/plain; charset=utf-8", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": true, - "disposition": "attachment; filename=a%2Gb.txt", - "bytes": 0 - } - }, - { - "name": "a%2Gb.txt", - "shared": true, - "mode": "fresh", - "query": "?download=1", - "expected": { - "status": 304, - "type": "text/plain; charset=utf-8", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": true, - "disposition": "attachment; filename=a%2Gb.txt", - "bytes": 0 - } - }, - { - "name": "a\"b.txt", - "shared": true, - "mode": "head", - "query": "?download=1", - "expected": { - "status": 200, - "type": "text/plain; charset=utf-8", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": true, - "disposition": "attachment; filename=\"a\\\"b.txt\"", - "bytes": 0 - } - }, - { - "name": "a\"b.txt", - "shared": true, - "mode": "fresh", - "query": "?download=1", - "expected": { - "status": 304, - "type": "text/plain; charset=utf-8", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": true, - "disposition": "attachment; filename=\"a\\\"b.txt\"", - "bytes": 0 - } - }, - { - "name": "report with spaces.txt", - "shared": true, - "mode": "head", - "query": "?download=1", - "expected": { - "status": 200, - "type": "text/plain; charset=utf-8", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": true, - "disposition": "attachment; filename=\"report with spaces.txt\"", - "bytes": 0 - } - }, - { - "name": "report with spaces.txt", - "shared": true, - "mode": "fresh", - "query": "?download=1", - "expected": { - "status": 304, - "type": "text/plain; charset=utf-8", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": true, - "disposition": "attachment; filename=\"report with spaces.txt\"", - "bytes": 0 - } - }, - { - "name": "unknown.mystery", - "shared": true, - "mode": "head", - "query": "?download=1", - "expected": { - "status": 200, - "type": "application/octet-stream", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": true, - "disposition": "attachment; filename=unknown.mystery", - "bytes": 0 - } - }, - { - "name": "unknown.mystery", - "shared": true, - "mode": "fresh", - "query": "?download=1", - "expected": { - "status": 304, - "type": "application/octet-stream", - "encoding": "", - "length": "", - "ranges": "", - "vary": "Accept-Encoding", - "csp": "", - "control": "private, no-cache, must-revalidate", - "nosniff": "nosniff", - "weak": true, - "attachment": true, - "disposition": "attachment; filename=unknown.mystery", - "bytes": 0 - } - } -] diff --git a/backend/internal/server/testdata/file-query.json b/backend/internal/server/testdata/file-query.json deleted file mode 100644 index 48bf4f0..0000000 --- a/backend/internal/server/testdata/file-query.json +++ /dev/null @@ -1,316 +0,0 @@ -[ - { - "query": "", - "download": false, - "force": false, - "refresh": false - }, - { - "query": "download=", - "download": false, - "force": false, - "refresh": false - }, - { - "query": "download[]=", - "download": true, - "force": false, - "refresh": false - }, - { - "query": "download[0]=", - "download": true, - "force": false, - "refresh": false - }, - { - "query": "download[x]=", - "download": true, - "force": false, - "refresh": false - }, - { - "query": "download=1", - "download": true, - "force": false, - "refresh": false - }, - { - "query": "download[]=1", - "download": true, - "force": false, - "refresh": false - }, - { - "query": "download[0]=1", - "download": true, - "force": false, - "refresh": false - }, - { - "query": "download[x]=1", - "download": true, - "force": false, - "refresh": false - }, - { - "query": "download=0", - "download": true, - "force": false, - "refresh": false - }, - { - "query": "download[]=0", - "download": true, - "force": false, - "refresh": false - }, - { - "query": "download[0]=0", - "download": true, - "force": false, - "refresh": false - }, - { - "query": "download[x]=0", - "download": true, - "force": false, - "refresh": false - }, - { - "query": "download=true", - "download": true, - "force": false, - "refresh": false - }, - { - "query": "download[]=true", - "download": true, - "force": false, - "refresh": false - }, - { - "query": "download[0]=true", - "download": true, - "force": false, - "refresh": false - }, - { - "query": "download[x]=true", - "download": true, - "force": false, - "refresh": false - }, - { - "query": "force=", - "download": false, - "force": false, - "refresh": false - }, - { - "query": "force[]=", - "download": false, - "force": false, - "refresh": false - }, - { - "query": "force[0]=", - "download": false, - "force": false, - "refresh": false - }, - { - "query": "force[x]=", - "download": false, - "force": false, - "refresh": false - }, - { - "query": "force=1", - "download": false, - "force": true, - "refresh": true - }, - { - "query": "force[]=1", - "download": false, - "force": true, - "refresh": true - }, - { - "query": "force[0]=1", - "download": false, - "force": true, - "refresh": true - }, - { - "query": "force[x]=1", - "download": false, - "force": false, - "refresh": false - }, - { - "query": "force=0", - "download": false, - "force": false, - "refresh": false - }, - { - "query": "force[]=0", - "download": false, - "force": false, - "refresh": false - }, - { - "query": "force[0]=0", - "download": false, - "force": false, - "refresh": false - }, - { - "query": "force[x]=0", - "download": false, - "force": false, - "refresh": false - }, - { - "query": "force=true", - "download": false, - "force": false, - "refresh": false - }, - { - "query": "force[]=true", - "download": false, - "force": false, - "refresh": false - }, - { - "query": "force[0]=true", - "download": false, - "force": false, - "refresh": false - }, - { - "query": "force[x]=true", - "download": false, - "force": false, - "refresh": false - }, - { - "query": "reconnect=", - "download": false, - "force": false, - "refresh": false - }, - { - "query": "reconnect[]=", - "download": false, - "force": false, - "refresh": false - }, - { - "query": "reconnect[0]=", - "download": false, - "force": false, - "refresh": false - }, - { - "query": "reconnect[x]=", - "download": false, - "force": false, - "refresh": false - }, - { - "query": "reconnect=1", - "download": false, - "force": false, - "refresh": true - }, - { - "query": "reconnect[]=1", - "download": false, - "force": false, - "refresh": false - }, - { - "query": "reconnect[0]=1", - "download": false, - "force": false, - "refresh": false - }, - { - "query": "reconnect[x]=1", - "download": false, - "force": false, - "refresh": false - }, - { - "query": "reconnect=0", - "download": false, - "force": false, - "refresh": false - }, - { - "query": "reconnect[]=0", - "download": false, - "force": false, - "refresh": false - }, - { - "query": "reconnect[0]=0", - "download": false, - "force": false, - "refresh": false - }, - { - "query": "reconnect[x]=0", - "download": false, - "force": false, - "refresh": false - }, - { - "query": "reconnect=true", - "download": false, - "force": false, - "refresh": false - }, - { - "query": "reconnect[]=true", - "download": false, - "force": false, - "refresh": false - }, - { - "query": "reconnect[0]=true", - "download": false, - "force": false, - "refresh": false - }, - { - "query": "reconnect[x]=true", - "download": false, - "force": false, - "refresh": false - }, - { - "query": "force=1&force[]=1", - "download": false, - "force": false, - "refresh": false - }, - { - "query": "reconnect=1&reconnect[]=1", - "download": false, - "force": false, - "refresh": false - }, - { - "query": "force[toString]=x", - "error": true - }, - { - "query": "reconnect=1&force[toString]=x", - "error": true - } -] diff --git a/backend/internal/server/testdata/file-search.json b/backend/internal/server/testdata/file-search.json deleted file mode 100644 index d22dc98..0000000 --- a/backend/internal/server/testdata/file-search.json +++ /dev/null @@ -1,171 +0,0 @@ -{ - "files": [ - { - "name": "éclair.txt", - "path": "docs", - "size": 1 - }, - { - "name": "İ.txt", - "path": "", - "size": 2 - }, - { - "name": "ΟΣ.txt", - "path": "greek/ΣΙ", - "size": 3 - }, - { - "name": "😀.txt", - "path": "", - "size": 4 - }, - { - "name": "[x].txt", - "path": "literal", - "size": 5 - }, - { - "name": "README.md", - "path": "nested/docs", - "size": 6 - } - ], - "cases": [ - { - "query": "", - "expected": [] - }, - { - "query": "q=", - "expected": [] - }, - { - "query": "q=a", - "expected": [] - }, - { - "query": "q=%C3%A9", - "expected": [] - }, - { - "query": "q=%C4%B0", - "expected": [] - }, - { - "query": "q=i%CC%87", - "expected": [ - { - "name": "İ.txt", - "path": "", - "size": 2 - } - ] - }, - { - "query": "q=%CE%9F%CE%A3", - "expected": [] - }, - { - "query": "q=%CE%BF%CF%83", - "expected": [ - { - "name": "ΟΣ.txt", - "path": "greek/ΣΙ", - "size": 3 - } - ] - }, - { - "query": "q=%CE%BF%CF%82", - "expected": [] - }, - { - "query": "q=%CE%A3%CE%99", - "expected": [ - { - "name": "ΟΣ.txt", - "path": "greek/ΣΙ", - "size": 3 - } - ] - }, - { - "query": "q=%F0%9F%98%80", - "expected": [ - { - "name": "😀.txt", - "path": "", - "size": 4 - } - ] - }, - { - "query": "q=%20%5Bx%5D%20", - "expected": [ - { - "name": "[x].txt", - "path": "literal", - "size": 5 - } - ] - }, - { - "query": "q=%EF%BB%BFREADME%EF%BB%BF", - "expected": [ - { - "name": "README.md", - "path": "nested/docs", - "size": 6 - } - ] - }, - { - "query": "q=%C2%85README%C2%85", - "expected": [] - }, - { - "query": "q=docs", - "expected": [ - { - "name": "éclair.txt", - "path": "docs", - "size": 1 - }, - { - "name": "README.md", - "path": "nested/docs", - "size": 6 - } - ] - }, - { - "query": "q=nested%2Fdocs", - "expected": [] - }, - { - "query": "q=%25FF", - "expected": [] - }, - { - "query": "q[]=README", - "error": true - }, - { - "query": "q=README&q=docs", - "error": true - }, - { - "query": "q[x]=README", - "error": true - }, - { - "query": "q[]=", - "error": true - }, - { - "query": "q=README&q[]=docs", - "error": true - } - ] -} diff --git a/backend/internal/server/testdata/folder-listing.json b/backend/internal/server/testdata/folder-listing.json deleted file mode 100644 index 2e06a0b..0000000 --- a/backend/internal/server/testdata/folder-listing.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "files": [ - { - "name": "normal", - "path": "", - "size": 12, - "sha": "abc" - }, - { - "name": "missing-sha", - "path": "", - "size": 1 - }, - { - "name": "empty", - "path": "", - "size": 0, - "sha": "abc" - }, - { - "name": "folder", - "path": "" - } - ], - "expected": [ - { - "name": "normal", - "path": "", - "size": 12, - "sha": "a9993e36" - }, - { - "name": "missing-sha", - "path": "", - "size": 1, - "sha": "da39a3ee" - }, - { - "name": "empty", - "path": "", - "size": 0 - }, - { - "name": "folder", - "path": "" - } - ] -} diff --git a/backend/internal/server/testdata/folder-paths.json b/backend/internal/server/testdata/folder-paths.json deleted file mode 100644 index 40d4b60..0000000 --- a/backend/internal/server/testdata/folder-paths.json +++ /dev/null @@ -1,92 +0,0 @@ -[ - { - "requested": "", - "directory": "", - "name": "" - }, - { - "requested": "alice", - "directory": "", - "name": "alice" - }, - { - "requested": "alice/", - "directory": "", - "name": "alice" - }, - { - "requested": "alice//", - "directory": "", - "name": "alice" - }, - { - "requested": "a//b/", - "directory": "a", - "name": "b" - }, - { - "requested": "/", - "directory": "", - "name": "" - }, - { - "requested": "//", - "directory": "", - "name": "" - }, - { - "requested": "///", - "directory": "", - "name": "" - }, - { - "requested": "./alice/", - "directory": "", - "name": "alice" - }, - { - "requested": "a/../b", - "directory": "a/..", - "name": "b" - }, - { - "requested": "//a/b", - "directory": "//a", - "name": "b" - }, - { - "requested": "a///b//", - "directory": "a/", - "name": "b" - }, - { - "requested": "a\\b", - "directory": "", - "name": "a\\b" - }, - { - "requested": "日本語/é/", - "directory": "日本語", - "name": "é" - }, - { - "requested": " a / b ", - "directory": " a ", - "name": " b " - }, - { - "requested": "/root/leaf", - "directory": "/root", - "name": "leaf" - }, - { - "requested": "../x", - "directory": "..", - "name": "x" - }, - { - "requested": "a/./b", - "directory": "a/.", - "name": "b" - } -] diff --git a/backend/internal/server/testdata/github-pagination.json b/backend/internal/server/testdata/github-pagination.json deleted file mode 100644 index 1f31f93..0000000 --- a/backend/internal/server/testdata/github-pagination.json +++ /dev/null @@ -1,1739 +0,0 @@ -[ - { - "name": "0/\"\"", - "count": 0, - "link": "", - "conflict": 0, - "expected": { - "urls": [ - "https://api.github.com/user/repos?page=1&per_page=100" - ], - "ids": [] - } - }, - { - "name": "0/\"; rel=\\\"next\\\"\"", - "count": 0, - "link": "; rel=\"next\"", - "conflict": 0, - "expected": { - "urls": [ - "https://api.github.com/user/repos?page=1&per_page=100", - "https://api.github.com/user/repos?after=opaque%2Bcursor&per_page=7" - ], - "ids": [ - 2 - ] - } - }, - { - "name": "0/\";rel=\\\"next\\\"\"", - "count": 0, - "link": ";rel=\"next\"", - "conflict": 0, - "expected": { - "urls": [ - "https://api.github.com/user/repos?page=1&per_page=100", - "https://api.github.com/user/repos?after=opaque%2Bcursor&per_page=7" - ], - "ids": [ - 2 - ] - } - }, - { - "name": "0/\";\\t rel=\\\"next\\\"\"", - "count": 0, - "link": ";\t rel=\"next\"", - "conflict": 0, - "expected": { - "urls": [ - "https://api.github.com/user/repos?page=1&per_page=100", - "https://api.github.com/user/repos?after=opaque%2Bcursor&per_page=7" - ], - "ids": [ - 2 - ] - } - }, - { - "name": "0/\"; rel=\\\"next\\\"\"", - "count": 0, - "link": "; rel=\"next\"", - "conflict": 0, - "expected": { - "urls": [ - "https://api.github.com/user/repos?page=1&per_page=100", - "https://api.github.com/user/repos?after=opaque%2Bcursor&per_page=7" - ], - "ids": [ - 2 - ] - } - }, - { - "name": "0/\";rel=\\\"next\\\"\"", - "count": 0, - "link": ";rel=\"next\"", - "conflict": 0, - "expected": { - "urls": [ - "https://api.github.com/user/repos?page=1&per_page=100", - "https://api.github.com/user/repos?after=opaque%2Bcursor&per_page=7" - ], - "ids": [ - 2 - ] - } - }, - { - "name": "0/\";…rel=\\\"next\\\"\"", - "count": 0, - "link": ";…rel=\"next\"", - "conflict": 0, - "expected": { - "urls": [ - "https://api.github.com/user/repos?page=1&per_page=100" - ], - "ids": [] - } - }, - { - "name": "0/\"; rel=\\\"prev\\\"\"", - "count": 0, - "link": "; rel=\"prev\"", - "conflict": 0, - "expected": { - "urls": [ - "https://api.github.com/user/repos?page=1&per_page=100" - ], - "ids": [] - } - }, - { - "name": "0/\"; rel=\\\"Next\\\"\"", - "count": 0, - "link": "; rel=\"Next\"", - "conflict": 0, - "expected": { - "urls": [ - "https://api.github.com/user/repos?page=1&per_page=100" - ], - "ids": [] - } - }, - { - "name": "0/\"; rel='next'\"", - "count": 0, - "link": "; rel='next'", - "conflict": 0, - "expected": { - "urls": [ - "https://api.github.com/user/repos?page=1&per_page=100" - ], - "ids": [] - } - }, - { - "name": "0/\" ; rel=\\\"next\\\"\"", - "count": 0, - "link": " ; rel=\"next\"", - "conflict": 0, - "expected": { - "urls": [ - "https://api.github.com/user/repos?page=1&per_page=100" - ], - "ids": [] - } - }, - { - "name": "0/\"; rel=\\\"prev\\\", ; rel=\\\"next\\\"\"", - "count": 0, - "link": "; rel=\"prev\", ; rel=\"next\"", - "conflict": 0, - "expected": { - "urls": [ - "https://api.github.com/user/repos?page=1&per_page=100", - "https://api.github.com/user/repos?after=opaque%2Bcursor&per_page=7" - ], - "ids": [ - 2 - ] - } - }, - { - "name": "1/\"\"", - "count": 1, - "link": "", - "conflict": 0, - "expected": { - "urls": [ - "https://api.github.com/user/repos?page=1&per_page=100" - ], - "ids": [ - 1 - ] - } - }, - { - "name": "1/\"; rel=\\\"next\\\"\"", - "count": 1, - "link": "; rel=\"next\"", - "conflict": 0, - "expected": { - "urls": [ - "https://api.github.com/user/repos?page=1&per_page=100", - "https://api.github.com/user/repos?after=opaque%2Bcursor&per_page=7" - ], - "ids": [ - 1, - 2 - ] - } - }, - { - "name": "1/\";rel=\\\"next\\\"\"", - "count": 1, - "link": ";rel=\"next\"", - "conflict": 0, - "expected": { - "urls": [ - "https://api.github.com/user/repos?page=1&per_page=100", - "https://api.github.com/user/repos?after=opaque%2Bcursor&per_page=7" - ], - "ids": [ - 1, - 2 - ] - } - }, - { - "name": "1/\";\\t rel=\\\"next\\\"\"", - "count": 1, - "link": ";\t rel=\"next\"", - "conflict": 0, - "expected": { - "urls": [ - "https://api.github.com/user/repos?page=1&per_page=100", - "https://api.github.com/user/repos?after=opaque%2Bcursor&per_page=7" - ], - "ids": [ - 1, - 2 - ] - } - }, - { - "name": "1/\"; rel=\\\"next\\\"\"", - "count": 1, - "link": "; rel=\"next\"", - "conflict": 0, - "expected": { - "urls": [ - "https://api.github.com/user/repos?page=1&per_page=100", - "https://api.github.com/user/repos?after=opaque%2Bcursor&per_page=7" - ], - "ids": [ - 1, - 2 - ] - } - }, - { - "name": "1/\";rel=\\\"next\\\"\"", - "count": 1, - "link": ";rel=\"next\"", - "conflict": 0, - "expected": { - "urls": [ - "https://api.github.com/user/repos?page=1&per_page=100", - "https://api.github.com/user/repos?after=opaque%2Bcursor&per_page=7" - ], - "ids": [ - 1, - 2 - ] - } - }, - { - "name": "1/\";…rel=\\\"next\\\"\"", - "count": 1, - "link": ";…rel=\"next\"", - "conflict": 0, - "expected": { - "urls": [ - "https://api.github.com/user/repos?page=1&per_page=100" - ], - "ids": [ - 1 - ] - } - }, - { - "name": "1/\"; rel=\\\"prev\\\"\"", - "count": 1, - "link": "; rel=\"prev\"", - "conflict": 0, - "expected": { - "urls": [ - "https://api.github.com/user/repos?page=1&per_page=100" - ], - "ids": [ - 1 - ] - } - }, - { - "name": "1/\"; rel=\\\"Next\\\"\"", - "count": 1, - "link": "; rel=\"Next\"", - "conflict": 0, - "expected": { - "urls": [ - "https://api.github.com/user/repos?page=1&per_page=100" - ], - "ids": [ - 1 - ] - } - }, - { - "name": "1/\"; rel='next'\"", - "count": 1, - "link": "; rel='next'", - "conflict": 0, - "expected": { - "urls": [ - "https://api.github.com/user/repos?page=1&per_page=100" - ], - "ids": [ - 1 - ] - } - }, - { - "name": "1/\" ; rel=\\\"next\\\"\"", - "count": 1, - "link": " ; rel=\"next\"", - "conflict": 0, - "expected": { - "urls": [ - "https://api.github.com/user/repos?page=1&per_page=100" - ], - "ids": [ - 1 - ] - } - }, - { - "name": "1/\"; rel=\\\"prev\\\", ; rel=\\\"next\\\"\"", - "count": 1, - "link": "; rel=\"prev\", ; rel=\"next\"", - "conflict": 0, - "expected": { - "urls": [ - "https://api.github.com/user/repos?page=1&per_page=100", - "https://api.github.com/user/repos?after=opaque%2Bcursor&per_page=7" - ], - "ids": [ - 1, - 2 - ] - } - }, - { - "name": "100/\"\"", - "count": 100, - "link": "", - "conflict": 0, - "expected": { - "urls": [ - "https://api.github.com/user/repos?page=1&per_page=100" - ], - "ids": [ - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1 - ] - } - }, - { - "name": "100/\"; rel=\\\"next\\\"\"", - "count": 100, - "link": "; rel=\"next\"", - "conflict": 0, - "expected": { - "urls": [ - "https://api.github.com/user/repos?page=1&per_page=100", - "https://api.github.com/user/repos?after=opaque%2Bcursor&per_page=7" - ], - "ids": [ - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 2 - ] - } - }, - { - "name": "100/\";rel=\\\"next\\\"\"", - "count": 100, - "link": ";rel=\"next\"", - "conflict": 0, - "expected": { - "urls": [ - "https://api.github.com/user/repos?page=1&per_page=100", - "https://api.github.com/user/repos?after=opaque%2Bcursor&per_page=7" - ], - "ids": [ - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 2 - ] - } - }, - { - "name": "100/\";\\t rel=\\\"next\\\"\"", - "count": 100, - "link": ";\t rel=\"next\"", - "conflict": 0, - "expected": { - "urls": [ - "https://api.github.com/user/repos?page=1&per_page=100", - "https://api.github.com/user/repos?after=opaque%2Bcursor&per_page=7" - ], - "ids": [ - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 2 - ] - } - }, - { - "name": "100/\"; rel=\\\"next\\\"\"", - "count": 100, - "link": "; rel=\"next\"", - "conflict": 0, - "expected": { - "urls": [ - "https://api.github.com/user/repos?page=1&per_page=100", - "https://api.github.com/user/repos?after=opaque%2Bcursor&per_page=7" - ], - "ids": [ - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 2 - ] - } - }, - { - "name": "100/\";rel=\\\"next\\\"\"", - "count": 100, - "link": ";rel=\"next\"", - "conflict": 0, - "expected": { - "urls": [ - "https://api.github.com/user/repos?page=1&per_page=100", - "https://api.github.com/user/repos?after=opaque%2Bcursor&per_page=7" - ], - "ids": [ - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 2 - ] - } - }, - { - "name": "100/\";…rel=\\\"next\\\"\"", - "count": 100, - "link": ";…rel=\"next\"", - "conflict": 0, - "expected": { - "urls": [ - "https://api.github.com/user/repos?page=1&per_page=100" - ], - "ids": [ - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1 - ] - } - }, - { - "name": "100/\"; rel=\\\"prev\\\"\"", - "count": 100, - "link": "; rel=\"prev\"", - "conflict": 0, - "expected": { - "urls": [ - "https://api.github.com/user/repos?page=1&per_page=100" - ], - "ids": [ - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1 - ] - } - }, - { - "name": "100/\"; rel=\\\"Next\\\"\"", - "count": 100, - "link": "; rel=\"Next\"", - "conflict": 0, - "expected": { - "urls": [ - "https://api.github.com/user/repos?page=1&per_page=100" - ], - "ids": [ - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1 - ] - } - }, - { - "name": "100/\"; rel='next'\"", - "count": 100, - "link": "; rel='next'", - "conflict": 0, - "expected": { - "urls": [ - "https://api.github.com/user/repos?page=1&per_page=100" - ], - "ids": [ - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1 - ] - } - }, - { - "name": "100/\" ; rel=\\\"next\\\"\"", - "count": 100, - "link": " ; rel=\"next\"", - "conflict": 0, - "expected": { - "urls": [ - "https://api.github.com/user/repos?page=1&per_page=100" - ], - "ids": [ - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1 - ] - } - }, - { - "name": "100/\"; rel=\\\"prev\\\", ; rel=\\\"next\\\"\"", - "count": 100, - "link": "; rel=\"prev\", ; rel=\"next\"", - "conflict": 0, - "expected": { - "urls": [ - "https://api.github.com/user/repos?page=1&per_page=100", - "https://api.github.com/user/repos?after=opaque%2Bcursor&per_page=7" - ], - "ids": [ - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 2 - ] - } - }, - { - "name": "conflict-on-1", - "count": 1, - "link": "; rel=\"next\"", - "conflict": 1, - "expected": { - "urls": [ - "https://api.github.com/user/repos?page=1&per_page=100" - ], - "ids": [] - } - }, - { - "name": "conflict-on-2", - "count": 1, - "link": "; rel=\"next\"", - "conflict": 2, - "expected": { - "urls": [ - "https://api.github.com/user/repos?page=1&per_page=100", - "https://api.github.com/user/repos?after=opaque%2Bcursor&per_page=7" - ], - "ids": [ - 1 - ] - } - } -] diff --git a/backend/internal/server/testdata/github-quota.json b/backend/internal/server/testdata/github-quota.json deleted file mode 100644 index a3f5a8b..0000000 --- a/backend/internal/server/testdata/github-quota.json +++ /dev/null @@ -1,87 +0,0 @@ -[ - { - "name": "token-0", - "token": "", - "scope": "", - "expected": [ - "gh_rate_gate:e3b0c44298fc1c149afbf4c8" - ] - }, - { - "name": "token-1", - "token": "synthetic-oauth", - "scope": "", - "expected": [ - "gh_rate_gate:4e3123649321fcdea843dcca" - ] - }, - { - "name": "token-2", - "token": "ghp_synthetic", - "scope": "", - "expected": [ - "gh_rate_gate:70232f9dabd7738e42ca5e32" - ] - }, - { - "name": "token-3", - "token": "github_pat_synthetic", - "scope": "", - "expected": [ - "gh_rate_gate:f3283c7673338ce53105e7e4" - ] - }, - { - "name": "token-4", - "token": "synthetic-ü-🔑", - "scope": "", - "expected": [ - "gh_rate_gate:d81aab95ad5e5bc4a4bd54a6" - ] - }, - { - "name": "installation-1", - "token": "synthetic-installation-1", - "scope": "installation:123:1", - "expected": [ - "gh_rate_gate:49bdd0cc2a308c01195c228d", - "gh_rate_gate:installation:1" - ] - }, - { - "name": "installation-42", - "token": "synthetic-installation-42", - "scope": "installation:123:42", - "expected": [ - "gh_rate_gate:a678e8f5ee266fc1987d415f", - "gh_rate_gate:installation:42" - ] - }, - { - "name": "installation-9007199254740991", - "token": "synthetic-installation-9007199254740991", - "scope": "installation:123:9007199254740991", - "expected": [ - "gh_rate_gate:211d6bdaaaf51f2eb9145c38", - "gh_rate_gate:installation:9007199254740991" - ] - }, - { - "name": "app-user-000000000000000000000001", - "token": "synthetic-app-user-000000000000000000000001", - "scope": "app-user:000000000000000000000001", - "expected": [ - "gh_rate_gate:dd52a0089c6479c96a8fa1b6", - "gh_rate_gate:app-user:000000000000000000000001" - ] - }, - { - "name": "app-user-abcdefabcdefabcdefabcdef", - "token": "synthetic-app-user-abcdefabcdefabcdefabcdef", - "scope": "app-user:abcdefabcdefabcdefabcdef", - "expected": [ - "gh_rate_gate:02f42289369727acc0d169f8", - "gh_rate_gate:app-user:abcdefabcdefabcdefabcdef" - ] - } -] diff --git a/backend/internal/server/testdata/github-responses.json b/backend/internal/server/testdata/github-responses.json deleted file mode 100644 index bb345e1..0000000 --- a/backend/internal/server/testdata/github-responses.json +++ /dev/null @@ -1,440 +0,0 @@ -[ - { - "name": "200/{}", - "status": 200, - "headers": {}, - "expected": null - }, - { - "name": "200/{\"retry-after\":\"\"}", - "status": 200, - "headers": { - "retry-after": "" - }, - "expected": null - }, - { - "name": "200/{\"retry-after\":\"30\"}", - "status": 200, - "headers": { - "retry-after": "30" - }, - "expected": null - }, - { - "name": "200/{\"x-ratelimit-remaining\":\"0\"}", - "status": 200, - "headers": { - "x-ratelimit-remaining": "0" - }, - "expected": null - }, - { - "name": "204/{}", - "status": 204, - "headers": {}, - "expected": null - }, - { - "name": "204/{\"retry-after\":\"\"}", - "status": 204, - "headers": { - "retry-after": "" - }, - "expected": null - }, - { - "name": "204/{\"retry-after\":\"30\"}", - "status": 204, - "headers": { - "retry-after": "30" - }, - "expected": null - }, - { - "name": "204/{\"x-ratelimit-remaining\":\"0\"}", - "status": 204, - "headers": { - "x-ratelimit-remaining": "0" - }, - "expected": null - }, - { - "name": "301/{}", - "status": 301, - "headers": {}, - "expected": { - "code": "github_app_access_required", - "status": 403 - } - }, - { - "name": "301/{\"retry-after\":\"\"}", - "status": 301, - "headers": { - "retry-after": "" - }, - "expected": { - "code": "github_app_access_required", - "status": 403 - } - }, - { - "name": "301/{\"retry-after\":\"30\"}", - "status": 301, - "headers": { - "retry-after": "30" - }, - "expected": { - "code": "github_app_access_required", - "status": 403 - } - }, - { - "name": "301/{\"x-ratelimit-remaining\":\"0\"}", - "status": 301, - "headers": { - "x-ratelimit-remaining": "0" - }, - "expected": { - "code": "github_app_access_required", - "status": 403 - } - }, - { - "name": "400/{}", - "status": 400, - "headers": {}, - "expected": { - "code": "github_app_access_required", - "status": 403 - } - }, - { - "name": "400/{\"retry-after\":\"\"}", - "status": 400, - "headers": { - "retry-after": "" - }, - "expected": { - "code": "github_app_access_required", - "status": 403 - } - }, - { - "name": "400/{\"retry-after\":\"30\"}", - "status": 400, - "headers": { - "retry-after": "30" - }, - "expected": { - "code": "github_app_access_required", - "status": 403 - } - }, - { - "name": "400/{\"x-ratelimit-remaining\":\"0\"}", - "status": 400, - "headers": { - "x-ratelimit-remaining": "0" - }, - "expected": { - "code": "github_app_access_required", - "status": 403 - } - }, - { - "name": "401/{}", - "status": 401, - "headers": {}, - "expected": { - "code": "github_app_reconnect_required", - "status": 403 - } - }, - { - "name": "401/{\"retry-after\":\"\"}", - "status": 401, - "headers": { - "retry-after": "" - }, - "expected": { - "code": "github_app_reconnect_required", - "status": 403 - } - }, - { - "name": "401/{\"retry-after\":\"30\"}", - "status": 401, - "headers": { - "retry-after": "30" - }, - "expected": { - "code": "github_app_reconnect_required", - "status": 403 - } - }, - { - "name": "401/{\"x-ratelimit-remaining\":\"0\"}", - "status": 401, - "headers": { - "x-ratelimit-remaining": "0" - }, - "expected": { - "code": "github_app_reconnect_required", - "status": 403 - } - }, - { - "name": "403/{}", - "status": 403, - "headers": {}, - "expected": { - "code": "github_app_access_required", - "status": 403 - } - }, - { - "name": "403/{\"retry-after\":\"\"}", - "status": 403, - "headers": { - "retry-after": "" - }, - "expected": { - "code": "github_rate_limit_exceeded", - "status": 429 - } - }, - { - "name": "403/{\"retry-after\":\"30\"}", - "status": 403, - "headers": { - "retry-after": "30" - }, - "expected": { - "code": "github_rate_limit_exceeded", - "status": 429 - } - }, - { - "name": "403/{\"x-ratelimit-remaining\":\"0\"}", - "status": 403, - "headers": { - "x-ratelimit-remaining": "0" - }, - "expected": { - "code": "github_rate_limit_exceeded", - "status": 429 - } - }, - { - "name": "404/{}", - "status": 404, - "headers": {}, - "expected": { - "code": "github_app_access_required", - "status": 403 - } - }, - { - "name": "404/{\"retry-after\":\"\"}", - "status": 404, - "headers": { - "retry-after": "" - }, - "expected": { - "code": "github_app_access_required", - "status": 403 - } - }, - { - "name": "404/{\"retry-after\":\"30\"}", - "status": 404, - "headers": { - "retry-after": "30" - }, - "expected": { - "code": "github_app_access_required", - "status": 403 - } - }, - { - "name": "404/{\"x-ratelimit-remaining\":\"0\"}", - "status": 404, - "headers": { - "x-ratelimit-remaining": "0" - }, - "expected": { - "code": "github_app_access_required", - "status": 403 - } - }, - { - "name": "422/{}", - "status": 422, - "headers": {}, - "expected": { - "code": "github_app_access_required", - "status": 403 - } - }, - { - "name": "422/{\"retry-after\":\"\"}", - "status": 422, - "headers": { - "retry-after": "" - }, - "expected": { - "code": "github_app_access_required", - "status": 403 - } - }, - { - "name": "422/{\"retry-after\":\"30\"}", - "status": 422, - "headers": { - "retry-after": "30" - }, - "expected": { - "code": "github_app_access_required", - "status": 403 - } - }, - { - "name": "422/{\"x-ratelimit-remaining\":\"0\"}", - "status": 422, - "headers": { - "x-ratelimit-remaining": "0" - }, - "expected": { - "code": "github_app_access_required", - "status": 403 - } - }, - { - "name": "429/{}", - "status": 429, - "headers": {}, - "expected": { - "code": "github_rate_limit_exceeded", - "status": 429 - } - }, - { - "name": "429/{\"retry-after\":\"\"}", - "status": 429, - "headers": { - "retry-after": "" - }, - "expected": { - "code": "github_rate_limit_exceeded", - "status": 429 - } - }, - { - "name": "429/{\"retry-after\":\"30\"}", - "status": 429, - "headers": { - "retry-after": "30" - }, - "expected": { - "code": "github_rate_limit_exceeded", - "status": 429 - } - }, - { - "name": "429/{\"x-ratelimit-remaining\":\"0\"}", - "status": 429, - "headers": { - "x-ratelimit-remaining": "0" - }, - "expected": { - "code": "github_rate_limit_exceeded", - "status": 429 - } - }, - { - "name": "500/{}", - "status": 500, - "headers": {}, - "expected": { - "code": "github_unavailable", - "status": 502 - } - }, - { - "name": "500/{\"retry-after\":\"\"}", - "status": 500, - "headers": { - "retry-after": "" - }, - "expected": { - "code": "github_unavailable", - "status": 502 - } - }, - { - "name": "500/{\"retry-after\":\"30\"}", - "status": 500, - "headers": { - "retry-after": "30" - }, - "expected": { - "code": "github_unavailable", - "status": 502 - } - }, - { - "name": "500/{\"x-ratelimit-remaining\":\"0\"}", - "status": 500, - "headers": { - "x-ratelimit-remaining": "0" - }, - "expected": { - "code": "github_unavailable", - "status": 502 - } - }, - { - "name": "503/{}", - "status": 503, - "headers": {}, - "expected": { - "code": "github_unavailable", - "status": 502 - } - }, - { - "name": "503/{\"retry-after\":\"\"}", - "status": 503, - "headers": { - "retry-after": "" - }, - "expected": { - "code": "github_unavailable", - "status": 502 - } - }, - { - "name": "503/{\"retry-after\":\"30\"}", - "status": 503, - "headers": { - "retry-after": "30" - }, - "expected": { - "code": "github_unavailable", - "status": 502 - } - }, - { - "name": "503/{\"x-ratelimit-remaining\":\"0\"}", - "status": 503, - "headers": { - "x-ratelimit-remaining": "0" - }, - "expected": { - "code": "github_unavailable", - "status": 502 - } - } -] diff --git a/backend/internal/server/testdata/json-http.json b/backend/internal/server/testdata/json-http.json deleted file mode 100644 index 608c6cf..0000000 --- a/backend/internal/server/testdata/json-http.json +++ /dev/null @@ -1,1110 +0,0 @@ -[ - { - "name": "json-http-0", - "method": "GET", - "status": 200, - "value": { - "a": "<é>

", - "z": 42 - }, - "match": "", - "expected": { - "status": 200, - "etag": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "type": "application/json; charset=utf-8", - "length": "25", - "body": "{\"a\":\"<é>

\",\"z\":42}" - } - }, - { - "name": "json-http-1", - "method": "HEAD", - "status": 200, - "value": { - "a": "<é>

", - "z": 42 - }, - "match": "", - "expected": { - "status": 200, - "etag": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "type": "application/json; charset=utf-8", - "length": "25", - "body": "" - } - }, - { - "name": "json-http-2", - "method": "POST", - "status": 200, - "value": { - "a": "<é>

", - "z": 42 - }, - "match": "", - "expected": { - "status": 200, - "etag": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "type": "application/json; charset=utf-8", - "length": "25", - "body": "{\"a\":\"<é>

\",\"z\":42}" - } - }, - { - "name": "json-http-3", - "method": "QUERY", - "status": 200, - "value": { - "a": "<é>

", - "z": 42 - }, - "match": "", - "expected": { - "status": 200, - "etag": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "type": "application/json; charset=utf-8", - "length": "25", - "body": "{\"a\":\"<é>

\",\"z\":42}" - } - }, - { - "name": "json-http-4", - "method": "GET", - "status": 200, - "value": { - "a": "<é>

", - "z": 42 - }, - "match": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "expected": { - "status": 304, - "etag": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "type": "", - "length": "", - "body": "" - } - }, - { - "name": "json-http-5", - "method": "HEAD", - "status": 200, - "value": { - "a": "<é>

", - "z": 42 - }, - "match": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "expected": { - "status": 304, - "etag": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "type": "", - "length": "", - "body": "" - } - }, - { - "name": "json-http-6", - "method": "POST", - "status": 200, - "value": { - "a": "<é>

", - "z": 42 - }, - "match": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "expected": { - "status": 200, - "etag": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "type": "application/json; charset=utf-8", - "length": "25", - "body": "{\"a\":\"<é>

\",\"z\":42}" - } - }, - { - "name": "json-http-7", - "method": "QUERY", - "status": 200, - "value": { - "a": "<é>

", - "z": 42 - }, - "match": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "expected": { - "status": 304, - "etag": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "type": "", - "length": "", - "body": "" - } - }, - { - "name": "json-http-8", - "method": "GET", - "status": 200, - "value": { - "a": "<é>

", - "z": 42 - }, - "match": "W/\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "expected": { - "status": 304, - "etag": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "type": "", - "length": "", - "body": "" - } - }, - { - "name": "json-http-9", - "method": "HEAD", - "status": 200, - "value": { - "a": "<é>

", - "z": 42 - }, - "match": "W/\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "expected": { - "status": 304, - "etag": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "type": "", - "length": "", - "body": "" - } - }, - { - "name": "json-http-10", - "method": "POST", - "status": 200, - "value": { - "a": "<é>

", - "z": 42 - }, - "match": "W/\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "expected": { - "status": 200, - "etag": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "type": "application/json; charset=utf-8", - "length": "25", - "body": "{\"a\":\"<é>

\",\"z\":42}" - } - }, - { - "name": "json-http-11", - "method": "QUERY", - "status": 200, - "value": { - "a": "<é>

", - "z": 42 - }, - "match": "W/\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "expected": { - "status": 304, - "etag": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "type": "", - "length": "", - "body": "" - } - }, - { - "name": "json-http-12", - "method": "GET", - "status": 200, - "value": { - "a": "<é>

", - "z": 42 - }, - "match": "\"stale\", \"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "expected": { - "status": 304, - "etag": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "type": "", - "length": "", - "body": "" - } - }, - { - "name": "json-http-13", - "method": "HEAD", - "status": 200, - "value": { - "a": "<é>

", - "z": 42 - }, - "match": "\"stale\", \"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "expected": { - "status": 304, - "etag": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "type": "", - "length": "", - "body": "" - } - }, - { - "name": "json-http-14", - "method": "POST", - "status": 200, - "value": { - "a": "<é>

", - "z": 42 - }, - "match": "\"stale\", \"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "expected": { - "status": 200, - "etag": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "type": "application/json; charset=utf-8", - "length": "25", - "body": "{\"a\":\"<é>

\",\"z\":42}" - } - }, - { - "name": "json-http-15", - "method": "QUERY", - "status": 200, - "value": { - "a": "<é>

", - "z": 42 - }, - "match": "\"stale\", \"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "expected": { - "status": 304, - "etag": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "type": "", - "length": "", - "body": "" - } - }, - { - "name": "json-http-16", - "method": "GET", - "status": 200, - "value": { - "a": "<é>

", - "z": 42 - }, - "match": "*", - "expected": { - "status": 304, - "etag": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "type": "", - "length": "", - "body": "" - } - }, - { - "name": "json-http-17", - "method": "HEAD", - "status": 200, - "value": { - "a": "<é>

", - "z": 42 - }, - "match": "*", - "expected": { - "status": 304, - "etag": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "type": "", - "length": "", - "body": "" - } - }, - { - "name": "json-http-18", - "method": "POST", - "status": 200, - "value": { - "a": "<é>

", - "z": 42 - }, - "match": "*", - "expected": { - "status": 200, - "etag": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "type": "application/json; charset=utf-8", - "length": "25", - "body": "{\"a\":\"<é>

\",\"z\":42}" - } - }, - { - "name": "json-http-19", - "method": "QUERY", - "status": 200, - "value": { - "a": "<é>

", - "z": 42 - }, - "match": "*", - "expected": { - "status": 304, - "etag": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "type": "", - "length": "", - "body": "" - } - }, - { - "name": "json-http-20", - "method": "GET", - "status": 200, - "value": { - "a": "<é>

", - "z": 42 - }, - "match": "\"stale\"", - "expected": { - "status": 200, - "etag": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "type": "application/json; charset=utf-8", - "length": "25", - "body": "{\"a\":\"<é>

\",\"z\":42}" - } - }, - { - "name": "json-http-21", - "method": "HEAD", - "status": 200, - "value": { - "a": "<é>

", - "z": 42 - }, - "match": "\"stale\"", - "expected": { - "status": 200, - "etag": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "type": "application/json; charset=utf-8", - "length": "25", - "body": "" - } - }, - { - "name": "json-http-22", - "method": "POST", - "status": 200, - "value": { - "a": "<é>

", - "z": 42 - }, - "match": "\"stale\"", - "expected": { - "status": 200, - "etag": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "type": "application/json; charset=utf-8", - "length": "25", - "body": "{\"a\":\"<é>

\",\"z\":42}" - } - }, - { - "name": "json-http-23", - "method": "QUERY", - "status": 200, - "value": { - "a": "<é>

", - "z": 42 - }, - "match": "\"stale\"", - "expected": { - "status": 200, - "etag": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "type": "application/json; charset=utf-8", - "length": "25", - "body": "{\"a\":\"<é>

\",\"z\":42}" - } - }, - { - "name": "json-http-24", - "method": "GET", - "status": 200, - "value": { - "a": "<é>

", - "z": 42 - }, - "match": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\", \"other\"", - "expected": { - "status": 304, - "etag": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "type": "", - "length": "", - "body": "" - } - }, - { - "name": "json-http-25", - "method": "HEAD", - "status": 200, - "value": { - "a": "<é>

", - "z": 42 - }, - "match": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\", \"other\"", - "expected": { - "status": 304, - "etag": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "type": "", - "length": "", - "body": "" - } - }, - { - "name": "json-http-26", - "method": "POST", - "status": 200, - "value": { - "a": "<é>

", - "z": 42 - }, - "match": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\", \"other\"", - "expected": { - "status": 200, - "etag": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "type": "application/json; charset=utf-8", - "length": "25", - "body": "{\"a\":\"<é>

\",\"z\":42}" - } - }, - { - "name": "json-http-27", - "method": "QUERY", - "status": 200, - "value": { - "a": "<é>

", - "z": 42 - }, - "match": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\", \"other\"", - "expected": { - "status": 304, - "etag": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "type": "", - "length": "", - "body": "" - } - }, - { - "name": "json-http-28", - "method": "GET", - "status": 200, - "value": { - "a": "<é>

", - "z": 42 - }, - "match": "\t\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "expected": { - "status": 304, - "etag": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "type": "", - "length": "", - "body": "" - } - }, - { - "name": "json-http-29", - "method": "HEAD", - "status": 200, - "value": { - "a": "<é>

", - "z": 42 - }, - "match": "\t\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "expected": { - "status": 304, - "etag": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "type": "", - "length": "", - "body": "" - } - }, - { - "name": "json-http-30", - "method": "POST", - "status": 200, - "value": { - "a": "<é>

", - "z": 42 - }, - "match": "\t\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "expected": { - "status": 200, - "etag": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "type": "application/json; charset=utf-8", - "length": "25", - "body": "{\"a\":\"<é>

\",\"z\":42}" - } - }, - { - "name": "json-http-31", - "method": "QUERY", - "status": 200, - "value": { - "a": "<é>

", - "z": 42 - }, - "match": "\t\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "expected": { - "status": 304, - "etag": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "type": "", - "length": "", - "body": "" - } - }, - { - "name": "json-http-32", - "method": "GET", - "status": 200, - "value": { - "a": "<é>

", - "z": 42 - }, - "match": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "control": "no-cache", - "expected": { - "status": 200, - "etag": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "type": "application/json; charset=utf-8", - "length": "25", - "body": "{\"a\":\"<é>

\",\"z\":42}" - } - }, - { - "name": "json-http-33", - "method": "GET", - "status": 200, - "value": { - "a": "<é>

", - "z": 42 - }, - "match": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "control": "max-age=0, no-cache", - "expected": { - "status": 200, - "etag": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "type": "application/json; charset=utf-8", - "length": "25", - "body": "{\"a\":\"<é>

\",\"z\":42}" - } - }, - { - "name": "json-http-34", - "method": "GET", - "status": 200, - "value": { - "a": "<é>

", - "z": 42 - }, - "match": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "control": "NO-CACHE", - "expected": { - "status": 304, - "etag": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "type": "", - "length": "", - "body": "" - } - }, - { - "name": "json-http-35", - "method": "GET", - "status": 200, - "value": { - "a": "<é>

", - "z": 42 - }, - "match": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "control": "no-cache=1", - "expected": { - "status": 304, - "etag": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "type": "", - "length": "", - "body": "" - } - }, - { - "name": "json-http-36", - "method": "GET", - "status": 200, - "value": { - "a": "<é>

", - "z": 42 - }, - "match": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "control": "max-age=0", - "expected": { - "status": 304, - "etag": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "type": "", - "length": "", - "body": "" - } - }, - { - "name": "json-http-37", - "method": "GET", - "status": 201, - "value": { - "a": "<é>

", - "z": 42 - }, - "match": "", - "expected": { - "status": 201, - "etag": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "type": "application/json; charset=utf-8", - "length": "25", - "body": "{\"a\":\"<é>

\",\"z\":42}" - } - }, - { - "name": "json-http-38", - "method": "GET", - "status": 201, - "value": { - "a": "<é>

", - "z": 42 - }, - "match": "*", - "expected": { - "status": 304, - "etag": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "type": "", - "length": "", - "body": "" - } - }, - { - "name": "json-http-39", - "method": "GET", - "status": 204, - "value": { - "a": "<é>

", - "z": 42 - }, - "match": "", - "expected": { - "status": 204, - "etag": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "type": "", - "length": "", - "body": "" - } - }, - { - "name": "json-http-40", - "method": "GET", - "status": 204, - "value": { - "a": "<é>

", - "z": 42 - }, - "match": "*", - "expected": { - "status": 304, - "etag": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "type": "", - "length": "", - "body": "" - } - }, - { - "name": "json-http-41", - "method": "GET", - "status": 205, - "value": { - "a": "<é>

", - "z": 42 - }, - "match": "", - "expected": { - "status": 205, - "etag": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "type": "application/json; charset=utf-8", - "length": "0", - "body": "" - } - }, - { - "name": "json-http-42", - "method": "GET", - "status": 205, - "value": { - "a": "<é>

", - "z": 42 - }, - "match": "*", - "expected": { - "status": 304, - "etag": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "type": "", - "length": "", - "body": "" - } - }, - { - "name": "json-http-43", - "method": "GET", - "status": 304, - "value": { - "a": "<é>

", - "z": 42 - }, - "match": "", - "expected": { - "status": 304, - "etag": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "type": "", - "length": "", - "body": "" - } - }, - { - "name": "json-http-44", - "method": "GET", - "status": 304, - "value": { - "a": "<é>

", - "z": 42 - }, - "match": "*", - "expected": { - "status": 304, - "etag": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "type": "", - "length": "", - "body": "" - } - }, - { - "name": "json-http-45", - "method": "GET", - "status": 400, - "value": { - "a": "<é>

", - "z": 42 - }, - "match": "", - "expected": { - "status": 400, - "etag": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "type": "application/json; charset=utf-8", - "length": "25", - "body": "{\"a\":\"<é>

\",\"z\":42}" - } - }, - { - "name": "json-http-46", - "method": "GET", - "status": 400, - "value": { - "a": "<é>

", - "z": 42 - }, - "match": "*", - "expected": { - "status": 400, - "etag": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "type": "application/json; charset=utf-8", - "length": "25", - "body": "{\"a\":\"<é>

\",\"z\":42}" - } - }, - { - "name": "json-http-47", - "method": "GET", - "status": 401, - "value": { - "a": "<é>

", - "z": 42 - }, - "match": "", - "expected": { - "status": 401, - "etag": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "type": "application/json; charset=utf-8", - "length": "25", - "body": "{\"a\":\"<é>

\",\"z\":42}" - } - }, - { - "name": "json-http-48", - "method": "GET", - "status": 401, - "value": { - "a": "<é>

", - "z": 42 - }, - "match": "*", - "expected": { - "status": 401, - "etag": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "type": "application/json; charset=utf-8", - "length": "25", - "body": "{\"a\":\"<é>

\",\"z\":42}" - } - }, - { - "name": "json-http-49", - "method": "GET", - "status": 403, - "value": { - "a": "<é>

", - "z": 42 - }, - "match": "", - "expected": { - "status": 403, - "etag": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "type": "application/json; charset=utf-8", - "length": "25", - "body": "{\"a\":\"<é>

\",\"z\":42}" - } - }, - { - "name": "json-http-50", - "method": "GET", - "status": 403, - "value": { - "a": "<é>

", - "z": 42 - }, - "match": "*", - "expected": { - "status": 403, - "etag": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "type": "application/json; charset=utf-8", - "length": "25", - "body": "{\"a\":\"<é>

\",\"z\":42}" - } - }, - { - "name": "json-http-51", - "method": "GET", - "status": 500, - "value": { - "a": "<é>

", - "z": 42 - }, - "match": "", - "expected": { - "status": 500, - "etag": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "type": "application/json; charset=utf-8", - "length": "25", - "body": "{\"a\":\"<é>

\",\"z\":42}" - } - }, - { - "name": "json-http-52", - "method": "GET", - "status": 500, - "value": { - "a": "<é>

", - "z": 42 - }, - "match": "*", - "expected": { - "status": 500, - "etag": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "type": "application/json; charset=utf-8", - "length": "25", - "body": "{\"a\":\"<é>

\",\"z\":42}" - } - }, - { - "name": "json-http-53", - "method": "GET", - "status": 200, - "value": { - "a": "<é>

", - "z": 42 - }, - "since": "Wed, 01 Jan 2025 00:00:00 GMT", - "modified": "Wed, 01 Jan 2025 00:00:00 GMT", - "expected": { - "status": 304, - "etag": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "type": "", - "length": "", - "body": "" - } - }, - { - "name": "json-http-54", - "method": "GET", - "status": 200, - "value": { - "a": "<é>

", - "z": 42 - }, - "since": "Tue, 31 Dec 2024 00:00:00 GMT", - "modified": "Wed, 01 Jan 2025 00:00:00 GMT", - "expected": { - "status": 200, - "etag": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "type": "application/json; charset=utf-8", - "length": "25", - "body": "{\"a\":\"<é>

\",\"z\":42}" - } - }, - { - "name": "json-http-55", - "method": "GET", - "status": 200, - "value": { - "a": "<é>

", - "z": 42 - }, - "since": "invalid", - "modified": "Wed, 01 Jan 2025 00:00:00 GMT", - "expected": { - "status": 200, - "etag": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "type": "application/json; charset=utf-8", - "length": "25", - "body": "{\"a\":\"<é>

\",\"z\":42}" - } - }, - { - "name": "json-http-56", - "method": "GET", - "status": 200, - "value": { - "a": "<é>

", - "z": 42 - }, - "match": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "since": "invalid", - "expected": { - "status": 304, - "etag": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "type": "", - "length": "", - "body": "" - } - }, - { - "name": "json-http-57", - "method": "GET", - "status": 200, - "value": { - "a": "<é>

", - "z": 42 - }, - "match": "\"stale\"", - "since": "Wed, 01 Jan 2030 00:00:00 GMT", - "modified": "Wed, 01 Jan 2025 00:00:00 GMT", - "expected": { - "status": 200, - "etag": "\"19-tby2Juxroci6d8ug6rRsIX12sEU\"", - "type": "application/json; charset=utf-8", - "length": "25", - "body": "{\"a\":\"<é>

\",\"z\":42}" - } - }, - { - "name": "json-http-58", - "method": "GET", - "status": 200, - "value": null, - "expected": { - "status": 200, - "etag": "\"4-K+iMpCQsduglOsYkdIUQZQMtaDM\"", - "type": "application/json; charset=utf-8", - "length": "4", - "body": "null" - } - }, - { - "name": "json-http-59", - "method": "GET", - "status": 200, - "value": [], - "expected": { - "status": 200, - "etag": "\"2-l9Fw4VUO7kr8CvBlt4zaMCqXZ0w\"", - "type": "application/json; charset=utf-8", - "length": "2", - "body": "[]" - } - }, - { - "name": "json-http-60", - "method": "GET", - "status": 200, - "value": {}, - "expected": { - "status": 200, - "etag": "\"2-vyGp6PvFo4RvsFtPoIWeCReyIC8\"", - "type": "application/json; charset=utf-8", - "length": "2", - "body": "{}" - } - }, - { - "name": "json-http-61", - "method": "GET", - "status": 200, - "value": "literal \\u2028 then 
", - "expected": { - "status": 200, - "etag": "\"1a-3urRitzGYTx26+eHyzTspbKD3sQ\"", - "type": "application/json; charset=utf-8", - "length": "26", - "body": "\"literal \\\\u2028 then 
\"" - } - }, - { - "name": "json-http-62", - "method": "GET", - "status": 200, - "value": true, - "expected": { - "status": 200, - "etag": "\"4-X/5TO4MPCKAyY0ipFgr6/IraRNs\"", - "type": "application/json; charset=utf-8", - "length": "4", - "body": "true" - } - }, - { - "name": "json-http-63", - "method": "GET", - "status": 200, - "value": 0, - "expected": { - "status": 200, - "etag": "\"1-tlifxqsNyCzxIJnRwtQKuZToQQw\"", - "type": "application/json; charset=utf-8", - "length": "1", - "body": "0" - } - }, - { - "name": "json-http-64", - "method": "GET", - "status": 200, - "value": { - "value": null - }, - "expected": { - "status": 200, - "etag": "\"e-9/1BuKMgFObM1mWJm+YjxtXJnUM\"", - "type": "application/json; charset=utf-8", - "length": "14", - "body": "{\"value\":null}" - } - }, - { - "name": "json-http-65", - "method": "GET", - "status": 200, - "value": { - "a": "<é>

", - "z": 42 - }, - "preset": "\"custom\"", - "match": "W/\"custom\"", - "expected": { - "status": 304, - "etag": "\"custom\"", - "type": "", - "length": "", - "body": "" - } - } -] diff --git a/backend/internal/server/testdata/legacy-source-paths.json b/backend/internal/server/testdata/legacy-source-paths.json deleted file mode 100644 index e291bcd..0000000 --- a/backend/internal/server/testdata/legacy-source-paths.json +++ /dev/null @@ -1,178 +0,0 @@ -[ - { - "record": {}, - "commit": "opaque:<>&
", - "revision": "blob:one", - "path": "nested/Alice.txt", - "expected": "__content/fb916ece96f3bc33d28795d2ddc4b3049c391f0a3e1c8b2b98164c83757fd223/aa29b46789634776312739145cb01baee8ea8feec2478c24c45d31f754d15247/nested/Alice.txt" - }, - { - "record": { - "contentCacheRevision": null - }, - "commit": "opaque:<>&
", - "revision": "blob:one", - "path": "nested/Alice.txt", - "expected": "__content/fb916ece96f3bc33d28795d2ddc4b3049c391f0a3e1c8b2b98164c83757fd223/aa29b46789634776312739145cb01baee8ea8feec2478c24c45d31f754d15247/nested/Alice.txt" - }, - { - "record": { - "contentCacheRevision": "revision:two" - }, - "commit": "opaque:<>&
", - "revision": "blob:one", - "path": "nested/Alice.txt", - "expected": "__content/fb916ece96f3bc33d28795d2ddc4b3049c391f0a3e1c8b2b98164c83757fd223/9258257db9f073ef6b9c9f1269b0fd655ffe91e66bd4fea12513bf13b3d99e8e/nested/Alice.txt" - }, - { - "record": { - "anonymizeDate": "2026-01-02T03:04:05.006Z" - }, - "commit": "opaque:<>&
", - "revision": "blob:one", - "path": "nested/Alice.txt", - "expected": "__content/8b87f867180bbecf2e1931d15df39a5b9a28188f0708a4f04e84d41f2559124e/95a94ce3b5c306fa98d679230565556733ee44773c8c9cfdcb66787a038389f1/nested/Alice.txt" - }, - { - "record": { - "anonymizeDate": "2026-01-02T03:04:05.006Z", - "contentCacheRevision": null - }, - "commit": "opaque:<>&
", - "revision": "blob:one", - "path": "nested/Alice.txt", - "expected": "__content/8b87f867180bbecf2e1931d15df39a5b9a28188f0708a4f04e84d41f2559124e/95a94ce3b5c306fa98d679230565556733ee44773c8c9cfdcb66787a038389f1/nested/Alice.txt" - }, - { - "record": { - "anonymizeDate": "2026-01-02T03:04:05.006Z", - "contentCacheRevision": "revision:two" - }, - "commit": "opaque:<>&
", - "revision": "blob:one", - "path": "nested/Alice.txt", - "expected": "__content/8b87f867180bbecf2e1931d15df39a5b9a28188f0708a4f04e84d41f2559124e/b33fc5c8d1c2f2bd48cada3b1011a2497b1202e231c38c3d2a23b200bded417a/nested/Alice.txt" - }, - { - "record": { - "treeGeneration": "generation:one" - }, - "commit": "opaque:<>&
", - "revision": "blob:one", - "path": "nested/Alice.txt", - "expected": "__content/794d8ad90714945ecd4adef0ba987cc4569d7403ab1506ce28e84c95aab87b5a/52dd79bc9244b04a15ef5cb0685f6070be00d8b17b571eeb711f4bb5ebd5dc77/nested/Alice.txt" - }, - { - "record": { - "treeGeneration": "generation:one", - "contentCacheRevision": null - }, - "commit": "opaque:<>&
", - "revision": "blob:one", - "path": "nested/Alice.txt", - "expected": "__content/794d8ad90714945ecd4adef0ba987cc4569d7403ab1506ce28e84c95aab87b5a/52dd79bc9244b04a15ef5cb0685f6070be00d8b17b571eeb711f4bb5ebd5dc77/nested/Alice.txt" - }, - { - "record": { - "treeGeneration": "generation:one", - "contentCacheRevision": "revision:two" - }, - "commit": "opaque:<>&
", - "revision": "blob:one", - "path": "nested/Alice.txt", - "expected": "__content/794d8ad90714945ecd4adef0ba987cc4569d7403ab1506ce28e84c95aab87b5a/a34016c2402b1ab4f94d1b96544c392236ab76121d09521246328aa1f4f8a7b4/nested/Alice.txt" - }, - { - "record": { - "treeGeneration": "generation:one", - "anonymizeDate": "2026-01-02T03:04:05.006Z" - }, - "commit": "opaque:<>&
", - "revision": "blob:one", - "path": "nested/Alice.txt", - "expected": "__content/7cab1dee2df6efa0dc627cfe28eb1ebcdc7c02ee6b5e527a93cc852f202be9e6/5b4286ddcd827d439249a4c4a5ad1d7c92090dd84104c5892ca44aba7c6dac00/nested/Alice.txt" - }, - { - "record": { - "treeGeneration": "generation:one", - "anonymizeDate": "2026-01-02T03:04:05.006Z", - "contentCacheRevision": null - }, - "commit": "opaque:<>&
", - "revision": "blob:one", - "path": "nested/Alice.txt", - "expected": "__content/7cab1dee2df6efa0dc627cfe28eb1ebcdc7c02ee6b5e527a93cc852f202be9e6/5b4286ddcd827d439249a4c4a5ad1d7c92090dd84104c5892ca44aba7c6dac00/nested/Alice.txt" - }, - { - "record": { - "treeGeneration": "generation:one", - "anonymizeDate": "2026-01-02T03:04:05.006Z", - "contentCacheRevision": "revision:two" - }, - "commit": "opaque:<>&
", - "revision": "blob:one", - "path": "nested/Alice.txt", - "expected": "__content/7cab1dee2df6efa0dc627cfe28eb1ebcdc7c02ee6b5e527a93cc852f202be9e6/96fe544cbae56481f927c8b75e95a44e276c741345b059634702e72eb696ecad/nested/Alice.txt" - }, - { - "record": { - "treeGeneration": "<>&
\\u2028" - }, - "commit": "opaque:<>&
", - "revision": "blob:one", - "path": "nested/Alice.txt", - "expected": "__content/b1cb4810318ecdb8e0ebc1a9b2350711f4988f7eea7b86b119cdac05c5ff60de/85b6b3426a4a3cbf25432016ec5eb0a19648b473ab34e7a6930e57f523f95563/nested/Alice.txt" - }, - { - "record": { - "treeGeneration": "<>&
\\u2028", - "contentCacheRevision": null - }, - "commit": "opaque:<>&
", - "revision": "blob:one", - "path": "nested/Alice.txt", - "expected": "__content/b1cb4810318ecdb8e0ebc1a9b2350711f4988f7eea7b86b119cdac05c5ff60de/85b6b3426a4a3cbf25432016ec5eb0a19648b473ab34e7a6930e57f523f95563/nested/Alice.txt" - }, - { - "record": { - "treeGeneration": "<>&
\\u2028", - "contentCacheRevision": "revision:two" - }, - "commit": "opaque:<>&
", - "revision": "blob:one", - "path": "nested/Alice.txt", - "expected": "__content/b1cb4810318ecdb8e0ebc1a9b2350711f4988f7eea7b86b119cdac05c5ff60de/5ca4526fb45b59789aa75e0641fc6208f2a7dc5928e443fc20526e15acdd17ed/nested/Alice.txt" - }, - { - "record": { - "treeGeneration": "<>&
\\u2028", - "anonymizeDate": "2026-01-02T03:04:05.006Z" - }, - "commit": "opaque:<>&
", - "revision": "blob:one", - "path": "nested/Alice.txt", - "expected": "__content/d293ed507afa2ef82047ea9a7056ed74a4db35dc88cac4f7b8b0f14eef82d57c/7caa5508e30f6d17a15d375429ac722700f472ca1d7932442c419ebe138904fa/nested/Alice.txt" - }, - { - "record": { - "treeGeneration": "<>&
\\u2028", - "anonymizeDate": "2026-01-02T03:04:05.006Z", - "contentCacheRevision": null - }, - "commit": "opaque:<>&
", - "revision": "blob:one", - "path": "nested/Alice.txt", - "expected": "__content/d293ed507afa2ef82047ea9a7056ed74a4db35dc88cac4f7b8b0f14eef82d57c/7caa5508e30f6d17a15d375429ac722700f472ca1d7932442c419ebe138904fa/nested/Alice.txt" - }, - { - "record": { - "treeGeneration": "<>&
\\u2028", - "anonymizeDate": "2026-01-02T03:04:05.006Z", - "contentCacheRevision": "revision:two" - }, - "commit": "opaque:<>&
", - "revision": "blob:one", - "path": "nested/Alice.txt", - "expected": "__content/d293ed507afa2ef82047ea9a7056ed74a4db35dc88cac4f7b8b0f14eef82d57c/0faa590620eeec180ec4adae01ef2a86f5f93c178ee6abc5ca1e1c9d925723c6/nested/Alice.txt" - } -] diff --git a/backend/internal/server/testdata/monitoring-query.json b/backend/internal/server/testdata/monitoring-query.json deleted file mode 100644 index ca5577d..0000000 --- a/backend/internal/server/testdata/monitoring-query.json +++ /dev/null @@ -1,176 +0,0 @@ -[ - { - "query": "", - "performance": 15, - "cache": 60 - }, - { - "query": "minutes=", - "performance": 15, - "cache": 60 - }, - { - "query": "minutes=60", - "performance": 60, - "cache": 60 - }, - { - "query": "minutes=%2060%20", - "performance": 60, - "cache": 60 - }, - { - "query": "minutes=060", - "performance": 60, - "cache": 60 - }, - { - "query": "minutes=60.0", - "performance": 60, - "cache": 60 - }, - { - "query": "minutes=6e1", - "performance": 60, - "cache": 60 - }, - { - "query": "minutes=0x3c", - "performance": 60, - "cache": 60 - }, - { - "query": "minutes=0b111100", - "performance": 60, - "cache": 60 - }, - { - "query": "minutes=0o74", - "performance": 60, - "cache": 60 - }, - { - "query": "minutes=15", - "performance": 15, - "cache": 15 - }, - { - "query": "minutes=1440", - "performance": 15, - "cache": 1440 - }, - { - "query": "minutes=10080", - "performance": 15, - "cache": 10080 - }, - { - "query": "minutes=NaN", - "performance": 15, - "cache": 60 - }, - { - "query": "minutes=Infinity", - "performance": 15, - "cache": 60 - }, - { - "query": "minutes=-Infinity", - "performance": 15, - "cache": 60 - }, - { - "query": "minutes=%2B60", - "performance": 60, - "cache": 60 - }, - { - "query": "minutes=-60", - "performance": 15, - "cache": 60 - }, - { - "query": "minutes=60x", - "performance": 15, - "cache": 60 - }, - { - "query": "minutes=0x3c_", - "performance": 15, - "cache": 60 - }, - { - "query": "minutes=0xffffffffffffffffffff", - "performance": 15, - "cache": 60 - }, - { - "query": "minutes=%EF%BB%BF60", - "performance": 60, - "cache": 60 - }, - { - "query": "minutes=%C2%8560", - "performance": 15, - "cache": 60 - }, - { - "query": "minutes[]=60", - "performance": 60, - "cache": 60 - }, - { - "query": "minutes[0]=60", - "performance": 60, - "cache": 60 - }, - { - "query": "minutes[1]=60", - "performance": 60, - "cache": 60 - }, - { - "query": "minutes[]=60&minutes[]=15", - "performance": 15, - "cache": 60 - }, - { - "query": "minutes[0][]=60", - "performance": 60, - "cache": 60 - }, - { - "query": "minutes[x]=60", - "performance": 15, - "cache": 60 - }, - { - "query": "minutes[toString]=60", - "error": true - }, - { - "query": "minutes[]=", - "performance": 15, - "cache": 60 - }, - { - "query": "minutes=60&minutes[]=15", - "performance": 15, - "cache": 60 - }, - { - "query": "minutes[20]=60", - "performance": 15, - "cache": 60 - }, - { - "query": "minutes=60%FF", - "performance": 15, - "cache": 60 - }, - { - "query": "minutes=60%zz", - "performance": 15, - "cache": 60 - } -] diff --git a/backend/internal/server/testdata/oauth-profile.json b/backend/internal/server/testdata/oauth-profile.json deleted file mode 100644 index 614e6ed..0000000 --- a/backend/internal/server/testdata/oauth-profile.json +++ /dev/null @@ -1,226 +0,0 @@ -[ - { - "name": "id-0", - "profile": { - "login": "synthetic-login" - }, - "rejected": true - }, - { - "name": "id-1", - "profile": { - "login": "synthetic-login", - "id": null - }, - "rejected": true - }, - { - "name": "id-2", - "profile": { - "login": "synthetic-login", - "id": false - }, - "rejected": true - }, - { - "name": "id-3", - "profile": { - "login": "synthetic-login", - "id": true - }, - "rejected": true - }, - { - "name": "id-4", - "profile": { - "login": "synthetic-login", - "id": "42" - }, - "rejected": true - }, - { - "name": "id-5", - "profile": { - "login": "synthetic-login", - "id": "" - }, - "rejected": true - }, - { - "name": "id-6", - "profile": { - "login": "synthetic-login", - "id": [] - }, - "rejected": true - }, - { - "name": "id-7", - "profile": { - "login": "synthetic-login", - "id": {} - }, - "rejected": true - }, - { - "name": "id-8", - "profile": { - "login": "synthetic-login", - "id": 0 - }, - "rejected": false - }, - { - "name": "id-9", - "profile": { - "login": "synthetic-login", - "id": -1 - }, - "rejected": false - }, - { - "name": "id-10", - "profile": { - "login": "synthetic-login", - "id": 1 - }, - "rejected": false - }, - { - "name": "id-11", - "profile": { - "login": "synthetic-login", - "id": 1.5 - }, - "rejected": true - }, - { - "name": "id-12", - "profile": { - "login": "synthetic-login", - "id": -1.5 - }, - "rejected": true - }, - { - "name": "id-13", - "profile": { - "login": "synthetic-login", - "id": 9007199254740991 - }, - "rejected": false - }, - { - "name": "id-14", - "profile": { - "login": "synthetic-login", - "id": -9007199254740991 - }, - "rejected": false - }, - { - "name": "id-15", - "profile": { - "login": "synthetic-login", - "id": 9007199254740992 - }, - "rejected": true - }, - { - "name": "id-16", - "profile": { - "login": "synthetic-login", - "id": 1e+30 - }, - "rejected": true - }, - { - "name": "login-17", - "profile": { - "id": 42 - }, - "rejected": true - }, - { - "name": "login-18", - "profile": { - "id": 42, - "login": null - }, - "rejected": true - }, - { - "name": "login-19", - "profile": { - "id": 42, - "login": false - }, - "rejected": true - }, - { - "name": "login-20", - "profile": { - "id": 42, - "login": true - }, - "rejected": false - }, - { - "name": "login-21", - "profile": { - "id": 42, - "login": 0 - }, - "rejected": true - }, - { - "name": "login-22", - "profile": { - "id": 42, - "login": 1 - }, - "rejected": false - }, - { - "name": "login-23", - "profile": { - "id": 42, - "login": "" - }, - "rejected": true - }, - { - "name": "login-24", - "profile": { - "id": 42, - "login": "valid-login" - }, - "rejected": false - }, - { - "name": "login-25", - "profile": { - "id": 42, - "login": [] - }, - "rejected": false - }, - { - "name": "login-26", - "profile": { - "id": 42, - "login": {} - }, - "rejected": false - }, - { - "name": "login-27", - "profile": { - "id": 42, - "login": [ - "login" - ] - }, - "rejected": false - } -] diff --git a/backend/internal/server/testdata/oauth-tokens.json b/backend/internal/server/testdata/oauth-tokens.json deleted file mode 100644 index d889415..0000000 --- a/backend/internal/server/testdata/oauth-tokens.json +++ /dev/null @@ -1,458 +0,0 @@ -[ - { - "name": "valid", - "tokens": { - "access_token": "synthetic-access", - "refresh_token": "synthetic-refresh", - "expires_in": 3600, - "refresh_token_expires_in": 7200 - }, - "status": 200, - "expected": null - }, - { - "name": "fractional", - "tokens": { - "access_token": "synthetic-access", - "refresh_token": "synthetic-refresh", - "expires_in": 0.25, - "refresh_token_expires_in": 7200 - }, - "status": 200, - "expected": null - }, - { - "name": "access_token/\"\"", - "tokens": { - "access_token": "", - "refresh_token": "synthetic-refresh", - "expires_in": 3600, - "refresh_token_expires_in": 7200 - }, - "status": 200, - "expected": { - "code": "github_app_reconnect_required", - "status": 401 - } - }, - { - "name": "access_token/null", - "tokens": { - "access_token": null, - "refresh_token": "synthetic-refresh", - "expires_in": 3600, - "refresh_token_expires_in": 7200 - }, - "status": 200, - "expected": { - "code": "github_app_reconnect_required", - "status": 401 - } - }, - { - "name": "access_token/1", - "tokens": { - "access_token": 1, - "refresh_token": "synthetic-refresh", - "expires_in": 3600, - "refresh_token_expires_in": 7200 - }, - "status": 200, - "expected": { - "code": "github_app_reconnect_required", - "status": 401 - } - }, - { - "name": "access_token/true", - "tokens": { - "access_token": true, - "refresh_token": "synthetic-refresh", - "expires_in": 3600, - "refresh_token_expires_in": 7200 - }, - "status": 200, - "expected": { - "code": "github_app_reconnect_required", - "status": 401 - } - }, - { - "name": "access_token/[]", - "tokens": { - "access_token": [], - "refresh_token": "synthetic-refresh", - "expires_in": 3600, - "refresh_token_expires_in": 7200 - }, - "status": 200, - "expected": { - "code": "github_app_reconnect_required", - "status": 401 - } - }, - { - "name": "access_token/{}", - "tokens": { - "access_token": {}, - "refresh_token": "synthetic-refresh", - "expires_in": 3600, - "refresh_token_expires_in": 7200 - }, - "status": 200, - "expected": { - "code": "github_app_reconnect_required", - "status": 401 - } - }, - { - "name": "refresh_token/\"\"", - "tokens": { - "access_token": "synthetic-access", - "refresh_token": "", - "expires_in": 3600, - "refresh_token_expires_in": 7200 - }, - "status": 200, - "expected": { - "code": "github_app_reconnect_required", - "status": 401 - } - }, - { - "name": "refresh_token/null", - "tokens": { - "access_token": "synthetic-access", - "refresh_token": null, - "expires_in": 3600, - "refresh_token_expires_in": 7200 - }, - "status": 200, - "expected": { - "code": "github_app_reconnect_required", - "status": 401 - } - }, - { - "name": "refresh_token/1", - "tokens": { - "access_token": "synthetic-access", - "refresh_token": 1, - "expires_in": 3600, - "refresh_token_expires_in": 7200 - }, - "status": 200, - "expected": { - "code": "github_app_reconnect_required", - "status": 401 - } - }, - { - "name": "refresh_token/true", - "tokens": { - "access_token": "synthetic-access", - "refresh_token": true, - "expires_in": 3600, - "refresh_token_expires_in": 7200 - }, - "status": 200, - "expected": { - "code": "github_app_reconnect_required", - "status": 401 - } - }, - { - "name": "refresh_token/[]", - "tokens": { - "access_token": "synthetic-access", - "refresh_token": [], - "expires_in": 3600, - "refresh_token_expires_in": 7200 - }, - "status": 200, - "expected": { - "code": "github_app_reconnect_required", - "status": 401 - } - }, - { - "name": "refresh_token/{}", - "tokens": { - "access_token": "synthetic-access", - "refresh_token": {}, - "expires_in": 3600, - "refresh_token_expires_in": 7200 - }, - "status": 200, - "expected": { - "code": "github_app_reconnect_required", - "status": 401 - } - }, - { - "name": "expires_in/null", - "tokens": { - "access_token": "synthetic-access", - "refresh_token": "synthetic-refresh", - "expires_in": null, - "refresh_token_expires_in": 7200 - }, - "status": 200, - "expected": { - "code": "github_app_reconnect_required", - "status": 401 - } - }, - { - "name": "expires_in/0", - "tokens": { - "access_token": "synthetic-access", - "refresh_token": "synthetic-refresh", - "expires_in": 0, - "refresh_token_expires_in": 7200 - }, - "status": 200, - "expected": { - "code": "github_app_reconnect_required", - "status": 401 - } - }, - { - "name": "expires_in/-1", - "tokens": { - "access_token": "synthetic-access", - "refresh_token": "synthetic-refresh", - "expires_in": -1, - "refresh_token_expires_in": 7200 - }, - "status": 200, - "expected": { - "code": "github_app_reconnect_required", - "status": 401 - } - }, - { - "name": "expires_in/\"3600\"", - "tokens": { - "access_token": "synthetic-access", - "refresh_token": "synthetic-refresh", - "expires_in": "3600", - "refresh_token_expires_in": 7200 - }, - "status": 200, - "expected": { - "code": "github_app_reconnect_required", - "status": 401 - } - }, - { - "name": "expires_in/true", - "tokens": { - "access_token": "synthetic-access", - "refresh_token": "synthetic-refresh", - "expires_in": true, - "refresh_token_expires_in": 7200 - }, - "status": 200, - "expected": { - "code": "github_app_reconnect_required", - "status": 401 - } - }, - { - "name": "expires_in/[]", - "tokens": { - "access_token": "synthetic-access", - "refresh_token": "synthetic-refresh", - "expires_in": [], - "refresh_token_expires_in": 7200 - }, - "status": 200, - "expected": { - "code": "github_app_reconnect_required", - "status": 401 - } - }, - { - "name": "expires_in/{}", - "tokens": { - "access_token": "synthetic-access", - "refresh_token": "synthetic-refresh", - "expires_in": {}, - "refresh_token_expires_in": 7200 - }, - "status": 200, - "expected": { - "code": "github_app_reconnect_required", - "status": 401 - } - }, - { - "name": "refresh_token_expires_in/null", - "tokens": { - "access_token": "synthetic-access", - "refresh_token": "synthetic-refresh", - "expires_in": 3600, - "refresh_token_expires_in": null - }, - "status": 200, - "expected": { - "code": "github_app_reconnect_required", - "status": 401 - } - }, - { - "name": "refresh_token_expires_in/0", - "tokens": { - "access_token": "synthetic-access", - "refresh_token": "synthetic-refresh", - "expires_in": 3600, - "refresh_token_expires_in": 0 - }, - "status": 200, - "expected": { - "code": "github_app_reconnect_required", - "status": 401 - } - }, - { - "name": "refresh_token_expires_in/-1", - "tokens": { - "access_token": "synthetic-access", - "refresh_token": "synthetic-refresh", - "expires_in": 3600, - "refresh_token_expires_in": -1 - }, - "status": 200, - "expected": { - "code": "github_app_reconnect_required", - "status": 401 - } - }, - { - "name": "refresh_token_expires_in/\"3600\"", - "tokens": { - "access_token": "synthetic-access", - "refresh_token": "synthetic-refresh", - "expires_in": 3600, - "refresh_token_expires_in": "3600" - }, - "status": 200, - "expected": { - "code": "github_app_reconnect_required", - "status": 401 - } - }, - { - "name": "refresh_token_expires_in/true", - "tokens": { - "access_token": "synthetic-access", - "refresh_token": "synthetic-refresh", - "expires_in": 3600, - "refresh_token_expires_in": true - }, - "status": 200, - "expected": { - "code": "github_app_reconnect_required", - "status": 401 - } - }, - { - "name": "refresh_token_expires_in/[]", - "tokens": { - "access_token": "synthetic-access", - "refresh_token": "synthetic-refresh", - "expires_in": 3600, - "refresh_token_expires_in": [] - }, - "status": 200, - "expected": { - "code": "github_app_reconnect_required", - "status": 401 - } - }, - { - "name": "refresh_token_expires_in/{}", - "tokens": { - "access_token": "synthetic-access", - "refresh_token": "synthetic-refresh", - "expires_in": 3600, - "refresh_token_expires_in": {} - }, - "status": 200, - "expected": { - "code": "github_app_reconnect_required", - "status": 401 - } - }, - { - "name": "http/400", - "tokens": { - "access_token": "synthetic-access", - "refresh_token": "synthetic-refresh", - "expires_in": 3600, - "refresh_token_expires_in": 7200 - }, - "status": 400, - "expected": { - "code": "github_app_reconnect_required", - "status": 401 - } - }, - { - "name": "http/401", - "tokens": { - "access_token": "synthetic-access", - "refresh_token": "synthetic-refresh", - "expires_in": 3600, - "refresh_token_expires_in": 7200 - }, - "status": 401, - "expected": { - "code": "github_app_reconnect_required", - "status": 401 - } - }, - { - "name": "http/403", - "tokens": { - "access_token": "synthetic-access", - "refresh_token": "synthetic-refresh", - "expires_in": 3600, - "refresh_token_expires_in": 7200 - }, - "status": 403, - "expected": { - "code": "github_app_reconnect_required", - "status": 401 - } - }, - { - "name": "http/429", - "tokens": { - "access_token": "synthetic-access", - "refresh_token": "synthetic-refresh", - "expires_in": 3600, - "refresh_token_expires_in": 7200 - }, - "status": 429, - "expected": { - "code": "github_rate_limit_exceeded", - "status": 429 - } - }, - { - "name": "http/500", - "tokens": { - "access_token": "synthetic-access", - "refresh_token": "synthetic-refresh", - "expires_in": 3600, - "refresh_token_expires_in": 7200 - }, - "status": 500, - "expected": { - "code": "github_unavailable", - "status": 502 - } - } -] diff --git a/backend/internal/server/testdata/options.json b/backend/internal/server/testdata/options.json deleted file mode 100644 index d0768a6..0000000 --- a/backend/internal/server/testdata/options.json +++ /dev/null @@ -1,3816 +0,0 @@ -[ - { - "name": "repo/empty", - "kind": "repo", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": {} - }, - "expected": { - "terms": [ - "Alice", - "" - ] - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "repo/scalar-terms-0", - "kind": "repo", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - 1, - true, - false, - -42, - 0 - ], - "options": {} - }, - "expected": { - "terms": [ - "1", - "true", - "false", - "-42", - "0" - ] - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "Alice XXXX-5 XXXX-XXXX-1 XXXX-4 XXXX-2 XXXX-3 XXXX-5.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "repo/scalar-terms-1", - "kind": "repo", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - 0.000001, - 1e-7, - 100000000000000000000, - 1e+21 - ], - "options": {} - }, - "expected": { - "terms": [ - "0.000001", - "1e-7", - "100000000000000000000", - "1e+21" - ] - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "Alice 0 1 -42 true false XXXX-1 XXXX-2 XXXX-3 1e+21 keep" - }, - { - "name": "repo/scalar-terms-2", - "kind": "repo", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "", - false, - "Alice" - ], - "options": {} - }, - "expected": { - "terms": [ - "", - "false", - "Alice" - ] - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-3 0 1 -42 true XXXX-2 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "repo/scalar-terms-3", - "kind": "repo", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - 0, - 1.25, - 9007199254740992 - ], - "options": {} - }, - "expected": { - "terms": [ - "0", - "1.25", - "9007199254740992" - ] - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "Alice XXXX-1 1 -42 true false XXXX-1.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "repo/all-true", - "kind": "repo", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "update": true, - "image": true, - "pdf": true, - "notebook": true, - "link": true, - "page": true, - "title": true, - "body": true, - "comments": true, - "content": true, - "origin": true, - "username": true, - "date": true, - "diff": true, - "unknown": true, - "expirationMode": "never", - "pageSource": { - "branch": "docs", - "path": "/site", - "private": "discard" - } - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "expirationMode": "never", - "update": true, - "image": true, - "pdf": true, - "notebook": true, - "link": true, - "page": true, - "pageSource": { - "branch": "docs", - "path": "/site" - } - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "repo/all-false", - "kind": "repo", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "update": false, - "image": false, - "pdf": false, - "notebook": false, - "link": false, - "page": false, - "title": false, - "body": false, - "comments": false, - "content": false, - "origin": false, - "username": false, - "date": false, - "diff": false, - "unknown": false, - "expirationMode": "never", - "pageSource": { - "branch": "docs", - "path": "/site", - "private": "discard" - } - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "expirationMode": "never", - "update": false, - "image": false, - "pdf": false, - "notebook": false, - "link": false, - "page": false, - "pageSource": { - "branch": "docs", - "path": "/site" - } - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "repo/boolean-coercion-null", - "kind": "repo", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "update": null, - "image": null, - "pdf": null, - "notebook": null, - "link": null, - "page": null, - "title": null, - "body": null, - "comments": null, - "content": null, - "origin": null, - "username": null, - "date": null, - "diff": null - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "update": null, - "image": null, - "pdf": null, - "notebook": null, - "link": null, - "page": null - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "repo/boolean-coercion-0", - "kind": "repo", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "update": 0, - "image": 0, - "pdf": 0, - "notebook": 0, - "link": 0, - "page": 0, - "title": 0, - "body": 0, - "comments": 0, - "content": 0, - "origin": 0, - "username": 0, - "date": 0, - "diff": 0 - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "update": false, - "image": false, - "pdf": false, - "notebook": false, - "link": false, - "page": false - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "repo/boolean-coercion-1", - "kind": "repo", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "update": 1, - "image": 1, - "pdf": 1, - "notebook": 1, - "link": 1, - "page": 1, - "title": 1, - "body": 1, - "comments": 1, - "content": 1, - "origin": 1, - "username": 1, - "date": 1, - "diff": 1 - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "update": true, - "image": true, - "pdf": true, - "notebook": true, - "link": true, - "page": true - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "repo/boolean-coercion-\"0\"", - "kind": "repo", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "update": "0", - "image": "0", - "pdf": "0", - "notebook": "0", - "link": "0", - "page": "0", - "title": "0", - "body": "0", - "comments": "0", - "content": "0", - "origin": "0", - "username": "0", - "date": "0", - "diff": "0" - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "update": false, - "image": false, - "pdf": false, - "notebook": false, - "link": false, - "page": false - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "repo/boolean-coercion-\"1\"", - "kind": "repo", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "update": "1", - "image": "1", - "pdf": "1", - "notebook": "1", - "link": "1", - "page": "1", - "title": "1", - "body": "1", - "comments": "1", - "content": "1", - "origin": "1", - "username": "1", - "date": "1", - "diff": "1" - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "update": true, - "image": true, - "pdf": true, - "notebook": true, - "link": true, - "page": true - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "repo/boolean-coercion-\"true\"", - "kind": "repo", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "update": "true", - "image": "true", - "pdf": "true", - "notebook": "true", - "link": "true", - "page": "true", - "title": "true", - "body": "true", - "comments": "true", - "content": "true", - "origin": "true", - "username": "true", - "date": "true", - "diff": "true" - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "update": true, - "image": true, - "pdf": true, - "notebook": true, - "link": true, - "page": true - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "repo/boolean-coercion-\"false\"", - "kind": "repo", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "update": "false", - "image": "false", - "pdf": "false", - "notebook": "false", - "link": "false", - "page": "false", - "title": "false", - "body": "false", - "comments": "false", - "content": "false", - "origin": "false", - "username": "false", - "date": "false", - "diff": "false" - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "update": false, - "image": false, - "pdf": false, - "notebook": false, - "link": false, - "page": false - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "repo/boolean-coercion-\"yes\"", - "kind": "repo", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "update": "yes", - "image": "yes", - "pdf": "yes", - "notebook": "yes", - "link": "yes", - "page": "yes", - "title": "yes", - "body": "yes", - "comments": "yes", - "content": "yes", - "origin": "yes", - "username": "yes", - "date": "yes", - "diff": "yes" - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "update": true, - "image": true, - "pdf": true, - "notebook": true, - "link": true, - "page": true - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "repo/boolean-coercion-\"no\"", - "kind": "repo", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "update": "no", - "image": "no", - "pdf": "no", - "notebook": "no", - "link": "no", - "page": "no", - "title": "no", - "body": "no", - "comments": "no", - "content": "no", - "origin": "no", - "username": "no", - "date": "no", - "diff": "no" - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "update": false, - "image": false, - "pdf": false, - "notebook": false, - "link": false, - "page": false - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "repo/expiration-null", - "kind": "repo", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "expirationDate": null - } - }, - "expected": { - "terms": [ - "Alice", - "" - ] - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "repo/expiration-", - "kind": "repo", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "expirationDate": "" - } - }, - "expected": { - "terms": [ - "Alice", - "" - ] - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "repo/expiration-false", - "kind": "repo", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "expirationDate": false - } - }, - "expected": { - "terms": [ - "Alice", - "" - ] - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "repo/expiration-0", - "kind": "repo", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "expirationDate": 0 - } - }, - "expected": { - "terms": [ - "Alice", - "" - ] - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "repo/expiration-true", - "kind": "repo", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "expirationDate": true - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "expirationDate": "1970-01-01T00:00:00.001Z" - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "repo/expiration-1", - "kind": "repo", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "expirationDate": 1 - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "expirationDate": "1970-01-01T00:00:00.001Z" - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "repo/expiration--1.5", - "kind": "repo", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "expirationDate": -1.5 - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "expirationDate": "1969-12-31T23:59:59.999Z" - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "repo/expiration-1700000000123", - "kind": "repo", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "expirationDate": 1700000000123 - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "expirationDate": "2023-11-14T22:13:20.123Z" - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "repo/expiration-2026-06-01T12:30:00.000Z", - "kind": "repo", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "expirationDate": "2026-06-01T12:30:00.000Z" - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "expirationDate": "2026-06-01T12:30:00.000Z" - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "repo/expiration-0001-01-01", - "kind": "repo", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "expirationDate": "0001-01-01" - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "expirationDate": "0001-01-01T00:00:00.000Z" - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "repo/expiration-March 1 2026", - "kind": "repo", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "expirationDate": "March 1 2026" - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "expirationDate": "2026-03-01T00:00:00.000Z" - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "repo/expiration-2026-02-29", - "kind": "repo", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "expirationDate": "2026-02-29" - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "expirationDate": "2026-03-01T00:00:00.000Z" - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "repo/expiration-2026-02-28T24:00:00Z", - "kind": "repo", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "expirationDate": "2026-02-28T24:00:00Z" - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "expirationDate": "2026-03-01T00:00:00.000Z" - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "repo/expiration-2026,3,1", - "kind": "repo", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "expirationDate": [ - "2026", - "3", - "1" - ] - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "expirationDate": "2026-03-01T00:00:00.000Z" - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "repo/expiration-2026-03-01", - "kind": "repo", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "expirationDate": [ - "2026-03-01" - ] - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "expirationDate": "2026-03-01T00:00:00.000Z" - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "repo/expiration-2026-03-01T01:00:00+02:00", - "kind": "repo", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "expirationDate": "2026-03-01T01:00:00+02:00" - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "expirationDate": "2026-02-28T23:00:00.000Z" - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "repo/invalid-boolean-\"\"", - "kind": "repo", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice" - ], - "options": { - "image": "" - } - }, - "rejected": true - }, - { - "name": "repo/invalid-boolean-\"TRUE\"", - "kind": "repo", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice" - ], - "options": { - "image": "TRUE" - } - }, - "rejected": true - }, - { - "name": "repo/invalid-boolean-\"False\"", - "kind": "repo", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice" - ], - "options": { - "image": "False" - } - }, - "rejected": true - }, - { - "name": "repo/invalid-boolean-\" yes \"", - "kind": "repo", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice" - ], - "options": { - "image": " yes " - } - }, - "rejected": true - }, - { - "name": "repo/invalid-boolean-2", - "kind": "repo", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice" - ], - "options": { - "image": 2 - } - }, - "rejected": true - }, - { - "name": "repo/invalid-boolean--1", - "kind": "repo", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice" - ], - "options": { - "image": -1 - } - }, - "rejected": true - }, - { - "name": "repo/invalid-boolean-[]", - "kind": "repo", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice" - ], - "options": { - "image": [] - } - }, - "rejected": true - }, - { - "name": "repo/invalid-boolean-{}", - "kind": "repo", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice" - ], - "options": { - "image": {} - } - }, - "rejected": true - }, - { - "name": "repo/page-source", - "kind": "repo", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "pageSource": { - "branch": "docs", - "path": "/", - "arbitrary": "discard" - } - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "pageSource": { - "branch": "docs", - "path": "/" - } - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "repo/irrelevant-invalid-options", - "kind": "repo", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "diff": "invalid", - "content": 123 - } - }, - "expected": { - "terms": [ - "Alice", - "" - ] - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "gist/empty", - "kind": "gist", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": {} - }, - "expected": { - "terms": [ - "Alice", - "" - ] - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "gist/scalar-terms-0", - "kind": "gist", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - 1, - true, - false, - -42, - 0 - ], - "options": {} - }, - "expected": { - "terms": [ - "1", - "true", - "false", - "-42", - "0" - ] - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "Alice XXXX-5 XXXX-XXXX-1 XXXX-4 XXXX-2 XXXX-3 XXXX-5.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "gist/scalar-terms-1", - "kind": "gist", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - 0.000001, - 1e-7, - 100000000000000000000, - 1e+21 - ], - "options": {} - }, - "expected": { - "terms": [ - "0.000001", - "1e-7", - "100000000000000000000", - "1e+21" - ] - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "Alice 0 1 -42 true false XXXX-1 XXXX-2 XXXX-3 1e+21 keep" - }, - { - "name": "gist/scalar-terms-2", - "kind": "gist", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "", - false, - "Alice" - ], - "options": {} - }, - "expected": { - "terms": [ - "", - "false", - "Alice" - ] - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-3 0 1 -42 true XXXX-2 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "gist/scalar-terms-3", - "kind": "gist", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - 0, - 1.25, - 9007199254740992 - ], - "options": {} - }, - "expected": { - "terms": [ - "0", - "1.25", - "9007199254740992" - ] - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "Alice XXXX-1 1 -42 true false XXXX-1.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "gist/all-true", - "kind": "gist", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "update": true, - "image": true, - "pdf": true, - "notebook": true, - "link": true, - "page": true, - "title": true, - "body": true, - "comments": true, - "content": true, - "origin": true, - "username": true, - "date": true, - "diff": true, - "unknown": true, - "expirationMode": "never", - "pageSource": { - "branch": "docs", - "path": "/site", - "private": "discard" - } - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "expirationMode": "never", - "update": true, - "image": true, - "link": true, - "title": true, - "body": true, - "comments": true, - "content": true, - "origin": true, - "username": true, - "date": true - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "gist/all-false", - "kind": "gist", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "update": false, - "image": false, - "pdf": false, - "notebook": false, - "link": false, - "page": false, - "title": false, - "body": false, - "comments": false, - "content": false, - "origin": false, - "username": false, - "date": false, - "diff": false, - "unknown": false, - "expirationMode": "never", - "pageSource": { - "branch": "docs", - "path": "/site", - "private": "discard" - } - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "expirationMode": "never", - "update": false, - "image": false, - "link": false, - "title": false, - "body": false, - "comments": false, - "content": false, - "origin": false, - "username": false, - "date": false - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "gist/boolean-coercion-null", - "kind": "gist", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "update": null, - "image": null, - "pdf": null, - "notebook": null, - "link": null, - "page": null, - "title": null, - "body": null, - "comments": null, - "content": null, - "origin": null, - "username": null, - "date": null, - "diff": null - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "update": null, - "image": null, - "link": null, - "title": null, - "body": null, - "comments": null, - "content": null, - "origin": null, - "username": null, - "date": null - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "gist/boolean-coercion-0", - "kind": "gist", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "update": 0, - "image": 0, - "pdf": 0, - "notebook": 0, - "link": 0, - "page": 0, - "title": 0, - "body": 0, - "comments": 0, - "content": 0, - "origin": 0, - "username": 0, - "date": 0, - "diff": 0 - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "update": false, - "image": false, - "link": false, - "title": false, - "body": false, - "comments": false, - "content": false, - "origin": false, - "username": false, - "date": false - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "gist/boolean-coercion-1", - "kind": "gist", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "update": 1, - "image": 1, - "pdf": 1, - "notebook": 1, - "link": 1, - "page": 1, - "title": 1, - "body": 1, - "comments": 1, - "content": 1, - "origin": 1, - "username": 1, - "date": 1, - "diff": 1 - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "update": true, - "image": true, - "link": true, - "title": true, - "body": true, - "comments": true, - "content": true, - "origin": true, - "username": true, - "date": true - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "gist/boolean-coercion-\"0\"", - "kind": "gist", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "update": "0", - "image": "0", - "pdf": "0", - "notebook": "0", - "link": "0", - "page": "0", - "title": "0", - "body": "0", - "comments": "0", - "content": "0", - "origin": "0", - "username": "0", - "date": "0", - "diff": "0" - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "update": false, - "image": false, - "link": false, - "title": false, - "body": false, - "comments": false, - "content": false, - "origin": false, - "username": false, - "date": false - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "gist/boolean-coercion-\"1\"", - "kind": "gist", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "update": "1", - "image": "1", - "pdf": "1", - "notebook": "1", - "link": "1", - "page": "1", - "title": "1", - "body": "1", - "comments": "1", - "content": "1", - "origin": "1", - "username": "1", - "date": "1", - "diff": "1" - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "update": true, - "image": true, - "link": true, - "title": true, - "body": true, - "comments": true, - "content": true, - "origin": true, - "username": true, - "date": true - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "gist/boolean-coercion-\"true\"", - "kind": "gist", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "update": "true", - "image": "true", - "pdf": "true", - "notebook": "true", - "link": "true", - "page": "true", - "title": "true", - "body": "true", - "comments": "true", - "content": "true", - "origin": "true", - "username": "true", - "date": "true", - "diff": "true" - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "update": true, - "image": true, - "link": true, - "title": true, - "body": true, - "comments": true, - "content": true, - "origin": true, - "username": true, - "date": true - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "gist/boolean-coercion-\"false\"", - "kind": "gist", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "update": "false", - "image": "false", - "pdf": "false", - "notebook": "false", - "link": "false", - "page": "false", - "title": "false", - "body": "false", - "comments": "false", - "content": "false", - "origin": "false", - "username": "false", - "date": "false", - "diff": "false" - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "update": false, - "image": false, - "link": false, - "title": false, - "body": false, - "comments": false, - "content": false, - "origin": false, - "username": false, - "date": false - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "gist/boolean-coercion-\"yes\"", - "kind": "gist", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "update": "yes", - "image": "yes", - "pdf": "yes", - "notebook": "yes", - "link": "yes", - "page": "yes", - "title": "yes", - "body": "yes", - "comments": "yes", - "content": "yes", - "origin": "yes", - "username": "yes", - "date": "yes", - "diff": "yes" - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "update": true, - "image": true, - "link": true, - "title": true, - "body": true, - "comments": true, - "content": true, - "origin": true, - "username": true, - "date": true - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "gist/boolean-coercion-\"no\"", - "kind": "gist", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "update": "no", - "image": "no", - "pdf": "no", - "notebook": "no", - "link": "no", - "page": "no", - "title": "no", - "body": "no", - "comments": "no", - "content": "no", - "origin": "no", - "username": "no", - "date": "no", - "diff": "no" - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "update": false, - "image": false, - "link": false, - "title": false, - "body": false, - "comments": false, - "content": false, - "origin": false, - "username": false, - "date": false - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "gist/expiration-null", - "kind": "gist", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "expirationDate": null - } - }, - "expected": { - "terms": [ - "Alice", - "" - ] - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "gist/expiration-", - "kind": "gist", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "expirationDate": "" - } - }, - "expected": { - "terms": [ - "Alice", - "" - ] - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "gist/expiration-false", - "kind": "gist", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "expirationDate": false - } - }, - "expected": { - "terms": [ - "Alice", - "" - ] - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "gist/expiration-0", - "kind": "gist", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "expirationDate": 0 - } - }, - "expected": { - "terms": [ - "Alice", - "" - ] - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "gist/expiration-true", - "kind": "gist", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "expirationDate": true - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "expirationDate": "1970-01-01T00:00:00.001Z" - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "gist/expiration-1", - "kind": "gist", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "expirationDate": 1 - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "expirationDate": "1970-01-01T00:00:00.001Z" - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "gist/expiration--1.5", - "kind": "gist", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "expirationDate": -1.5 - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "expirationDate": "1969-12-31T23:59:59.999Z" - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "gist/expiration-1700000000123", - "kind": "gist", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "expirationDate": 1700000000123 - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "expirationDate": "2023-11-14T22:13:20.123Z" - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "gist/expiration-2026-06-01T12:30:00.000Z", - "kind": "gist", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "expirationDate": "2026-06-01T12:30:00.000Z" - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "expirationDate": "2026-06-01T12:30:00.000Z" - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "gist/expiration-0001-01-01", - "kind": "gist", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "expirationDate": "0001-01-01" - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "expirationDate": "0001-01-01T00:00:00.000Z" - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "gist/expiration-March 1 2026", - "kind": "gist", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "expirationDate": "March 1 2026" - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "expirationDate": "2026-03-01T00:00:00.000Z" - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "gist/expiration-2026-02-29", - "kind": "gist", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "expirationDate": "2026-02-29" - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "expirationDate": "2026-03-01T00:00:00.000Z" - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "gist/expiration-2026-02-28T24:00:00Z", - "kind": "gist", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "expirationDate": "2026-02-28T24:00:00Z" - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "expirationDate": "2026-03-01T00:00:00.000Z" - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "gist/expiration-2026,3,1", - "kind": "gist", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "expirationDate": [ - "2026", - "3", - "1" - ] - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "expirationDate": "2026-03-01T00:00:00.000Z" - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "gist/expiration-2026-03-01", - "kind": "gist", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "expirationDate": [ - "2026-03-01" - ] - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "expirationDate": "2026-03-01T00:00:00.000Z" - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "gist/expiration-2026-03-01T01:00:00+02:00", - "kind": "gist", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "expirationDate": "2026-03-01T01:00:00+02:00" - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "expirationDate": "2026-02-28T23:00:00.000Z" - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "gist/invalid-boolean-\"\"", - "kind": "gist", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice" - ], - "options": { - "image": "" - } - }, - "rejected": true - }, - { - "name": "gist/invalid-boolean-\"TRUE\"", - "kind": "gist", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice" - ], - "options": { - "image": "TRUE" - } - }, - "rejected": true - }, - { - "name": "gist/invalid-boolean-\"False\"", - "kind": "gist", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice" - ], - "options": { - "image": "False" - } - }, - "rejected": true - }, - { - "name": "gist/invalid-boolean-\" yes \"", - "kind": "gist", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice" - ], - "options": { - "image": " yes " - } - }, - "rejected": true - }, - { - "name": "gist/invalid-boolean-2", - "kind": "gist", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice" - ], - "options": { - "image": 2 - } - }, - "rejected": true - }, - { - "name": "gist/invalid-boolean--1", - "kind": "gist", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice" - ], - "options": { - "image": -1 - } - }, - "rejected": true - }, - { - "name": "gist/invalid-boolean-[]", - "kind": "gist", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice" - ], - "options": { - "image": [] - } - }, - "rejected": true - }, - { - "name": "gist/invalid-boolean-{}", - "kind": "gist", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice" - ], - "options": { - "image": {} - } - }, - "rejected": true - }, - { - "name": "gist/page-source", - "kind": "gist", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "pageSource": { - "branch": "docs", - "path": "/", - "arbitrary": "discard" - } - } - }, - "expected": { - "terms": [ - "Alice", - "" - ] - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "gist/irrelevant-invalid-options", - "kind": "gist", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "page": "invalid", - "pdf": 123 - } - }, - "expected": { - "terms": [ - "Alice", - "" - ] - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "pr/empty", - "kind": "pr", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": {} - }, - "expected": { - "terms": [ - "Alice", - "" - ] - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "pr/scalar-terms-0", - "kind": "pr", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - 1, - true, - false, - -42, - 0 - ], - "options": {} - }, - "expected": { - "terms": [ - "1", - "true", - "false", - "-42", - "0" - ] - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "Alice XXXX-5 XXXX-XXXX-1 XXXX-4 XXXX-2 XXXX-3 XXXX-5.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "pr/scalar-terms-1", - "kind": "pr", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - 0.000001, - 1e-7, - 100000000000000000000, - 1e+21 - ], - "options": {} - }, - "expected": { - "terms": [ - "0.000001", - "1e-7", - "100000000000000000000", - "1e+21" - ] - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "Alice 0 1 -42 true false XXXX-1 XXXX-2 XXXX-3 1e+21 keep" - }, - { - "name": "pr/scalar-terms-2", - "kind": "pr", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "", - false, - "Alice" - ], - "options": {} - }, - "expected": { - "terms": [ - "", - "false", - "Alice" - ] - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-3 0 1 -42 true XXXX-2 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "pr/scalar-terms-3", - "kind": "pr", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - 0, - 1.25, - 9007199254740992 - ], - "options": {} - }, - "expected": { - "terms": [ - "0", - "1.25", - "9007199254740992" - ] - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "Alice XXXX-1 1 -42 true false XXXX-1.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "pr/all-true", - "kind": "pr", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "update": true, - "image": true, - "pdf": true, - "notebook": true, - "link": true, - "page": true, - "title": true, - "body": true, - "comments": true, - "content": true, - "origin": true, - "username": true, - "date": true, - "diff": true, - "unknown": true, - "expirationMode": "never", - "pageSource": { - "branch": "docs", - "path": "/site", - "private": "discard" - } - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "expirationMode": "never", - "update": true, - "image": true, - "link": true, - "title": true, - "body": true, - "comments": true, - "diff": true, - "origin": true, - "username": true, - "date": true - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "pr/all-false", - "kind": "pr", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "update": false, - "image": false, - "pdf": false, - "notebook": false, - "link": false, - "page": false, - "title": false, - "body": false, - "comments": false, - "content": false, - "origin": false, - "username": false, - "date": false, - "diff": false, - "unknown": false, - "expirationMode": "never", - "pageSource": { - "branch": "docs", - "path": "/site", - "private": "discard" - } - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "expirationMode": "never", - "update": false, - "image": false, - "link": false, - "title": false, - "body": false, - "comments": false, - "diff": false, - "origin": false, - "username": false, - "date": false - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "pr/boolean-coercion-null", - "kind": "pr", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "update": null, - "image": null, - "pdf": null, - "notebook": null, - "link": null, - "page": null, - "title": null, - "body": null, - "comments": null, - "content": null, - "origin": null, - "username": null, - "date": null, - "diff": null - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "update": null, - "image": null, - "link": null, - "title": null, - "body": null, - "comments": null, - "diff": null, - "origin": null, - "username": null, - "date": null - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "pr/boolean-coercion-0", - "kind": "pr", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "update": 0, - "image": 0, - "pdf": 0, - "notebook": 0, - "link": 0, - "page": 0, - "title": 0, - "body": 0, - "comments": 0, - "content": 0, - "origin": 0, - "username": 0, - "date": 0, - "diff": 0 - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "update": false, - "image": false, - "link": false, - "title": false, - "body": false, - "comments": false, - "diff": false, - "origin": false, - "username": false, - "date": false - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "pr/boolean-coercion-1", - "kind": "pr", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "update": 1, - "image": 1, - "pdf": 1, - "notebook": 1, - "link": 1, - "page": 1, - "title": 1, - "body": 1, - "comments": 1, - "content": 1, - "origin": 1, - "username": 1, - "date": 1, - "diff": 1 - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "update": true, - "image": true, - "link": true, - "title": true, - "body": true, - "comments": true, - "diff": true, - "origin": true, - "username": true, - "date": true - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "pr/boolean-coercion-\"0\"", - "kind": "pr", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "update": "0", - "image": "0", - "pdf": "0", - "notebook": "0", - "link": "0", - "page": "0", - "title": "0", - "body": "0", - "comments": "0", - "content": "0", - "origin": "0", - "username": "0", - "date": "0", - "diff": "0" - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "update": false, - "image": false, - "link": false, - "title": false, - "body": false, - "comments": false, - "diff": false, - "origin": false, - "username": false, - "date": false - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "pr/boolean-coercion-\"1\"", - "kind": "pr", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "update": "1", - "image": "1", - "pdf": "1", - "notebook": "1", - "link": "1", - "page": "1", - "title": "1", - "body": "1", - "comments": "1", - "content": "1", - "origin": "1", - "username": "1", - "date": "1", - "diff": "1" - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "update": true, - "image": true, - "link": true, - "title": true, - "body": true, - "comments": true, - "diff": true, - "origin": true, - "username": true, - "date": true - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "pr/boolean-coercion-\"true\"", - "kind": "pr", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "update": "true", - "image": "true", - "pdf": "true", - "notebook": "true", - "link": "true", - "page": "true", - "title": "true", - "body": "true", - "comments": "true", - "content": "true", - "origin": "true", - "username": "true", - "date": "true", - "diff": "true" - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "update": true, - "image": true, - "link": true, - "title": true, - "body": true, - "comments": true, - "diff": true, - "origin": true, - "username": true, - "date": true - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "pr/boolean-coercion-\"false\"", - "kind": "pr", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "update": "false", - "image": "false", - "pdf": "false", - "notebook": "false", - "link": "false", - "page": "false", - "title": "false", - "body": "false", - "comments": "false", - "content": "false", - "origin": "false", - "username": "false", - "date": "false", - "diff": "false" - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "update": false, - "image": false, - "link": false, - "title": false, - "body": false, - "comments": false, - "diff": false, - "origin": false, - "username": false, - "date": false - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "pr/boolean-coercion-\"yes\"", - "kind": "pr", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "update": "yes", - "image": "yes", - "pdf": "yes", - "notebook": "yes", - "link": "yes", - "page": "yes", - "title": "yes", - "body": "yes", - "comments": "yes", - "content": "yes", - "origin": "yes", - "username": "yes", - "date": "yes", - "diff": "yes" - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "update": true, - "image": true, - "link": true, - "title": true, - "body": true, - "comments": true, - "diff": true, - "origin": true, - "username": true, - "date": true - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "pr/boolean-coercion-\"no\"", - "kind": "pr", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "update": "no", - "image": "no", - "pdf": "no", - "notebook": "no", - "link": "no", - "page": "no", - "title": "no", - "body": "no", - "comments": "no", - "content": "no", - "origin": "no", - "username": "no", - "date": "no", - "diff": "no" - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "update": false, - "image": false, - "link": false, - "title": false, - "body": false, - "comments": false, - "diff": false, - "origin": false, - "username": false, - "date": false - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "pr/expiration-null", - "kind": "pr", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "expirationDate": null - } - }, - "expected": { - "terms": [ - "Alice", - "" - ] - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "pr/expiration-", - "kind": "pr", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "expirationDate": "" - } - }, - "expected": { - "terms": [ - "Alice", - "" - ] - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "pr/expiration-false", - "kind": "pr", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "expirationDate": false - } - }, - "expected": { - "terms": [ - "Alice", - "" - ] - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "pr/expiration-0", - "kind": "pr", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "expirationDate": 0 - } - }, - "expected": { - "terms": [ - "Alice", - "" - ] - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "pr/expiration-true", - "kind": "pr", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "expirationDate": true - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "expirationDate": "1970-01-01T00:00:00.001Z" - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "pr/expiration-1", - "kind": "pr", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "expirationDate": 1 - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "expirationDate": "1970-01-01T00:00:00.001Z" - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "pr/expiration--1.5", - "kind": "pr", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "expirationDate": -1.5 - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "expirationDate": "1969-12-31T23:59:59.999Z" - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "pr/expiration-1700000000123", - "kind": "pr", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "expirationDate": 1700000000123 - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "expirationDate": "2023-11-14T22:13:20.123Z" - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "pr/expiration-2026-06-01T12:30:00.000Z", - "kind": "pr", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "expirationDate": "2026-06-01T12:30:00.000Z" - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "expirationDate": "2026-06-01T12:30:00.000Z" - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "pr/expiration-0001-01-01", - "kind": "pr", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "expirationDate": "0001-01-01" - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "expirationDate": "0001-01-01T00:00:00.000Z" - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "pr/expiration-March 1 2026", - "kind": "pr", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "expirationDate": "March 1 2026" - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "expirationDate": "2026-03-01T00:00:00.000Z" - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "pr/expiration-2026-02-29", - "kind": "pr", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "expirationDate": "2026-02-29" - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "expirationDate": "2026-03-01T00:00:00.000Z" - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "pr/expiration-2026-02-28T24:00:00Z", - "kind": "pr", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "expirationDate": "2026-02-28T24:00:00Z" - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "expirationDate": "2026-03-01T00:00:00.000Z" - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "pr/expiration-2026,3,1", - "kind": "pr", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "expirationDate": [ - "2026", - "3", - "1" - ] - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "expirationDate": "2026-03-01T00:00:00.000Z" - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "pr/expiration-2026-03-01", - "kind": "pr", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "expirationDate": [ - "2026-03-01" - ] - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "expirationDate": "2026-03-01T00:00:00.000Z" - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "pr/expiration-2026-03-01T01:00:00+02:00", - "kind": "pr", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "expirationDate": "2026-03-01T01:00:00+02:00" - } - }, - "expected": { - "terms": [ - "Alice", - "" - ], - "expirationDate": "2026-02-28T23:00:00.000Z" - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "pr/invalid-boolean-\"\"", - "kind": "pr", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice" - ], - "options": { - "image": "" - } - }, - "rejected": true - }, - { - "name": "pr/invalid-boolean-\"TRUE\"", - "kind": "pr", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice" - ], - "options": { - "image": "TRUE" - } - }, - "rejected": true - }, - { - "name": "pr/invalid-boolean-\"False\"", - "kind": "pr", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice" - ], - "options": { - "image": "False" - } - }, - "rejected": true - }, - { - "name": "pr/invalid-boolean-\" yes \"", - "kind": "pr", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice" - ], - "options": { - "image": " yes " - } - }, - "rejected": true - }, - { - "name": "pr/invalid-boolean-2", - "kind": "pr", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice" - ], - "options": { - "image": 2 - } - }, - "rejected": true - }, - { - "name": "pr/invalid-boolean--1", - "kind": "pr", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice" - ], - "options": { - "image": -1 - } - }, - "rejected": true - }, - { - "name": "pr/invalid-boolean-[]", - "kind": "pr", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice" - ], - "options": { - "image": [] - } - }, - "rejected": true - }, - { - "name": "pr/invalid-boolean-{}", - "kind": "pr", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice" - ], - "options": { - "image": {} - } - }, - "rejected": true - }, - { - "name": "pr/page-source", - "kind": "pr", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "pageSource": { - "branch": "docs", - "path": "/", - "arbitrary": "discard" - } - } - }, - "expected": { - "terms": [ - "Alice", - "" - ] - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - }, - { - "name": "pr/irrelevant-invalid-options", - "kind": "pr", - "body": { - "source": { - "branch": "main", - "commit": "abc" - }, - "terms": [ - "Alice", - "" - ], - "options": { - "page": "invalid", - "pdf": 123 - } - }, - "expected": { - "terms": [ - "Alice", - "" - ] - }, - "input": "Alice 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep", - "output": "XXXX-1 0 1 -42 true false 0.000001 1e-7 100000000000000000000 1e+21 keep" - } -] diff --git a/backend/internal/server/testdata/preview-branch-order.json b/backend/internal/server/testdata/preview-branch-order.json deleted file mode 100644 index f08eac3..0000000 --- a/backend/internal/server/testdata/preview-branch-order.json +++ /dev/null @@ -1,92 +0,0 @@ -[ - { - "mode": "populated", - "query": "branch[]=", - "calls": [ - "lookup", - "branches" - ], - "error": "readme_not_available", - "status": 404 - }, - { - "mode": "populated", - "query": "branch[toString]=main", - "calls": [ - "lookup", - "branches" - ], - "error": "invalid_query_value", - "status": 500 - }, - { - "mode": "populated", - "query": "branch=missing", - "calls": [ - "lookup", - "branches" - ], - "error": "readme_not_available", - "status": 404 - }, - { - "mode": "empty", - "query": "branch[]=", - "calls": [ - "lookup", - "branches" - ], - "error": "readme_not_available", - "status": 404 - }, - { - "mode": "empty", - "query": "branch[toString]=main", - "calls": [ - "lookup", - "branches" - ], - "error": "readme_not_available", - "status": 404 - }, - { - "mode": "empty", - "query": "branch=missing", - "calls": [ - "lookup", - "branches" - ], - "error": "readme_not_available", - "status": 404 - }, - { - "mode": "failure", - "query": "branch[]=", - "calls": [ - "lookup", - "branches" - ], - "error": "repo_not_found", - "status": 503 - }, - { - "mode": "failure", - "query": "branch[toString]=main", - "calls": [ - "lookup", - "branches" - ], - "error": "repo_not_found", - "status": 503 - }, - { - "mode": "failure", - "query": "branch=missing", - "calls": [ - "lookup", - "branches" - ], - "error": "repo_not_found", - "status": 503 - } -] diff --git a/backend/internal/server/testdata/preview-branches.json b/backend/internal/server/testdata/preview-branches.json deleted file mode 100644 index d68f0f1..0000000 --- a/backend/internal/server/testdata/preview-branches.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "branches": [ - { - "name": "main" - }, - { - "name": "release" - }, - { - "name": "main,release" - }, - { - "name": "[object Object]" - } - ], - "cases": [ - { - "query": "", - "selected": "main" - }, - { - "query": "branch=", - "selected": "main" - }, - { - "query": "branch=main", - "selected": "main" - }, - { - "query": "branch=release", - "selected": "release" - }, - { - "query": "branch[]=release", - "selected": "release" - }, - { - "query": "branch[0]=main", - "selected": "main" - }, - { - "query": "branch=main&branch=release", - "selected": "main,release" - }, - { - "query": "branch=main&branch[]=release", - "selected": "main,release" - }, - { - "query": "branch[]=", - "selected": null - }, - { - "query": "branch[x]=main", - "selected": "[object Object]" - }, - { - "query": "branch[toString]=main", - "error": true - }, - { - "query": "branch=%20main%20", - "selected": null - } - ] -} diff --git a/backend/internal/server/testdata/preview-hints.json b/backend/internal/server/testdata/preview-hints.json deleted file mode 100644 index 23f0f96..0000000 --- a/backend/internal/server/testdata/preview-hints.json +++ /dev/null @@ -1,99 +0,0 @@ -[ - { - "query": "", - "filter": null - }, - { - "query": "repositoryID=", - "filter": null - }, - { - "query": "repositoryID=507f1f77bcf86cd799439011", - "filter": { - "_id": "507f1f77bcf86cd799439011" - } - }, - { - "query": "repositoryID=507F1F77BCF86CD799439011", - "filter": { - "_id": "507f1f77bcf86cd799439011" - } - }, - { - "query": "repositoryID=abcdefghijkl", - "filter": { - "_id": "6162636465666768696a6b6c" - } - }, - { - "query": "repositoryID=invalid", - "error": true - }, - { - "query": "repositoryID[]=507f1f77bcf86cd799439011", - "filter": { - "_id": { - "$in": [ - "507f1f77bcf86cd799439011" - ] - } - } - }, - { - "query": "repositoryID=507f1f77bcf86cd799439011&repositoryID=507f1f77bcf86cd799439011", - "filter": { - "_id": { - "$in": [ - "507f1f77bcf86cd799439011", - "507f1f77bcf86cd799439011" - ] - } - } - }, - { - "query": "repositoryID[2]=507f1f77bcf86cd799439011", - "filter": { - "_id": { - "$in": [ - "507f1f77bcf86cd799439011" - ] - } - } - }, - { - "query": "repositoryID[0][0]=507f1f77bcf86cd799439011", - "filter": { - "_id": { - "$in": [ - "507f1f77bcf86cd799439011" - ] - } - } - }, - { - "query": "repositoryID[_id]=507f1f77bcf86cd799439011", - "filter": { - "_id": "507f1f77bcf86cd799439011" - } - }, - { - "query": "repositoryID[x]=507f1f77bcf86cd799439011", - "error": true - }, - { - "query": "repositoryID[]=", - "error": true - }, - { - "query": "repositoryID=507f1f77bcf86cd799439011&repositoryID[]=invalid", - "error": true - }, - { - "query": "repositoryID[]=invalid&reconnect=1", - "filter": null - }, - { - "query": "repositoryID[]=invalid&reconnect[]=1", - "error": true - } -] diff --git a/backend/internal/server/testdata/preview-query.json b/backend/internal/server/testdata/preview-query.json deleted file mode 100644 index 6b08d93..0000000 --- a/backend/internal/server/testdata/preview-query.json +++ /dev/null @@ -1,104 +0,0 @@ -[ - { - "query": "", - "savedResource": false, - "invalidConnection": false, - "choice": "" - }, - { - "query": "connection=", - "savedResource": false, - "invalidConnection": true, - "choice": "" - }, - { - "query": "connection=oauth", - "savedResource": false, - "invalidConnection": false, - "choice": "oauth" - }, - { - "query": "connection=github-app", - "savedResource": false, - "invalidConnection": false, - "choice": "github-app" - }, - { - "query": "connection=custom", - "savedResource": false, - "invalidConnection": true, - "choice": "custom" - }, - { - "query": "connection=oauth&connection=github-app", - "savedResource": false, - "invalidConnection": true, - "choice": "" - }, - { - "query": "connection[]=oauth", - "savedResource": false, - "invalidConnection": true, - "choice": "" - }, - { - "query": "connection[0]=github-app", - "savedResource": false, - "invalidConnection": true, - "choice": "" - }, - { - "query": "connection[x]=oauth", - "savedResource": false, - "invalidConnection": true, - "choice": "" - }, - { - "query": "connection=oauth&connection[]=oauth", - "savedResource": false, - "invalidConnection": true, - "choice": "" - }, - { - "query": "connection[]=github-app&connection=oauth", - "savedResource": false, - "invalidConnection": true, - "choice": "" - }, - { - "query": "connection[toString]=oauth", - "savedResource": false, - "invalidConnection": true, - "choice": "" - }, - { - "query": "connection=%6fauth", - "savedResource": false, - "invalidConnection": false, - "choice": "oauth" - }, - { - "query": "anonymizedRepoId=fixture", - "savedResource": true, - "invalidConnection": false, - "choice": "" - }, - { - "query": "anonymizedRepoId[]=fixture", - "savedResource": false, - "invalidConnection": false, - "choice": "" - }, - { - "query": "anonymizedRepoId=fixture&anonymizedRepoId[]=fixture", - "savedResource": false, - "invalidConnection": false, - "choice": "" - }, - { - "query": "anonymizedRepoId=", - "savedResource": true, - "invalidConnection": false, - "choice": "" - } -] diff --git a/backend/internal/server/testdata/project-names.json b/backend/internal/server/testdata/project-names.json deleted file mode 100644 index 4c5e935..0000000 --- a/backend/internal/server/testdata/project-names.json +++ /dev/null @@ -1,331 +0,0 @@ -[ - { - "name": "case-0", - "body": {}, - "rejected": true - }, - { - "name": "case-1", - "body": { - "type": "repo", - "id": "item", - "name": " Name " - }, - "expected": "Name" - }, - { - "name": "case-2", - "body": { - "type": null, - "id": "item", - "name": "Name" - }, - "rejected": true - }, - { - "name": "case-3", - "body": { - "type": false, - "id": "item", - "name": "Name" - }, - "rejected": true - }, - { - "name": "case-4", - "body": { - "type": 0, - "id": "item", - "name": "Name" - }, - "rejected": true - }, - { - "name": "case-5", - "body": { - "type": [], - "id": "item", - "name": "Name" - }, - "rejected": true - }, - { - "name": "case-6", - "body": { - "type": {}, - "id": "item", - "name": "Name" - }, - "rejected": true - }, - { - "name": "case-7", - "body": { - "type": "", - "id": "item", - "name": "Name" - }, - "rejected": true - }, - { - "name": "case-8", - "body": { - "type": "repo", - "id": null, - "name": "Name" - }, - "rejected": true - }, - { - "name": "case-9", - "body": { - "type": "repo", - "id": false, - "name": "Name" - }, - "rejected": true - }, - { - "name": "case-10", - "body": { - "type": "repo", - "id": 0, - "name": "Name" - }, - "rejected": true - }, - { - "name": "case-11", - "body": { - "type": "repo", - "id": [], - "name": "Name" - }, - "rejected": true - }, - { - "name": "case-12", - "body": { - "type": "repo", - "id": {}, - "name": "Name" - }, - "rejected": true - }, - { - "name": "case-13", - "body": { - "type": "repo", - "id": "", - "name": "Name" - }, - "rejected": true - }, - { - "name": "case-14", - "body": { - "type": "repo", - "id": "item", - "name": null - }, - "rejected": true - }, - { - "name": "case-15", - "body": { - "type": "repo", - "id": "item", - "name": false - }, - "rejected": true - }, - { - "name": "case-16", - "body": { - "type": "repo", - "id": "item", - "name": 0 - }, - "rejected": true - }, - { - "name": "case-17", - "body": { - "type": "repo", - "id": "item", - "name": [] - }, - "rejected": true - }, - { - "name": "case-18", - "body": { - "type": "repo", - "id": "item", - "name": {} - }, - "rejected": true - }, - { - "name": "case-19", - "body": { - "type": "repo", - "id": "item", - "name": "" - }, - "expected": "" - }, - { - "name": "case-20", - "body": { - "type": "repo", - "id": "item", - "name": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" - }, - "expected": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" - }, - { - "name": "case-21", - "body": { - "type": "repo", - "id": "item", - "name": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" - }, - "rejected": true - }, - { - "name": "case-22", - "body": { - "type": "repo", - "id": "item", - "name": "😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀" - }, - "expected": "😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀" - }, - { - "name": "case-23", - "body": { - "type": "repo", - "id": "item", - "name": "😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀" - }, - "rejected": true - }, - { - "name": "case-24", - "body": { - "type": "repo", - "id": "item", - "name": "Name" - }, - "expected": "Name" - }, - { - "name": "case-25", - "body": { - "type": "repo", - "id": "item", - "name": "…Name…" - }, - "expected": "…Name…" - }, - { - "name": "case-26", - "body": { - "type": "repo", - "id": "item", - "name": "Ÿ" - }, - "expected": "Ÿ" - }, - { - "name": "case-27", - "body": { - "type": "repo", - "id": "item", - "name": "\tName" - }, - "rejected": true - }, - { - "name": "case-28", - "body": { - "type": "repo", - "id": "item", - "name": "Name\n" - }, - "rejected": true - }, - { - "name": "case-29", - "body": { - "type": "repo", - "id": "item", - "name": "" - }, - "rejected": true - }, - { - "name": "case-30", - "body": { - "type": "repo", - "id": "item", - "name": "
Name
" - }, - "expected": "Name" - }, - { - "name": "case-31", - "body": { - "type": "gist", - "id": "éééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééé", - "name": "Name" - }, - "expected": "Name" - }, - { - "name": "case-32", - "body": { - "type": "gist", - "id": "ééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééé", - "name": "Name" - }, - "rejected": true - }, - { - "name": "case-33", - "body": { - "type": "gist", - "id": "😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀", - "name": "Name" - }, - "expected": "Name" - }, - { - "name": "case-34", - "body": { - "type": "gist", - "id": "😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀", - "name": "Name" - }, - "rejected": true - }, - { - "name": "case-35", - "body": { - "type": "pr", - "id": "item", - "name": " " - }, - "expected": "" - }, - { - "name": "case-36", - "body": { - "type": "other", - "id": "item", - "name": "Name" - }, - "rejected": true - } -] diff --git a/backend/internal/server/testdata/query-values.json b/backend/internal/server/testdata/query-values.json deleted file mode 100644 index d456b88..0000000 --- a/backend/internal/server/testdata/query-values.json +++ /dev/null @@ -1,7646 +0,0 @@ -[ - { - "query": "", - "scalar": false, - "truthy": false, - "value": "undefined" - }, - { - "query": "days=7", - "scalar": true, - "truthy": true, - "value": "7" - }, - { - "query": "days=", - "scalar": true, - "truthy": false, - "value": "" - }, - { - "query": "days=7&days=2", - "scalar": false, - "truthy": true, - "value": "7,2" - }, - { - "query": "days[]=7&days[]=30", - "scalar": false, - "truthy": true, - "value": "7,30" - }, - { - "query": "days[1]=7&days[0]=2", - "scalar": false, - "truthy": true, - "value": "2,7" - }, - { - "query": "days=3&days[]=7", - "scalar": false, - "truthy": true, - "value": "3,7" - }, - { - "query": "days[]=7&days=3", - "scalar": false, - "truthy": true, - "value": "7,3" - }, - { - "query": "days[1]=7&days=3", - "scalar": false, - "truthy": true, - "value": "7,3" - }, - { - "query": "days[21]=7", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x]=7", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days=3&days[x]=7", - "scalar": false, - "truthy": true, - "value": "3,[object Object]" - }, - { - "query": "days[x]=7&days=3", - "scalar": false, - "truthy": true, - "value": "[object Object],3" - }, - { - "query": "days[0][]=7", - "scalar": false, - "truthy": true, - "value": "7" - }, - { - "query": "days[0]=3&days[0]=7", - "scalar": false, - "truthy": true, - "value": "3,7" - }, - { - "query": "days[toString]=7", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[__proto__][x]=3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[constructor][prototype][x]=3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days%5B%5D=3", - "scalar": false, - "truthy": true, - "value": "3" - }, - { - "query": "days=7%ff", - "scalar": true, - "truthy": true, - "value": "7%ff" - }, - { - "query": "days=7%zz", - "scalar": true, - "truthy": true, - "value": "7%zz" - }, - { - "query": "days[=3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[[x]]=3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x]ignored[y]=3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][0][0][0][0][0]=3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[19]=3", - "scalar": false, - "truthy": true, - "value": "3" - }, - { - "query": "days[20]=3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[01]=3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "[days]=3", - "scalar": true, - "truthy": true, - "value": "3" - }, - { - "query": "days[a=b]=7", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days=3;other=7", - "scalar": true, - "truthy": true, - "value": "3;other=7" - }, - { - "query": "days=3&days=3&days=3&days=3&days=3&days=3&days=3&days=3&days=3&days=3&days=3&days=3&days=3&days=3&days=3&days=3&days=3&days=3&days=3&days=3&days=3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[]=3&days[]=3&days[]=3&days[]=3&days[]=3&days[]=3&days[]=3&days[]=3&days[]=3&days[]=3&days[]=3&days[]=3&days[]=3&days[]=3&days[]=3&days[]=3&days[]=3&days[]=3&days[]=3&days[]=3&days[]=3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&x=3&days=7", - "scalar": false, - "truthy": false, - "value": "undefined" - }, - { - "query": "days[__proto__]=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[21]=7suffix&days[toString]=7suffix&days[constructor]=-1&days[1][x]=a+b&days[0][]=7&days[constructor]=%FF&days[0][]=-1&days=-1", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[__proto__]=%zz&days[][x]=%zz&other=0x10", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1][x]=a+b&days[21]=7&days[1][x]=7&days[0]=7suffix", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[__proto__]=2&days[1]=2&other=0x10&days[1]=&days[__proto__]=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x][]=%FF&days[1][x]=a+b&days[21]=a+b&days[toString]=7&days[1][x]=7&days[1][x]=-1&days[0][]=a+b&days[1][x]=7&days[1][x]=7suffix&days=7suffix", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "other=0x10&days[1]=0x10&days[__proto__]=0x10&days[0][x]=%zz&days[20]=0x10&days[0][x]=%EF%BB%BF3&days[x]=%zz&days[valueOf]=%zz&days[x]=%zz", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x][]=7suffix&days[1][x]=7suffix&days[toString]=a+b&days[19]=-1&days[1][x]=%FF&days[0][]=-1&days[constructor]=7suffix&days[x][]=-1", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[1]=%EF%BB%BF3&days[1]=0x10&days[][x]=&other=%EF%BB%BF3&days[20]=&days[]=%zz&days[0][x]=0x10", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1][x]=%FF&days[constructor]=%FF&days[19]=7&days[21]=-1&days[toString]=7suffix&days=7suffix&days[constructor]=%FF&days[1][x]=a+b", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[1]=%zz", - "scalar": false, - "truthy": true, - "value": "%zz" - }, - { - "query": "days[0][]=7suffix&days[0][]=7", - "scalar": false, - "truthy": true, - "value": "7suffix,7" - }, - { - "query": "days[valueOf]=&days[valueOf]=0x10&other=%zz&days[x]=&days[][x]=%EF%BB%BF3&days[__proto__]=%EF%BB%BF3&days[20]=%zz", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1][x]=%FF&days[21]=a+b&days[0][]=7suffix&days[x][]=a+b&days[0]=%FF&days[toString]=%FF&days[21]=7&days[0]=7suffix", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[1]=0x10&days[0][x]=2&days[20]=0x10", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days=-1&days=a+b&days[x][]=7suffix&days[constructor]=a+b&days[toString]=-1&days=%FF", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[x]=2&days[]=2&days[20]=&days[]=2&days[x]=0x10&days[x]=&days[][x]=0x10&other=%zz&days[1]=", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0]=7&days[21]=7&days[toString]=7&days[1][x]=%FF&days[x][]=%FF&days[toString]=7&days[1][x]=-1&days[1][x]=7suffix&days[constructor]=%FF&days[21]=a+b", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[__proto__]=%EF%BB%BF3&days[][x]=2&days[1]=%EF%BB%BF3&days[valueOf]=2&days[valueOf]=%zz&days[1]=%EF%BB%BF3&days[][x]=%zz&days[valueOf]=&days[20]=0x10", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][]=7suffix&days[constructor]=-1&days=a+b&days[19]=7suffix&days[19]=a+b&days[1][x]=-1&days[constructor]=7&days=7suffix&days=%FF&days[0][]=-1", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[__proto__]=%zz&other=%zz&other=%EF%BB%BF3&days[__proto__]=%zz&days[1]=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days=7suffix&days[0]=-1&days[19]=7suffix&days[1][x]=%FF&days[0][]=a+b&days[0][]=7&days[constructor]=-1&days=7&days[19]=%FF&days[19]=a+b", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[__proto__]=%EF%BB%BF3&days[valueOf]=%EF%BB%BF3&other=2&days[0][x]=0x10&days[__proto__]=&days[0][x]=%zz&days[]=&days[20]=2&days[__proto__]=", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0]=%FF&days=%FF&days[0][]=a+b&days[0][]=7&days[x][]=a+b&days[x][]=-1&days[0][]=a+b&days[0][]=7", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "other=2", - "scalar": false, - "truthy": false, - "value": "undefined" - }, - { - "query": "days[21]=%FF&days[toString]=7suffix&days=7suffix&days[1][x]=a+b&days[toString]=%FF&days[x][]=%FF", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[][x]=2&days[x]=%EF%BB%BF3&days[0][x]=2&other=%zz&days[20]=&days[x]=%zz&days[x]=", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days=a+b&days[toString]=a+b&days[constructor]=%FF&days[constructor]=-1&days[toString]=-1&days[0]=-1", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[__proto__]=0x10&days[__proto__]=&days[1]=0x10&days[1]=&days[valueOf]=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[constructor]=7suffix&days[toString]=7", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[20]=%EF%BB%BF3&days[1]=%zz&days[][x]=&days[__proto__]=&days[]=%EF%BB%BF3&days[0][x]=%EF%BB%BF3&days[1]=0x10", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x][]=a+b&days[x][]=7suffix&days=a+b&days[x][]=%FF", - "scalar": false, - "truthy": true, - "value": "[object Object],a b" - }, - { - "query": "days[0][x]=0x10&days[x]=%zz&days[valueOf]=%EF%BB%BF3&days[x]=%zz&other=%zz", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days=7&days[1][x]=a+b&days[toString]=7&days[19]=7&days[21]=%FF&days[21]=%FF&days[0][]=7&days[x][]=7&days[21]=a+b&days[19]=7suffix", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "other=0x10&days[0][x]=0x10&days[__proto__]=%zz&days[x]=2&days[x]=%EF%BB%BF3&days[1]=2&days[__proto__]=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x][]=-1&days[0]=-1&days[toString]=7suffix&days[x][]=7&days[constructor]=7suffix&days[x][]=a+b&days=7&days[19]=7suffix", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[]=0x10&other=%EF%BB%BF3&days[__proto__]=%zz&days[][x]=%EF%BB%BF3&days[__proto__]=0x10&days[0][x]=%EF%BB%BF3&days[valueOf]=%EF%BB%BF3&days[valueOf]=2&other=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x][]=-1&days[1][x]=%FF", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[valueOf]=2&days[1]=0x10&days[1]=0x10&days[valueOf]=0x10&days[]=%zz&days[x]=%EF%BB%BF3&days[x]=2&other=2&days[]=0x10", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0]=%FF&days[toString]=a+b&days[x][]=7suffix&days[constructor]=7", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[valueOf]=%zz&days[valueOf]=2&days[]=0x10&days[]=&days[]=", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[19]=7suffix&days[0]=a+b&days=7&days[21]=%FF&days[0]=a+b&days[constructor]=7&days[0]=a+b&days[toString]=7suffix&days[0][]=7&days[0]=7", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[valueOf]=%EF%BB%BF3&other=2&days[][x]=0x10&days[0][x]=2&days[][x]=%zz&days[__proto__]=2&days[0][x]=", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[21]=-1&days[x][]=%FF&days=%FF&days[toString]=-1&days[0][]=a+b&days[toString]=-1&days[21]=-1&days[constructor]=7&days[0][]=a+b&days[21]=%FF", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[valueOf]=0x10&other=%EF%BB%BF3&days[0][x]=&days[]=%zz&days[1]=&other=2&days[1]=", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][]=%FF&days[constructor]=7suffix&days[1][x]=%FF&days=-1&days=7&days[0]=-1&days[21]=7suffix&days[0][]=%FF", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[][x]=0x10", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days=7&days[constructor]=%FF&days[21]=%FF&days[1][x]=7&days[1][x]=7&days[19]=-1&days[0]=7&days[1][x]=a+b", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[valueOf]=0x10&days[]=%zz&days[]=0x10&days[20]=2&days[0][x]=", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1][x]=a+b&days[21]=7&days[0][]=a+b&days[toString]=a+b&days[toString]=%FF&days[1][x]=7suffix&days[19]=%FF&days[0]=%FF", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[][x]=%zz&days[x]=&days[x]=&other=%EF%BB%BF3&days[][x]=2&days[valueOf]=%EF%BB%BF3&other=%zz&days[][x]=0x10&days[0][x]=%zz", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[toString]=7&days[toString]=7suffix&days=7&days[toString]=a+b", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[1]=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "3" - }, - { - "query": "days[constructor]=7suffix&days[0]=%FF", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1]=%zz&days[x]=0x10&other=%EF%BB%BF3&days[__proto__]=2&days[__proto__]=0x10&days[valueOf]=%EF%BB%BF3&days[]=0x10&days[][x]=0x10&days[]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0]=%FF&days[0][]=a+b&days=7suffix&days[21]=-1&days[21]=a+b&days[19]=-1", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[]=0x10&other=2&other=%EF%BB%BF3&days[valueOf]=2&days[0][x]=%EF%BB%BF3&other=%EF%BB%BF3&days[][x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[toString]=7suffix&days[constructor]=a+b", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[][x]=2&days[1]=2&days[0][x]=%EF%BB%BF3&other=0x10&days[][x]=2&other=&days[]=%zz", - "scalar": false, - "truthy": true, - "value": "[object Object],2,%zz" - }, - { - "query": "days[21]=7&days[0][]=7&days[constructor]=7suffix&days[0][]=a+b&days[21]=%FF&days[1][x]=-1&days[x][]=%FF&days[21]=%FF&days[1][x]=7suffix&days[21]=%FF", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[]=0x10&days[x]=%EF%BB%BF3&days[][x]=", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[19]=7&days[x][]=%FF&days[x][]=-1&days[19]=%FF&days[21]=a+b&days[toString]=7", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[0][x]=", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[19]=-1&days[0]=a+b&days[1][x]=%FF&days[x][]=-1&days[21]=7&days=7", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x]=0x10&days[x]=2&days[]=%zz&days[__proto__]=0x10&other=2&other=0x10&days[][x]=0x10&days[1]=2&days[20]=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[toString]=7&days[21]=7", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[20]=%zz&days[valueOf]=%EF%BB%BF3&days[__proto__]=%EF%BB%BF3&days[1]=%zz&days[valueOf]=%EF%BB%BF3&days[valueOf]=&other=2&days[][x]=&days[0][x]=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days=7suffix&days[0][]=%FF&days[toString]=7suffix&days[1][x]=%FF&days[0][]=a+b&days=a+b", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[__proto__]=", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days=a+b&days[19]=a+b&days[constructor]=%FF&days[toString]=7suffix&days[constructor]=a+b&days=7suffix&days=a+b&days[0][]=a+b", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[0][x]=%zz&days[]=2&days[1]=0x10&days[x]=%EF%BB%BF3&days[1]=%EF%BB%BF3&other=2&days[__proto__]=%zz", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[constructor]=a+b&days[constructor]=7suffix&days[toString]=-1&days=-1&days[1][x]=%FF&days=-1&days[toString]=7suffix&days=a+b", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[valueOf]=%EF%BB%BF3&days[valueOf]=%EF%BB%BF3&days[]=2&days[__proto__]=2&days[20]=%EF%BB%BF3&days[x]=%zz&days[20]=%zz&days[1]=&days[x]=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[19]=7&days[x][]=7suffix&days[1][x]=7suffix&days[19]=a+b", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[]=2", - "scalar": false, - "truthy": true, - "value": "2" - }, - { - "query": "days[1][x]=7&days[19]=-1&days[toString]=-1&days[0][]=7suffix", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "other=%EF%BB%BF3&days[__proto__]=2&days[__proto__]=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][]=a+b&days[x][]=a+b&days[0]=7suffix&days[0]=7suffix", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1]=&days[0][x]=%zz&days[]=2", - "scalar": false, - "truthy": true, - "value": "[object Object],,2" - }, - { - "query": "days=-1&days[x][]=7&days[x][]=a+b&days[toString]=-1&days[constructor]=%FF&days=-1", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[__proto__]=2&days[__proto__]=&days[x]=0x10", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0]=%FF&days[toString]=-1&days[toString]=7&days[toString]=7&days[19]=7&days[constructor]=7suffix", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[1]=0x10", - "scalar": false, - "truthy": true, - "value": "0x10" - }, - { - "query": "days[0]=7suffix&days[0]=%FF&days[x][]=7suffix&days[0]=7suffix&days[x][]=7suffix&days[21]=%FF", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[valueOf]=", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[19]=-1&days[constructor]=7suffix&days[21]=%FF&days[constructor]=7", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[][x]=2&days[__proto__]=%zz&days[x]=2&days[x]=%zz&days[20]=0x10&days[x]=%zz&days[0][x]=0x10", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0]=%FF&days[19]=a+b&days[constructor]=a+b&days[x][]=7&days[21]=%FF&days[x][]=-1&days[x][]=a+b&days[0]=%FF&days[19]=7suffix&days[0][]=7", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x]=2&days[][x]=2&other=0x10&days[x]=0x10&days[]=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x][]=-1&days[19]=7&days[constructor]=%FF&days[21]=%FF&days[constructor]=-1&days[0]=-1", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1]=0x10", - "scalar": false, - "truthy": true, - "value": "0x10" - }, - { - "query": "days[0][]=7&days[0]=7suffix&days[constructor]=%FF&days[0]=a+b&days[toString]=7suffix&days[constructor]=a+b", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[][x]=2&days[]=%zz&days[valueOf]=0x10&days[]=0x10&days[0][x]=2&days[]=0x10&days[][x]=%zz&days[]=&days[valueOf]=0x10", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[21]=7suffix&days[toString]=a+b&days[toString]=7suffix&days[1][x]=-1", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[__proto__]=%zz&days[__proto__]=%EF%BB%BF3&days[x]=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x][]=-1&days[19]=7suffix&days[19]=-1&days[constructor]=7suffix", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "other=%EF%BB%BF3", - "scalar": false, - "truthy": false, - "value": "undefined" - }, - { - "query": "days=%FF&days[x][]=a+b&days[0][]=7suffix&days[21]=%FF&days[x][]=%FF&days[19]=a+b", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[]=&days[20]=0x10&days[][x]=&days[][x]=0x10&days[x]=&days[20]=2&days[0][x]=0x10", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1][x]=-1&days[0]=a+b&days[1][x]=a+b&days[0]=%FF&days[x][]=-1&days[0][]=a+b", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[valueOf]=", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0]=7&days[0]=a+b&days[1][x]=-1&days[19]=a+b&days[constructor]=-1&days[constructor]=a+b&days[1][x]=%FF&days[0]=7suffix", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x]=%EF%BB%BF3&days[]=2&days[1]=&days[__proto__]=&days[]=&days[][x]=%zz&other=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1][x]=-1&days[constructor]=%FF&days[1][x]=%FF&days[21]=7&days[x][]=%FF&days[x][]=%FF&days[constructor]=%FF&days[toString]=%FF", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[20]=0x10&days[0][x]=&days[0][x]=&other=2&days[0][x]=2&days[20]=2&days[__proto__]=", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x][]=%FF&days[0]=7", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[][x]=%zz", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][]=-1&days[21]=a+b", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[20]=%EF%BB%BF3&days[1]=&days[][x]=%zz&days[1]=%EF%BB%BF3&days[__proto__]=%EF%BB%BF3&days[]=2&days[0][x]=2&days[0][x]=%zz&other=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0]=7&days[x][]=a+b&days=a+b&days[1][x]=-1&days[1][x]=-1&days[1][x]=-1&days[21]=%FF&days=-1", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "other=%zz&days[][x]=%zz&days[0][x]=&days[valueOf]=&days[x]=%zz&days[1]=%zz&days[]=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[constructor]=7&days[19]=%FF&days[1][x]=%FF&days[0]=%FF", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[20]=%zz&days[valueOf]=2&days[]=%zz&days[valueOf]=&days[]=", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[constructor]=7suffix&days[toString]=-1", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[valueOf]=%zz", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x][]=-1&days[21]=a+b&days[constructor]=7suffix&days[21]=-1", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x]=%zz&other=%EF%BB%BF3&days[][x]=", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[constructor]=7&days[1][x]=7&days[constructor]=a+b&days[toString]=-1&days[0][]=7&days[19]=%FF&days[0]=7suffix&days[toString]=7", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[valueOf]=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0]=a+b&days[x][]=a+b", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][x]=%zz&days[x]=%EF%BB%BF3&other=&days[20]=%zz&other=&other=%EF%BB%BF3&days[valueOf]=0x10&days[][x]=2&days[x]=", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x][]=7suffix&days[toString]=a+b&days[21]=a+b&days[constructor]=%FF&days[0][]=-1&days[0][]=%FF&days[19]=7suffix&days[x][]=-1", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[][x]=%EF%BB%BF3&days[20]=2&days[0][x]=&days[__proto__]=%EF%BB%BF3&days[][x]=%EF%BB%BF3&days[valueOf]=&days[0][x]=0x10&days[1]=2&days[20]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0]=7&days[constructor]=-1&days[toString]=-1&days[0]=7&days[1][x]=7&days[toString]=a+b", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[20]=&days[__proto__]=&days[__proto__]=2&days[__proto__]=2&days[][x]=&days[x]=%zz&days[0][x]=0x10&days[x]=%zz&days[1]=", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[constructor]=7&days[constructor]=7suffix&days[0][]=a+b&days[x][]=7suffix&days[0][]=7suffix&days[toString]=-1&days[19]=a+b&days=-1", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[__proto__]=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days=a+b&days[21]=%FF&days[0][]=-1&days[0][]=7", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][x]=%EF%BB%BF3&days[__proto__]=%zz&days[][x]=%zz", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[toString]=7&days[0]=-1&days[21]=7suffix&days[21]=a+b&days[0][]=a+b&days[x][]=7suffix&days[0][]=7suffix&days[constructor]=-1", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "other=%zz&days[1]=%zz&days[x]=0x10", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[toString]=7&days=7suffix&days[21]=7suffix&days[toString]=7suffix", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[valueOf]=0x10&days[0][x]=0x10&days[__proto__]=0x10&days[1]=&days[][x]=2&days[__proto__]=&days[__proto__]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][]=7suffix&days[19]=-1&days[toString]=7&days[x][]=7", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[20]=%EF%BB%BF3&days[][x]=2&days[][x]=%zz&days[0][x]=%EF%BB%BF3&days[valueOf]=%EF%BB%BF3&days[valueOf]=0x10&days[0][x]=%EF%BB%BF3&days[x]=0x10&days[][x]=0x10", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x][]=7&days[toString]=-1&days[constructor]=a+b&days[21]=7&days[constructor]=%FF&days[1][x]=a+b", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[]=%zz&days[1]=%zz&days[__proto__]=0x10&other=2&days[__proto__]=%zz&days[]=%EF%BB%BF3&days[valueOf]=0x10", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1][x]=-1&days=-1&days[21]=%FF&days[toString]=7suffix", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[valueOf]=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1][x]=7&days[19]=a+b", - "scalar": false, - "truthy": true, - "value": "[object Object],a b" - }, - { - "query": "days[][x]=%EF%BB%BF3&days[]=0x10&days[]=0x10&days[]=&days[]=%EF%BB%BF3&days[][x]=2&days[x]=0x10&other=2&days[x]=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[19]=7suffix&days[19]=7&days[constructor]=7&days[1][x]=7suffix", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x]=2&days[__proto__]=0x10&days[x]=0x10&other=%EF%BB%BF3&days[]=%EF%BB%BF3&days[__proto__]=%EF%BB%BF3&days[0][x]=&days[][x]=&days[1]=0x10", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[19]=a+b&days[21]=%FF&days[0][]=a+b&days[constructor]=a+b", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[20]=", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[21]=a+b&days[19]=-1&days[19]=%FF&days[1][x]=a+b&days[21]=7&days[1][x]=7", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][x]=%EF%BB%BF3&other=%zz&days[0][x]=&days[]=&days[20]=%zz&days[x]=0x10&days[20]=", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[19]=-1&days[constructor]=7suffix&days[21]=7&days[0]=7&days[0][]=7suffix&days[0][]=7suffix", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[__proto__]=%zz&days[valueOf]=0x10&days[x]=&days[1]=0x10&days[x]=", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][]=a+b&days[x][]=-1", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[]=&other=2&days[x]=0x10", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[21]=7suffix&days[constructor]=7suffix&days[0]=7&days[19]=-1&days[toString]=%FF&days[0]=a+b", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[0][x]=%zz&other=&days[20]=2&other=%EF%BB%BF3&days[valueOf]=&days[x]=%EF%BB%BF3&days[][x]=%zz", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[21]=7suffix&days[19]=-1", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x]=2&days[__proto__]=0x10&days[][x]=0x10&days[__proto__]=%EF%BB%BF3&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1][x]=7suffix&days[0][]=-1&days[0]=7&days=%FF&days[21]=-1&days[0][]=-1&days[constructor]=7&days[0][]=%FF&days[0]=7&days[1][x]=%FF", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[20]=0x10", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days=7&days[toString]=7suffix&days[constructor]=-1&days[21]=-1&days[toString]=7suffix&days[19]=-1&days[x][]=a+b&days[constructor]=a+b", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[20]=%zz", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[19]=7&days[x][]=a+b", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x]=0x10&days[1]=%zz&days[x]=", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days=%FF&days[0]=a+b", - "scalar": false, - "truthy": true, - "value": "%FF,a b" - }, - { - "query": "days[20]=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[constructor]=7&days[21]=7suffix&days[constructor]=7suffix&days[toString]=-1&days[x][]=%FF&days[21]=-1&days[1][x]=a+b&days[toString]=%FF", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[][x]=%zz&days[x]=0x10&days[1]=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x][]=a+b&days[constructor]=7suffix&days=-1&days=7suffix&days[21]=-1&days[0][]=a+b&days[0]=-1&days[0][]=%FF&days[21]=7suffix&days[21]=-1", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1]=&other=2&days[valueOf]=0x10&days[][x]=%zz&days[x]=0x10", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days=a+b&days[1][x]=-1&days[x][]=a+b&days[constructor]=a+b&days[x][]=7&days[1][x]=7suffix&days[x][]=%FF&days[19]=a+b", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[__proto__]=%zz&days[0][x]=2&days[]=%EF%BB%BF3&days[][x]=%EF%BB%BF3&days[0][x]=%EF%BB%BF3&days[1]=2&other=%zz", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[21]=7&days[constructor]=%FF&days=7&days[constructor]=%FF&days[x][]=a+b&days[0][]=%FF&days=a+b&days[toString]=a+b", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[valueOf]=%EF%BB%BF3&days[valueOf]=2&days[1]=2&days[__proto__]=%EF%BB%BF3&days[valueOf]=&days[valueOf]=%EF%BB%BF3&days[0][x]=", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[19]=%FF&days[0]=a+b&days[1][x]=a+b&days[x][]=%FF&days[constructor]=%FF&days[21]=a+b&days[x][]=a+b&days=7suffix", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][x]=%EF%BB%BF3&days[1]=%EF%BB%BF3&days[][x]=%EF%BB%BF3&days[][x]=%zz&days[valueOf]=2&other=2&days[]=%zz", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0]=-1&days[1][x]=7", - "scalar": false, - "truthy": true, - "value": "-1,[object Object]" - }, - { - "query": "days[][x]=2&days[valueOf]=&days[valueOf]=%EF%BB%BF3&days[__proto__]=%zz&other=%EF%BB%BF3&days[1]=2&days[][x]=&days[__proto__]=&days[0][x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days=7&days[0][]=a+b", - "scalar": false, - "truthy": true, - "value": "7,a b" - }, - { - "query": "days[valueOf]=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[constructor]=-1&days[0][]=7suffix&days[1][x]=%FF&days[toString]=a+b&days[constructor]=7&days[19]=7&days[1][x]=%FF&days=%FF&days[x][]=7suffix&days[0][]=7suffix", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[20]=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1][x]=7suffix&days[1][x]=7", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[valueOf]=0x10&days[20]=2&days[1]=0x10", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days=a+b&days[toString]=7suffix&days[constructor]=a+b&days[1][x]=%FF&days[0][]=%FF&days[0][]=%FF", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x]=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[toString]=7&days[19]=%FF&days[x][]=-1&days[1][x]=-1", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[x]=0x10&days[]=2&days[][x]=%EF%BB%BF3&days[1]=%EF%BB%BF3&days[]=0x10&other=0x10&days[]=", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1][x]=a+b&days[toString]=-1&days[21]=7suffix&days[0]=a+b", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[valueOf]=2&days[][x]=%zz&days[0][x]=%EF%BB%BF3&days[1]=2&days[x]=%zz&days[__proto__]=%zz&days[1]=2&days[][x]=0x10&days[0][x]=0x10", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[19]=%FF&days[x][]=-1&days[1][x]=%FF&days[toString]=7suffix&days[constructor]=7&days[1][x]=7suffix&days[0]=7suffix&days=7suffix", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "other=%EF%BB%BF3&days[x]=%EF%BB%BF3&days[1]=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days=7suffix&days[x][]=%FF&days[1][x]=a+b&days[constructor]=a+b&days[0]=7&days[1][x]=a+b&days[19]=a+b&days[0]=7", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[valueOf]=%zz&other=%EF%BB%BF3&days[][x]=2&days[1]=%EF%BB%BF3&days[][x]=0x10", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[constructor]=7suffix&days[0][]=%FF&days[constructor]=7&days[1][x]=-1&days[0][]=-1&days[19]=-1", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x]=&days[0][x]=0x10&days[__proto__]=0x10&days[x]=%zz&days[][x]=0x10&other=%EF%BB%BF3&days[1]=%zz&other=2&days[]=0x10", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x][]=a+b&days=a+b&days=7suffix&days=a+b&days[constructor]=7suffix&days[toString]=-1&days[0][]=a+b&days[0]=%FF", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[x]=0x10&days[][x]=&days[x]=%zz", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[toString]=7&days[0]=-1", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[][x]=", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][]=-1&days[0][]=a+b", - "scalar": false, - "truthy": true, - "value": "-1,a b" - }, - { - "query": "days[x]=%zz", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[toString]=a+b&days[1][x]=%FF&days[0][]=a+b&days=a+b&days[21]=-1&days[x][]=7suffix&days[19]=-1&days[constructor]=7suffix&days[21]=%FF&days[19]=7suffix", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[][x]=0x10&days[valueOf]=0x10&days[1]=0x10&other=%zz&days[valueOf]=0x10&days[0][x]=0x10&other=2&days[valueOf]=%EF%BB%BF3&days[20]=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[constructor]=-1&days[toString]=7&days[toString]=%FF&days=a+b", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[0][x]=0x10&days[]=%zz&days[]=0x10&days[0][x]=2&days[1]=&days[][x]=%zz&days[__proto__]=0x10", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[21]=7&days[21]=a+b&days[constructor]=a+b&days[constructor]=7&days[toString]=7suffix&days[0]=7&days[toString]=7suffix&days[toString]=%FF&days[21]=a+b&days[19]=%FF", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[__proto__]=%zz&days[]=2&days[__proto__]=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[toString]=7suffix&days[19]=7&days[21]=-1&days[19]=a+b&days[constructor]=a+b&days[x][]=a+b&days[21]=7&days[toString]=-1", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[valueOf]=2&days[__proto__]=%EF%BB%BF3&days[][x]=2&days[valueOf]=0x10&days[1]=%zz&days[][x]=%zz&days[]=0x10", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[toString]=%FF&days[constructor]=7", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "other=&other=2&days[]=%zz&days[valueOf]=&other=%zz", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x][]=%FF&days[1][x]=a+b&days=-1&days[19]=7suffix", - "scalar": false, - "truthy": true, - "value": "[object Object],-1,7suffix" - }, - { - "query": "days[valueOf]=2&days[__proto__]=%zz&days[][x]=%zz&days[1]=0x10&days[1]=%EF%BB%BF3&other=&other=%EF%BB%BF3&days[valueOf]=2&other=%zz", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days=7suffix&days[19]=a+b&days[0][]=a+b&days[toString]=7suffix&days[toString]=%FF&days[19]=7suffix&days[constructor]=%FF&days[x][]=-1", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[20]=2&days[20]=&other=&days[1]=%EF%BB%BF3&days[x]=%EF%BB%BF3&days[20]=&days[1]=%EF%BB%BF3&days[x]=&days[]=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][]=-1&days[21]=a+b&days[toString]=a+b&days[0][]=7suffix&days=a+b&days[toString]=-1&days[0][]=a+b&days[21]=a+b&days[x][]=-1&days[21]=-1", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "other=%zz&days[x]=0x10&days[x]=2&days[x]=0x10&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x][]=-1&days[x][]=7suffix&days[0][]=7&days=a+b&days[0]=a+b&days[x][]=7suffix&days[toString]=7suffix&days=7suffix", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[0][x]=2&days[valueOf]=&days[20]=0x10&days[__proto__]=2&days[0][x]=%zz&days[valueOf]=2&days[1]=%EF%BB%BF3&days[]=0x10&other=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days=7&days[21]=a+b&days[constructor]=7suffix&days[19]=7suffix&days[x][]=a+b&days[0][]=7", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[]=%zz&other=&days[][x]=&days[]=0x10&days[x]=%zz&days[valueOf]=%EF%BB%BF3&days[valueOf]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days=-1&days[0]=7&days[constructor]=7&days[1][x]=7&days[constructor]=a+b&days=7suffix", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[][x]=%EF%BB%BF3&days[x]=2&days[valueOf]=&days[valueOf]=&days[20]=2&days[__proto__]=0x10&days[0][x]=%EF%BB%BF3&days[__proto__]=%EF%BB%BF3&days[20]=0x10", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days=%FF&days[21]=-1&days[0][]=-1&days[toString]=%FF", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[21]=7suffix&days[constructor]=%FF", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[__proto__]=%EF%BB%BF3&days[x]=0x10&days[]=%EF%BB%BF3&days[20]=2&days[__proto__]=&days[0][x]=0x10&days[__proto__]=0x10&other=%EF%BB%BF3&other=", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0]=7&days[19]=-1&days[0][]=7&days[0]=a+b&days[x][]=a+b&days[x][]=7&days=%FF&days[21]=-1", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[__proto__]=2&other=%zz&days[__proto__]=%zz&days[__proto__]=0x10&days[]=%zz&days[][x]=2&days[valueOf]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days=%FF&days[0]=%FF&days=-1&days[1][x]=7suffix&days[21]=7&days[21]=a+b", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[][x]=2&days[][x]=0x10&days[1]=2", - "scalar": false, - "truthy": true, - "value": "[object Object],2" - }, - { - "query": "days[21]=7&days[constructor]=7suffix&days[0][]=a+b&days=7suffix&days[19]=7suffix&days[0]=7&days[1][x]=-1&days[constructor]=7", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[]=2", - "scalar": false, - "truthy": true, - "value": "2" - }, - { - "query": "days[0][]=7&days[0][]=-1&days[19]=7&days[0]=-1&days[1][x]=%FF&days[toString]=%FF&days[x][]=-1&days[x][]=-1", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[__proto__]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][]=a+b&days[0]=a+b&days[1][x]=%FF&days[x][]=%FF&days[1][x]=7&days[1][x]=-1", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[20]=%EF%BB%BF3&days[1]=2&days[]=%EF%BB%BF3&days[1]=0x10&days[1]=%EF%BB%BF3&days[1]=%zz&other=0x10", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[toString]=-1&days=7suffix&days[0][]=-1&days[1][x]=%FF&days[constructor]=%FF&days[21]=-1", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "other=%EF%BB%BF3&days[1]=2&days[0][x]=%zz&days[][x]=%zz&other=%EF%BB%BF3&days[x]=%zz&days[valueOf]=&days[1]=&other=", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[toString]=7suffix&days=7suffix&days[19]=7suffix&days[1][x]=-1&days[0][]=7suffix&days[0]=-1&days[toString]=-1&days[1][x]=%FF&days[x][]=7&days[x][]=a+b", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[20]=%zz&days[x]=&days[__proto__]=0x10&days[__proto__]=2&days[1]=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days=7&days[21]=7suffix&days[0]=7&days[0][]=7&days=a+b&days[0][]=a+b&days=7suffix&days=%FF", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x]=%zz&days[]=&days[valueOf]=0x10&days[valueOf]=2&days[valueOf]=%EF%BB%BF3&days[1]=0x10&days[__proto__]=0x10", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[19]=%FF&days[21]=7suffix&days=a+b&days[0]=-1", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1]=%EF%BB%BF3&days[valueOf]=2&other=2&days[1]=%zz&days[20]=&days[][x]=%zz&days[1]=0x10", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[21]=a+b&days=7&days[toString]=%FF&days[1][x]=-1&days[1][x]=7&days[x][]=%FF", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[1]=0x10&other=2&other=&days[][x]=0x10&days[][x]=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "[object Object],0x10" - }, - { - "query": "days[1][x]=-1&days[0]=%FF&days[constructor]=%FF&days[1][x]=7&days[19]=-1&days[0][]=7suffix&days[toString]=7&days[21]=a+b", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[]=&days[20]=2&days[]=0x10&days[]=%EF%BB%BF3&days[][x]=%EF%BB%BF3&days[][x]=2&days[][x]=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][]=7&days=a+b&days[1][x]=a+b&days[constructor]=%FF", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[__proto__]=%zz&days[x]=&days[0][x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1][x]=%FF&days[0][]=7suffix&days[1][x]=7&days[toString]=7suffix&days[x][]=-1&days[constructor]=7&days[19]=%FF&days[0][]=a+b&days[1][x]=7suffix&days[0][]=7", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[1]=%zz&days[0][x]=&days[]=&days[1]=%EF%BB%BF3&days[20]=&days[20]=%zz&days[1]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[19]=%FF&days=-1&days[0]=-1&days[constructor]=%FF", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[__proto__]=&days[20]=%zz&days[0][x]=0x10", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0]=%FF&days[1][x]=%FF&days[19]=7&days[21]=7suffix", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[]=%zz&days[]=%EF%BB%BF3&days[__proto__]=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days=%FF&days[1][x]=-1&days[1][x]=%FF&days[21]=%FF&days[x][]=%FF&days[0][]=a+b&days[19]=7suffix&days[0]=7suffix&days[1][x]=%FF&days[19]=a+b", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "other=%EF%BB%BF3&days[][x]=2&days[]=%zz&days[1]=2&days[valueOf]=2&days[__proto__]=%zz&days[1]=2&days[1]=&days[20]=0x10", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[constructor]=%FF&days[1][x]=a+b&days[19]=7&days[x][]=%FF&days[toString]=-1&days[0][]=7&days[0]=7suffix&days[21]=7suffix&days[constructor]=a+b&days[19]=7", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[valueOf]=&days[20]=2&days[__proto__]=2&days[__proto__]=%zz&days[]=0x10&days[][x]=&days[]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[21]=-1&days=%FF", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1]=%zz", - "scalar": false, - "truthy": true, - "value": "%zz" - }, - { - "query": "days[0]=7&days[0]=a+b&days[1][x]=7&days[constructor]=-1", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x]=2&other=2&days[20]=&days[]=0x10&days[20]=%zz", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1][x]=7&days[0][]=%FF&days[0][]=7&days=-1&days[0][]=7suffix&days[0]=7suffix", - "scalar": false, - "truthy": true, - "value": "%FF,7,7suffix,[object Object],-1,7suffix" - }, - { - "query": "days[0][x]=0x10&days[]=2&days[valueOf]=%EF%BB%BF3&days[0][x]=0x10&days[20]=%zz&other=%EF%BB%BF3&days[]=%zz", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[toString]=7&days[x][]=7suffix&days[21]=%FF&days[constructor]=7&days[19]=7suffix&days[x][]=%FF", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[]=%EF%BB%BF3&days[x]=%zz&days[][x]=%zz", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[19]=7suffix&days[21]=7&days[1][x]=-1&days[1][x]=7suffix", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "other=&days[][x]=2&days[20]=&days[1]=%zz&days[]=2&days[0][x]=0x10&days[1]=0x10&days[1]=&days[1]=", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0]=a+b&days[x][]=%FF&days[21]=-1&days=7&days[0][]=7suffix&days[0][]=a+b&days[21]=-1&days=a+b", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1]=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "3" - }, - { - "query": "days[0][]=%FF&days[toString]=7suffix&days[21]=a+b&days[x][]=%FF&days[x][]=7&days[21]=7&days[0]=7suffix&days=a+b&days[1][x]=7suffix&days[1][x]=7", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[__proto__]=%EF%BB%BF3&days[x]=0x10&other=&days[20]=0x10&days[0][x]=0x10&days[20]=2&days[x]=0x10&days[][x]=%EF%BB%BF3&days[__proto__]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[toString]=a+b&days[x][]=a+b&days[19]=7suffix&days[x][]=7&days[0]=-1&days[constructor]=a+b", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[valueOf]=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x][]=7suffix&days[toString]=7suffix&days[constructor]=7suffix&days[0][]=%FF&days[constructor]=a+b&days[x][]=a+b", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[20]=0x10&days[20]=&days[__proto__]=0x10&days[]=&days[0][x]=2&days[]=&days[1]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[toString]=%FF&days[1][x]=-1", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[][x]=%zz&days[][x]=0x10&other=0x10", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[toString]=7&days[0][]=7suffix&days[0]=%FF&days[constructor]=%FF&days[0]=-1&days[0][]=a+b&days[21]=7&days[0][]=a+b", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[20]=%EF%BB%BF3&days[0][x]=%EF%BB%BF3&other=0x10&other=2&days[__proto__]=&days[__proto__]=&days[1]=&days[valueOf]=&days[x]=0x10", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[constructor]=7suffix&days[toString]=a+b&days[19]=7suffix&days[21]=7&days[1][x]=-1&days[x][]=%FF", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[valueOf]=%EF%BB%BF3&days[0][x]=%zz&days[][x]=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[21]=%FF&days[21]=%FF&days[constructor]=7suffix&days[19]=7", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "other=0x10&days[x]=&other=0x10&days[20]=0x10&days[valueOf]=", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[constructor]=%FF&days[x][]=%FF&days[constructor]=-1&days=a+b&days=7suffix&days[0][]=a+b", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][x]=2&days[valueOf]=2&other=%zz&days[20]=&days[valueOf]=", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[21]=a+b&days[21]=7suffix", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "other=0x10", - "scalar": false, - "truthy": false, - "value": "undefined" - }, - { - "query": "days[19]=7suffix&days[toString]=7", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[__proto__]=2&days[20]=%EF%BB%BF3&days[][x]=%zz&days[0][x]=0x10&days[__proto__]=%zz&days[1]=%zz&days[1]=%EF%BB%BF3&days[20]=&days[1]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1][x]=a+b&days[1][x]=7suffix&days[0]=a+b&days[0][]=-1&days[0]=7&days[1][x]=7suffix&days[constructor]=7&days[19]=7suffix&days[constructor]=7suffix&days[19]=a+b", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1][x]=a+b&days[toString]=-1&days[1][x]=7suffix&days[x][]=7suffix&days=%FF&days=a+b", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[x]=&days[1]=%zz&days[__proto__]=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[toString]=a+b&days[0][]=7", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[0][x]=0x10&days[20]=0x10&days[]=%zz&days[]=0x10&days[1]=&days[__proto__]=0x10&days[20]=&days[20]=%zz&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x][]=7suffix&days[19]=-1&days[toString]=7&days[19]=7", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[20]=%zz&days[][x]=%EF%BB%BF3&days[][x]=0x10&days[1]=%EF%BB%BF3&days[x]=%EF%BB%BF3&days[1]=2&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1][x]=7&days[toString]=%FF&days[constructor]=a+b&days[constructor]=-1", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "other=%zz&other=0x10&days[x]=%EF%BB%BF3&days[][x]=2&days[]=&days[x]=%EF%BB%BF3&days[0][x]=%zz&days[][x]=%zz&days[][x]=", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][]=-1&days[0][]=a+b", - "scalar": false, - "truthy": true, - "value": "-1,a b" - }, - { - "query": "other=2", - "scalar": false, - "truthy": false, - "value": "undefined" - }, - { - "query": "days[toString]=%FF&days[toString]=a+b&days[21]=%FF&days=a+b", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[20]=&days[valueOf]=%EF%BB%BF3&days[1]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[constructor]=-1&days[0]=%FF&days[constructor]=-1&days[19]=7", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[]=", - "scalar": false, - "truthy": true, - "value": "" - }, - { - "query": "days[constructor]=%FF&days[constructor]=a+b&days[0]=7suffix&days[0]=-1&days[19]=7suffix&days=%FF", - "scalar": false, - "truthy": true, - "value": "[object Object],%FF" - }, - { - "query": "days[][x]=%EF%BB%BF3&days[valueOf]=%EF%BB%BF3&days[x]=%EF%BB%BF3&days[x]=2&days[0][x]=0x10&days[valueOf]=2&days[]=%EF%BB%BF3&days[][x]=%zz&other=", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[21]=7suffix&days[constructor]=7suffix&days[toString]=a+b&days[0][]=7suffix&days=%FF&days[0][]=-1&days[0]=%FF&days[19]=%FF&days[x][]=%FF&days[21]=7", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[]=%EF%BB%BF3&days[x]=%EF%BB%BF3&days[valueOf]=%EF%BB%BF3&days[__proto__]=%zz&days[][x]=&days[0][x]=%zz&days[1]=0x10", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[21]=%FF&days[0]=-1&days[0]=-1&days[0]=7suffix&days[x][]=a+b&days[1][x]=7suffix&days[0][]=a+b&days[constructor]=7&days[21]=7&days[toString]=a+b", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[__proto__]=", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[toString]=-1&days[toString]=7suffix&days[21]=7&days[19]=-1&days[0][]=7suffix&days[21]=-1&days[1][x]=a+b&days[19]=7", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[20]=&days[][x]=%zz&days[x]=0x10", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0]=7&days=7suffix&days[0][]=7suffix&days[0]=7&days[x][]=-1&days[21]=7&days[toString]=a+b&days=7suffix&days[19]=7&days[0][]=-1", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[0][x]=&days[0][x]=0x10&days[__proto__]=&days[x]=%zz&days[valueOf]=0x10", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[19]=%FF&days[21]=-1&days[21]=-1&days[1][x]=7suffix&days=%FF&days[x][]=7suffix&days[0][]=7suffix&days[toString]=-1", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days=%FF&days[21]=a+b&days[19]=7&days=7suffix", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1]=0x10&days[x]=%EF%BB%BF3&days[][x]=0x10&days[0][x]=2&days[valueOf]=%zz&other=%zz&other=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][]=-1&days[21]=-1", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[20]=%zz&days[]=&days[valueOf]=&days[]=0x10&days[][x]=0x10", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[constructor]=7suffix&days[0]=%FF&days[1][x]=%FF&days[1][x]=%FF&days[21]=-1&days[constructor]=%FF&days[constructor]=-1&days[toString]=7suffix&days[21]=7suffix&days[x][]=%FF", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[][x]=0x10&days[]=%EF%BB%BF3&days[x]=%EF%BB%BF3&days[0][x]=&other=&days[__proto__]=2&days[20]=%zz", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[constructor]=-1&days[0]=a+b&days=a+b&days[x][]=a+b&days[0]=7&days[toString]=-1&days[1][x]=a+b&days[1][x]=-1", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "other=0x10&days[20]=%EF%BB%BF3&days[valueOf]=&days[1]=&days[0][x]=2&other=2&days[valueOf]=%zz&days[][x]=0x10&other=", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[21]=%FF&days[x][]=7&days[21]=a+b&days[x][]=7suffix", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[]=%zz&days[0][x]=&days[0][x]=2", - "scalar": false, - "truthy": true, - "value": "%zz,[object Object]" - }, - { - "query": "days[0][]=a+b&days[0]=-1", - "scalar": false, - "truthy": true, - "value": "a b,-1" - }, - { - "query": "days[valueOf]=0x10&days[0][x]=0x10&days[20]=", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[19]=-1&days[21]=7suffix", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[20]=0x10&days[20]=2&days[x]=&days[20]=&days[]=%zz", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days=a+b&days[constructor]=%FF&days[0][]=-1&days[21]=7suffix&days[0]=a+b&days[19]=7", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[__proto__]=2&days[x]=%zz&days[0][x]=%zz&days[1]=0x10&days[x]=%zz", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1][x]=7suffix&days=a+b&days[1][x]=%FF&days[21]=7suffix&days[toString]=%FF&days[0][]=-1&days[19]=a+b&days[0]=-1", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[]=2&days[valueOf]=2&other=&days[x]=0x10&other=%EF%BB%BF3&days[][x]=&days[]=&days[1]=%zz&other=%zz", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[21]=%FF&days[x][]=7&days[0]=%FF&days[0]=-1&days[19]=-1&days[21]=%FF&days[1][x]=a+b&days[0]=7suffix&days=%FF&days[0][]=a+b", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[][x]=2&days[][x]=%zz&days[x]=0x10&days[20]=%EF%BB%BF3&days[x]=2&days[20]=%EF%BB%BF3&days[][x]=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1][x]=-1&days[constructor]=7&days[19]=7suffix&days[21]=a+b&days[1][x]=7&days[1][x]=a+b", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1]=", - "scalar": false, - "truthy": true, - "value": "" - }, - { - "query": "days=a+b&days[constructor]=7&days[toString]=%FF&days[0][]=-1", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[][x]=%zz&days[x]=0x10&other=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][]=7suffix&days[1][x]=%FF&days[21]=7suffix&days[19]=-1&days=%FF&days[19]=%FF&days[1][x]=-1&days[1][x]=-1", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][x]=%EF%BB%BF3&days[20]=&days[x]=0x10&days[20]=%zz&days[20]=2&days[]=%EF%BB%BF3&days[][x]=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1][x]=-1&days[toString]=7suffix&days[0][]=%FF&days[0]=%FF&days=a+b&days[19]=7&days[21]=-1&days[constructor]=-1&days[constructor]=7&days[x][]=7", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[20]=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0]=%FF&days[1][x]=a+b&days[constructor]=%FF&days[constructor]=a+b&days[0]=-1&days[0][]=7suffix", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[]=2", - "scalar": false, - "truthy": true, - "value": "2" - }, - { - "query": "days[21]=7suffix&days[0][]=7&days[x][]=%FF&days[constructor]=-1", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[]=%zz", - "scalar": false, - "truthy": true, - "value": "%zz" - }, - { - "query": "days=%FF&days=%FF&days[1][x]=7suffix&days[constructor]=7&days[0][]=7&days[19]=7&days=%FF&days[21]=%FF&days[0][]=-1&days[toString]=-1", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[x]=2&days[__proto__]=%zz&days[x]=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[21]=%FF&days[1][x]=a+b&days[1][x]=a+b&days[1][x]=a+b", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "other=", - "scalar": false, - "truthy": false, - "value": "undefined" - }, - { - "query": "days[0][]=%FF&days[constructor]=7&days[0][]=%FF&days[0]=%FF", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][x]=%zz&days[x]=%EF%BB%BF3&days[0][x]=%EF%BB%BF3&days[x]=&days[]=2&other=%zz&other=%zz&days[1]=%zz&days[]=0x10", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1][x]=-1&days[21]=%FF&days[21]=a+b&days[1][x]=7suffix&days=a+b&days=7suffix", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[__proto__]=0x10&days[0][x]=%zz&days[][x]=2&days[]=&days[][x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[toString]=7suffix&days[21]=7&days[0][]=%FF&days[0]=a+b&days[0]=a+b&days=7&days[1][x]=-1&days[1][x]=a+b", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[x]=&days[__proto__]=&days[]=%zz&other=%EF%BB%BF3&days[x]=0x10&days[x]=%EF%BB%BF3&days[20]=&days[0][x]=&days[][x]=%zz", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][]=-1&days[x][]=%FF&days[toString]=a+b&days[21]=7&days[0]=%FF&days[21]=%FF", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[0][x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[toString]=%FF&days[19]=-1&days[1][x]=%FF&days[0]=7suffix", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[]=", - "scalar": false, - "truthy": true, - "value": "" - }, - { - "query": "days[constructor]=7&days[1][x]=7suffix&days[0]=%FF&days[0][]=a+b&days[19]=a+b&days=a+b&days[constructor]=-1&days=%FF&days[19]=-1&days[21]=7suffix", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][x]=%EF%BB%BF3&days[__proto__]=2&days[valueOf]=%EF%BB%BF3&days[]=0x10&days[20]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[21]=%FF&days[0]=7suffix&days[1][x]=7suffix&days[x][]=-1", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[]=0x10&days[__proto__]=&days[0][x]=2&days[__proto__]=0x10&days[x]=%zz&other=%zz&days[valueOf]=&days[]=0x10&days[x]=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[constructor]=7suffix&days=a+b", - "scalar": false, - "truthy": true, - "value": "[object Object],a b" - }, - { - "query": "days[1]=%zz&days[][x]=&days[]=", - "scalar": false, - "truthy": true, - "value": "[object Object],%zz," - }, - { - "query": "days[1][x]=-1&days[0]=%FF&days[19]=7suffix&days[x][]=-1&days[toString]=%FF&days[21]=7suffix", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[][x]=2&days[][x]=&days[1]=0x10&days[][x]=0x10&days[0][x]=%zz&days[valueOf]=2&other=%zz", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[constructor]=%FF&days[1][x]=-1&days[constructor]=%FF&days[0][]=%FF", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1]=0x10&days[x]=&days[0][x]=0x10", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[21]=-1&days[1][x]=%FF", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[]=0x10&days[]=2&days[1]=0x10&days[20]=0x10&days[20]=&days[1]=%EF%BB%BF3&days[20]=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[19]=7suffix&days=a+b&days[toString]=a+b&days[19]=%FF&days=7&days[19]=7suffix", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "other=%EF%BB%BF3", - "scalar": false, - "truthy": false, - "value": "undefined" - }, - { - "query": "days[0][]=a+b&days[0][]=-1&days[21]=-1&days[constructor]=7suffix&days[21]=-1&days[x][]=7suffix", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "other=%EF%BB%BF3&days[x]=%zz&days[][x]=0x10&days[20]=&days[0][x]=", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1][x]=7&days[0][]=7suffix&days[0]=a+b&days[x][]=a+b&days[constructor]=7&days[constructor]=a+b", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[]=0x10", - "scalar": false, - "truthy": true, - "value": "0x10" - }, - { - "query": "days[1][x]=a+b&days[x][]=%FF&days[0][]=a+b&days[21]=7", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[__proto__]=%zz&days[__proto__]=0x10&days[]=%EF%BB%BF3&other=2&days[__proto__]=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[19]=a+b&days[constructor]=-1&days[constructor]=-1&days[19]=%FF&days[0]=7&days[19]=7suffix&days[x][]=a+b&days[1][x]=a+b&days[0]=7suffix&days[1][x]=7suffix", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[valueOf]=0x10&days[20]=0x10&days[20]=&days[x]=2&days[0][x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[toString]=7suffix&days[1][x]=-1&days[x][]=-1&days[x][]=-1&days[19]=7suffix&days[0]=a+b&days[19]=%FF&days[toString]=a+b&days[0]=-1&days[21]=7suffix", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[__proto__]=0x10", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][]=a+b&days[toString]=%FF&days[toString]=7suffix&days[0]=a+b&days[19]=-1&days[toString]=7suffix", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[valueOf]=0x10&other=%EF%BB%BF3&other=%zz&days[1]=&other=0x10", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[21]=a+b&days=7suffix&days=-1&days[19]=a+b&days[constructor]=-1&days=7", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x]=2&days[valueOf]=%EF%BB%BF3&days[]=%zz&days[__proto__]=&other=", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[19]=7suffix&days[toString]=-1&days[0]=%FF&days[19]=7suffix&days[constructor]=a+b&days[1][x]=7suffix&days[0]=a+b&days[toString]=7suffix", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[][x]=0x10&other=&days[valueOf]=%zz", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x][]=%FF&days[x][]=%FF&days[x][]=7&days[0]=7suffix&days[0]=7&days[0]=7suffix&days[toString]=7suffix&days[toString]=-1", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[20]=&days[__proto__]=2&days[__proto__]=%EF%BB%BF3&days[valueOf]=0x10&days[x]=&days[][x]=2&days[0][x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][]=7&days[19]=%FF&days[0][]=-1&days[constructor]=7&days=7&days[21]=7&days[19]=7suffix&days[constructor]=a+b", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1]=0x10&days[20]=%zz&days[][x]=0x10&days[x]=&other=0x10", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days=a+b&days[1][x]=7&days[0][]=%FF&days=%FF&days[1][x]=7suffix&days[toString]=7suffix&days[19]=%FF&days[1][x]=7&days[constructor]=-1&days[x][]=7", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[]=", - "scalar": false, - "truthy": true, - "value": "" - }, - { - "query": "days[21]=a+b&days[19]=7suffix&days[1][x]=7suffix&days[21]=a+b&days[0]=a+b&days[0][]=a+b", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1]=%EF%BB%BF3&days[0][x]=%zz&days[1]=2&days[]=0x10&other=2", - "scalar": false, - "truthy": true, - "value": "[object Object],3,2,0x10" - }, - { - "query": "days[0]=-1&days[21]=a+b&days[1][x]=-1&days[21]=a+b&days[21]=7suffix&days[19]=7&days[19]=-1&days[0]=%FF", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[valueOf]=&days[1]=%EF%BB%BF3&days[valueOf]=&other=0x10&days[0][x]=", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x][]=7suffix&days[21]=%FF&days[constructor]=-1&days[21]=%FF", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[valueOf]=2&days[valueOf]=&days[valueOf]=%EF%BB%BF3&other=%EF%BB%BF3&days[__proto__]=0x10&days[][x]=%zz&days[20]=%EF%BB%BF3&days[20]=2&days[]=", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[constructor]=-1&days[19]=7suffix&days[19]=%FF&days[1][x]=7suffix&days[x][]=a+b&days[1][x]=7suffix&days[21]=%FF&days[toString]=7&days[x][]=7suffix&days[19]=%FF", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[x]=", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1][x]=7suffix&days[0][]=7suffix&days=%FF&days[0][]=a+b&days[toString]=-1&days[toString]=7suffix&days=-1&days[0][]=a+b&days[constructor]=a+b&days[0]=a+b", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[20]=0x10&days[]=2&days[0][x]=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[toString]=7suffix&days[0]=%FF&days[0]=7&days[x][]=7&days[x][]=7&days=7suffix&days[1][x]=%FF&days[19]=7", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[x]=", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[toString]=%FF&days[0]=a+b&days=-1&days=7&days[x][]=%FF&days[constructor]=-1&days[21]=-1&days[1][x]=%FF&days[0]=a+b&days[0][]=%FF", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[__proto__]=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[19]=7&days[toString]=a+b&days[0][]=%FF&days=-1&days[x][]=-1&days[toString]=7suffix&days[1][x]=a+b&days=7suffix&days[1][x]=%FF&days=a+b", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[1]=2&other=%zz&days[0][x]=", - "scalar": false, - "truthy": true, - "value": "[object Object],2" - }, - { - "query": "days[21]=%FF&days[1][x]=-1", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[][x]=%EF%BB%BF3&days[1]=0x10&days[__proto__]=%EF%BB%BF3&days[__proto__]=%zz&days[__proto__]=0x10", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x][]=7&days[constructor]=-1&days[x][]=a+b&days[1][x]=%FF&days[0][]=7suffix&days[19]=a+b&days=a+b&days[constructor]=%FF&days[toString]=%FF&days[0]=-1", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[]=&days[1]=&days[x]=&days[__proto__]=0x10&days[x]=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[toString]=-1&days[19]=a+b&days[constructor]=a+b&days[1][x]=-1&days[toString]=%FF&days[x][]=7suffix", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[]=2", - "scalar": false, - "truthy": true, - "value": "2" - }, - { - "query": "days[0][]=-1&days[0]=a+b&days[0]=7suffix&days=7suffix&days[0]=-1&days[21]=a+b&days[0][]=7suffix&days[21]=%FF&days[1][x]=a+b&days[x][]=-1", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1]=&days[x]=2&days[__proto__]=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[toString]=7&days[21]=7suffix&days[1][x]=7suffix&days[0][]=a+b&days=-1&days[1][x]=a+b&days[19]=%FF&days[1][x]=-1", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[valueOf]=%EF%BB%BF3&days[][x]=2&days[valueOf]=%zz&days[][x]=%EF%BB%BF3&days[0][x]=0x10&days[valueOf]=2&other=%zz", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x][]=-1&days[1][x]=7suffix", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[valueOf]=&other=0x10&days[0][x]=0x10&days[][x]=%zz&other=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days=7&days[x][]=a+b&days[0]=a+b&days[19]=a+b&days[constructor]=7&days[toString]=7&days[0]=-1&days[0][]=a+b", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[1]=%EF%BB%BF3&days[20]=&days[1]=%zz", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1][x]=%FF&days[0]=%FF&days[0][]=a+b&days[19]=7suffix", - "scalar": false, - "truthy": true, - "value": "%FF,[object Object],a b,7suffix" - }, - { - "query": "days[][x]=%zz&days[x]=%zz&other=%EF%BB%BF3&days[20]=%EF%BB%BF3&days[1]=&other=0x10&days[1]=%zz", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[toString]=a+b&days[19]=-1&days[1][x]=%FF&days[constructor]=7suffix&days[0]=a+b&days[19]=%FF", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[x]=%EF%BB%BF3&days[][x]=0x10&days[x]=2&days[][x]=%zz&other=%zz", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days=%FF&days[constructor]=%FF&days[x][]=7&days=a+b&days[0][]=-1&days[toString]=7suffix&days[21]=%FF&days[19]=%FF&days[1][x]=7&days[toString]=7", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[20]=2&days[valueOf]=%EF%BB%BF3&days[x]=&days[x]=%zz&days[20]=%zz&days[__proto__]=%zz&days[valueOf]=2&days[valueOf]=0x10&days[][x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[toString]=7suffix&days=7&days[21]=-1&days[1][x]=-1", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[valueOf]=&days[1]=%EF%BB%BF3&days[][x]=0x10&days[x]=&days[0][x]=&days[20]=2&other=&days[]=%EF%BB%BF3&days[]=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[constructor]=%FF&days[toString]=%FF", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[0][x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[19]=-1&days[1][x]=7suffix&days[x][]=7&days[21]=-1", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x]=0x10&days[][x]=&other=0x10&other=&days[x]=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0]=a+b&days[x][]=-1&days[toString]=-1&days[x][]=-1&days[1][x]=%FF&days[21]=7suffix", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[20]=%EF%BB%BF3&days[valueOf]=0x10&days[x]=", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days=7suffix&days[19]=%FF", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[__proto__]=%EF%BB%BF3&days[1]=2&days[1]=0x10&days[valueOf]=%zz&days[]=%zz", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x][]=%FF&days=a+b&days[21]=7suffix&days[constructor]=7suffix", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[]=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "3" - }, - { - "query": "days[19]=a+b&days=7&days[constructor]=a+b&days[0]=7&days[0][]=%FF&days=7&days[0][]=7suffix&days[x][]=7&days[0][]=a+b&days[21]=-1", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[20]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[toString]=-1&days[0]=7&days[toString]=-1&days[0][]=%FF&days[toString]=a+b&days[19]=7&days[0]=7suffix&days[constructor]=7", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[1]=%EF%BB%BF3&days[valueOf]=%zz&other=%EF%BB%BF3&days[][x]=2&other=2&days[]=2&days[20]=%zz", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[toString]=%FF&days[1][x]=-1&days[1][x]=7&days[0]=-1", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[1]=%EF%BB%BF3&days[][x]=%EF%BB%BF3&days[0][x]=%zz&other=&days[0][x]=0x10&days[valueOf]=&days[x]=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days=a+b&days=7", - "scalar": false, - "truthy": true, - "value": "a b,7" - }, - { - "query": "days[][x]=%zz&other=%EF%BB%BF3&days[1]=&days[]=2&days[0][x]=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "[object Object],,2" - }, - { - "query": "days[toString]=7&days[19]=-1&days[x][]=-1&days[constructor]=%FF", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[][x]=0x10&days[x]=0x10&days[20]=0x10", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0]=7&days=-1&days[1][x]=7&days[21]=-1&days[19]=a+b&days[21]=-1&days[19]=7&days[toString]=7suffix&days[19]=-1&days[x][]=7", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[0][x]=%zz&days[]=%EF%BB%BF3&days[]=2&days[][x]=%EF%BB%BF3&other=2", - "scalar": false, - "truthy": true, - "value": "[object Object],3,2" - }, - { - "query": "days[21]=7suffix&days[0]=%FF&days[1][x]=a+b&days[0][]=a+b&days=-1&days[1][x]=7suffix", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "other=0x10&days[0][x]=&days[valueOf]=%EF%BB%BF3&days[][x]=%zz&days[20]=%zz", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[toString]=7suffix&days[21]=7suffix&days[0]=%FF&days[x][]=a+b&days[constructor]=7&days[0]=7", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[valueOf]=0x10&days[1]=%zz&days[1]=%EF%BB%BF3&days[__proto__]=&days[x]=&other=2&days[__proto__]=0x10", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x][]=%FF&days[toString]=-1&days[toString]=a+b&days[19]=7&days=a+b&days[1][x]=a+b", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[valueOf]=&days[__proto__]=&days[0][x]=%EF%BB%BF3&days[][x]=2&days[]=", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[toString]=-1&days[0][]=7suffix&days=a+b&days[0]=7suffix", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[1]=%EF%BB%BF3&days[__proto__]=0x10&days[]=&days[0][x]=2&days[1]=0x10&days[20]=%EF%BB%BF3&other=0x10&days[]=2&days[1]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x][]=7&days[1][x]=-1&days[0][]=-1&days[0]=7", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[][x]=%zz&days[]=0x10&days[]=2", - "scalar": false, - "truthy": true, - "value": "[object Object],0x10,2" - }, - { - "query": "days[0]=a+b&days[1][x]=7suffix&days[1][x]=7&days[toString]=%FF&days[0][]=%FF&days[21]=a+b", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[1]=&days[]=0x10&days[1]=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "0x10,,3" - }, - { - "query": "days[19]=a+b&days[0][]=%FF", - "scalar": false, - "truthy": true, - "value": "%FF,a b" - }, - { - "query": "days[1]=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "3" - }, - { - "query": "days[1][x]=%FF&days=a+b&days[0][]=7suffix&days[constructor]=a+b", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "other=0x10&days[]=%zz&days[x]=%zz&days[1]=%EF%BB%BF3&other=%zz&days[20]=0x10&other=", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[19]=-1&days[toString]=a+b&days[constructor]=7&days=7&days[0][]=a+b&days[1][x]=7suffix&days[x][]=7suffix&days[0]=7&days[constructor]=a+b&days[19]=%FF", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][x]=%zz&days[__proto__]=&days[20]=%EF%BB%BF3&days[1]=%zz&days[]=%zz", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days=-1&days[21]=7&days[0][]=7&days[1][x]=a+b&days[19]=7suffix&days[0]=a+b", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[][x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[toString]=7suffix&days[19]=-1&days[1][x]=-1&days[1][x]=%FF&days[19]=a+b&days[21]=a+b&days[toString]=7&days[toString]=-1&days[0]=%FF&days[1][x]=7", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[1]=%zz&days[0][x]=%zz&days[__proto__]=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[21]=7suffix&days[0][]=-1&days[1][x]=7suffix&days[0]=7suffix", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "other=2", - "scalar": false, - "truthy": false, - "value": "undefined" - }, - { - "query": "days[x][]=-1&days[1][x]=7suffix&days[0]=7suffix&days=%FF", - "scalar": false, - "truthy": true, - "value": "[object Object],%FF" - }, - { - "query": "other=", - "scalar": false, - "truthy": false, - "value": "undefined" - }, - { - "query": "days[toString]=%FF&days=a+b&days[0][]=7suffix&days[toString]=7", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[0][x]=0x10&days[0][x]=%EF%BB%BF3&days[1]=%EF%BB%BF3&days[valueOf]=%EF%BB%BF3&days[__proto__]=%zz&days[0][x]=%EF%BB%BF3&days[20]=%zz", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x][]=7suffix&days[1][x]=7suffix", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[__proto__]=%zz", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[19]=7&days[0][]=7&days[1][x]=%FF&days[toString]=a+b&days[1][x]=-1&days=a+b&days[toString]=%FF&days=%FF", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[]=0x10&days[20]=%EF%BB%BF3&other=%zz&days[][x]=%EF%BB%BF3&days[1]=0x10", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days=7suffix&days[x][]=7suffix&days[1][x]=-1&days[x][]=%FF", - "scalar": false, - "truthy": true, - "value": "7suffix,[object Object]" - }, - { - "query": "days[valueOf]=2&days[__proto__]=&days[1]=%EF%BB%BF3&days[__proto__]=2&days[__proto__]=%zz&days[20]=%EF%BB%BF3&days[1]=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x][]=7&days[0][]=a+b&days[0][]=7suffix&days[x][]=7suffix&days[0]=a+b&days[19]=7suffix", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[valueOf]=2&days[valueOf]=2&days[x]=%zz", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[21]=7&days[x][]=7suffix&days[toString]=%FF&days[constructor]=%FF&days[0]=%FF&days[x][]=a+b&days[constructor]=7suffix&days[0]=-1", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[][x]=0x10", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[19]=7suffix&days[x][]=%FF&days[19]=%FF&days[19]=%FF&days[19]=7&days[0]=7", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1]=%zz&days[valueOf]=%zz&days[__proto__]=", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[19]=a+b&days[1][x]=7suffix", - "scalar": false, - "truthy": true, - "value": "[object Object],a b" - }, - { - "query": "days[20]=0x10&days[20]=%EF%BB%BF3&days[x]=0x10&days[]=&days[][x]=&days[x]=2&days[x]=&days[x]=0x10&days[x]=", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][]=7&days[constructor]=7suffix&days[constructor]=%FF&days[constructor]=%FF&days[0][]=7&days[21]=-1", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[]=%EF%BB%BF3&days[][x]=0x10&days[valueOf]=2&days[]=0x10&other=2&other=&days[]=0x10&days[1]=2&days[__proto__]=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1][x]=%FF&days[21]=7suffix&days[0]=a+b&days[x][]=%FF", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1]=&days[0][x]=&days[][x]=0x10&days[20]=&days[__proto__]=%zz&days[valueOf]=&days[][x]=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[19]=-1&days[toString]=7&days[x][]=7suffix&days[constructor]=-1&days[0][]=7&days[x][]=a+b&days[toString]=-1&days[19]=7suffix&days[19]=a+b&days[1][x]=7suffix", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[]=&days[1]=%zz&days[]=&other=&days[0][x]=%zz&days[20]=&days[x]=2&days[][x]=%EF%BB%BF3&other=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x][]=7suffix&days=7&days[constructor]=%FF&days[x][]=7suffix&days[constructor]=a+b&days[0][]=7&days[1][x]=7&days[0][]=a+b", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[][x]=&days[0][x]=0x10&days[0][x]=0x10&other=%EF%BB%BF3&days[__proto__]=0x10", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0]=7suffix&days[0]=7", - "scalar": false, - "truthy": true, - "value": "7suffix,7" - }, - { - "query": "days[x]=%EF%BB%BF3&days[x]=%EF%BB%BF3&days[__proto__]=0x10", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[21]=%FF&days[0]=a+b&days[1][x]=%FF&days[x][]=-1&days[0]=7&days[19]=-1", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[20]=%EF%BB%BF3&days[]=&days[20]=&days[valueOf]=%zz&days[x]=2&days[__proto__]=0x10&days[]=%zz", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[toString]=7&days[1][x]=-1&days[1][x]=a+b&days[0]=7suffix", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[][x]=%EF%BB%BF3&days[__proto__]=&days[x]=2&days[][x]=&days[x]=%zz", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[21]=7&days[0]=-1&days[1][x]=-1&days[toString]=-1", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[][x]=&days[][x]=%zz&days[20]=%zz&days[valueOf]=2&days[0][x]=0x10&other=2&days[]=2&days[valueOf]=&days[20]=", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0]=-1&days[1][x]=-1&days[x][]=-1&days[0][]=-1&days[constructor]=7&days[1][x]=-1", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x]=0x10", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[19]=-1&days[x][]=7suffix&days[19]=7&days[constructor]=7&days[21]=7&days[0][]=7suffix", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x]=%EF%BB%BF3&days[valueOf]=&days[20]=&days[]=&days[0][x]=0x10", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[toString]=a+b&days[19]=%FF&days[19]=%FF&days[x][]=-1&days[0]=a+b&days[1][x]=-1", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[1]=0x10&other=2&days[valueOf]=0x10&days[]=%EF%BB%BF3&days[][x]=%EF%BB%BF3&days[20]=0x10&days[][x]=%EF%BB%BF3&days[x]=%EF%BB%BF3&days[][x]=0x10", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[21]=7&days[toString]=7suffix&days[0]=-1&days[1][x]=a+b&days[21]=a+b&days[toString]=%FF&days[0][]=7suffix&days[0][]=%FF&days=a+b&days[0][]=%FF", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[]=2&days[0][x]=%EF%BB%BF3&days[__proto__]=&days[__proto__]=&days[][x]=%zz&days[20]=%zz&days[valueOf]=0x10", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0]=7suffix&days[21]=%FF&days[constructor]=7suffix&days[19]=7&days[0]=%FF&days[1][x]=a+b&days[21]=7&days[19]=7suffix", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][x]=%zz&days[__proto__]=0x10&other=&other=0x10&days[][x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[constructor]=%FF&days[21]=-1", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[__proto__]=&days[20]=%zz&days[1]=0x10&days[][x]=&days[0][x]=2&days[0][x]=0x10&days[1]=0x10", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[21]=a+b&days[0]=7suffix&days[21]=7suffix&days=%FF&days[x][]=-1&days[toString]=%FF&days[toString]=7suffix&days[0][]=7suffix&days[1][x]=7&days[0]=%FF", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[1]=&days[0][x]=%zz&days[valueOf]=%zz&days[][x]=%EF%BB%BF3&days[0][x]=2&days[1]=&other=0x10", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[21]=7&days[1][x]=-1&days[0][]=7suffix&days[0][]=-1", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[]=%EF%BB%BF3&days[]=%zz&days[][x]=2&days[20]=2&days[valueOf]=0x10&days[][x]=&days[20]=&days[x]=&days[x]=%zz", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1][x]=-1&days[0]=-1&days[1][x]=%FF&days[21]=7suffix", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[20]=%zz&days[__proto__]=&other=&other=0x10&days[][x]=0x10", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x][]=%FF&days[1][x]=-1&days[0][]=%FF&days[1][x]=7suffix&days[constructor]=%FF&days[toString]=a+b&days[1][x]=%FF&days[x][]=7", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[1]=%zz&days[x]=0x10&days[1]=&days[__proto__]=2&days[1]=%zz", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[19]=7&days[toString]=7", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[valueOf]=", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x][]=7&days[constructor]=7suffix&days[x][]=7&days[19]=%FF&days[21]=a+b&days[0]=a+b", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][x]=%EF%BB%BF3&days[valueOf]=2&days[valueOf]=%zz", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0]=a+b&days[21]=7&days[19]=7&days[0]=%FF&days[0][]=-1&days[toString]=7&days[1][x]=a+b&days[x][]=%FF&days[1][x]=-1&days[21]=7", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[0][x]=0x10", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][]=-1&days[1][x]=-1&days[0][]=7&days[toString]=7&days[0][]=-1&days[constructor]=7&days[19]=-1&days=%FF", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[0][x]=%zz&days[20]=0x10&other=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[constructor]=-1&days[0][]=7suffix&days=%FF&days[19]=a+b&days[0]=-1&days[21]=-1", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1]=0x10&days[x]=%zz&days[x]=%zz&days[valueOf]=0x10&days[]=%zz", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0]=7suffix&days[x][]=-1&days[19]=-1&days=7suffix&days[constructor]=%FF&days[0][]=7&days[x][]=7suffix&days=a+b", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[][x]=&days[valueOf]=0x10&days[valueOf]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days=7&days[constructor]=7&days[constructor]=%FF&days[toString]=7suffix&days[x][]=-1&days[x][]=7suffix&days[constructor]=7suffix&days[21]=%FF&days[toString]=7suffix&days[constructor]=%FF", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[]=", - "scalar": false, - "truthy": true, - "value": "" - }, - { - "query": "days[21]=-1&days[19]=a+b&days[19]=a+b&days[x][]=a+b&days[19]=-1&days=%FF&days[0][]=-1&days[21]=-1", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[__proto__]=", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[toString]=-1&days[1][x]=7suffix&days[0]=7&days[0][]=7suffix&days[toString]=7&days[21]=-1", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[20]=%zz", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][]=a+b&days[x][]=a+b&days[toString]=7suffix&days[0]=7suffix", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[][x]=%EF%BB%BF3&days[][x]=%EF%BB%BF3&days[1]=%EF%BB%BF3&days[][x]=&days[__proto__]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1][x]=7&days[21]=a+b", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[20]=", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[19]=7suffix&days=%FF&days[toString]=a+b&days[0]=7suffix&days=a+b&days[19]=7suffix&days[1][x]=7&days[1][x]=7", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[20]=0x10&days[20]=%EF%BB%BF3&days[0][x]=%zz&days[__proto__]=%zz&days[__proto__]=%EF%BB%BF3&days[][x]=%EF%BB%BF3&days[20]=0x10", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[constructor]=%FF&days[21]=%FF&days[21]=%FF&days[constructor]=a+b&days=-1&days[0][]=7", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[20]=0x10&other=0x10&days[1]=%zz&days[]=%EF%BB%BF3&days[x]=%zz", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[constructor]=a+b&days[x][]=-1", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[valueOf]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[21]=-1&days[toString]=a+b", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[valueOf]=2&days[][x]=2&days[valueOf]=%zz&days[valueOf]=2&days[1]=&other=0x10&other=0x10", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x][]=%FF&days[0][]=%FF", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1]=&days[__proto__]=&days[0][x]=2&days[x]=2&other=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days=7&days[0][]=7&days[1][x]=7&days[x][]=7&days[21]=7&days[toString]=a+b&days=-1&days[constructor]=7", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[20]=%zz&days[][x]=&days[][x]=2&other=%EF%BB%BF3&days[]=0x10", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[21]=%FF&days[21]=7&days[19]=%FF&days[x][]=-1&days[x][]=%FF&days=-1", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x]=&days[x]=&days[__proto__]=%EF%BB%BF3&days[20]=&days[valueOf]=%zz&days[][x]=&days[20]=%EF%BB%BF3&days[20]=&days[20]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0]=a+b&days[0][]=7", - "scalar": false, - "truthy": true, - "value": "a b,7" - }, - { - "query": "days[x]=2&days[valueOf]=&days[1]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][]=7&days[0]=a+b", - "scalar": false, - "truthy": true, - "value": "7,a b" - }, - { - "query": "days[0][x]=%EF%BB%BF3&days[1]=%EF%BB%BF3&days[x]=", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[toString]=a+b&days[1][x]=-1&days[toString]=7suffix&days[constructor]=7suffix&days[1][x]=a+b&days[1][x]=%FF", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[0][x]=0x10&days[__proto__]=%EF%BB%BF3&days[valueOf]=&days[20]=%EF%BB%BF3&days[20]=&days[1]=%EF%BB%BF3&days[x]=0x10&days[]=%EF%BB%BF3&days[valueOf]=%zz", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0]=7suffix&days[1][x]=7suffix&days[x][]=%FF&days[0]=7suffix&days[toString]=%FF&days[0]=7&days[1][x]=7suffix&days[constructor]=-1", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[0][x]=0x10&days[valueOf]=&days[valueOf]=%EF%BB%BF3&other=&days[x]=", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][]=7&days[toString]=%FF&days[x][]=7&days[19]=7&days[0]=a+b&days[1][x]=-1", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[]=%zz", - "scalar": false, - "truthy": true, - "value": "%zz" - }, - { - "query": "days[21]=-1&days[x][]=a+b&days=%FF&days=-1&days[x][]=a+b&days[toString]=7suffix", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[valueOf]=2&days[valueOf]=%zz&days[]=&days[0][x]=2&days[]=", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[toString]=-1&days[x][]=7&days[1][x]=a+b&days[toString]=7", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[x]=%EF%BB%BF3&days[1]=%EF%BB%BF3&days[valueOf]=2&days[20]=&days[][x]=", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][]=7suffix&days=%FF&days[constructor]=%FF&days[0]=7suffix&days[0][]=-1&days[1][x]=-1&days[toString]=-1&days[21]=7&days=-1&days[constructor]=%FF", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[0][x]=2&days[20]=%EF%BB%BF3&days[20]=%zz&days[]=&days[][x]=", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0]=%FF&days[0][]=a+b&days[toString]=7suffix&days[19]=a+b&days[toString]=7suffix&days[19]=-1", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[valueOf]=&days[]=&days[0][x]=", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days=%FF&days[x][]=7&days[constructor]=%FF&days[0][]=%FF&days[x][]=7suffix&days[19]=%FF", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[20]=%EF%BB%BF3&days[1]=&days[0][x]=%EF%BB%BF3&days[0][x]=2&other=2&days[valueOf]=0x10&days[__proto__]=&days[x]=%zz&days[1]=", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0]=%FF&days[toString]=7suffix&days[toString]=7&days[21]=7&days=a+b&days[0][]=7", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[__proto__]=%zz&other=&other=0x10&days[]=0x10&days[][x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days=7suffix&days[0][]=a+b&days[0]=7&days[1][x]=7suffix", - "scalar": false, - "truthy": true, - "value": "7suffix,[object Object],7" - }, - { - "query": "days[__proto__]=2&days[0][x]=%EF%BB%BF3&days[][x]=0x10", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[21]=a+b&days[21]=a+b&days[0][]=%FF&days[1][x]=7&days[x][]=7&days[0]=7suffix", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][x]=&days[__proto__]=%EF%BB%BF3&days[][x]=2&days[x]=%EF%BB%BF3&days[valueOf]=%zz&days[][x]=2&days[x]=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days=-1&days[0]=a+b", - "scalar": false, - "truthy": true, - "value": "-1,a b" - }, - { - "query": "days[x]=%EF%BB%BF3&days[__proto__]=2&other=%EF%BB%BF3&days[valueOf]=%zz&days[0][x]=0x10", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[toString]=-1&days[21]=-1&days[21]=7suffix&days[x][]=7suffix&days[0]=%FF&days[0][]=a+b&days=7&days[constructor]=-1", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[][x]=2&days[]=%zz&days[20]=2&days[][x]=&days[__proto__]=", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0]=7suffix&days[x][]=7suffix&days[21]=7&days[constructor]=7suffix&days[1][x]=a+b&days[21]=%FF&days[19]=-1&days[19]=7suffix&days[constructor]=a+b&days[0][]=7", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][x]=%EF%BB%BF3&days[1]=2&other=%zz", - "scalar": false, - "truthy": true, - "value": "[object Object],2" - }, - { - "query": "days[1][x]=a+b&days[19]=a+b&days[toString]=-1&days[0]=%FF&days=-1&days[21]=a+b", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[20]=&days[]=%EF%BB%BF3&days[1]=2&days[1]=2&other=0x10", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1][x]=-1&days[toString]=%FF&days[x][]=7suffix&days[21]=-1", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[][x]=0x10&days[20]=0x10&days[x]=%zz&days[valueOf]=%EF%BB%BF3&days[__proto__]=2&days[0][x]=0x10&other=", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[constructor]=7suffix&days=-1&days[1][x]=%FF&days=%FF&days[constructor]=a+b&days[0][]=-1&days[0][]=-1&days[0]=7", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[]=&days[][x]=0x10&days[20]=%zz&days[][x]=%zz&days[1]=", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[toString]=7suffix&days[0][]=a+b&days[0][]=7&days[1][x]=-1&days=-1&days[x][]=%FF&days[constructor]=7suffix&days[x][]=7suffix", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[__proto__]=0x10&other=%zz&days[valueOf]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][]=%FF&days[toString]=-1&days[19]=-1&days[0][]=7&days[0]=7suffix&days[0][]=7suffix&days[x][]=%FF&days[x][]=7&days[1][x]=a+b&days[19]=7", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[1]=0x10", - "scalar": false, - "truthy": true, - "value": "0x10" - }, - { - "query": "days[x][]=7suffix&days[constructor]=-1&days[constructor]=7suffix&days[21]=a+b&days[19]=a+b&days[0]=7suffix&days[0][]=%FF&days[0][]=7", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[][x]=2&days[valueOf]=%EF%BB%BF3&days[__proto__]=%EF%BB%BF3&days[1]=&days[valueOf]=2&days[__proto__]=%EF%BB%BF3&days[0][x]=&days[x]=%EF%BB%BF3&days[20]=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1][x]=-1&days[19]=7suffix&days[0]=7suffix&days[19]=-1", - "scalar": false, - "truthy": true, - "value": "7suffix,[object Object],7suffix,-1" - }, - { - "query": "days[valueOf]=2&days[x]=%EF%BB%BF3&other=", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][]=a+b&days[1][x]=a+b&days=7&days[21]=%FF&days[19]=7&days[21]=7&days[toString]=-1&days[0][]=-1", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[1]=2&other=%zz&days[][x]=0x10&days[0][x]=%zz&days[]=%zz", - "scalar": false, - "truthy": true, - "value": "[object Object],2,%zz" - }, - { - "query": "days[1][x]=7suffix&days[0]=-1", - "scalar": false, - "truthy": true, - "value": "-1,[object Object]" - }, - { - "query": "days[]=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "3" - }, - { - "query": "days=7&days[toString]=-1&days[0][]=-1&days[1][x]=-1&days[x][]=7&days[x][]=%FF&days[1][x]=7suffix&days[x][]=%FF", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[20]=&days[20]=%EF%BB%BF3&days[__proto__]=2&days[]=0x10&days[0][x]=0x10", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[21]=a+b&days[19]=-1", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[20]=2&days[valueOf]=0x10&days[][x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1][x]=7suffix&days[0][]=a+b&days[21]=7suffix&days[1][x]=a+b", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[__proto__]=2&days[20]=0x10&days[][x]=0x10&days[]=0x10&days[valueOf]=", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[constructor]=7&days[0][]=a+b&days[19]=a+b&days[toString]=-1&days[1][x]=a+b&days[1][x]=a+b&days[x][]=a+b&days[x][]=-1", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[][x]=&days[][x]=2&other=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][]=7suffix&days[19]=7suffix&days[1][x]=%FF&days[constructor]=-1&days[x][]=-1&days[x][]=%FF&days[0][]=7&days[1][x]=a+b&days[19]=7suffix&days[21]=7", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "other=%EF%BB%BF3&days[1]=%EF%BB%BF3&days[0][x]=0x10&days[x]=&days[1]=%EF%BB%BF3&days[x]=&days[1]=0x10&days[1]=2&days[x]=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][]=7&days[0][]=7", - "scalar": false, - "truthy": true, - "value": "7,7" - }, - { - "query": "days[]=%zz&days[0][x]=%EF%BB%BF3&days[0][x]=&days[][x]=0x10&days[0][x]=%zz&days[]=&days[]=%EF%BB%BF3&days[valueOf]=2&days[valueOf]=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[constructor]=7&days[constructor]=7suffix&days[0]=7suffix&days=7&days[19]=a+b&days[0][]=7&days[19]=7suffix&days[21]=a+b&days[constructor]=%FF&days[0][]=%FF", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[20]=%EF%BB%BF3&days[1]=%zz&days[1]=%zz&days[0][x]=0x10&days[valueOf]=0x10&other=2&days[20]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0]=-1&days[constructor]=%FF&days[1][x]=a+b&days[1][x]=7suffix&days[constructor]=7&days[19]=7suffix&days[x][]=%FF&days[x][]=%FF", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[][x]=%zz&days[][x]=%zz&days[1]=&other=%zz&days[1]=%zz", - "scalar": false, - "truthy": true, - "value": "[object Object],,%zz" - }, - { - "query": "days[toString]=a+b&days[0][]=7suffix&days[0]=a+b&days[0][]=a+b&days[x][]=7suffix&days[1][x]=7suffix&days[19]=7suffix&days[0][]=a+b&days[x][]=%FF&days[21]=a+b", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[]=", - "scalar": false, - "truthy": true, - "value": "" - }, - { - "query": "days[0]=%FF&days=%FF&days=%FF&days[toString]=%FF&days=7suffix&days[constructor]=7suffix&days[constructor]=7&days[19]=7", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[][x]=%EF%BB%BF3&days[0][x]=%EF%BB%BF3&days[]=%zz&days[20]=0x10&days[1]=0x10&days[x]=2&days[__proto__]=%zz&days[]=%zz&days[1]=", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x][]=a+b&days[x][]=a+b&days[x][]=a+b&days[1][x]=7suffix&days[1][x]=7&days[19]=7suffix&days[x][]=a+b&days[x][]=7suffix", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1]=2&days[]=2&days[20]=0x10&days[valueOf]=&days[__proto__]=%zz&other=2&days[x]=%zz&days[0][x]=2&other=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1][x]=-1&days[toString]=a+b&days[0][]=7&days[21]=a+b&days[toString]=-1&days[x][]=7suffix&days[x][]=a+b&days[0]=%FF&days[19]=%FF&days[19]=%FF", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "other=%EF%BB%BF3&other=0x10&other=0x10&other=0x10&days[__proto__]=0x10&days[20]=2&days[valueOf]=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[toString]=7&days[constructor]=7&days[21]=a+b&days[toString]=7&days[0][]=a+b&days[21]=a+b&days[1][x]=7suffix&days[0]=%FF&days=-1&days[0][]=%FF", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[valueOf]=%zz", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x][]=%FF&days[1][x]=7&days[21]=7&days[21]=%FF&days[0][]=-1&days[1][x]=7&days[21]=7suffix&days[toString]=%FF", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[__proto__]=2&days[valueOf]=0x10&days[0][x]=0x10&days[20]=%zz&days[][x]=2&days[][x]=%EF%BB%BF3&other=0x10&days[20]=2&days[][x]=0x10", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[constructor]=%FF&days[0]=-1&days[toString]=-1&days[0]=7suffix&days[toString]=7&days[x][]=7", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[][x]=2&days[__proto__]=%zz&days[0][x]=2&days[valueOf]=2&days[1]=%zz", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[constructor]=%FF&days[0]=%FF&days=7suffix&days[19]=7&days=7suffix&days[0]=%FF&days[constructor]=7suffix&days[x][]=-1&days[0]=%FF&days[0]=%FF", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[__proto__]=&days[1]=2&days[x]=%EF%BB%BF3&days[]=&days[__proto__]=2&days[]=%EF%BB%BF3&other=0x10&days[__proto__]=0x10&days[20]=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][]=-1&days[constructor]=%FF&days[0]=a+b&days[21]=7suffix&days[x][]=%FF&days[1][x]=7suffix&days[0]=-1&days[toString]=%FF&days[x][]=7suffix&days[x][]=7suffix", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[0][x]=%zz&days[__proto__]=%EF%BB%BF3&days[0][x]=2&days[1]=0x10&days[x]=&days[]=%EF%BB%BF3&days[0][x]=&days[][x]=0x10&other=%zz", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[19]=7suffix&days[19]=-1&days=7suffix&days[19]=7&days=-1&days[toString]=a+b&days[0][]=7&days[toString]=7suffix&days=a+b&days[constructor]=-1", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[1]=&days[0][x]=0x10&days[0][x]=0x10&days[1]=2&days[valueOf]=%zz", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][]=a+b&days[19]=%FF&days[0]=7&days[21]=7suffix&days[x][]=%FF&days[0][]=7suffix", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1]=&days[20]=2&days[valueOf]=%zz&days[0][x]=&days[x]=0x10", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[21]=%FF&days[constructor]=a+b", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][x]=%zz", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[21]=%FF&days[0]=a+b&days[x][]=-1&days[21]=7", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[__proto__]=", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days=-1&days[toString]=7suffix", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[valueOf]=&other=2&days[][x]=%EF%BB%BF3&days[__proto__]=0x10&days[]=%EF%BB%BF3&other=2&days[x]=0x10&days[0][x]=2&other=", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[toString]=7suffix&days[19]=-1&days[21]=a+b&days=7&days[0]=7suffix&days[x][]=a+b&days[toString]=%FF&days[0][]=-1&days[toString]=7&days[toString]=a+b", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "other=%zz&days[valueOf]=%zz&other=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1][x]=7&days[0]=7suffix&days[19]=7suffix&days=%FF&days[1][x]=a+b&days[toString]=-1&days[19]=a+b&days[21]=7suffix&days[0][]=7&days[19]=-1", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "other=%EF%BB%BF3&other=0x10&days[x]=%zz", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][]=%FF&days[19]=-1&days[toString]=7&days[x][]=7suffix&days[0]=-1&days[x][]=7&days[21]=7&days[x][]=%FF", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[]=%zz&days[1]=2&days[valueOf]=&days[][x]=%zz&days[20]=%zz&days[x]=%EF%BB%BF3&other=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[toString]=%FF&days=7suffix", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[20]=%EF%BB%BF3&other=0x10&days[][x]=%EF%BB%BF3&days[]=%zz&days[]=%EF%BB%BF3&days[20]=%EF%BB%BF3&days[0][x]=2&days[__proto__]=&other=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0]=7&days[constructor]=a+b&days[1][x]=-1&days[toString]=%FF&days[x][]=%FF&days[0][]=%FF", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[20]=&other=%zz&days[20]=2&days[x]=0x10&days[valueOf]=0x10", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x][]=7suffix&days[x][]=%FF&days[0][]=7suffix&days=-1&days[toString]=7&days[0]=%FF&days[constructor]=7suffix&days[0][]=%FF&days[0]=7suffix&days=a+b", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "other=%zz", - "scalar": false, - "truthy": false, - "value": "undefined" - }, - { - "query": "days[0][]=7&days[1][x]=%FF&days[21]=-1&days[19]=-1&days[19]=a+b&days[0][]=7suffix&days[19]=7suffix&days[x][]=%FF", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[][x]=2&days[20]=0x10&days[1]=2&days[1]=%EF%BB%BF3&days[20]=&other=%EF%BB%BF3&days[]=&other=2&days[]=0x10", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[19]=-1&days[toString]=7suffix&days[0][]=7&days[0]=%FF&days[21]=7&days[toString]=7suffix", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[20]=%zz", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0]=a+b&days[0][]=7suffix&days[1][x]=%FF&days[constructor]=a+b", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[20]=2&days[x]=0x10&days[][x]=%EF%BB%BF3&days[1]=%EF%BB%BF3&days[][x]=0x10&days[][x]=%zz&days[__proto__]=0x10&days[0][x]=%EF%BB%BF3&days[1]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[toString]=a+b&days[x][]=7&days[0][]=7&days[toString]=7&days[0]=7suffix&days[0]=7&days[21]=%FF&days=-1&days=%FF&days=%FF", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[1]=2&days[0][x]=&days[20]=0x10&days[]=%zz&days[0][x]=%EF%BB%BF3", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][]=-1&days[toString]=%FF", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[][x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1][x]=7&days[1][x]=%FF&days[toString]=a+b&days[1][x]=7&days=%FF&days[constructor]=7suffix&days[constructor]=7&days[0][]=%FF&days[21]=%FF&days[0]=7", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[valueOf]=%zz", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][]=-1&days[0][]=7", - "scalar": false, - "truthy": true, - "value": "-1,7" - }, - { - "query": "days[x]=0x10&days[valueOf]=0x10&days[][x]=&days[__proto__]=&days[1]=%EF%BB%BF3&days[0][x]=%zz&days[][x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1][x]=7&days[0][]=a+b&days[1][x]=7suffix&days[21]=%FF", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[__proto__]=&days[valueOf]=%EF%BB%BF3&days[20]=0x10&days[]=&days[20]=%zz", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[21]=-1&days[21]=-1", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x]=", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[toString]=a+b&days[1][x]=-1", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days=7&days=2", - "scalar": false, - "truthy": true, - "value": "7,2" - }, - { - "query": "days=7&days[]=2", - "scalar": false, - "truthy": true, - "value": "7,2" - }, - { - "query": "days=7&days[0]=2", - "scalar": false, - "truthy": true, - "value": "7,2" - }, - { - "query": "days=7&days[1]=2", - "scalar": false, - "truthy": true, - "value": "7,2" - }, - { - "query": "days=7&days[19]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days=7&days[20]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days=7&days[21]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "7,[object Object]" - }, - { - "query": "days=7&days[0][]=2", - "scalar": false, - "truthy": true, - "value": "7,2" - }, - { - "query": "days=7&days[][x]=2", - "scalar": false, - "truthy": true, - "value": "7,[object Object]" - }, - { - "query": "days=7&days[x][]=2", - "scalar": false, - "truthy": true, - "value": "7,[object Object]" - }, - { - "query": "days=7&days[0][x]=2", - "scalar": false, - "truthy": true, - "value": "7,[object Object]" - }, - { - "query": "days=7&days[1][x]=2", - "scalar": false, - "truthy": true, - "value": "7,[object Object]" - }, - { - "query": "days=7&days[__proto__]=2", - "scalar": false, - "truthy": true, - "value": "7,[object Object]" - }, - { - "query": "days=7&days[toString]=2", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days=7&days[valueOf]=2", - "scalar": false, - "truthy": true, - "value": "7,[object Object]" - }, - { - "query": "days=7&days[constructor]=2", - "scalar": false, - "truthy": true, - "value": "7,[object Object]" - }, - { - "query": "days=7&other=2", - "scalar": true, - "truthy": true, - "value": "7" - }, - { - "query": "days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=2", - "scalar": false, - "truthy": true, - "value": "7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,2" - }, - { - "query": "days=2&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7", - "scalar": false, - "truthy": true, - "value": "2,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7" - }, - { - "query": "days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days=2&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days=2&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days=2&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[]=7&days=2", - "scalar": false, - "truthy": true, - "value": "7,2" - }, - { - "query": "days[]=7&days[]=2", - "scalar": false, - "truthy": true, - "value": "7,2" - }, - { - "query": "days[]=7&days[0]=2", - "scalar": false, - "truthy": true, - "value": "7,2" - }, - { - "query": "days[]=7&days[1]=2", - "scalar": false, - "truthy": true, - "value": "7,2" - }, - { - "query": "days[]=7&days[19]=2", - "scalar": false, - "truthy": true, - "value": "7,2" - }, - { - "query": "days[]=7&days[20]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[]=7&days[21]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[]=7&days[0][]=2", - "scalar": false, - "truthy": true, - "value": "7,2" - }, - { - "query": "days[]=7&days[][x]=2", - "scalar": false, - "truthy": true, - "value": "7,[object Object]" - }, - { - "query": "days[]=7&days[x][]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[]=7&days[0][x]=2", - "scalar": false, - "truthy": true, - "value": "7,[object Object]" - }, - { - "query": "days[]=7&days[1][x]=2", - "scalar": false, - "truthy": true, - "value": "7,[object Object]" - }, - { - "query": "days[]=7&days[__proto__]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[]=7&days[toString]=2", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[]=7&days[valueOf]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[]=7&days[constructor]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[]=7&other=2", - "scalar": false, - "truthy": true, - "value": "7" - }, - { - "query": "days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days=2", - "scalar": false, - "truthy": true, - "value": "7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,2" - }, - { - "query": "days=2&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7", - "scalar": false, - "truthy": true, - "value": "2,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7" - }, - { - "query": "days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days=2&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days=2&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days=2&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0]=7&days=2", - "scalar": false, - "truthy": true, - "value": "7,2" - }, - { - "query": "days[0]=7&days[]=2", - "scalar": false, - "truthy": true, - "value": "7,2" - }, - { - "query": "days[0]=7&days[0]=2", - "scalar": false, - "truthy": true, - "value": "7,2" - }, - { - "query": "days[0]=7&days[1]=2", - "scalar": false, - "truthy": true, - "value": "7,2" - }, - { - "query": "days[0]=7&days[19]=2", - "scalar": false, - "truthy": true, - "value": "7,2" - }, - { - "query": "days[0]=7&days[20]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0]=7&days[21]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0]=7&days[0][]=2", - "scalar": false, - "truthy": true, - "value": "7,2" - }, - { - "query": "days[0]=7&days[][x]=2", - "scalar": false, - "truthy": true, - "value": "7,[object Object]" - }, - { - "query": "days[0]=7&days[x][]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0]=7&days[0][x]=2", - "scalar": false, - "truthy": true, - "value": "7,[object Object]" - }, - { - "query": "days[0]=7&days[1][x]=2", - "scalar": false, - "truthy": true, - "value": "7,[object Object]" - }, - { - "query": "days[0]=7&days[__proto__]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0]=7&days[toString]=2", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[0]=7&days[valueOf]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0]=7&days[constructor]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0]=7&other=2", - "scalar": false, - "truthy": true, - "value": "7" - }, - { - "query": "days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days=2", - "scalar": false, - "truthy": true, - "value": "7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,2" - }, - { - "query": "days=2&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7", - "scalar": false, - "truthy": true, - "value": "2,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7" - }, - { - "query": "days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days=2", - "scalar": false, - "truthy": true, - "value": "7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,2" - }, - { - "query": "days=2&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7", - "scalar": false, - "truthy": true, - "value": "2,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7" - }, - { - "query": "days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days=2", - "scalar": false, - "truthy": true, - "value": "[object Object],2" - }, - { - "query": "days=2&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7", - "scalar": false, - "truthy": true, - "value": "2,[object Object]" - }, - { - "query": "days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days=2", - "scalar": false, - "truthy": true, - "value": "[object Object],2" - }, - { - "query": "days=2&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7", - "scalar": false, - "truthy": true, - "value": "2,[object Object]" - }, - { - "query": "days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[0]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1]=7&days=2", - "scalar": false, - "truthy": true, - "value": "7,2" - }, - { - "query": "days[1]=7&days[]=2", - "scalar": false, - "truthy": true, - "value": "2,7" - }, - { - "query": "days[1]=7&days[0]=2", - "scalar": false, - "truthy": true, - "value": "2,7" - }, - { - "query": "days[1]=7&days[1]=2", - "scalar": false, - "truthy": true, - "value": "7,2" - }, - { - "query": "days[1]=7&days[19]=2", - "scalar": false, - "truthy": true, - "value": "7,2" - }, - { - "query": "days[1]=7&days[20]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1]=7&days[21]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1]=7&days[0][]=2", - "scalar": false, - "truthy": true, - "value": "2,7" - }, - { - "query": "days[1]=7&days[][x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object],7" - }, - { - "query": "days[1]=7&days[x][]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1]=7&days[0][x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object],7" - }, - { - "query": "days[1]=7&days[1][x]=2", - "scalar": false, - "truthy": true, - "value": "7,[object Object]" - }, - { - "query": "days[1]=7&days[__proto__]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1]=7&days[toString]=2", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[1]=7&days[valueOf]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1]=7&days[constructor]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1]=7&other=2", - "scalar": false, - "truthy": true, - "value": "7" - }, - { - "query": "days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days=2", - "scalar": false, - "truthy": true, - "value": "7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,2" - }, - { - "query": "days=2&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7", - "scalar": false, - "truthy": true, - "value": "2,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7" - }, - { - "query": "days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days=2", - "scalar": false, - "truthy": true, - "value": "7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,2" - }, - { - "query": "days=2&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7", - "scalar": false, - "truthy": true, - "value": "2,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7" - }, - { - "query": "days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days=2", - "scalar": false, - "truthy": true, - "value": "[object Object],2" - }, - { - "query": "days=2&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7", - "scalar": false, - "truthy": true, - "value": "2,[object Object]" - }, - { - "query": "days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days=2", - "scalar": false, - "truthy": true, - "value": "[object Object],2" - }, - { - "query": "days=2&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7", - "scalar": false, - "truthy": true, - "value": "2,[object Object]" - }, - { - "query": "days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[1]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[19]=7&days=2", - "scalar": false, - "truthy": true, - "value": "7,2" - }, - { - "query": "days[19]=7&days[]=2", - "scalar": false, - "truthy": true, - "value": "2,7" - }, - { - "query": "days[19]=7&days[0]=2", - "scalar": false, - "truthy": true, - "value": "2,7" - }, - { - "query": "days[19]=7&days[1]=2", - "scalar": false, - "truthy": true, - "value": "2,7" - }, - { - "query": "days[19]=7&days[19]=2", - "scalar": false, - "truthy": true, - "value": "7,2" - }, - { - "query": "days[19]=7&days[20]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[19]=7&days[21]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[19]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[19]=7&days[0][]=2", - "scalar": false, - "truthy": true, - "value": "2,7" - }, - { - "query": "days[19]=7&days[][x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object],7" - }, - { - "query": "days[19]=7&days[x][]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[19]=7&days[0][x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object],7" - }, - { - "query": "days[19]=7&days[1][x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object],7" - }, - { - "query": "days[19]=7&days[__proto__]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[19]=7&days[toString]=2", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[19]=7&days[valueOf]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[19]=7&days[constructor]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[19]=7&other=2", - "scalar": false, - "truthy": true, - "value": "7" - }, - { - "query": "days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days=2", - "scalar": false, - "truthy": true, - "value": "7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,2" - }, - { - "query": "days=2&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days=2", - "scalar": false, - "truthy": true, - "value": "7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,2" - }, - { - "query": "days=2&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days=2", - "scalar": false, - "truthy": true, - "value": "[object Object],2" - }, - { - "query": "days=2&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days=2", - "scalar": false, - "truthy": true, - "value": "[object Object],2" - }, - { - "query": "days=2&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[19]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[20]=7&days=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[20]=7&days[]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[20]=7&days[0]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[20]=7&days[1]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[20]=7&days[19]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[20]=7&days[20]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[20]=7&days[21]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[20]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[20]=7&days[0][]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[20]=7&days[][x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[20]=7&days[x][]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[20]=7&days[0][x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[20]=7&days[1][x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[20]=7&days[__proto__]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[20]=7&days[toString]=2", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[20]=7&days[valueOf]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[20]=7&days[constructor]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[20]=7&other=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days=2&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days=2&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days=2&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days=2&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[20]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[21]=7&days=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[21]=7&days[]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[21]=7&days[0]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[21]=7&days[1]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[21]=7&days[19]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[21]=7&days[20]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[21]=7&days[21]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[21]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[21]=7&days[0][]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[21]=7&days[][x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[21]=7&days[x][]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[21]=7&days[0][x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[21]=7&days[1][x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[21]=7&days[__proto__]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[21]=7&days[toString]=2", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[21]=7&days[valueOf]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[21]=7&days[constructor]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[21]=7&other=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days=2&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days=2&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days=2&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days=2&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[21]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x]=7&days=2", - "scalar": false, - "truthy": true, - "value": "[object Object],2" - }, - { - "query": "days[x]=7&days[]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x]=7&days[0]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x]=7&days[1]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x]=7&days[19]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x]=7&days[20]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x]=7&days[21]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x]=7&days[0][]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x]=7&days[][x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x]=7&days[x][]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x]=7&days[0][x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x]=7&days[1][x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x]=7&days[__proto__]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x]=7&days[toString]=2", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[x]=7&days[valueOf]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x]=7&days[constructor]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x]=7&other=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days=2", - "scalar": false, - "truthy": true, - "value": "[object Object],2" - }, - { - "query": "days=2&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7", - "scalar": false, - "truthy": true, - "value": "2,[object Object]" - }, - { - "query": "days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days=2", - "scalar": false, - "truthy": true, - "value": "[object Object],2" - }, - { - "query": "days=2&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7", - "scalar": false, - "truthy": true, - "value": "2,[object Object]" - }, - { - "query": "days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days=2", - "scalar": false, - "truthy": true, - "value": "[object Object],2" - }, - { - "query": "days=2&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7", - "scalar": false, - "truthy": true, - "value": "2,[object Object]" - }, - { - "query": "days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days=2", - "scalar": false, - "truthy": true, - "value": "[object Object],2" - }, - { - "query": "days=2&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7", - "scalar": false, - "truthy": true, - "value": "2,[object Object]" - }, - { - "query": "days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][]=7&days=2", - "scalar": false, - "truthy": true, - "value": "7,2" - }, - { - "query": "days[0][]=7&days[]=2", - "scalar": false, - "truthy": true, - "value": "7,2" - }, - { - "query": "days[0][]=7&days[0]=2", - "scalar": false, - "truthy": true, - "value": "7,2" - }, - { - "query": "days[0][]=7&days[1]=2", - "scalar": false, - "truthy": true, - "value": "7,2" - }, - { - "query": "days[0][]=7&days[19]=2", - "scalar": false, - "truthy": true, - "value": "7,2" - }, - { - "query": "days[0][]=7&days[20]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][]=7&days[21]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][]=7&days[0][]=2", - "scalar": false, - "truthy": true, - "value": "7,2" - }, - { - "query": "days[0][]=7&days[][x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][]=7&days[x][]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][]=7&days[0][x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][]=7&days[1][x]=2", - "scalar": false, - "truthy": true, - "value": "7,[object Object]" - }, - { - "query": "days[0][]=7&days[__proto__]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][]=7&days[toString]=2", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[0][]=7&days[valueOf]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][]=7&days[constructor]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][]=7&other=2", - "scalar": false, - "truthy": true, - "value": "7" - }, - { - "query": "days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days=2", - "scalar": false, - "truthy": true, - "value": "7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,2" - }, - { - "query": "days=2&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7", - "scalar": false, - "truthy": true, - "value": "2,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7" - }, - { - "query": "days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days=2", - "scalar": false, - "truthy": true, - "value": "7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,2" - }, - { - "query": "days=2&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7", - "scalar": false, - "truthy": true, - "value": "2,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7" - }, - { - "query": "days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days=2", - "scalar": false, - "truthy": true, - "value": "[object Object],2" - }, - { - "query": "days=2&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7", - "scalar": false, - "truthy": true, - "value": "2,[object Object]" - }, - { - "query": "days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days=2", - "scalar": false, - "truthy": true, - "value": "[object Object],2" - }, - { - "query": "days=2&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7", - "scalar": false, - "truthy": true, - "value": "2,[object Object]" - }, - { - "query": "days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[0][]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[][x]=7&days=2", - "scalar": false, - "truthy": true, - "value": "[object Object],2" - }, - { - "query": "days[][x]=7&days[]=2", - "scalar": false, - "truthy": true, - "value": "[object Object],2" - }, - { - "query": "days[][x]=7&days[0]=2", - "scalar": false, - "truthy": true, - "value": "[object Object],2" - }, - { - "query": "days[][x]=7&days[1]=2", - "scalar": false, - "truthy": true, - "value": "[object Object],2" - }, - { - "query": "days[][x]=7&days[19]=2", - "scalar": false, - "truthy": true, - "value": "[object Object],2" - }, - { - "query": "days[][x]=7&days[20]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[][x]=7&days[21]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[][x]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[][x]=7&days[0][]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[][x]=7&days[][x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[][x]=7&days[x][]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[][x]=7&days[0][x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[][x]=7&days[1][x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object],[object Object]" - }, - { - "query": "days[][x]=7&days[__proto__]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[][x]=7&days[toString]=2", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[][x]=7&days[valueOf]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[][x]=7&days[constructor]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[][x]=7&other=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days=2", - "scalar": false, - "truthy": true, - "value": "[object Object],2" - }, - { - "query": "days=2&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7", - "scalar": false, - "truthy": true, - "value": "2,[object Object]" - }, - { - "query": "days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days=2", - "scalar": false, - "truthy": true, - "value": "[object Object],2" - }, - { - "query": "days=2&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7", - "scalar": false, - "truthy": true, - "value": "2,[object Object]" - }, - { - "query": "days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days=2", - "scalar": false, - "truthy": true, - "value": "[object Object],2" - }, - { - "query": "days=2&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7", - "scalar": false, - "truthy": true, - "value": "2,[object Object]" - }, - { - "query": "days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days=2", - "scalar": false, - "truthy": true, - "value": "[object Object],2" - }, - { - "query": "days=2&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7", - "scalar": false, - "truthy": true, - "value": "2,[object Object]" - }, - { - "query": "days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[][x]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x][]=7&days=2", - "scalar": false, - "truthy": true, - "value": "[object Object],2" - }, - { - "query": "days[x][]=7&days[]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x][]=7&days[0]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x][]=7&days[1]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x][]=7&days[19]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x][]=7&days[20]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x][]=7&days[21]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x][]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x][]=7&days[0][]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x][]=7&days[][x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x][]=7&days[x][]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x][]=7&days[0][x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x][]=7&days[1][x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x][]=7&days[__proto__]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x][]=7&days[toString]=2", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[x][]=7&days[valueOf]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x][]=7&days[constructor]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x][]=7&other=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days=2", - "scalar": false, - "truthy": true, - "value": "[object Object],2" - }, - { - "query": "days=2&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7", - "scalar": false, - "truthy": true, - "value": "2,[object Object]" - }, - { - "query": "days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days=2", - "scalar": false, - "truthy": true, - "value": "[object Object],2" - }, - { - "query": "days=2&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7", - "scalar": false, - "truthy": true, - "value": "2,[object Object]" - }, - { - "query": "days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days=2", - "scalar": false, - "truthy": true, - "value": "[object Object],2" - }, - { - "query": "days=2&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7", - "scalar": false, - "truthy": true, - "value": "2,[object Object]" - }, - { - "query": "days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days=2", - "scalar": false, - "truthy": true, - "value": "[object Object],2" - }, - { - "query": "days=2&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7", - "scalar": false, - "truthy": true, - "value": "2,[object Object]" - }, - { - "query": "days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x][]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][x]=7&days=2", - "scalar": false, - "truthy": true, - "value": "[object Object],2" - }, - { - "query": "days[0][x]=7&days[]=2", - "scalar": false, - "truthy": true, - "value": "[object Object],2" - }, - { - "query": "days[0][x]=7&days[0]=2", - "scalar": false, - "truthy": true, - "value": "[object Object],2" - }, - { - "query": "days[0][x]=7&days[1]=2", - "scalar": false, - "truthy": true, - "value": "[object Object],2" - }, - { - "query": "days[0][x]=7&days[19]=2", - "scalar": false, - "truthy": true, - "value": "[object Object],2" - }, - { - "query": "days[0][x]=7&days[20]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][x]=7&days[21]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][x]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][x]=7&days[0][]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][x]=7&days[][x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][x]=7&days[x][]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][x]=7&days[0][x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][x]=7&days[1][x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object],[object Object]" - }, - { - "query": "days[0][x]=7&days[__proto__]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][x]=7&days[toString]=2", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[0][x]=7&days[valueOf]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][x]=7&days[constructor]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][x]=7&other=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days=2", - "scalar": false, - "truthy": true, - "value": "[object Object],2" - }, - { - "query": "days=2&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7", - "scalar": false, - "truthy": true, - "value": "2,[object Object]" - }, - { - "query": "days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days=2", - "scalar": false, - "truthy": true, - "value": "[object Object],2" - }, - { - "query": "days=2&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7", - "scalar": false, - "truthy": true, - "value": "2,[object Object]" - }, - { - "query": "days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days=2", - "scalar": false, - "truthy": true, - "value": "[object Object],2" - }, - { - "query": "days=2&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7", - "scalar": false, - "truthy": true, - "value": "2,[object Object]" - }, - { - "query": "days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days=2", - "scalar": false, - "truthy": true, - "value": "[object Object],2" - }, - { - "query": "days=2&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7", - "scalar": false, - "truthy": true, - "value": "2,[object Object]" - }, - { - "query": "days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[0][x]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1][x]=7&days=2", - "scalar": false, - "truthy": true, - "value": "[object Object],2" - }, - { - "query": "days[1][x]=7&days[]=2", - "scalar": false, - "truthy": true, - "value": "2,[object Object]" - }, - { - "query": "days[1][x]=7&days[0]=2", - "scalar": false, - "truthy": true, - "value": "2,[object Object]" - }, - { - "query": "days[1][x]=7&days[1]=2", - "scalar": false, - "truthy": true, - "value": "[object Object],2" - }, - { - "query": "days[1][x]=7&days[19]=2", - "scalar": false, - "truthy": true, - "value": "[object Object],2" - }, - { - "query": "days[1][x]=7&days[20]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1][x]=7&days[21]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1][x]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1][x]=7&days[0][]=2", - "scalar": false, - "truthy": true, - "value": "2,[object Object]" - }, - { - "query": "days[1][x]=7&days[][x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object],[object Object]" - }, - { - "query": "days[1][x]=7&days[x][]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1][x]=7&days[0][x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object],[object Object]" - }, - { - "query": "days[1][x]=7&days[1][x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1][x]=7&days[__proto__]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1][x]=7&days[toString]=2", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[1][x]=7&days[valueOf]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1][x]=7&days[constructor]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1][x]=7&other=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days=2", - "scalar": false, - "truthy": true, - "value": "[object Object],2" - }, - { - "query": "days=2&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7", - "scalar": false, - "truthy": true, - "value": "2,[object Object]" - }, - { - "query": "days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days=2", - "scalar": false, - "truthy": true, - "value": "[object Object],2" - }, - { - "query": "days=2&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7", - "scalar": false, - "truthy": true, - "value": "2,[object Object]" - }, - { - "query": "days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days=2", - "scalar": false, - "truthy": true, - "value": "[object Object],2" - }, - { - "query": "days=2&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7", - "scalar": false, - "truthy": true, - "value": "2,[object Object]" - }, - { - "query": "days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days=2", - "scalar": false, - "truthy": true, - "value": "[object Object],2" - }, - { - "query": "days=2&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7", - "scalar": false, - "truthy": true, - "value": "2,[object Object]" - }, - { - "query": "days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[1][x]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[__proto__]=7&days=2", - "scalar": false, - "truthy": true, - "value": "[object Object],2" - }, - { - "query": "days[__proto__]=7&days[]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[__proto__]=7&days[0]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[__proto__]=7&days[1]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[__proto__]=7&days[19]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[__proto__]=7&days[20]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[__proto__]=7&days[21]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[__proto__]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[__proto__]=7&days[0][]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[__proto__]=7&days[][x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[__proto__]=7&days[x][]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[__proto__]=7&days[0][x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[__proto__]=7&days[1][x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[__proto__]=7&days[__proto__]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[__proto__]=7&days[toString]=2", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[__proto__]=7&days[valueOf]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[__proto__]=7&days[constructor]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[__proto__]=7&other=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days=2", - "scalar": false, - "truthy": true, - "value": "[object Object],2" - }, - { - "query": "days=2&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7", - "scalar": false, - "truthy": true, - "value": "2,[object Object]" - }, - { - "query": "days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days=2", - "scalar": false, - "truthy": true, - "value": "[object Object],2" - }, - { - "query": "days=2&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7", - "scalar": false, - "truthy": true, - "value": "2,[object Object]" - }, - { - "query": "days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days=2", - "scalar": false, - "truthy": true, - "value": "[object Object],2" - }, - { - "query": "days=2&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7", - "scalar": false, - "truthy": true, - "value": "2,[object Object]" - }, - { - "query": "days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days=2", - "scalar": false, - "truthy": true, - "value": "[object Object],2" - }, - { - "query": "days=2&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7", - "scalar": false, - "truthy": true, - "value": "2,[object Object]" - }, - { - "query": "days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[__proto__]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[toString]=7&days=2", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[toString]=7&days[]=2", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[toString]=7&days[0]=2", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[toString]=7&days[1]=2", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[toString]=7&days[19]=2", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[toString]=7&days[20]=2", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[toString]=7&days[21]=2", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[toString]=7&days[x]=2", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[toString]=7&days[0][]=2", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[toString]=7&days[][x]=2", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[toString]=7&days[x][]=2", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[toString]=7&days[0][x]=2", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[toString]=7&days[1][x]=2", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[toString]=7&days[__proto__]=2", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[toString]=7&days[toString]=2", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[toString]=7&days[valueOf]=2", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[toString]=7&days[constructor]=2", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[toString]=7&other=2", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days=2", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days=2&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[x]=2", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days=2", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days=2&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[x]=2", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days=2", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days=2&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[x]=2", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days=2", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days=2&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[toString]=7&days[x]=2", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[valueOf]=7&days=2", - "scalar": false, - "truthy": true, - "value": "[object Object],2" - }, - { - "query": "days[valueOf]=7&days[]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[valueOf]=7&days[0]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[valueOf]=7&days[1]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[valueOf]=7&days[19]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[valueOf]=7&days[20]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[valueOf]=7&days[21]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[valueOf]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[valueOf]=7&days[0][]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[valueOf]=7&days[][x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[valueOf]=7&days[x][]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[valueOf]=7&days[0][x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[valueOf]=7&days[1][x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[valueOf]=7&days[__proto__]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[valueOf]=7&days[toString]=2", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[valueOf]=7&days[valueOf]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[valueOf]=7&days[constructor]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[valueOf]=7&other=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days=2", - "scalar": false, - "truthy": true, - "value": "[object Object],2" - }, - { - "query": "days=2&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7", - "scalar": false, - "truthy": true, - "value": "2,[object Object]" - }, - { - "query": "days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days=2", - "scalar": false, - "truthy": true, - "value": "[object Object],2" - }, - { - "query": "days=2&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7", - "scalar": false, - "truthy": true, - "value": "2,[object Object]" - }, - { - "query": "days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days=2", - "scalar": false, - "truthy": true, - "value": "[object Object],2" - }, - { - "query": "days=2&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7", - "scalar": false, - "truthy": true, - "value": "2,[object Object]" - }, - { - "query": "days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days=2", - "scalar": false, - "truthy": true, - "value": "[object Object],2" - }, - { - "query": "days=2&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7", - "scalar": false, - "truthy": true, - "value": "2,[object Object]" - }, - { - "query": "days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[valueOf]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[constructor]=7&days=2", - "scalar": false, - "truthy": true, - "value": "[object Object],2" - }, - { - "query": "days[constructor]=7&days[]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[constructor]=7&days[0]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[constructor]=7&days[1]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[constructor]=7&days[19]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[constructor]=7&days[20]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[constructor]=7&days[21]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[constructor]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[constructor]=7&days[0][]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[constructor]=7&days[][x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[constructor]=7&days[x][]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[constructor]=7&days[0][x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[constructor]=7&days[1][x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[constructor]=7&days[__proto__]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[constructor]=7&days[toString]=2", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "days[constructor]=7&days[valueOf]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[constructor]=7&days[constructor]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[constructor]=7&other=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days=2", - "scalar": false, - "truthy": true, - "value": "[object Object],2" - }, - { - "query": "days=2&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7", - "scalar": false, - "truthy": true, - "value": "2,[object Object]" - }, - { - "query": "days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days=2", - "scalar": false, - "truthy": true, - "value": "[object Object],2" - }, - { - "query": "days=2&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7", - "scalar": false, - "truthy": true, - "value": "2,[object Object]" - }, - { - "query": "days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days=2", - "scalar": false, - "truthy": true, - "value": "[object Object],2" - }, - { - "query": "days=2&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7", - "scalar": false, - "truthy": true, - "value": "2,[object Object]" - }, - { - "query": "days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days=2", - "scalar": false, - "truthy": true, - "value": "[object Object],2" - }, - { - "query": "days=2&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7", - "scalar": false, - "truthy": true, - "value": "2,[object Object]" - }, - { - "query": "days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[constructor]=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "other=7&days=2", - "scalar": true, - "truthy": true, - "value": "2" - }, - { - "query": "other=7&days[]=2", - "scalar": false, - "truthy": true, - "value": "2" - }, - { - "query": "other=7&days[0]=2", - "scalar": false, - "truthy": true, - "value": "2" - }, - { - "query": "other=7&days[1]=2", - "scalar": false, - "truthy": true, - "value": "2" - }, - { - "query": "other=7&days[19]=2", - "scalar": false, - "truthy": true, - "value": "2" - }, - { - "query": "other=7&days[20]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "other=7&days[21]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "other=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "other=7&days[0][]=2", - "scalar": false, - "truthy": true, - "value": "2" - }, - { - "query": "other=7&days[][x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "other=7&days[x][]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "other=7&days[0][x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "other=7&days[1][x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "other=7&days[__proto__]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "other=7&days[toString]=2", - "scalar": false, - "truthy": true, - "error": true - }, - { - "query": "other=7&days[valueOf]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "other=7&days[constructor]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "other=7&other=2", - "scalar": false, - "truthy": false, - "value": "undefined" - }, - { - "query": "other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&days=2", - "scalar": true, - "truthy": true, - "value": "2" - }, - { - "query": "days=2&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7", - "scalar": true, - "truthy": true, - "value": "2" - }, - { - "query": "other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&days=2", - "scalar": true, - "truthy": true, - "value": "2" - }, - { - "query": "days=2&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7", - "scalar": true, - "truthy": true, - "value": "2" - }, - { - "query": "other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&days=2", - "scalar": true, - "truthy": true, - "value": "2" - }, - { - "query": "days=2&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7", - "scalar": true, - "truthy": true, - "value": "2" - }, - { - "query": "other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - }, - { - "query": "other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&days=2", - "scalar": true, - "truthy": true, - "value": "2" - }, - { - "query": "days=2&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7", - "scalar": true, - "truthy": true, - "value": "2" - }, - { - "query": "other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&other=7&days[x]=2", - "scalar": false, - "truthy": true, - "value": "[object Object]" - } -] diff --git a/backend/internal/server/testdata/queue-metrics.json b/backend/internal/server/testdata/queue-metrics.json deleted file mode 100644 index a4507ee..0000000 --- a/backend/internal/server/testdata/queue-metrics.json +++ /dev/null @@ -1,228 +0,0 @@ -{ - "now": 1800000000000, - "ranges": [ - { - "input": "", - "queue": "download", - "range": "1h", - "minutes": 60, - "count": 60, - "first": { - "ts": 1799996460000, - "completed": 0, - "failed": 0, - "avgMs": 0 - }, - "last": { - "ts": 1800000000000, - "completed": 2, - "failed": 1, - "avgMs": 4 - } - }, - { - "input": "1h", - "queue": "download", - "range": "1h", - "minutes": 60, - "count": 60, - "first": { - "ts": 1799996460000, - "completed": 0, - "failed": 0, - "avgMs": 0 - }, - "last": { - "ts": 1800000000000, - "completed": 2, - "failed": 1, - "avgMs": 4 - } - }, - { - "input": "6h", - "queue": "download", - "range": "6h", - "minutes": 360, - "count": 360, - "first": { - "ts": 1799978460000, - "completed": 0, - "failed": 0, - "avgMs": 0 - }, - "last": { - "ts": 1800000000000, - "completed": 2, - "failed": 1, - "avgMs": 4 - } - }, - { - "input": "24h", - "queue": "download", - "range": "24h", - "minutes": 1440, - "count": 1440, - "first": { - "ts": 1799913660000, - "completed": 0, - "failed": 0, - "avgMs": 0 - }, - "last": { - "ts": 1800000000000, - "completed": 2, - "failed": 1, - "avgMs": 4 - } - }, - { - "input": "7d", - "queue": "download", - "range": "7d", - "minutes": 10080, - "count": 10080, - "first": { - "ts": 1799395260000, - "completed": 0, - "failed": 0, - "avgMs": 0 - }, - "last": { - "ts": 1800000000000, - "completed": 2, - "failed": 1, - "avgMs": 4 - } - }, - { - "input": "60", - "queue": "download", - "range": "60", - "minutes": 60, - "count": 60, - "first": { - "ts": 1799996460000, - "completed": 0, - "failed": 0, - "avgMs": 0 - }, - "last": { - "ts": 1800000000000, - "completed": 2, - "failed": 1, - "avgMs": 4 - } - }, - { - "input": "1440", - "queue": "download", - "range": "1440", - "minutes": 60, - "count": 60, - "first": { - "ts": 1799996460000, - "completed": 0, - "failed": 0, - "avgMs": 0 - }, - "last": { - "ts": 1800000000000, - "completed": 2, - "failed": 1, - "avgMs": 4 - } - }, - { - "input": "garbage", - "queue": "download", - "range": "garbage", - "minutes": 60, - "count": 60, - "first": { - "ts": 1799996460000, - "completed": 0, - "failed": 0, - "avgMs": 0 - }, - "last": { - "ts": 1800000000000, - "completed": 2, - "failed": 1, - "avgMs": 4 - } - }, - { - "input": " 24h ", - "queue": "download", - "range": " 24h ", - "minutes": 60, - "count": 60, - "first": { - "ts": 1799996460000, - "completed": 0, - "failed": 0, - "avgMs": 0 - }, - "last": { - "ts": 1800000000000, - "completed": 2, - "failed": 1, - "avgMs": 4 - } - }, - { - "input": [ - "1h", - "7d" - ], - "queue": "download", - "range": "1h,7d", - "minutes": 60, - "count": 60, - "first": { - "ts": 1799996460000, - "completed": 0, - "failed": 0, - "avgMs": 0 - }, - "last": { - "ts": 1800000000000, - "completed": 2, - "failed": 1, - "avgMs": 4 - } - } - ], - "durations": [ - { - "input": -2, - "ms": 0 - }, - { - "input": 0, - "ms": 0 - }, - { - "input": 0.49, - "ms": 0 - }, - { - "input": 0.5, - "ms": 1 - }, - { - "input": 1.49, - "ms": 1 - }, - { - "input": 1.5, - "ms": 2 - }, - { - "input": 2.5, - "ms": 3 - } - ] -} diff --git a/backend/internal/server/testdata/quota.json b/backend/internal/server/testdata/quota.json deleted file mode 100644 index f21ef10..0000000 --- a/backend/internal/server/testdata/quota.json +++ /dev/null @@ -1,368 +0,0 @@ -{ - "now": "2030-01-01T00:00:00.000Z", - "filter": { - "owner": "owner", - "status": "ready", - "$or": [ - { - "options.expirationMode": "never" - }, - { - "options.expirationDate": { - "$exists": false - } - }, - { - "options.expirationDate": null - }, - { - "options.expirationDate": { - "$gt": "2030-01-01T00:00:00.000Z" - } - } - ] - }, - "cases": [ - { - "row": {}, - "expected": false - }, - { - "row": { - "sizeComputedAt": null - }, - "expected": false - }, - { - "row": { - "sizeComputedAt": "" - }, - "expected": false - }, - { - "row": { - "sizeComputedAt": "2030-01-01T00:00:00.000Z" - }, - "expected": false - }, - { - "row": { - "size": null - }, - "expected": false - }, - { - "row": { - "size": null, - "sizeComputedAt": null - }, - "expected": false - }, - { - "row": { - "size": null, - "sizeComputedAt": "" - }, - "expected": false - }, - { - "row": { - "size": null, - "sizeComputedAt": "2030-01-01T00:00:00.000Z" - }, - "expected": false - }, - { - "row": { - "size": {} - }, - "expected": false - }, - { - "row": { - "size": {}, - "sizeComputedAt": null - }, - "expected": false - }, - { - "row": { - "size": {}, - "sizeComputedAt": "" - }, - "expected": false - }, - { - "row": { - "size": {}, - "sizeComputedAt": "2030-01-01T00:00:00.000Z" - }, - "expected": false - }, - { - "row": { - "size": { - "storage": 0, - "file": 0 - } - }, - "expected": false - }, - { - "row": { - "size": { - "storage": 0, - "file": 0 - }, - "sizeComputedAt": null - }, - "expected": false - }, - { - "row": { - "size": { - "storage": 0, - "file": 0 - }, - "sizeComputedAt": "" - }, - "expected": false - }, - { - "row": { - "size": { - "storage": 0, - "file": 0 - }, - "sizeComputedAt": "2030-01-01T00:00:00.000Z" - }, - "expected": true - }, - { - "row": { - "size": { - "storage": 0, - "file": 1 - } - }, - "expected": true - }, - { - "row": { - "size": { - "storage": 0, - "file": 1 - }, - "sizeComputedAt": null - }, - "expected": true - }, - { - "row": { - "size": { - "storage": 0, - "file": 1 - }, - "sizeComputedAt": "" - }, - "expected": true - }, - { - "row": { - "size": { - "storage": 0, - "file": 1 - }, - "sizeComputedAt": "2030-01-01T00:00:00.000Z" - }, - "expected": true - }, - { - "row": { - "size": { - "storage": 9, - "file": 2 - } - }, - "expected": true - }, - { - "row": { - "size": { - "storage": 9, - "file": 2 - }, - "sizeComputedAt": null - }, - "expected": true - }, - { - "row": { - "size": { - "storage": 9, - "file": 2 - }, - "sizeComputedAt": "" - }, - "expected": true - }, - { - "row": { - "size": { - "storage": 9, - "file": 2 - }, - "sizeComputedAt": "2030-01-01T00:00:00.000Z" - }, - "expected": true - }, - { - "row": { - "size": { - "file": 2 - } - }, - "expected": false - }, - { - "row": { - "size": { - "file": 2 - }, - "sizeComputedAt": null - }, - "expected": false - }, - { - "row": { - "size": { - "file": 2 - }, - "sizeComputedAt": "" - }, - "expected": false - }, - { - "row": { - "size": { - "file": 2 - }, - "sizeComputedAt": "2030-01-01T00:00:00.000Z" - }, - "expected": false - }, - { - "row": { - "size": { - "storage": null, - "file": 2 - } - }, - "expected": false - }, - { - "row": { - "size": { - "storage": null, - "file": 2 - }, - "sizeComputedAt": null - }, - "expected": false - }, - { - "row": { - "size": { - "storage": null, - "file": 2 - }, - "sizeComputedAt": "" - }, - "expected": false - }, - { - "row": { - "size": { - "storage": null, - "file": 2 - }, - "sizeComputedAt": "2030-01-01T00:00:00.000Z" - }, - "expected": false - }, - { - "row": { - "size": { - "storage": 0, - "file": -1 - } - }, - "expected": false - }, - { - "row": { - "size": { - "storage": 0, - "file": -1 - }, - "sizeComputedAt": null - }, - "expected": false - }, - { - "row": { - "size": { - "storage": 0, - "file": -1 - }, - "sizeComputedAt": "" - }, - "expected": false - }, - { - "row": { - "size": { - "storage": 0, - "file": -1 - }, - "sizeComputedAt": "2030-01-01T00:00:00.000Z" - }, - "expected": true - }, - { - "row": { - "size": { - "storage": 0 - } - }, - "expected": false - }, - { - "row": { - "size": { - "storage": 0 - }, - "sizeComputedAt": null - }, - "expected": false - }, - { - "row": { - "size": { - "storage": 0 - }, - "sizeComputedAt": "" - }, - "expected": false - }, - { - "row": { - "size": { - "storage": 0 - }, - "sizeComputedAt": "2030-01-01T00:00:00.000Z" - }, - "expected": true - } - ] -} diff --git a/backend/internal/server/testdata/reactivation.json b/backend/internal/server/testdata/reactivation.json deleted file mode 100644 index 4b82141..0000000 --- a/backend/internal/server/testdata/reactivation.json +++ /dev/null @@ -1,562 +0,0 @@ -[ - { - "name": "queue/never", - "status": "queue", - "options": { - "expirationMode": "never" - }, - "now": "2026-01-01T00:00:00.000Z", - "expected": false - }, - { - "name": "queue/future", - "status": "queue", - "options": { - "expirationMode": "remove", - "expirationDate": "2099-01-01T00:00:00.000Z" - }, - "now": "2026-01-01T00:00:00.000Z", - "expected": false - }, - { - "name": "queue/past", - "status": "queue", - "options": { - "expirationMode": "remove", - "expirationDate": "2000-01-01T00:00:00.000Z" - }, - "now": "2026-01-01T00:00:00.000Z", - "expected": false - }, - { - "name": "queue/missing", - "status": "queue", - "options": {}, - "now": "2026-01-01T00:00:00.000Z", - "expected": false - }, - { - "name": "queue/empty", - "status": "queue", - "options": { - "expirationMode": "remove", - "expirationDate": null - }, - "now": "2026-01-01T00:00:00.000Z", - "expected": false - }, - { - "name": "queue/boundary", - "status": "queue", - "options": { - "expirationMode": "remove", - "expirationDate": "2026-01-01T00:00:00.000Z" - }, - "now": "2026-01-01T00:00:00.000Z", - "expected": false - }, - { - "name": "preparing/never", - "status": "preparing", - "options": { - "expirationMode": "never" - }, - "now": "2026-01-01T00:00:00.000Z", - "expected": false - }, - { - "name": "preparing/future", - "status": "preparing", - "options": { - "expirationMode": "remove", - "expirationDate": "2099-01-01T00:00:00.000Z" - }, - "now": "2026-01-01T00:00:00.000Z", - "expected": false - }, - { - "name": "preparing/past", - "status": "preparing", - "options": { - "expirationMode": "remove", - "expirationDate": "2000-01-01T00:00:00.000Z" - }, - "now": "2026-01-01T00:00:00.000Z", - "expected": false - }, - { - "name": "preparing/missing", - "status": "preparing", - "options": {}, - "now": "2026-01-01T00:00:00.000Z", - "expected": false - }, - { - "name": "preparing/empty", - "status": "preparing", - "options": { - "expirationMode": "remove", - "expirationDate": null - }, - "now": "2026-01-01T00:00:00.000Z", - "expected": false - }, - { - "name": "preparing/boundary", - "status": "preparing", - "options": { - "expirationMode": "remove", - "expirationDate": "2026-01-01T00:00:00.000Z" - }, - "now": "2026-01-01T00:00:00.000Z", - "expected": false - }, - { - "name": "download/never", - "status": "download", - "options": { - "expirationMode": "never" - }, - "now": "2026-01-01T00:00:00.000Z", - "expected": false - }, - { - "name": "download/future", - "status": "download", - "options": { - "expirationMode": "remove", - "expirationDate": "2099-01-01T00:00:00.000Z" - }, - "now": "2026-01-01T00:00:00.000Z", - "expected": false - }, - { - "name": "download/past", - "status": "download", - "options": { - "expirationMode": "remove", - "expirationDate": "2000-01-01T00:00:00.000Z" - }, - "now": "2026-01-01T00:00:00.000Z", - "expected": false - }, - { - "name": "download/missing", - "status": "download", - "options": {}, - "now": "2026-01-01T00:00:00.000Z", - "expected": false - }, - { - "name": "download/empty", - "status": "download", - "options": { - "expirationMode": "remove", - "expirationDate": null - }, - "now": "2026-01-01T00:00:00.000Z", - "expected": false - }, - { - "name": "download/boundary", - "status": "download", - "options": { - "expirationMode": "remove", - "expirationDate": "2026-01-01T00:00:00.000Z" - }, - "now": "2026-01-01T00:00:00.000Z", - "expected": false - }, - { - "name": "ready/never", - "status": "ready", - "options": { - "expirationMode": "never" - }, - "now": "2026-01-01T00:00:00.000Z", - "expected": false - }, - { - "name": "ready/future", - "status": "ready", - "options": { - "expirationMode": "remove", - "expirationDate": "2099-01-01T00:00:00.000Z" - }, - "now": "2026-01-01T00:00:00.000Z", - "expected": false - }, - { - "name": "ready/past", - "status": "ready", - "options": { - "expirationMode": "remove", - "expirationDate": "2000-01-01T00:00:00.000Z" - }, - "now": "2026-01-01T00:00:00.000Z", - "expected": false - }, - { - "name": "ready/missing", - "status": "ready", - "options": {}, - "now": "2026-01-01T00:00:00.000Z", - "expected": false - }, - { - "name": "ready/empty", - "status": "ready", - "options": { - "expirationMode": "remove", - "expirationDate": null - }, - "now": "2026-01-01T00:00:00.000Z", - "expected": false - }, - { - "name": "ready/boundary", - "status": "ready", - "options": { - "expirationMode": "remove", - "expirationDate": "2026-01-01T00:00:00.000Z" - }, - "now": "2026-01-01T00:00:00.000Z", - "expected": false - }, - { - "name": "archived/never", - "status": "archived", - "options": { - "expirationMode": "never" - }, - "now": "2026-01-01T00:00:00.000Z", - "expected": false - }, - { - "name": "archived/future", - "status": "archived", - "options": { - "expirationMode": "remove", - "expirationDate": "2099-01-01T00:00:00.000Z" - }, - "now": "2026-01-01T00:00:00.000Z", - "expected": false - }, - { - "name": "archived/past", - "status": "archived", - "options": { - "expirationMode": "remove", - "expirationDate": "2000-01-01T00:00:00.000Z" - }, - "now": "2026-01-01T00:00:00.000Z", - "expected": false - }, - { - "name": "archived/missing", - "status": "archived", - "options": {}, - "now": "2026-01-01T00:00:00.000Z", - "expected": false - }, - { - "name": "archived/empty", - "status": "archived", - "options": { - "expirationMode": "remove", - "expirationDate": null - }, - "now": "2026-01-01T00:00:00.000Z", - "expected": false - }, - { - "name": "archived/boundary", - "status": "archived", - "options": { - "expirationMode": "remove", - "expirationDate": "2026-01-01T00:00:00.000Z" - }, - "now": "2026-01-01T00:00:00.000Z", - "expected": false - }, - { - "name": "expired/never", - "status": "expired", - "options": { - "expirationMode": "never" - }, - "now": "2026-01-01T00:00:00.000Z", - "expected": true - }, - { - "name": "expired/future", - "status": "expired", - "options": { - "expirationMode": "remove", - "expirationDate": "2099-01-01T00:00:00.000Z" - }, - "now": "2026-01-01T00:00:00.000Z", - "expected": true - }, - { - "name": "expired/past", - "status": "expired", - "options": { - "expirationMode": "remove", - "expirationDate": "2000-01-01T00:00:00.000Z" - }, - "now": "2026-01-01T00:00:00.000Z", - "expected": false - }, - { - "name": "expired/missing", - "status": "expired", - "options": {}, - "now": "2026-01-01T00:00:00.000Z", - "expected": false - }, - { - "name": "expired/empty", - "status": "expired", - "options": { - "expirationMode": "remove", - "expirationDate": null - }, - "now": "2026-01-01T00:00:00.000Z", - "expected": false - }, - { - "name": "expired/boundary", - "status": "expired", - "options": { - "expirationMode": "remove", - "expirationDate": "2026-01-01T00:00:00.000Z" - }, - "now": "2026-01-01T00:00:00.000Z", - "expected": false - }, - { - "name": "expiring/never", - "status": "expiring", - "options": { - "expirationMode": "never" - }, - "now": "2026-01-01T00:00:00.000Z", - "expected": false - }, - { - "name": "expiring/future", - "status": "expiring", - "options": { - "expirationMode": "remove", - "expirationDate": "2099-01-01T00:00:00.000Z" - }, - "now": "2026-01-01T00:00:00.000Z", - "expected": false - }, - { - "name": "expiring/past", - "status": "expiring", - "options": { - "expirationMode": "remove", - "expirationDate": "2000-01-01T00:00:00.000Z" - }, - "now": "2026-01-01T00:00:00.000Z", - "expected": false - }, - { - "name": "expiring/missing", - "status": "expiring", - "options": {}, - "now": "2026-01-01T00:00:00.000Z", - "expected": false - }, - { - "name": "expiring/empty", - "status": "expiring", - "options": { - "expirationMode": "remove", - "expirationDate": null - }, - "now": "2026-01-01T00:00:00.000Z", - "expected": false - }, - { - "name": "expiring/boundary", - "status": "expiring", - "options": { - "expirationMode": "remove", - "expirationDate": "2026-01-01T00:00:00.000Z" - }, - "now": "2026-01-01T00:00:00.000Z", - "expected": false - }, - { - "name": "removed/never", - "status": "removed", - "options": { - "expirationMode": "never" - }, - "now": "2026-01-01T00:00:00.000Z", - "expected": true - }, - { - "name": "removed/future", - "status": "removed", - "options": { - "expirationMode": "remove", - "expirationDate": "2099-01-01T00:00:00.000Z" - }, - "now": "2026-01-01T00:00:00.000Z", - "expected": true - }, - { - "name": "removed/past", - "status": "removed", - "options": { - "expirationMode": "remove", - "expirationDate": "2000-01-01T00:00:00.000Z" - }, - "now": "2026-01-01T00:00:00.000Z", - "expected": false - }, - { - "name": "removed/missing", - "status": "removed", - "options": {}, - "now": "2026-01-01T00:00:00.000Z", - "expected": false - }, - { - "name": "removed/empty", - "status": "removed", - "options": { - "expirationMode": "remove", - "expirationDate": null - }, - "now": "2026-01-01T00:00:00.000Z", - "expected": false - }, - { - "name": "removed/boundary", - "status": "removed", - "options": { - "expirationMode": "remove", - "expirationDate": "2026-01-01T00:00:00.000Z" - }, - "now": "2026-01-01T00:00:00.000Z", - "expected": false - }, - { - "name": "removing/never", - "status": "removing", - "options": { - "expirationMode": "never" - }, - "now": "2026-01-01T00:00:00.000Z", - "expected": false - }, - { - "name": "removing/future", - "status": "removing", - "options": { - "expirationMode": "remove", - "expirationDate": "2099-01-01T00:00:00.000Z" - }, - "now": "2026-01-01T00:00:00.000Z", - "expected": false - }, - { - "name": "removing/past", - "status": "removing", - "options": { - "expirationMode": "remove", - "expirationDate": "2000-01-01T00:00:00.000Z" - }, - "now": "2026-01-01T00:00:00.000Z", - "expected": false - }, - { - "name": "removing/missing", - "status": "removing", - "options": {}, - "now": "2026-01-01T00:00:00.000Z", - "expected": false - }, - { - "name": "removing/empty", - "status": "removing", - "options": { - "expirationMode": "remove", - "expirationDate": null - }, - "now": "2026-01-01T00:00:00.000Z", - "expected": false - }, - { - "name": "removing/boundary", - "status": "removing", - "options": { - "expirationMode": "remove", - "expirationDate": "2026-01-01T00:00:00.000Z" - }, - "now": "2026-01-01T00:00:00.000Z", - "expected": false - }, - { - "name": "error/never", - "status": "error", - "options": { - "expirationMode": "never" - }, - "now": "2026-01-01T00:00:00.000Z", - "expected": false - }, - { - "name": "error/future", - "status": "error", - "options": { - "expirationMode": "remove", - "expirationDate": "2099-01-01T00:00:00.000Z" - }, - "now": "2026-01-01T00:00:00.000Z", - "expected": false - }, - { - "name": "error/past", - "status": "error", - "options": { - "expirationMode": "remove", - "expirationDate": "2000-01-01T00:00:00.000Z" - }, - "now": "2026-01-01T00:00:00.000Z", - "expected": false - }, - { - "name": "error/missing", - "status": "error", - "options": {}, - "now": "2026-01-01T00:00:00.000Z", - "expected": false - }, - { - "name": "error/empty", - "status": "error", - "options": { - "expirationMode": "remove", - "expirationDate": null - }, - "now": "2026-01-01T00:00:00.000Z", - "expected": false - }, - { - "name": "error/boundary", - "status": "error", - "options": { - "expirationMode": "remove", - "expirationDate": "2026-01-01T00:00:00.000Z" - }, - "now": "2026-01-01T00:00:00.000Z", - "expected": false - } -] diff --git a/backend/internal/server/testdata/readme-decoding.json b/backend/internal/server/testdata/readme-decoding.json deleted file mode 100644 index a388bbf..0000000 --- a/backend/internal/server/testdata/readme-decoding.json +++ /dev/null @@ -1,1039 +0,0 @@ -[ - { - "name": "base64:\"\"", - "data": { - "encoding": "base64", - "content": "" - }, - "expected": "" - }, - { - "name": "base64:\"a\"", - "data": { - "encoding": "base64", - "content": "a" - }, - "expected": "" - }, - { - "name": "base64:\"ab\"", - "data": { - "encoding": "base64", - "content": "ab" - }, - "expected": "i" - }, - { - "name": "base64:\"abc\"", - "data": { - "encoding": "base64", - "content": "abc" - }, - "expected": "i�" - }, - { - "name": "base64:\"abcd\"", - "data": { - "encoding": "base64", - "content": "abcd" - }, - "expected": "i�\u001d" - }, - { - "name": "base64:\"SGVsbG8=\"", - "data": { - "encoding": "base64", - "content": "SGVsbG8=" - }, - "expected": "Hello" - }, - { - "name": "base64:\"SG Vs\\nbG8\\r\\t=\"", - "data": { - "encoding": "base64", - "content": "SG Vs\nbG8\r\t=" - }, - "expected": "Hello" - }, - { - "name": "base64:\"SG!V@sb#G8=\"", - "data": { - "encoding": "base64", - "content": "SG!V@sb#G8=" - }, - "expected": "Hello" - }, - { - "name": "base64:\"SGVsbG8====junk\"", - "data": { - "encoding": "base64", - "content": "SGVsbG8====junk" - }, - "expected": "Hello" - }, - { - "name": "base64:\"=SGVsbG8\"", - "data": { - "encoding": "base64", - "content": "=SGVsbG8" - }, - "expected": "" - }, - { - "name": "base64:\"SGV=sbG8\"", - "data": { - "encoding": "base64", - "content": "SGV=sbG8" - }, - "expected": "He" - }, - { - "name": "base64:\"-_8\"", - "data": { - "encoding": "base64", - "content": "-_8" - }, - "expected": "��" - }, - { - "name": "base64:\"////\"", - "data": { - "encoding": "base64", - "content": "////" - }, - "expected": "���" - }, - { - "name": "base64:\"YWJjZA\"", - "data": { - "encoding": "base64", - "content": "YWJjZA" - }, - "expected": "abcd" - }, - { - "name": "base64:\"YWJjZAŁ\"", - "data": { - "encoding": "base64", - "content": "YWJjZAŁ" - }, - "expected": "abcd\u0000" - }, - { - "name": "base64:\"YWJjZA💡\"", - "data": { - "encoding": "base64", - "content": "YWJjZA💡" - }, - "expected": "abcd" - }, - { - "name": "BASE64:\"\"", - "data": { - "encoding": "BASE64", - "content": "" - }, - "expected": "" - }, - { - "name": "BASE64:\"a\"", - "data": { - "encoding": "BASE64", - "content": "a" - }, - "expected": "" - }, - { - "name": "BASE64:\"ab\"", - "data": { - "encoding": "BASE64", - "content": "ab" - }, - "expected": "i" - }, - { - "name": "BASE64:\"abc\"", - "data": { - "encoding": "BASE64", - "content": "abc" - }, - "expected": "i�" - }, - { - "name": "BASE64:\"abcd\"", - "data": { - "encoding": "BASE64", - "content": "abcd" - }, - "expected": "i�\u001d" - }, - { - "name": "BASE64:\"SGVsbG8=\"", - "data": { - "encoding": "BASE64", - "content": "SGVsbG8=" - }, - "expected": "Hello" - }, - { - "name": "BASE64:\"SG Vs\\nbG8\\r\\t=\"", - "data": { - "encoding": "BASE64", - "content": "SG Vs\nbG8\r\t=" - }, - "expected": "Hello" - }, - { - "name": "BASE64:\"SG!V@sb#G8=\"", - "data": { - "encoding": "BASE64", - "content": "SG!V@sb#G8=" - }, - "expected": "Hello" - }, - { - "name": "BASE64:\"SGVsbG8====junk\"", - "data": { - "encoding": "BASE64", - "content": "SGVsbG8====junk" - }, - "expected": "Hello" - }, - { - "name": "BASE64:\"=SGVsbG8\"", - "data": { - "encoding": "BASE64", - "content": "=SGVsbG8" - }, - "expected": "" - }, - { - "name": "BASE64:\"SGV=sbG8\"", - "data": { - "encoding": "BASE64", - "content": "SGV=sbG8" - }, - "expected": "He" - }, - { - "name": "BASE64:\"-_8\"", - "data": { - "encoding": "BASE64", - "content": "-_8" - }, - "expected": "��" - }, - { - "name": "BASE64:\"////\"", - "data": { - "encoding": "BASE64", - "content": "////" - }, - "expected": "���" - }, - { - "name": "BASE64:\"YWJjZA\"", - "data": { - "encoding": "BASE64", - "content": "YWJjZA" - }, - "expected": "abcd" - }, - { - "name": "BASE64:\"YWJjZAŁ\"", - "data": { - "encoding": "BASE64", - "content": "YWJjZAŁ" - }, - "expected": "abcd\u0000" - }, - { - "name": "BASE64:\"YWJjZA💡\"", - "data": { - "encoding": "BASE64", - "content": "YWJjZA💡" - }, - "expected": "abcd" - }, - { - "name": "base64url:\"\"", - "data": { - "encoding": "base64url", - "content": "" - }, - "expected": "" - }, - { - "name": "base64url:\"a\"", - "data": { - "encoding": "base64url", - "content": "a" - }, - "expected": "" - }, - { - "name": "base64url:\"ab\"", - "data": { - "encoding": "base64url", - "content": "ab" - }, - "expected": "i" - }, - { - "name": "base64url:\"abc\"", - "data": { - "encoding": "base64url", - "content": "abc" - }, - "expected": "i�" - }, - { - "name": "base64url:\"abcd\"", - "data": { - "encoding": "base64url", - "content": "abcd" - }, - "expected": "i�\u001d" - }, - { - "name": "base64url:\"SGVsbG8=\"", - "data": { - "encoding": "base64url", - "content": "SGVsbG8=" - }, - "expected": "Hello" - }, - { - "name": "base64url:\"SG Vs\\nbG8\\r\\t=\"", - "data": { - "encoding": "base64url", - "content": "SG Vs\nbG8\r\t=" - }, - "expected": "Hello" - }, - { - "name": "base64url:\"SG!V@sb#G8=\"", - "data": { - "encoding": "base64url", - "content": "SG!V@sb#G8=" - }, - "expected": "Hello" - }, - { - "name": "base64url:\"SGVsbG8====junk\"", - "data": { - "encoding": "base64url", - "content": "SGVsbG8====junk" - }, - "expected": "Hello" - }, - { - "name": "base64url:\"=SGVsbG8\"", - "data": { - "encoding": "base64url", - "content": "=SGVsbG8" - }, - "expected": "" - }, - { - "name": "base64url:\"SGV=sbG8\"", - "data": { - "encoding": "base64url", - "content": "SGV=sbG8" - }, - "expected": "He" - }, - { - "name": "base64url:\"-_8\"", - "data": { - "encoding": "base64url", - "content": "-_8" - }, - "expected": "��" - }, - { - "name": "base64url:\"////\"", - "data": { - "encoding": "base64url", - "content": "////" - }, - "expected": "���" - }, - { - "name": "base64url:\"YWJjZA\"", - "data": { - "encoding": "base64url", - "content": "YWJjZA" - }, - "expected": "abcd" - }, - { - "name": "base64url:\"YWJjZAŁ\"", - "data": { - "encoding": "base64url", - "content": "YWJjZAŁ" - }, - "expected": "abcd\u0000" - }, - { - "name": "base64url:\"YWJjZA💡\"", - "data": { - "encoding": "base64url", - "content": "YWJjZA💡" - }, - "expected": "abcd" - }, - { - "name": "utf8:128", - "data": { - "encoding": "base64", - "content": "gA==" - }, - "expected": "�" - }, - { - "name": "utf8:192,175", - "data": { - "encoding": "base64", - "content": "wK8=" - }, - "expected": "��" - }, - { - "name": "utf8:226,130", - "data": { - "encoding": "base64", - "content": "4oI=" - }, - "expected": "�" - }, - { - "name": "utf8:226,40,161", - "data": { - "encoding": "base64", - "content": "4iih" - }, - "expected": "�(�" - }, - { - "name": "utf8:240,159,146", - "data": { - "encoding": "base64", - "content": "8J+S" - }, - "expected": "�" - }, - { - "name": "utf8:237,160,128", - "data": { - "encoding": "base64", - "content": "7aCA" - }, - "expected": "���" - }, - { - "name": "utf8:244,144,128,128", - "data": { - "encoding": "base64", - "content": "9JCAgA==" - }, - "expected": "����" - }, - { - "name": "utf8:239,187,191,65", - "data": { - "encoding": "base64", - "content": "77u/QQ==" - }, - "expected": "A" - }, - { - "name": "utf8:255,254,97,0", - "data": { - "encoding": "base64", - "content": "//5hAA==" - }, - "expected": "��a\u0000" - }, - { - "name": "utf8:0,65,255", - "data": { - "encoding": "base64", - "content": "AEH/" - }, - "expected": "\u0000A�" - }, - { - "name": "utf8:Hello é😀", - "data": { - "encoding": "utf8", - "content": "Hello é😀" - }, - "expected": "Hello é😀" - }, - { - "name": "utf8:61ff62", - "data": { - "encoding": "utf8", - "content": "61ff62" - }, - "expected": "61ff62" - }, - { - "name": "utf8:616", - "data": { - "encoding": "utf8", - "content": "616" - }, - "expected": "616" - }, - { - "name": "utf-8:Hello é😀", - "data": { - "encoding": "utf-8", - "content": "Hello é😀" - }, - "expected": "Hello é😀" - }, - { - "name": "utf-8:61ff62", - "data": { - "encoding": "utf-8", - "content": "61ff62" - }, - "expected": "61ff62" - }, - { - "name": "utf-8:616", - "data": { - "encoding": "utf-8", - "content": "616" - }, - "expected": "616" - }, - { - "name": "UTF8:Hello é😀", - "data": { - "encoding": "UTF8", - "content": "Hello é😀" - }, - "expected": "Hello é😀" - }, - { - "name": "UTF8:61ff62", - "data": { - "encoding": "UTF8", - "content": "61ff62" - }, - "expected": "61ff62" - }, - { - "name": "UTF8:616", - "data": { - "encoding": "UTF8", - "content": "616" - }, - "expected": "616" - }, - { - "name": "ascii:Hello é😀", - "data": { - "encoding": "ascii", - "content": "Hello é😀" - }, - "expected": "Hello �=\u0000" - }, - { - "name": "ascii:61ff62", - "data": { - "encoding": "ascii", - "content": "61ff62" - }, - "expected": "61ff62" - }, - { - "name": "ascii:616", - "data": { - "encoding": "ascii", - "content": "616" - }, - "expected": "616" - }, - { - "name": "latin1:Hello é😀", - "data": { - "encoding": "latin1", - "content": "Hello é😀" - }, - "expected": "Hello �=\u0000" - }, - { - "name": "latin1:61ff62", - "data": { - "encoding": "latin1", - "content": "61ff62" - }, - "expected": "61ff62" - }, - { - "name": "latin1:616", - "data": { - "encoding": "latin1", - "content": "616" - }, - "expected": "616" - }, - { - "name": "binary:Hello é😀", - "data": { - "encoding": "binary", - "content": "Hello é😀" - }, - "expected": "Hello �=\u0000" - }, - { - "name": "binary:61ff62", - "data": { - "encoding": "binary", - "content": "61ff62" - }, - "expected": "61ff62" - }, - { - "name": "binary:616", - "data": { - "encoding": "binary", - "content": "616" - }, - "expected": "616" - }, - { - "name": "ucs2:Hello é😀", - "data": { - "encoding": "ucs2", - "content": "Hello é😀" - }, - "expected": "H\u0000e\u0000l\u0000l\u0000o\u0000 \u0000�\u0000=�\u0000�" - }, - { - "name": "ucs2:61ff62", - "data": { - "encoding": "ucs2", - "content": "61ff62" - }, - "expected": "6\u00001\u0000f\u0000f\u00006\u00002\u0000" - }, - { - "name": "ucs2:616", - "data": { - "encoding": "ucs2", - "content": "616" - }, - "expected": "6\u00001\u00006\u0000" - }, - { - "name": "ucs-2:Hello é😀", - "data": { - "encoding": "ucs-2", - "content": "Hello é😀" - }, - "expected": "H\u0000e\u0000l\u0000l\u0000o\u0000 \u0000�\u0000=�\u0000�" - }, - { - "name": "ucs-2:61ff62", - "data": { - "encoding": "ucs-2", - "content": "61ff62" - }, - "expected": "6\u00001\u0000f\u0000f\u00006\u00002\u0000" - }, - { - "name": "ucs-2:616", - "data": { - "encoding": "ucs-2", - "content": "616" - }, - "expected": "6\u00001\u00006\u0000" - }, - { - "name": "utf16le:Hello é😀", - "data": { - "encoding": "utf16le", - "content": "Hello é😀" - }, - "expected": "H\u0000e\u0000l\u0000l\u0000o\u0000 \u0000�\u0000=�\u0000�" - }, - { - "name": "utf16le:61ff62", - "data": { - "encoding": "utf16le", - "content": "61ff62" - }, - "expected": "6\u00001\u0000f\u0000f\u00006\u00002\u0000" - }, - { - "name": "utf16le:616", - "data": { - "encoding": "utf16le", - "content": "616" - }, - "expected": "6\u00001\u00006\u0000" - }, - { - "name": "utf-16le:Hello é😀", - "data": { - "encoding": "utf-16le", - "content": "Hello é😀" - }, - "expected": "H\u0000e\u0000l\u0000l\u0000o\u0000 \u0000�\u0000=�\u0000�" - }, - { - "name": "utf-16le:61ff62", - "data": { - "encoding": "utf-16le", - "content": "61ff62" - }, - "expected": "6\u00001\u0000f\u0000f\u00006\u00002\u0000" - }, - { - "name": "utf-16le:616", - "data": { - "encoding": "utf-16le", - "content": "616" - }, - "expected": "6\u00001\u00006\u0000" - }, - { - "name": "hex:Hello é😀", - "data": { - "encoding": "hex", - "content": "Hello é😀" - }, - "expected": "" - }, - { - "name": "hex:61ff62", - "data": { - "encoding": "hex", - "content": "61ff62" - }, - "expected": "a�b" - }, - { - "name": "hex:616", - "data": { - "encoding": "hex", - "content": "616" - }, - "expected": "a" - }, - { - "name": "unknown:Hello é😀", - "data": { - "encoding": "unknown", - "content": "Hello é😀" - }, - "error": "readme_not_available" - }, - { - "name": "unknown:61ff62", - "data": { - "encoding": "unknown", - "content": "61ff62" - }, - "error": "readme_not_available" - }, - { - "name": "unknown:616", - "data": { - "encoding": "unknown", - "content": "616" - }, - "error": "readme_not_available" - }, - { - "name": "utf8 :Hello é😀", - "data": { - "encoding": "utf8 ", - "content": "Hello é😀" - }, - "error": "readme_not_available" - }, - { - "name": "utf8 :61ff62", - "data": { - "encoding": "utf8 ", - "content": "61ff62" - }, - "error": "readme_not_available" - }, - { - "name": "utf8 :616", - "data": { - "encoding": "utf8 ", - "content": "616" - }, - "error": "readme_not_available" - }, - { - "name": ":Hello é😀", - "data": { - "encoding": "", - "content": "Hello é😀" - }, - "expected": "Hello é😀" - }, - { - "name": ":61ff62", - "data": { - "encoding": "", - "content": "61ff62" - }, - "expected": "61ff62" - }, - { - "name": ":616", - "data": { - "encoding": "", - "content": "616" - }, - "expected": "616" - }, - { - "name": "null:Hello é😀", - "data": { - "encoding": null, - "content": "Hello é😀" - }, - "expected": "Hello é😀" - }, - { - "name": "null:61ff62", - "data": { - "encoding": null, - "content": "61ff62" - }, - "expected": "61ff62" - }, - { - "name": "null:616", - "data": { - "encoding": null, - "content": "616" - }, - "expected": "616" - }, - { - "name": "42:Hello é😀", - "data": { - "encoding": 42, - "content": "Hello é😀" - }, - "expected": "Hello é😀" - }, - { - "name": "42:61ff62", - "data": { - "encoding": 42, - "content": "61ff62" - }, - "expected": "61ff62" - }, - { - "name": "42:616", - "data": { - "encoding": 42, - "content": "616" - }, - "expected": "616" - }, - { - "name": "content:null", - "data": { - "content": null, - "encoding": "base64" - }, - "error": "readme_not_available" - }, - { - "name": "content:42", - "data": { - "content": 42, - "encoding": "base64" - }, - "error": "readme_not_available" - }, - { - "name": "content:true", - "data": { - "content": true, - "encoding": "base64" - }, - "error": "readme_not_available" - }, - { - "name": "content:[]", - "data": { - "content": [], - "encoding": "base64" - }, - "expected": "" - }, - { - "name": "content:[65,66,255]", - "data": { - "content": [ - 65, - 66, - 255 - ], - "encoding": "base64" - }, - "expected": "AB�" - }, - { - "name": "content:[257,-1,1.9,null,true,\"258\",\"0x43\"]", - "data": { - "content": [ - 257, - -1, - 1.9, - null, - true, - "258", - "0x43" - ], - "encoding": "base64" - }, - "expected": "\u0001�\u0001\u0000\u0001\u0002C" - }, - { - "name": "content:{\"type\":\"Buffer\",\"data\":[65,0,255]}", - "data": { - "content": { - "type": "Buffer", - "data": [ - 65, - 0, - 255 - ] - }, - "encoding": "base64" - }, - "expected": "A\u0000�" - }, - { - "name": "content:{\"0\":65,\"1\":66,\"length\":3}", - "data": { - "content": { - "0": 65, - "1": 66, - "length": 3 - }, - "encoding": "base64" - }, - "expected": "AB\u0000" - }, - { - "name": "content:{\"0\":65,\"length\":\"3\"}", - "data": { - "content": { - "0": 65, - "length": "3" - }, - "encoding": "base64" - }, - "expected": "" - }, - { - "name": "content:[{\"toString\":null}]", - "data": { - "content": [ - { - "toString": null - } - ], - "encoding": "base64" - }, - "error": "readme_not_available" - }, - { - "name": "content:[[257]]", - "data": { - "content": [ - [ - 257 - ] - ], - "encoding": "base64" - }, - "expected": "\u0001" - }, - { - "name": "content:{\"0\":{\"toString\":0},\"length\":1}", - "data": { - "content": { - "0": { - "toString": 0 - }, - "length": 1 - }, - "encoding": "base64" - }, - "error": "readme_not_available" - }, - { - "name": "content:{}", - "data": { - "content": {}, - "encoding": "base64" - }, - "error": "readme_not_available" - }, - { - "name": "hex narrowing:Ķı", - "data": { - "encoding": "hex", - "content": "Ķı" - }, - "expected": "a" - }, - { - "name": "hex narrowing:61Ķı", - "data": { - "encoding": "hex", - "content": "61Ķı" - }, - "expected": "aa" - }, - { - "name": "hex narrowing:fFz1", - "data": { - "encoding": "hex", - "content": "fFz1" - }, - "expected": "�" - }, - { - "name": "hex narrowing:61 62", - "data": { - "encoding": "hex", - "content": "61 62" - }, - "expected": "a" - }, - { - "name": "missing content", - "data": { - "encoding": "base64" - }, - "error": "readme_not_available" - }, - { - "name": "missing encoding", - "data": { - "content": "Hello é😀" - }, - "expected": "Hello é😀" - } -] diff --git a/backend/internal/server/testdata/resources.json b/backend/internal/server/testdata/resources.json deleted file mode 100644 index 54744d5..0000000 --- a/backend/internal/server/testdata/resources.json +++ /dev/null @@ -1 +0,0 @@ -[{"name":"gist/minimal/0","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":false,"comments":false,"username":false,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false}},{"name":"gist/minimal/1","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":false,"comments":false,"username":false,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet"}},{"name":"gist/minimal/2","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":false,"comments":false,"username":false,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false}},{"name":"gist/minimal/3","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":false,"comments":false,"username":false,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet"}},{"name":"gist/minimal/4","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":false,"comments":false,"username":false,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false}},{"name":"gist/minimal/5","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":false,"comments":false,"username":false,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet"}},{"name":"gist/minimal/6","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":false,"comments":false,"username":false,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false}},{"name":"gist/minimal/7","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":false,"comments":false,"username":false,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet"}},{"name":"gist/minimal/8","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":true,"comments":false,"username":false,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"files":[]}},{"name":"gist/minimal/9","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":true,"comments":false,"username":false,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","files":[]}},{"name":"gist/minimal/10","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":true,"comments":false,"username":false,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"files":[]}},{"name":"gist/minimal/11","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":true,"comments":false,"username":false,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","files":[]}},{"name":"gist/minimal/12","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":true,"comments":false,"username":false,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"files":[]}},{"name":"gist/minimal/13","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":true,"comments":false,"username":false,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","files":[]}},{"name":"gist/minimal/14","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":true,"comments":false,"username":false,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"files":[]}},{"name":"gist/minimal/15","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":true,"comments":false,"username":false,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","files":[]}},{"name":"gist/minimal/16","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":false,"comments":true,"username":false,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false}},{"name":"gist/minimal/17","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":false,"comments":true,"username":false,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet"}},{"name":"gist/minimal/18","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":false,"comments":true,"username":false,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false}},{"name":"gist/minimal/19","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":false,"comments":true,"username":false,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet"}},{"name":"gist/minimal/20","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":false,"comments":true,"username":false,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false}},{"name":"gist/minimal/21","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":false,"comments":true,"username":false,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet"}},{"name":"gist/minimal/22","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":false,"comments":true,"username":false,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false}},{"name":"gist/minimal/23","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":false,"comments":true,"username":false,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet"}},{"name":"gist/minimal/24","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":true,"comments":true,"username":false,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"files":[]}},{"name":"gist/minimal/25","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":true,"comments":true,"username":false,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","files":[]}},{"name":"gist/minimal/26","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":true,"comments":true,"username":false,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"files":[]}},{"name":"gist/minimal/27","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":true,"comments":true,"username":false,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","files":[]}},{"name":"gist/minimal/28","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":true,"comments":true,"username":false,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"files":[]}},{"name":"gist/minimal/29","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":true,"comments":true,"username":false,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","files":[]}},{"name":"gist/minimal/30","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":true,"comments":true,"username":false,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"files":[]}},{"name":"gist/minimal/31","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":true,"comments":true,"username":false,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","files":[]}},{"name":"gist/minimal/32","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":false,"comments":false,"username":true,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"ownerLogin":"XXXX-1"}},{"name":"gist/minimal/33","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":false,"comments":false,"username":true,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1"}},{"name":"gist/minimal/34","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":false,"comments":false,"username":true,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"ownerLogin":"XXXX-1"}},{"name":"gist/minimal/35","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":false,"comments":false,"username":true,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1"}},{"name":"gist/minimal/36","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":false,"comments":false,"username":true,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"ownerLogin":"XXXX-1"}},{"name":"gist/minimal/37","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":false,"comments":false,"username":true,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1"}},{"name":"gist/minimal/38","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":false,"comments":false,"username":true,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"ownerLogin":"XXXX-1"}},{"name":"gist/minimal/39","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":false,"comments":false,"username":true,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1"}},{"name":"gist/minimal/40","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":true,"comments":false,"username":true,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"ownerLogin":"XXXX-1","files":[]}},{"name":"gist/minimal/41","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":true,"comments":false,"username":true,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","files":[]}},{"name":"gist/minimal/42","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":true,"comments":false,"username":true,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"ownerLogin":"XXXX-1","files":[]}},{"name":"gist/minimal/43","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":true,"comments":false,"username":true,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","files":[]}},{"name":"gist/minimal/44","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":true,"comments":false,"username":true,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"ownerLogin":"XXXX-1","files":[]}},{"name":"gist/minimal/45","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":true,"comments":false,"username":true,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","files":[]}},{"name":"gist/minimal/46","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":true,"comments":false,"username":true,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"ownerLogin":"XXXX-1","files":[]}},{"name":"gist/minimal/47","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":true,"comments":false,"username":true,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","files":[]}},{"name":"gist/minimal/48","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":false,"comments":true,"username":true,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"ownerLogin":"XXXX-1"}},{"name":"gist/minimal/49","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":false,"comments":true,"username":true,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1"}},{"name":"gist/minimal/50","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":false,"comments":true,"username":true,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"ownerLogin":"XXXX-1"}},{"name":"gist/minimal/51","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":false,"comments":true,"username":true,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1"}},{"name":"gist/minimal/52","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":false,"comments":true,"username":true,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"ownerLogin":"XXXX-1"}},{"name":"gist/minimal/53","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":false,"comments":true,"username":true,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1"}},{"name":"gist/minimal/54","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":false,"comments":true,"username":true,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"ownerLogin":"XXXX-1"}},{"name":"gist/minimal/55","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":false,"comments":true,"username":true,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1"}},{"name":"gist/minimal/56","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":true,"comments":true,"username":true,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"ownerLogin":"XXXX-1","files":[]}},{"name":"gist/minimal/57","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":true,"comments":true,"username":true,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","files":[]}},{"name":"gist/minimal/58","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":true,"comments":true,"username":true,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"ownerLogin":"XXXX-1","files":[]}},{"name":"gist/minimal/59","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":true,"comments":true,"username":true,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","files":[]}},{"name":"gist/minimal/60","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":true,"comments":true,"username":true,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"ownerLogin":"XXXX-1","files":[]}},{"name":"gist/minimal/61","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":true,"comments":true,"username":true,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","files":[]}},{"name":"gist/minimal/62","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":true,"comments":true,"username":true,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"ownerLogin":"XXXX-1","files":[]}},{"name":"gist/minimal/63","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":true,"comments":true,"username":true,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","files":[]}},{"name":"gist/minimal/64","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":false,"comments":false,"username":false,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false}},{"name":"gist/minimal/65","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":false,"comments":false,"username":false,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet"}},{"name":"gist/minimal/66","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":false,"comments":false,"username":false,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false}},{"name":"gist/minimal/67","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":false,"comments":false,"username":false,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet"}},{"name":"gist/minimal/68","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":false,"comments":false,"username":false,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false}},{"name":"gist/minimal/69","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":false,"comments":false,"username":false,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet"}},{"name":"gist/minimal/70","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":false,"comments":false,"username":false,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false}},{"name":"gist/minimal/71","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":false,"comments":false,"username":false,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet"}},{"name":"gist/minimal/72","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":true,"comments":false,"username":false,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"files":[]}},{"name":"gist/minimal/73","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":true,"comments":false,"username":false,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","files":[]}},{"name":"gist/minimal/74","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":true,"comments":false,"username":false,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"files":[]}},{"name":"gist/minimal/75","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":true,"comments":false,"username":false,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","files":[]}},{"name":"gist/minimal/76","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":true,"comments":false,"username":false,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"files":[]}},{"name":"gist/minimal/77","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":true,"comments":false,"username":false,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","files":[]}},{"name":"gist/minimal/78","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":true,"comments":false,"username":false,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"files":[]}},{"name":"gist/minimal/79","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":true,"comments":false,"username":false,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","files":[]}},{"name":"gist/minimal/80","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":false,"comments":true,"username":false,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false}},{"name":"gist/minimal/81","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":false,"comments":true,"username":false,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet"}},{"name":"gist/minimal/82","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":false,"comments":true,"username":false,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false}},{"name":"gist/minimal/83","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":false,"comments":true,"username":false,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet"}},{"name":"gist/minimal/84","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":false,"comments":true,"username":false,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false}},{"name":"gist/minimal/85","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":false,"comments":true,"username":false,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet"}},{"name":"gist/minimal/86","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":false,"comments":true,"username":false,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false}},{"name":"gist/minimal/87","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":false,"comments":true,"username":false,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet"}},{"name":"gist/minimal/88","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":true,"comments":true,"username":false,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"files":[]}},{"name":"gist/minimal/89","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":true,"comments":true,"username":false,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","files":[]}},{"name":"gist/minimal/90","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":true,"comments":true,"username":false,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"files":[]}},{"name":"gist/minimal/91","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":true,"comments":true,"username":false,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","files":[]}},{"name":"gist/minimal/92","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":true,"comments":true,"username":false,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"files":[]}},{"name":"gist/minimal/93","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":true,"comments":true,"username":false,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","files":[]}},{"name":"gist/minimal/94","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":true,"comments":true,"username":false,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"files":[]}},{"name":"gist/minimal/95","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":true,"comments":true,"username":false,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","files":[]}},{"name":"gist/minimal/96","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":false,"comments":false,"username":true,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"ownerLogin":"XXXX-1"}},{"name":"gist/minimal/97","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":false,"comments":false,"username":true,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1"}},{"name":"gist/minimal/98","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":false,"comments":false,"username":true,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"ownerLogin":"XXXX-1"}},{"name":"gist/minimal/99","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":false,"comments":false,"username":true,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1"}},{"name":"gist/minimal/100","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":false,"comments":false,"username":true,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"ownerLogin":"XXXX-1"}},{"name":"gist/minimal/101","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":false,"comments":false,"username":true,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1"}},{"name":"gist/minimal/102","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":false,"comments":false,"username":true,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"ownerLogin":"XXXX-1"}},{"name":"gist/minimal/103","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":false,"comments":false,"username":true,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1"}},{"name":"gist/minimal/104","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":true,"comments":false,"username":true,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"ownerLogin":"XXXX-1","files":[]}},{"name":"gist/minimal/105","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":true,"comments":false,"username":true,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","files":[]}},{"name":"gist/minimal/106","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":true,"comments":false,"username":true,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"ownerLogin":"XXXX-1","files":[]}},{"name":"gist/minimal/107","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":true,"comments":false,"username":true,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","files":[]}},{"name":"gist/minimal/108","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":true,"comments":false,"username":true,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"ownerLogin":"XXXX-1","files":[]}},{"name":"gist/minimal/109","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":true,"comments":false,"username":true,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","files":[]}},{"name":"gist/minimal/110","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":true,"comments":false,"username":true,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"ownerLogin":"XXXX-1","files":[]}},{"name":"gist/minimal/111","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":true,"comments":false,"username":true,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","files":[]}},{"name":"gist/minimal/112","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":false,"comments":true,"username":true,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"ownerLogin":"XXXX-1"}},{"name":"gist/minimal/113","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":false,"comments":true,"username":true,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1"}},{"name":"gist/minimal/114","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":false,"comments":true,"username":true,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"ownerLogin":"XXXX-1"}},{"name":"gist/minimal/115","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":false,"comments":true,"username":true,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1"}},{"name":"gist/minimal/116","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":false,"comments":true,"username":true,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"ownerLogin":"XXXX-1"}},{"name":"gist/minimal/117","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":false,"comments":true,"username":true,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1"}},{"name":"gist/minimal/118","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":false,"comments":true,"username":true,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"ownerLogin":"XXXX-1"}},{"name":"gist/minimal/119","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":false,"comments":true,"username":true,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1"}},{"name":"gist/minimal/120","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":true,"comments":true,"username":true,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"ownerLogin":"XXXX-1","files":[]}},{"name":"gist/minimal/121","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":true,"comments":true,"username":true,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","files":[]}},{"name":"gist/minimal/122","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":true,"comments":true,"username":true,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"ownerLogin":"XXXX-1","files":[]}},{"name":"gist/minimal/123","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":true,"comments":true,"username":true,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","files":[]}},{"name":"gist/minimal/124","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":true,"comments":true,"username":true,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"ownerLogin":"XXXX-1","files":[]}},{"name":"gist/minimal/125","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":true,"comments":true,"username":true,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","files":[]}},{"name":"gist/minimal/126","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":true,"comments":true,"username":true,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"ownerLogin":"XXXX-1","files":[]}},{"name":"gist/minimal/127","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":true,"comments":true,"username":true,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","files":[]}},{"name":"gist/minimal/128","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":false,"comments":false,"username":false,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"sourceGistId":"upstream"}},{"name":"gist/minimal/129","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":false,"comments":false,"username":false,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","sourceGistId":"upstream"}},{"name":"gist/minimal/130","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":false,"comments":false,"username":false,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"sourceGistId":"upstream"}},{"name":"gist/minimal/131","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":false,"comments":false,"username":false,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","sourceGistId":"upstream"}},{"name":"gist/minimal/132","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":false,"comments":false,"username":false,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"sourceGistId":"upstream"}},{"name":"gist/minimal/133","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":false,"comments":false,"username":false,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","sourceGistId":"upstream"}},{"name":"gist/minimal/134","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":false,"comments":false,"username":false,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"sourceGistId":"upstream"}},{"name":"gist/minimal/135","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":false,"comments":false,"username":false,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","sourceGistId":"upstream"}},{"name":"gist/minimal/136","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":true,"comments":false,"username":false,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"files":[],"sourceGistId":"upstream"}},{"name":"gist/minimal/137","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":true,"comments":false,"username":false,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","files":[],"sourceGistId":"upstream"}},{"name":"gist/minimal/138","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":true,"comments":false,"username":false,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"files":[],"sourceGistId":"upstream"}},{"name":"gist/minimal/139","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":true,"comments":false,"username":false,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","files":[],"sourceGistId":"upstream"}},{"name":"gist/minimal/140","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":true,"comments":false,"username":false,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"files":[],"sourceGistId":"upstream"}},{"name":"gist/minimal/141","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":true,"comments":false,"username":false,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","files":[],"sourceGistId":"upstream"}},{"name":"gist/minimal/142","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":true,"comments":false,"username":false,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"files":[],"sourceGistId":"upstream"}},{"name":"gist/minimal/143","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":true,"comments":false,"username":false,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","files":[],"sourceGistId":"upstream"}},{"name":"gist/minimal/144","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":false,"comments":true,"username":false,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"sourceGistId":"upstream"}},{"name":"gist/minimal/145","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":false,"comments":true,"username":false,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","sourceGistId":"upstream"}},{"name":"gist/minimal/146","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":false,"comments":true,"username":false,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"sourceGistId":"upstream"}},{"name":"gist/minimal/147","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":false,"comments":true,"username":false,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","sourceGistId":"upstream"}},{"name":"gist/minimal/148","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":false,"comments":true,"username":false,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"sourceGistId":"upstream"}},{"name":"gist/minimal/149","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":false,"comments":true,"username":false,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","sourceGistId":"upstream"}},{"name":"gist/minimal/150","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":false,"comments":true,"username":false,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"sourceGistId":"upstream"}},{"name":"gist/minimal/151","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":false,"comments":true,"username":false,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","sourceGistId":"upstream"}},{"name":"gist/minimal/152","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":true,"comments":true,"username":false,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"files":[],"sourceGistId":"upstream"}},{"name":"gist/minimal/153","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":true,"comments":true,"username":false,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","files":[],"sourceGistId":"upstream"}},{"name":"gist/minimal/154","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":true,"comments":true,"username":false,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"files":[],"sourceGistId":"upstream"}},{"name":"gist/minimal/155","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":true,"comments":true,"username":false,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","files":[],"sourceGistId":"upstream"}},{"name":"gist/minimal/156","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":true,"comments":true,"username":false,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"files":[],"sourceGistId":"upstream"}},{"name":"gist/minimal/157","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":true,"comments":true,"username":false,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","files":[],"sourceGistId":"upstream"}},{"name":"gist/minimal/158","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":true,"comments":true,"username":false,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"files":[],"sourceGistId":"upstream"}},{"name":"gist/minimal/159","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":true,"comments":true,"username":false,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","files":[],"sourceGistId":"upstream"}},{"name":"gist/minimal/160","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":false,"comments":false,"username":true,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"ownerLogin":"XXXX-1","sourceGistId":"upstream"}},{"name":"gist/minimal/161","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":false,"comments":false,"username":true,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","sourceGistId":"upstream"}},{"name":"gist/minimal/162","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":false,"comments":false,"username":true,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"ownerLogin":"XXXX-1","sourceGistId":"upstream"}},{"name":"gist/minimal/163","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":false,"comments":false,"username":true,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","sourceGistId":"upstream"}},{"name":"gist/minimal/164","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":false,"comments":false,"username":true,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"ownerLogin":"XXXX-1","sourceGistId":"upstream"}},{"name":"gist/minimal/165","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":false,"comments":false,"username":true,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","sourceGistId":"upstream"}},{"name":"gist/minimal/166","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":false,"comments":false,"username":true,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"ownerLogin":"XXXX-1","sourceGistId":"upstream"}},{"name":"gist/minimal/167","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":false,"comments":false,"username":true,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","sourceGistId":"upstream"}},{"name":"gist/minimal/168","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":true,"comments":false,"username":true,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"ownerLogin":"XXXX-1","files":[],"sourceGistId":"upstream"}},{"name":"gist/minimal/169","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":true,"comments":false,"username":true,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","files":[],"sourceGistId":"upstream"}},{"name":"gist/minimal/170","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":true,"comments":false,"username":true,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"ownerLogin":"XXXX-1","files":[],"sourceGistId":"upstream"}},{"name":"gist/minimal/171","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":true,"comments":false,"username":true,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","files":[],"sourceGistId":"upstream"}},{"name":"gist/minimal/172","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":true,"comments":false,"username":true,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"ownerLogin":"XXXX-1","files":[],"sourceGistId":"upstream"}},{"name":"gist/minimal/173","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":true,"comments":false,"username":true,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","files":[],"sourceGistId":"upstream"}},{"name":"gist/minimal/174","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":true,"comments":false,"username":true,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"ownerLogin":"XXXX-1","files":[],"sourceGistId":"upstream"}},{"name":"gist/minimal/175","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":true,"comments":false,"username":true,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","files":[],"sourceGistId":"upstream"}},{"name":"gist/minimal/176","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":false,"comments":true,"username":true,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"ownerLogin":"XXXX-1","sourceGistId":"upstream"}},{"name":"gist/minimal/177","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":false,"comments":true,"username":true,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","sourceGistId":"upstream"}},{"name":"gist/minimal/178","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":false,"comments":true,"username":true,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"ownerLogin":"XXXX-1","sourceGistId":"upstream"}},{"name":"gist/minimal/179","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":false,"comments":true,"username":true,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","sourceGistId":"upstream"}},{"name":"gist/minimal/180","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":false,"comments":true,"username":true,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"ownerLogin":"XXXX-1","sourceGistId":"upstream"}},{"name":"gist/minimal/181","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":false,"comments":true,"username":true,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","sourceGistId":"upstream"}},{"name":"gist/minimal/182","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":false,"comments":true,"username":true,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"ownerLogin":"XXXX-1","sourceGistId":"upstream"}},{"name":"gist/minimal/183","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":false,"comments":true,"username":true,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","sourceGistId":"upstream"}},{"name":"gist/minimal/184","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":true,"comments":true,"username":true,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"ownerLogin":"XXXX-1","files":[],"sourceGistId":"upstream"}},{"name":"gist/minimal/185","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":true,"comments":true,"username":true,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","files":[],"sourceGistId":"upstream"}},{"name":"gist/minimal/186","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":true,"comments":true,"username":true,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"ownerLogin":"XXXX-1","files":[],"sourceGistId":"upstream"}},{"name":"gist/minimal/187","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":true,"comments":true,"username":true,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","files":[],"sourceGistId":"upstream"}},{"name":"gist/minimal/188","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":true,"comments":true,"username":true,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"ownerLogin":"XXXX-1","files":[],"sourceGistId":"upstream"}},{"name":"gist/minimal/189","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":true,"comments":true,"username":true,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","files":[],"sourceGistId":"upstream"}},{"name":"gist/minimal/190","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":true,"comments":true,"username":true,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"ownerLogin":"XXXX-1","files":[],"sourceGistId":"upstream"}},{"name":"gist/minimal/191","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":true,"comments":true,"username":true,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","files":[],"sourceGistId":"upstream"}},{"name":"gist/minimal/192","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":false,"comments":false,"username":false,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"sourceGistId":"upstream"}},{"name":"gist/minimal/193","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":false,"comments":false,"username":false,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","sourceGistId":"upstream"}},{"name":"gist/minimal/194","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":false,"comments":false,"username":false,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"sourceGistId":"upstream"}},{"name":"gist/minimal/195","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":false,"comments":false,"username":false,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","sourceGistId":"upstream"}},{"name":"gist/minimal/196","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":false,"comments":false,"username":false,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"sourceGistId":"upstream"}},{"name":"gist/minimal/197","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":false,"comments":false,"username":false,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","sourceGistId":"upstream"}},{"name":"gist/minimal/198","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":false,"comments":false,"username":false,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"sourceGistId":"upstream"}},{"name":"gist/minimal/199","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":false,"comments":false,"username":false,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","sourceGistId":"upstream"}},{"name":"gist/minimal/200","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":true,"comments":false,"username":false,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"files":[],"sourceGistId":"upstream"}},{"name":"gist/minimal/201","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":true,"comments":false,"username":false,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","files":[],"sourceGistId":"upstream"}},{"name":"gist/minimal/202","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":true,"comments":false,"username":false,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"files":[],"sourceGistId":"upstream"}},{"name":"gist/minimal/203","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":true,"comments":false,"username":false,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","files":[],"sourceGistId":"upstream"}},{"name":"gist/minimal/204","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":true,"comments":false,"username":false,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"files":[],"sourceGistId":"upstream"}},{"name":"gist/minimal/205","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":true,"comments":false,"username":false,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","files":[],"sourceGistId":"upstream"}},{"name":"gist/minimal/206","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":true,"comments":false,"username":false,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"files":[],"sourceGistId":"upstream"}},{"name":"gist/minimal/207","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":true,"comments":false,"username":false,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","files":[],"sourceGistId":"upstream"}},{"name":"gist/minimal/208","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":false,"comments":true,"username":false,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"sourceGistId":"upstream"}},{"name":"gist/minimal/209","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":false,"comments":true,"username":false,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","sourceGistId":"upstream"}},{"name":"gist/minimal/210","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":false,"comments":true,"username":false,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"sourceGistId":"upstream"}},{"name":"gist/minimal/211","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":false,"comments":true,"username":false,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","sourceGistId":"upstream"}},{"name":"gist/minimal/212","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":false,"comments":true,"username":false,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"sourceGistId":"upstream"}},{"name":"gist/minimal/213","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":false,"comments":true,"username":false,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","sourceGistId":"upstream"}},{"name":"gist/minimal/214","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":false,"comments":true,"username":false,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"sourceGistId":"upstream"}},{"name":"gist/minimal/215","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":false,"comments":true,"username":false,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","sourceGistId":"upstream"}},{"name":"gist/minimal/216","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":true,"comments":true,"username":false,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"files":[],"sourceGistId":"upstream"}},{"name":"gist/minimal/217","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":true,"comments":true,"username":false,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","files":[],"sourceGistId":"upstream"}},{"name":"gist/minimal/218","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":true,"comments":true,"username":false,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"files":[],"sourceGistId":"upstream"}},{"name":"gist/minimal/219","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":true,"comments":true,"username":false,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","files":[],"sourceGistId":"upstream"}},{"name":"gist/minimal/220","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":true,"comments":true,"username":false,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"files":[],"sourceGistId":"upstream"}},{"name":"gist/minimal/221","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":true,"comments":true,"username":false,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","files":[],"sourceGistId":"upstream"}},{"name":"gist/minimal/222","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":true,"comments":true,"username":false,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"files":[],"sourceGistId":"upstream"}},{"name":"gist/minimal/223","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":true,"comments":true,"username":false,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","files":[],"sourceGistId":"upstream"}},{"name":"gist/minimal/224","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":false,"comments":false,"username":true,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"ownerLogin":"XXXX-1","sourceGistId":"upstream"}},{"name":"gist/minimal/225","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":false,"comments":false,"username":true,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","sourceGistId":"upstream"}},{"name":"gist/minimal/226","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":false,"comments":false,"username":true,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"ownerLogin":"XXXX-1","sourceGistId":"upstream"}},{"name":"gist/minimal/227","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":false,"comments":false,"username":true,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","sourceGistId":"upstream"}},{"name":"gist/minimal/228","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":false,"comments":false,"username":true,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"ownerLogin":"XXXX-1","sourceGistId":"upstream"}},{"name":"gist/minimal/229","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":false,"comments":false,"username":true,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","sourceGistId":"upstream"}},{"name":"gist/minimal/230","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":false,"comments":false,"username":true,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"ownerLogin":"XXXX-1","sourceGistId":"upstream"}},{"name":"gist/minimal/231","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":false,"comments":false,"username":true,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","sourceGistId":"upstream"}},{"name":"gist/minimal/232","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":true,"comments":false,"username":true,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"ownerLogin":"XXXX-1","files":[],"sourceGistId":"upstream"}},{"name":"gist/minimal/233","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":true,"comments":false,"username":true,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","files":[],"sourceGistId":"upstream"}},{"name":"gist/minimal/234","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":true,"comments":false,"username":true,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"ownerLogin":"XXXX-1","files":[],"sourceGistId":"upstream"}},{"name":"gist/minimal/235","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":true,"comments":false,"username":true,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","files":[],"sourceGistId":"upstream"}},{"name":"gist/minimal/236","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":true,"comments":false,"username":true,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"ownerLogin":"XXXX-1","files":[],"sourceGistId":"upstream"}},{"name":"gist/minimal/237","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":true,"comments":false,"username":true,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","files":[],"sourceGistId":"upstream"}},{"name":"gist/minimal/238","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":true,"comments":false,"username":true,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"ownerLogin":"XXXX-1","files":[],"sourceGistId":"upstream"}},{"name":"gist/minimal/239","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":true,"comments":false,"username":true,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","files":[],"sourceGistId":"upstream"}},{"name":"gist/minimal/240","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":false,"comments":true,"username":true,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"ownerLogin":"XXXX-1","sourceGistId":"upstream"}},{"name":"gist/minimal/241","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":false,"comments":true,"username":true,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","sourceGistId":"upstream"}},{"name":"gist/minimal/242","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":false,"comments":true,"username":true,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"ownerLogin":"XXXX-1","sourceGistId":"upstream"}},{"name":"gist/minimal/243","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":false,"comments":true,"username":true,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","sourceGistId":"upstream"}},{"name":"gist/minimal/244","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":false,"comments":true,"username":true,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"ownerLogin":"XXXX-1","sourceGistId":"upstream"}},{"name":"gist/minimal/245","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":false,"comments":true,"username":true,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","sourceGistId":"upstream"}},{"name":"gist/minimal/246","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":false,"comments":true,"username":true,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"ownerLogin":"XXXX-1","sourceGistId":"upstream"}},{"name":"gist/minimal/247","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":false,"comments":true,"username":true,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","sourceGistId":"upstream"}},{"name":"gist/minimal/248","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":true,"comments":true,"username":true,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"ownerLogin":"XXXX-1","files":[],"sourceGistId":"upstream"}},{"name":"gist/minimal/249","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":true,"comments":true,"username":true,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","files":[],"sourceGistId":"upstream"}},{"name":"gist/minimal/250","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":true,"comments":true,"username":true,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"ownerLogin":"XXXX-1","files":[],"sourceGistId":"upstream"}},{"name":"gist/minimal/251","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":true,"comments":true,"username":true,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","files":[],"sourceGistId":"upstream"}},{"name":"gist/minimal/252","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":true,"comments":true,"username":true,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"ownerLogin":"XXXX-1","files":[],"sourceGistId":"upstream"}},{"name":"gist/minimal/253","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":true,"comments":true,"username":true,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","files":[],"sourceGistId":"upstream"}},{"name":"gist/minimal/254","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":true,"comments":true,"username":true,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"ownerLogin":"XXXX-1","files":[],"sourceGistId":"upstream"}},{"name":"gist/minimal/255","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":true,"comments":true,"username":true,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","files":[],"sourceGistId":"upstream"}},{"name":"gist/rich/0","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":false,"comments":false,"username":false,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false}},{"name":"gist/rich/1","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":false,"comments":false,"username":false,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet"}},{"name":"gist/rich/2","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":false,"comments":false,"username":false,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false}},{"name":"gist/rich/3","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":false,"comments":false,"username":false,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet"}},{"name":"gist/rich/4","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":false,"comments":false,"username":false,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false}},{"name":"gist/rich/5","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":false,"comments":false,"username":false,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet"}},{"name":"gist/rich/6","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":false,"comments":false,"username":false,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false}},{"name":"gist/rich/7","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":false,"comments":false,"username":false,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet"}},{"name":"gist/rich/8","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":true,"comments":false,"username":false,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}]}},{"name":"gist/rich/9","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":true,"comments":false,"username":false,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}]}},{"name":"gist/rich/10","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":true,"comments":false,"username":false,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}]}},{"name":"gist/rich/11","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":true,"comments":false,"username":false,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}]}},{"name":"gist/rich/12","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":true,"comments":false,"username":false,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}]}},{"name":"gist/rich/13","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":true,"comments":false,"username":false,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}]}},{"name":"gist/rich/14","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":true,"comments":false,"username":false,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}]}},{"name":"gist/rich/15","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":true,"comments":false,"username":false,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}]}},{"name":"gist/rich/16","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":false,"comments":true,"username":false,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"comments":[{},{}]}},{"name":"gist/rich/17","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":false,"comments":true,"username":false,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","comments":[{},{}]}},{"name":"gist/rich/18","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":false,"comments":true,"username":false,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"comments":[{"body":"XXXX-1 comment"},{"body":"reply"}]}},{"name":"gist/rich/19","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":false,"comments":true,"username":false,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","comments":[{"body":"XXXX-1 comment"},{"body":"reply"}]}},{"name":"gist/rich/20","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":false,"comments":true,"username":false,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"comments":[{},{}]}},{"name":"gist/rich/21","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":false,"comments":true,"username":false,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","comments":[{},{}]}},{"name":"gist/rich/22","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":false,"comments":true,"username":false,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"comments":[{"body":"XXXX-1 comment"},{"body":"reply"}]}},{"name":"gist/rich/23","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":false,"comments":true,"username":false,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","comments":[{"body":"XXXX-1 comment"},{"body":"reply"}]}},{"name":"gist/rich/24","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":true,"comments":true,"username":false,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"comments":[{},{}]}},{"name":"gist/rich/25","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":true,"comments":true,"username":false,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"comments":[{},{}]}},{"name":"gist/rich/26","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":true,"comments":true,"username":false,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"comments":[{"body":"XXXX-1 comment"},{"body":"reply"}]}},{"name":"gist/rich/27","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":true,"comments":true,"username":false,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"comments":[{"body":"XXXX-1 comment"},{"body":"reply"}]}},{"name":"gist/rich/28","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":true,"comments":true,"username":false,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"comments":[{},{}]}},{"name":"gist/rich/29","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":true,"comments":true,"username":false,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"comments":[{},{}]}},{"name":"gist/rich/30","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":true,"comments":true,"username":false,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"comments":[{"body":"XXXX-1 comment"},{"body":"reply"}]}},{"name":"gist/rich/31","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":true,"comments":true,"username":false,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"comments":[{"body":"XXXX-1 comment"},{"body":"reply"}]}},{"name":"gist/rich/32","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":false,"comments":false,"username":true,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"ownerLogin":"XXXX-1"}},{"name":"gist/rich/33","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":false,"comments":false,"username":true,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1"}},{"name":"gist/rich/34","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":false,"comments":false,"username":true,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"ownerLogin":"XXXX-1"}},{"name":"gist/rich/35","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":false,"comments":false,"username":true,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1"}},{"name":"gist/rich/36","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":false,"comments":false,"username":true,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"ownerLogin":"XXXX-1"}},{"name":"gist/rich/37","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":false,"comments":false,"username":true,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1"}},{"name":"gist/rich/38","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":false,"comments":false,"username":true,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"ownerLogin":"XXXX-1"}},{"name":"gist/rich/39","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":false,"comments":false,"username":true,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1"}},{"name":"gist/rich/40","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":true,"comments":false,"username":true,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"ownerLogin":"XXXX-1","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}]}},{"name":"gist/rich/41","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":true,"comments":false,"username":true,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}]}},{"name":"gist/rich/42","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":true,"comments":false,"username":true,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"ownerLogin":"XXXX-1","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}]}},{"name":"gist/rich/43","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":true,"comments":false,"username":true,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}]}},{"name":"gist/rich/44","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":true,"comments":false,"username":true,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"ownerLogin":"XXXX-1","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}]}},{"name":"gist/rich/45","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":true,"comments":false,"username":true,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}]}},{"name":"gist/rich/46","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":true,"comments":false,"username":true,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"ownerLogin":"XXXX-1","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}]}},{"name":"gist/rich/47","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":true,"comments":false,"username":true,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}]}},{"name":"gist/rich/48","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":false,"comments":true,"username":true,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"ownerLogin":"XXXX-1","comments":[{"author":"XXXX-1"},{"author":"Bob"}]}},{"name":"gist/rich/49","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":false,"comments":true,"username":true,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","comments":[{"author":"XXXX-1"},{"author":"Bob"}]}},{"name":"gist/rich/50","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":false,"comments":true,"username":true,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"ownerLogin":"XXXX-1","comments":[{"body":"XXXX-1 comment","author":"XXXX-1"},{"body":"reply","author":"Bob"}]}},{"name":"gist/rich/51","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":false,"comments":true,"username":true,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","comments":[{"body":"XXXX-1 comment","author":"XXXX-1"},{"body":"reply","author":"Bob"}]}},{"name":"gist/rich/52","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":false,"comments":true,"username":true,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"ownerLogin":"XXXX-1","comments":[{"author":"XXXX-1"},{"author":"Bob"}]}},{"name":"gist/rich/53","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":false,"comments":true,"username":true,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","comments":[{"author":"XXXX-1"},{"author":"Bob"}]}},{"name":"gist/rich/54","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":false,"comments":true,"username":true,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"ownerLogin":"XXXX-1","comments":[{"body":"XXXX-1 comment","author":"XXXX-1"},{"body":"reply","author":"Bob"}]}},{"name":"gist/rich/55","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":false,"comments":true,"username":true,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","comments":[{"body":"XXXX-1 comment","author":"XXXX-1"},{"body":"reply","author":"Bob"}]}},{"name":"gist/rich/56","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":true,"comments":true,"username":true,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"ownerLogin":"XXXX-1","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"comments":[{"author":"XXXX-1"},{"author":"Bob"}]}},{"name":"gist/rich/57","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":true,"comments":true,"username":true,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"comments":[{"author":"XXXX-1"},{"author":"Bob"}]}},{"name":"gist/rich/58","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":true,"comments":true,"username":true,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"ownerLogin":"XXXX-1","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"comments":[{"body":"XXXX-1 comment","author":"XXXX-1"},{"body":"reply","author":"Bob"}]}},{"name":"gist/rich/59","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":true,"comments":true,"username":true,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"comments":[{"body":"XXXX-1 comment","author":"XXXX-1"},{"body":"reply","author":"Bob"}]}},{"name":"gist/rich/60","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":true,"comments":true,"username":true,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"ownerLogin":"XXXX-1","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"comments":[{"author":"XXXX-1"},{"author":"Bob"}]}},{"name":"gist/rich/61","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":true,"comments":true,"username":true,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"comments":[{"author":"XXXX-1"},{"author":"Bob"}]}},{"name":"gist/rich/62","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":true,"comments":true,"username":true,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"ownerLogin":"XXXX-1","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"comments":[{"body":"XXXX-1 comment","author":"XXXX-1"},{"body":"reply","author":"Bob"}]}},{"name":"gist/rich/63","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":true,"comments":true,"username":true,"date":false,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"comments":[{"body":"XXXX-1 comment","author":"XXXX-1"},{"body":"reply","author":"Bob"}]}},{"name":"gist/rich/64","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":false,"comments":false,"username":false,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/65","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":false,"comments":false,"username":false,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/66","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":false,"comments":false,"username":false,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/67","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":false,"comments":false,"username":false,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/68","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":false,"comments":false,"username":false,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/69","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":false,"comments":false,"username":false,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/70","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":false,"comments":false,"username":false,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/71","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":false,"comments":false,"username":false,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/72","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":true,"comments":false,"username":false,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/73","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":true,"comments":false,"username":false,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/74","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":true,"comments":false,"username":false,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/75","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":true,"comments":false,"username":false,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/76","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":true,"comments":false,"username":false,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/77","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":true,"comments":false,"username":false,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/78","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":true,"comments":false,"username":false,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/79","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":true,"comments":false,"username":false,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/80","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":false,"comments":true,"username":false,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"comments":[{"creationDate":"2025-01-01T00:00:00.000Z"},{}],"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/81","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":false,"comments":true,"username":false,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","comments":[{"creationDate":"2025-01-01T00:00:00.000Z"},{}],"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/82","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":false,"comments":true,"username":false,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"comments":[{"body":"XXXX-1 comment","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply"}],"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/83","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":false,"comments":true,"username":false,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","comments":[{"body":"XXXX-1 comment","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply"}],"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/84","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":false,"comments":true,"username":false,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"comments":[{"creationDate":"2025-01-01T00:00:00.000Z"},{}],"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/85","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":false,"comments":true,"username":false,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","comments":[{"creationDate":"2025-01-01T00:00:00.000Z"},{}],"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/86","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":false,"comments":true,"username":false,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"comments":[{"body":"XXXX-1 comment","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply"}],"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/87","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":false,"comments":true,"username":false,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","comments":[{"body":"XXXX-1 comment","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply"}],"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/88","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":true,"comments":true,"username":false,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"comments":[{"creationDate":"2025-01-01T00:00:00.000Z"},{}],"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/89","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":true,"comments":true,"username":false,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"comments":[{"creationDate":"2025-01-01T00:00:00.000Z"},{}],"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/90","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":true,"comments":true,"username":false,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"comments":[{"body":"XXXX-1 comment","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply"}],"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/91","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":true,"comments":true,"username":false,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"comments":[{"body":"XXXX-1 comment","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply"}],"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/92","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":true,"comments":true,"username":false,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"comments":[{"creationDate":"2025-01-01T00:00:00.000Z"},{}],"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/93","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":true,"comments":true,"username":false,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"comments":[{"creationDate":"2025-01-01T00:00:00.000Z"},{}],"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/94","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":true,"comments":true,"username":false,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"comments":[{"body":"XXXX-1 comment","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply"}],"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/95","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":true,"comments":true,"username":false,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"comments":[{"body":"XXXX-1 comment","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply"}],"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/96","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":false,"comments":false,"username":true,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"ownerLogin":"XXXX-1","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/97","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":false,"comments":false,"username":true,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/98","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":false,"comments":false,"username":true,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"ownerLogin":"XXXX-1","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/99","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":false,"comments":false,"username":true,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/100","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":false,"comments":false,"username":true,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"ownerLogin":"XXXX-1","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/101","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":false,"comments":false,"username":true,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/102","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":false,"comments":false,"username":true,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"ownerLogin":"XXXX-1","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/103","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":false,"comments":false,"username":true,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/104","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":true,"comments":false,"username":true,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"ownerLogin":"XXXX-1","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/105","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":true,"comments":false,"username":true,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/106","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":true,"comments":false,"username":true,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"ownerLogin":"XXXX-1","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/107","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":true,"comments":false,"username":true,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/108","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":true,"comments":false,"username":true,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"ownerLogin":"XXXX-1","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/109","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":true,"comments":false,"username":true,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/110","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":true,"comments":false,"username":true,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"ownerLogin":"XXXX-1","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/111","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":true,"comments":false,"username":true,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/112","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":false,"comments":true,"username":true,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"ownerLogin":"XXXX-1","comments":[{"author":"XXXX-1","creationDate":"2025-01-01T00:00:00.000Z"},{"author":"Bob"}],"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/113","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":false,"comments":true,"username":true,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","comments":[{"author":"XXXX-1","creationDate":"2025-01-01T00:00:00.000Z"},{"author":"Bob"}],"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/114","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":false,"comments":true,"username":true,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"ownerLogin":"XXXX-1","comments":[{"body":"XXXX-1 comment","author":"XXXX-1","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}],"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/115","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":false,"comments":true,"username":true,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","comments":[{"body":"XXXX-1 comment","author":"XXXX-1","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}],"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/116","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":false,"comments":true,"username":true,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"ownerLogin":"XXXX-1","comments":[{"author":"XXXX-1","creationDate":"2025-01-01T00:00:00.000Z"},{"author":"Bob"}],"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/117","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":false,"comments":true,"username":true,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","comments":[{"author":"XXXX-1","creationDate":"2025-01-01T00:00:00.000Z"},{"author":"Bob"}],"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/118","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":false,"comments":true,"username":true,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"ownerLogin":"XXXX-1","comments":[{"body":"XXXX-1 comment","author":"XXXX-1","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}],"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/119","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":false,"comments":true,"username":true,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","comments":[{"body":"XXXX-1 comment","author":"XXXX-1","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}],"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/120","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":true,"comments":true,"username":true,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"ownerLogin":"XXXX-1","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"comments":[{"author":"XXXX-1","creationDate":"2025-01-01T00:00:00.000Z"},{"author":"Bob"}],"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/121","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":true,"comments":true,"username":true,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"comments":[{"author":"XXXX-1","creationDate":"2025-01-01T00:00:00.000Z"},{"author":"Bob"}],"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/122","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":true,"comments":true,"username":true,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"ownerLogin":"XXXX-1","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"comments":[{"body":"XXXX-1 comment","author":"XXXX-1","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}],"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/123","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":true,"comments":true,"username":true,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"comments":[{"body":"XXXX-1 comment","author":"XXXX-1","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}],"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/124","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":true,"comments":true,"username":true,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"ownerLogin":"XXXX-1","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"comments":[{"author":"XXXX-1","creationDate":"2025-01-01T00:00:00.000Z"},{"author":"Bob"}],"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/125","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":true,"comments":true,"username":true,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"comments":[{"author":"XXXX-1","creationDate":"2025-01-01T00:00:00.000Z"},{"author":"Bob"}],"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/126","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":true,"comments":true,"username":true,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"ownerLogin":"XXXX-1","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"comments":[{"body":"XXXX-1 comment","author":"XXXX-1","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}],"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/127","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":true,"comments":true,"username":true,"date":true,"origin":false},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"comments":[{"body":"XXXX-1 comment","author":"XXXX-1","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}],"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/128","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":false,"comments":false,"username":false,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"sourceGistId":"upstream"}},{"name":"gist/rich/129","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":false,"comments":false,"username":false,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","sourceGistId":"upstream"}},{"name":"gist/rich/130","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":false,"comments":false,"username":false,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"sourceGistId":"upstream"}},{"name":"gist/rich/131","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":false,"comments":false,"username":false,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","sourceGistId":"upstream"}},{"name":"gist/rich/132","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":false,"comments":false,"username":false,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"sourceGistId":"upstream"}},{"name":"gist/rich/133","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":false,"comments":false,"username":false,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","sourceGistId":"upstream"}},{"name":"gist/rich/134","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":false,"comments":false,"username":false,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"sourceGistId":"upstream"}},{"name":"gist/rich/135","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":false,"comments":false,"username":false,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","sourceGistId":"upstream"}},{"name":"gist/rich/136","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":true,"comments":false,"username":false,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"sourceGistId":"upstream"}},{"name":"gist/rich/137","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":true,"comments":false,"username":false,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"sourceGistId":"upstream"}},{"name":"gist/rich/138","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":true,"comments":false,"username":false,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"sourceGistId":"upstream"}},{"name":"gist/rich/139","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":true,"comments":false,"username":false,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"sourceGistId":"upstream"}},{"name":"gist/rich/140","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":true,"comments":false,"username":false,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"sourceGistId":"upstream"}},{"name":"gist/rich/141","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":true,"comments":false,"username":false,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"sourceGistId":"upstream"}},{"name":"gist/rich/142","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":true,"comments":false,"username":false,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"sourceGistId":"upstream"}},{"name":"gist/rich/143","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":true,"comments":false,"username":false,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"sourceGistId":"upstream"}},{"name":"gist/rich/144","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":false,"comments":true,"username":false,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"comments":[{},{}],"sourceGistId":"upstream"}},{"name":"gist/rich/145","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":false,"comments":true,"username":false,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","comments":[{},{}],"sourceGistId":"upstream"}},{"name":"gist/rich/146","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":false,"comments":true,"username":false,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"comments":[{"body":"XXXX-1 comment"},{"body":"reply"}],"sourceGistId":"upstream"}},{"name":"gist/rich/147","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":false,"comments":true,"username":false,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","comments":[{"body":"XXXX-1 comment"},{"body":"reply"}],"sourceGistId":"upstream"}},{"name":"gist/rich/148","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":false,"comments":true,"username":false,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"comments":[{},{}],"sourceGistId":"upstream"}},{"name":"gist/rich/149","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":false,"comments":true,"username":false,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","comments":[{},{}],"sourceGistId":"upstream"}},{"name":"gist/rich/150","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":false,"comments":true,"username":false,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"comments":[{"body":"XXXX-1 comment"},{"body":"reply"}],"sourceGistId":"upstream"}},{"name":"gist/rich/151","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":false,"comments":true,"username":false,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","comments":[{"body":"XXXX-1 comment"},{"body":"reply"}],"sourceGistId":"upstream"}},{"name":"gist/rich/152","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":true,"comments":true,"username":false,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"comments":[{},{}],"sourceGistId":"upstream"}},{"name":"gist/rich/153","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":true,"comments":true,"username":false,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"comments":[{},{}],"sourceGistId":"upstream"}},{"name":"gist/rich/154","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":true,"comments":true,"username":false,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"comments":[{"body":"XXXX-1 comment"},{"body":"reply"}],"sourceGistId":"upstream"}},{"name":"gist/rich/155","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":true,"comments":true,"username":false,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"comments":[{"body":"XXXX-1 comment"},{"body":"reply"}],"sourceGistId":"upstream"}},{"name":"gist/rich/156","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":true,"comments":true,"username":false,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"comments":[{},{}],"sourceGistId":"upstream"}},{"name":"gist/rich/157","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":true,"comments":true,"username":false,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"comments":[{},{}],"sourceGistId":"upstream"}},{"name":"gist/rich/158","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":true,"comments":true,"username":false,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"comments":[{"body":"XXXX-1 comment"},{"body":"reply"}],"sourceGistId":"upstream"}},{"name":"gist/rich/159","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":true,"comments":true,"username":false,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"comments":[{"body":"XXXX-1 comment"},{"body":"reply"}],"sourceGistId":"upstream"}},{"name":"gist/rich/160","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":false,"comments":false,"username":true,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"ownerLogin":"XXXX-1","sourceGistId":"upstream"}},{"name":"gist/rich/161","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":false,"comments":false,"username":true,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","sourceGistId":"upstream"}},{"name":"gist/rich/162","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":false,"comments":false,"username":true,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"ownerLogin":"XXXX-1","sourceGistId":"upstream"}},{"name":"gist/rich/163","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":false,"comments":false,"username":true,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","sourceGistId":"upstream"}},{"name":"gist/rich/164","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":false,"comments":false,"username":true,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"ownerLogin":"XXXX-1","sourceGistId":"upstream"}},{"name":"gist/rich/165","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":false,"comments":false,"username":true,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","sourceGistId":"upstream"}},{"name":"gist/rich/166","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":false,"comments":false,"username":true,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"ownerLogin":"XXXX-1","sourceGistId":"upstream"}},{"name":"gist/rich/167","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":false,"comments":false,"username":true,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","sourceGistId":"upstream"}},{"name":"gist/rich/168","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":true,"comments":false,"username":true,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"ownerLogin":"XXXX-1","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"sourceGistId":"upstream"}},{"name":"gist/rich/169","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":true,"comments":false,"username":true,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"sourceGistId":"upstream"}},{"name":"gist/rich/170","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":true,"comments":false,"username":true,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"ownerLogin":"XXXX-1","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"sourceGistId":"upstream"}},{"name":"gist/rich/171","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":true,"comments":false,"username":true,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"sourceGistId":"upstream"}},{"name":"gist/rich/172","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":true,"comments":false,"username":true,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"ownerLogin":"XXXX-1","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"sourceGistId":"upstream"}},{"name":"gist/rich/173","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":true,"comments":false,"username":true,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"sourceGistId":"upstream"}},{"name":"gist/rich/174","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":true,"comments":false,"username":true,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"ownerLogin":"XXXX-1","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"sourceGistId":"upstream"}},{"name":"gist/rich/175","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":true,"comments":false,"username":true,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"sourceGistId":"upstream"}},{"name":"gist/rich/176","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":false,"comments":true,"username":true,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"ownerLogin":"XXXX-1","comments":[{"author":"XXXX-1"},{"author":"Bob"}],"sourceGistId":"upstream"}},{"name":"gist/rich/177","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":false,"comments":true,"username":true,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","comments":[{"author":"XXXX-1"},{"author":"Bob"}],"sourceGistId":"upstream"}},{"name":"gist/rich/178","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":false,"comments":true,"username":true,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"ownerLogin":"XXXX-1","comments":[{"body":"XXXX-1 comment","author":"XXXX-1"},{"body":"reply","author":"Bob"}],"sourceGistId":"upstream"}},{"name":"gist/rich/179","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":false,"comments":true,"username":true,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","comments":[{"body":"XXXX-1 comment","author":"XXXX-1"},{"body":"reply","author":"Bob"}],"sourceGistId":"upstream"}},{"name":"gist/rich/180","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":false,"comments":true,"username":true,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"ownerLogin":"XXXX-1","comments":[{"author":"XXXX-1"},{"author":"Bob"}],"sourceGistId":"upstream"}},{"name":"gist/rich/181","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":false,"comments":true,"username":true,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","comments":[{"author":"XXXX-1"},{"author":"Bob"}],"sourceGistId":"upstream"}},{"name":"gist/rich/182","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":false,"comments":true,"username":true,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"ownerLogin":"XXXX-1","comments":[{"body":"XXXX-1 comment","author":"XXXX-1"},{"body":"reply","author":"Bob"}],"sourceGistId":"upstream"}},{"name":"gist/rich/183","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":false,"comments":true,"username":true,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","comments":[{"body":"XXXX-1 comment","author":"XXXX-1"},{"body":"reply","author":"Bob"}],"sourceGistId":"upstream"}},{"name":"gist/rich/184","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":true,"comments":true,"username":true,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"ownerLogin":"XXXX-1","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"comments":[{"author":"XXXX-1"},{"author":"Bob"}],"sourceGistId":"upstream"}},{"name":"gist/rich/185","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":true,"comments":true,"username":true,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"comments":[{"author":"XXXX-1"},{"author":"Bob"}],"sourceGistId":"upstream"}},{"name":"gist/rich/186","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":true,"comments":true,"username":true,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"ownerLogin":"XXXX-1","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"comments":[{"body":"XXXX-1 comment","author":"XXXX-1"},{"body":"reply","author":"Bob"}],"sourceGistId":"upstream"}},{"name":"gist/rich/187","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":true,"comments":true,"username":true,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"comments":[{"body":"XXXX-1 comment","author":"XXXX-1"},{"body":"reply","author":"Bob"}],"sourceGistId":"upstream"}},{"name":"gist/rich/188","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":true,"comments":true,"username":true,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"ownerLogin":"XXXX-1","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"comments":[{"author":"XXXX-1"},{"author":"Bob"}],"sourceGistId":"upstream"}},{"name":"gist/rich/189","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":true,"comments":true,"username":true,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"comments":[{"author":"XXXX-1"},{"author":"Bob"}],"sourceGistId":"upstream"}},{"name":"gist/rich/190","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":true,"comments":true,"username":true,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"ownerLogin":"XXXX-1","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"comments":[{"body":"XXXX-1 comment","author":"XXXX-1"},{"body":"reply","author":"Bob"}],"sourceGistId":"upstream"}},{"name":"gist/rich/191","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":true,"comments":true,"username":true,"date":false,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"comments":[{"body":"XXXX-1 comment","author":"XXXX-1"},{"body":"reply","author":"Bob"}],"sourceGistId":"upstream"}},{"name":"gist/rich/192","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":false,"comments":false,"username":false,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"sourceGistId":"upstream","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/193","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":false,"comments":false,"username":false,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","sourceGistId":"upstream","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/194","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":false,"comments":false,"username":false,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"sourceGistId":"upstream","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/195","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":false,"comments":false,"username":false,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","sourceGistId":"upstream","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/196","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":false,"comments":false,"username":false,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"sourceGistId":"upstream","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/197","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":false,"comments":false,"username":false,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","sourceGistId":"upstream","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/198","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":false,"comments":false,"username":false,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"sourceGistId":"upstream","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/199","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":false,"comments":false,"username":false,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","sourceGistId":"upstream","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/200","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":true,"comments":false,"username":false,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"sourceGistId":"upstream","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/201","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":true,"comments":false,"username":false,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"sourceGistId":"upstream","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/202","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":true,"comments":false,"username":false,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"sourceGistId":"upstream","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/203","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":true,"comments":false,"username":false,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"sourceGistId":"upstream","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/204","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":true,"comments":false,"username":false,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"sourceGistId":"upstream","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/205","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":true,"comments":false,"username":false,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"sourceGistId":"upstream","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/206","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":true,"comments":false,"username":false,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"sourceGistId":"upstream","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/207","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":true,"comments":false,"username":false,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"sourceGistId":"upstream","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/208","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":false,"comments":true,"username":false,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"comments":[{"creationDate":"2025-01-01T00:00:00.000Z"},{}],"sourceGistId":"upstream","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/209","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":false,"comments":true,"username":false,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","comments":[{"creationDate":"2025-01-01T00:00:00.000Z"},{}],"sourceGistId":"upstream","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/210","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":false,"comments":true,"username":false,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"comments":[{"body":"XXXX-1 comment","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply"}],"sourceGistId":"upstream","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/211","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":false,"comments":true,"username":false,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","comments":[{"body":"XXXX-1 comment","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply"}],"sourceGistId":"upstream","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/212","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":false,"comments":true,"username":false,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"comments":[{"creationDate":"2025-01-01T00:00:00.000Z"},{}],"sourceGistId":"upstream","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/213","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":false,"comments":true,"username":false,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","comments":[{"creationDate":"2025-01-01T00:00:00.000Z"},{}],"sourceGistId":"upstream","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/214","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":false,"comments":true,"username":false,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"comments":[{"body":"XXXX-1 comment","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply"}],"sourceGistId":"upstream","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/215","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":false,"comments":true,"username":false,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","comments":[{"body":"XXXX-1 comment","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply"}],"sourceGistId":"upstream","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/216","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":true,"comments":true,"username":false,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"comments":[{"creationDate":"2025-01-01T00:00:00.000Z"},{}],"sourceGistId":"upstream","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/217","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":true,"comments":true,"username":false,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"comments":[{"creationDate":"2025-01-01T00:00:00.000Z"},{}],"sourceGistId":"upstream","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/218","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":true,"comments":true,"username":false,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"comments":[{"body":"XXXX-1 comment","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply"}],"sourceGistId":"upstream","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/219","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":true,"comments":true,"username":false,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"comments":[{"body":"XXXX-1 comment","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply"}],"sourceGistId":"upstream","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/220","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":true,"comments":true,"username":false,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"comments":[{"creationDate":"2025-01-01T00:00:00.000Z"},{}],"sourceGistId":"upstream","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/221","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":true,"comments":true,"username":false,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"comments":[{"creationDate":"2025-01-01T00:00:00.000Z"},{}],"sourceGistId":"upstream","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/222","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":true,"comments":true,"username":false,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"comments":[{"body":"XXXX-1 comment","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply"}],"sourceGistId":"upstream","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/223","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":true,"comments":true,"username":false,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"comments":[{"body":"XXXX-1 comment","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply"}],"sourceGistId":"upstream","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/224","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":false,"comments":false,"username":true,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"ownerLogin":"XXXX-1","sourceGistId":"upstream","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/225","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":false,"comments":false,"username":true,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","sourceGistId":"upstream","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/226","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":false,"comments":false,"username":true,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"ownerLogin":"XXXX-1","sourceGistId":"upstream","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/227","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":false,"comments":false,"username":true,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","sourceGistId":"upstream","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/228","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":false,"comments":false,"username":true,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"ownerLogin":"XXXX-1","sourceGistId":"upstream","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/229","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":false,"comments":false,"username":true,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","sourceGistId":"upstream","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/230","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":false,"comments":false,"username":true,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"ownerLogin":"XXXX-1","sourceGistId":"upstream","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/231","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":false,"comments":false,"username":true,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","sourceGistId":"upstream","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/232","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":true,"comments":false,"username":true,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"ownerLogin":"XXXX-1","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"sourceGistId":"upstream","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/233","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":true,"comments":false,"username":true,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"sourceGistId":"upstream","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/234","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":true,"comments":false,"username":true,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"ownerLogin":"XXXX-1","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"sourceGistId":"upstream","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/235","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":true,"comments":false,"username":true,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"sourceGistId":"upstream","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/236","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":true,"comments":false,"username":true,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"ownerLogin":"XXXX-1","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"sourceGistId":"upstream","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/237","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":true,"comments":false,"username":true,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"sourceGistId":"upstream","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/238","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":true,"comments":false,"username":true,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"ownerLogin":"XXXX-1","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"sourceGistId":"upstream","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/239","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":true,"comments":false,"username":true,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"sourceGistId":"upstream","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/240","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":false,"comments":true,"username":true,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"ownerLogin":"XXXX-1","comments":[{"author":"XXXX-1","creationDate":"2025-01-01T00:00:00.000Z"},{"author":"Bob"}],"sourceGistId":"upstream","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/241","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":false,"comments":true,"username":true,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","comments":[{"author":"XXXX-1","creationDate":"2025-01-01T00:00:00.000Z"},{"author":"Bob"}],"sourceGistId":"upstream","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/242","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":false,"comments":true,"username":true,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"ownerLogin":"XXXX-1","comments":[{"body":"XXXX-1 comment","author":"XXXX-1","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}],"sourceGistId":"upstream","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/243","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":false,"comments":true,"username":true,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","comments":[{"body":"XXXX-1 comment","author":"XXXX-1","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}],"sourceGistId":"upstream","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/244","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":false,"comments":true,"username":true,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"ownerLogin":"XXXX-1","comments":[{"author":"XXXX-1","creationDate":"2025-01-01T00:00:00.000Z"},{"author":"Bob"}],"sourceGistId":"upstream","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/245","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":false,"comments":true,"username":true,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","comments":[{"author":"XXXX-1","creationDate":"2025-01-01T00:00:00.000Z"},{"author":"Bob"}],"sourceGistId":"upstream","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/246","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":false,"comments":true,"username":true,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"ownerLogin":"XXXX-1","comments":[{"body":"XXXX-1 comment","author":"XXXX-1","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}],"sourceGistId":"upstream","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/247","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":false,"comments":true,"username":true,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","comments":[{"body":"XXXX-1 comment","author":"XXXX-1","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}],"sourceGistId":"upstream","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/248","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":true,"comments":true,"username":true,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"ownerLogin":"XXXX-1","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"comments":[{"author":"XXXX-1","creationDate":"2025-01-01T00:00:00.000Z"},{"author":"Bob"}],"sourceGistId":"upstream","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/249","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":true,"comments":true,"username":true,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"comments":[{"author":"XXXX-1","creationDate":"2025-01-01T00:00:00.000Z"},{"author":"Bob"}],"sourceGistId":"upstream","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/250","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":true,"comments":true,"username":true,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"ownerLogin":"XXXX-1","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"comments":[{"body":"XXXX-1 comment","author":"XXXX-1","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}],"sourceGistId":"upstream","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/251","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":true,"comments":true,"username":true,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"comments":[{"body":"XXXX-1 comment","author":"XXXX-1","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}],"sourceGistId":"upstream","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/252","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":true,"comments":true,"username":true,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"ownerLogin":"XXXX-1","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"comments":[{"author":"XXXX-1","creationDate":"2025-01-01T00:00:00.000Z"},{"author":"Bob"}],"sourceGistId":"upstream","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/253","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":true,"comments":true,"username":true,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"comments":[{"author":"XXXX-1","creationDate":"2025-01-01T00:00:00.000Z"},{"author":"Bob"}],"sourceGistId":"upstream","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/254","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":true,"comments":true,"username":true,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"ownerLogin":"XXXX-1","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"comments":[{"body":"XXXX-1 comment","author":"XXXX-1","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}],"sourceGistId":"upstream","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/rich/255","kind":"gist","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":true,"comments":true,"username":true,"date":true,"origin":true},"gist":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","isPublic":false,"description":"XXXX-1 snippet","ownerLogin":"XXXX-1","files":[{"filename":"XXXX-1.txt","content":"XXXX-1 content","size":13},{"filename":"empty","content":"","language":"Text","size":0,"type":"text/plain"}],"comments":[{"body":"XXXX-1 comment","author":"XXXX-1","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}],"sourceGistId":"upstream","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/minimal/0","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":false,"comments":false,"username":false,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false}},{"name":"pr/minimal/1","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":false,"comments":false,"username":false,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title"}},{"name":"pr/minimal/2","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":false,"comments":false,"username":false,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"body":"XXXX-1 body"}},{"name":"pr/minimal/3","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":false,"comments":false,"username":false,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body"}},{"name":"pr/minimal/4","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":false,"comments":false,"username":false,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/5","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":false,"comments":false,"username":false,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/6","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":false,"comments":false,"username":false,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/7","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":false,"comments":false,"username":false,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/8","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":true,"comments":false,"username":false,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false}},{"name":"pr/minimal/9","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":true,"comments":false,"username":false,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title"}},{"name":"pr/minimal/10","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":true,"comments":false,"username":false,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"body":"XXXX-1 body"}},{"name":"pr/minimal/11","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":true,"comments":false,"username":false,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body"}},{"name":"pr/minimal/12","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":true,"comments":false,"username":false,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/13","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":true,"comments":false,"username":false,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/14","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":true,"comments":false,"username":false,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/15","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":true,"comments":false,"username":false,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/16","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":false,"comments":true,"username":false,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false}},{"name":"pr/minimal/17","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":false,"comments":true,"username":false,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title"}},{"name":"pr/minimal/18","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":false,"comments":true,"username":false,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"body":"XXXX-1 body"}},{"name":"pr/minimal/19","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":false,"comments":true,"username":false,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body"}},{"name":"pr/minimal/20","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":false,"comments":true,"username":false,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/21","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":false,"comments":true,"username":false,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/22","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":false,"comments":true,"username":false,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/23","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":false,"comments":true,"username":false,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/24","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":true,"comments":true,"username":false,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false}},{"name":"pr/minimal/25","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":true,"comments":true,"username":false,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title"}},{"name":"pr/minimal/26","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":true,"comments":true,"username":false,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"body":"XXXX-1 body"}},{"name":"pr/minimal/27","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":true,"comments":true,"username":false,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body"}},{"name":"pr/minimal/28","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":true,"comments":true,"username":false,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/29","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":true,"comments":true,"username":false,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/30","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":true,"comments":true,"username":false,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/31","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":true,"comments":true,"username":false,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/32","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":false,"comments":false,"username":true,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false}},{"name":"pr/minimal/33","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":false,"comments":false,"username":true,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title"}},{"name":"pr/minimal/34","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":false,"comments":false,"username":true,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"body":"XXXX-1 body"}},{"name":"pr/minimal/35","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":false,"comments":false,"username":true,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body"}},{"name":"pr/minimal/36","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":false,"comments":false,"username":true,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/37","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":false,"comments":false,"username":true,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/38","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":false,"comments":false,"username":true,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/39","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":false,"comments":false,"username":true,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/40","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":true,"comments":false,"username":true,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false}},{"name":"pr/minimal/41","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":true,"comments":false,"username":true,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title"}},{"name":"pr/minimal/42","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":true,"comments":false,"username":true,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"body":"XXXX-1 body"}},{"name":"pr/minimal/43","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":true,"comments":false,"username":true,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body"}},{"name":"pr/minimal/44","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":true,"comments":false,"username":true,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/45","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":true,"comments":false,"username":true,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/46","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":true,"comments":false,"username":true,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/47","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":true,"comments":false,"username":true,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/48","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":false,"comments":true,"username":true,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false}},{"name":"pr/minimal/49","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":false,"comments":true,"username":true,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title"}},{"name":"pr/minimal/50","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":false,"comments":true,"username":true,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"body":"XXXX-1 body"}},{"name":"pr/minimal/51","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":false,"comments":true,"username":true,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body"}},{"name":"pr/minimal/52","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":false,"comments":true,"username":true,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/53","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":false,"comments":true,"username":true,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/54","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":false,"comments":true,"username":true,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/55","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":false,"comments":true,"username":true,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/56","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":true,"comments":true,"username":true,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false}},{"name":"pr/minimal/57","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":true,"comments":true,"username":true,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title"}},{"name":"pr/minimal/58","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":true,"comments":true,"username":true,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"body":"XXXX-1 body"}},{"name":"pr/minimal/59","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":true,"comments":true,"username":true,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body"}},{"name":"pr/minimal/60","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":true,"comments":true,"username":true,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/61","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":true,"comments":true,"username":true,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/62","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":true,"comments":true,"username":true,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/63","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":true,"comments":true,"username":true,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/64","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":false,"comments":false,"username":false,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false}},{"name":"pr/minimal/65","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":false,"comments":false,"username":false,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title"}},{"name":"pr/minimal/66","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":false,"comments":false,"username":false,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"body":"XXXX-1 body"}},{"name":"pr/minimal/67","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":false,"comments":false,"username":false,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body"}},{"name":"pr/minimal/68","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":false,"comments":false,"username":false,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/69","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":false,"comments":false,"username":false,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/70","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":false,"comments":false,"username":false,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/71","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":false,"comments":false,"username":false,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/72","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":true,"comments":false,"username":false,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false}},{"name":"pr/minimal/73","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":true,"comments":false,"username":false,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title"}},{"name":"pr/minimal/74","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":true,"comments":false,"username":false,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"body":"XXXX-1 body"}},{"name":"pr/minimal/75","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":true,"comments":false,"username":false,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body"}},{"name":"pr/minimal/76","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":true,"comments":false,"username":false,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/77","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":true,"comments":false,"username":false,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/78","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":true,"comments":false,"username":false,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/79","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":true,"comments":false,"username":false,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/80","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":false,"comments":true,"username":false,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false}},{"name":"pr/minimal/81","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":false,"comments":true,"username":false,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title"}},{"name":"pr/minimal/82","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":false,"comments":true,"username":false,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"body":"XXXX-1 body"}},{"name":"pr/minimal/83","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":false,"comments":true,"username":false,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body"}},{"name":"pr/minimal/84","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":false,"comments":true,"username":false,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/85","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":false,"comments":true,"username":false,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/86","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":false,"comments":true,"username":false,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/87","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":false,"comments":true,"username":false,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/88","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":true,"comments":true,"username":false,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false}},{"name":"pr/minimal/89","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":true,"comments":true,"username":false,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title"}},{"name":"pr/minimal/90","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":true,"comments":true,"username":false,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"body":"XXXX-1 body"}},{"name":"pr/minimal/91","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":true,"comments":true,"username":false,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body"}},{"name":"pr/minimal/92","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":true,"comments":true,"username":false,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/93","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":true,"comments":true,"username":false,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/94","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":true,"comments":true,"username":false,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/95","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":true,"comments":true,"username":false,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/96","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":false,"comments":false,"username":true,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false}},{"name":"pr/minimal/97","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":false,"comments":false,"username":true,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title"}},{"name":"pr/minimal/98","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":false,"comments":false,"username":true,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"body":"XXXX-1 body"}},{"name":"pr/minimal/99","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":false,"comments":false,"username":true,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body"}},{"name":"pr/minimal/100","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":false,"comments":false,"username":true,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/101","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":false,"comments":false,"username":true,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/102","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":false,"comments":false,"username":true,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/103","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":false,"comments":false,"username":true,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/104","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":true,"comments":false,"username":true,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false}},{"name":"pr/minimal/105","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":true,"comments":false,"username":true,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title"}},{"name":"pr/minimal/106","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":true,"comments":false,"username":true,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"body":"XXXX-1 body"}},{"name":"pr/minimal/107","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":true,"comments":false,"username":true,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body"}},{"name":"pr/minimal/108","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":true,"comments":false,"username":true,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/109","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":true,"comments":false,"username":true,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/110","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":true,"comments":false,"username":true,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/111","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":true,"comments":false,"username":true,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/112","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":false,"comments":true,"username":true,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false}},{"name":"pr/minimal/113","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":false,"comments":true,"username":true,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title"}},{"name":"pr/minimal/114","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":false,"comments":true,"username":true,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"body":"XXXX-1 body"}},{"name":"pr/minimal/115","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":false,"comments":true,"username":true,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body"}},{"name":"pr/minimal/116","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":false,"comments":true,"username":true,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/117","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":false,"comments":true,"username":true,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/118","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":false,"comments":true,"username":true,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/119","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":false,"comments":true,"username":true,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/120","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":true,"comments":true,"username":true,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false}},{"name":"pr/minimal/121","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":true,"comments":true,"username":true,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title"}},{"name":"pr/minimal/122","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":true,"comments":true,"username":true,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"body":"XXXX-1 body"}},{"name":"pr/minimal/123","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":true,"comments":true,"username":true,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body"}},{"name":"pr/minimal/124","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":true,"comments":true,"username":true,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/125","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":true,"comments":true,"username":true,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/126","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":true,"comments":true,"username":true,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/127","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":true,"comments":true,"username":true,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/128","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":false,"comments":false,"username":false,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false}},{"name":"pr/minimal/129","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":false,"comments":false,"username":false,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title"}},{"name":"pr/minimal/130","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":false,"comments":false,"username":false,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"body":"XXXX-1 body"}},{"name":"pr/minimal/131","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":false,"comments":false,"username":false,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body"}},{"name":"pr/minimal/132","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":false,"comments":false,"username":false,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/133","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":false,"comments":false,"username":false,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/134","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":false,"comments":false,"username":false,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/135","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":false,"comments":false,"username":false,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/136","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":true,"comments":false,"username":false,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false}},{"name":"pr/minimal/137","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":true,"comments":false,"username":false,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title"}},{"name":"pr/minimal/138","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":true,"comments":false,"username":false,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"body":"XXXX-1 body"}},{"name":"pr/minimal/139","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":true,"comments":false,"username":false,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body"}},{"name":"pr/minimal/140","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":true,"comments":false,"username":false,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/141","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":true,"comments":false,"username":false,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/142","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":true,"comments":false,"username":false,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/143","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":true,"comments":false,"username":false,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/144","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":false,"comments":true,"username":false,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false}},{"name":"pr/minimal/145","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":false,"comments":true,"username":false,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title"}},{"name":"pr/minimal/146","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":false,"comments":true,"username":false,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"body":"XXXX-1 body"}},{"name":"pr/minimal/147","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":false,"comments":true,"username":false,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body"}},{"name":"pr/minimal/148","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":false,"comments":true,"username":false,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/149","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":false,"comments":true,"username":false,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/150","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":false,"comments":true,"username":false,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/151","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":false,"comments":true,"username":false,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/152","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":true,"comments":true,"username":false,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false}},{"name":"pr/minimal/153","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":true,"comments":true,"username":false,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title"}},{"name":"pr/minimal/154","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":true,"comments":true,"username":false,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"body":"XXXX-1 body"}},{"name":"pr/minimal/155","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":true,"comments":true,"username":false,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body"}},{"name":"pr/minimal/156","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":true,"comments":true,"username":false,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/157","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":true,"comments":true,"username":false,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/158","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":true,"comments":true,"username":false,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/159","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":true,"comments":true,"username":false,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/160","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":false,"comments":false,"username":true,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false}},{"name":"pr/minimal/161","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":false,"comments":false,"username":true,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title"}},{"name":"pr/minimal/162","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":false,"comments":false,"username":true,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"body":"XXXX-1 body"}},{"name":"pr/minimal/163","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":false,"comments":false,"username":true,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body"}},{"name":"pr/minimal/164","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":false,"comments":false,"username":true,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/165","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":false,"comments":false,"username":true,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/166","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":false,"comments":false,"username":true,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/167","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":false,"comments":false,"username":true,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/168","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":true,"comments":false,"username":true,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false}},{"name":"pr/minimal/169","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":true,"comments":false,"username":true,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title"}},{"name":"pr/minimal/170","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":true,"comments":false,"username":true,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"body":"XXXX-1 body"}},{"name":"pr/minimal/171","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":true,"comments":false,"username":true,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body"}},{"name":"pr/minimal/172","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":true,"comments":false,"username":true,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/173","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":true,"comments":false,"username":true,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/174","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":true,"comments":false,"username":true,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/175","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":true,"comments":false,"username":true,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/176","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":false,"comments":true,"username":true,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false}},{"name":"pr/minimal/177","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":false,"comments":true,"username":true,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title"}},{"name":"pr/minimal/178","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":false,"comments":true,"username":true,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"body":"XXXX-1 body"}},{"name":"pr/minimal/179","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":false,"comments":true,"username":true,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body"}},{"name":"pr/minimal/180","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":false,"comments":true,"username":true,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/181","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":false,"comments":true,"username":true,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/182","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":false,"comments":true,"username":true,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/183","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":false,"comments":true,"username":true,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/184","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":true,"comments":true,"username":true,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false}},{"name":"pr/minimal/185","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":true,"comments":true,"username":true,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title"}},{"name":"pr/minimal/186","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":true,"comments":true,"username":true,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"body":"XXXX-1 body"}},{"name":"pr/minimal/187","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":true,"comments":true,"username":true,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body"}},{"name":"pr/minimal/188","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":true,"comments":true,"username":true,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/189","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":true,"comments":true,"username":true,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/190","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":true,"comments":true,"username":true,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/191","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":true,"comments":true,"username":true,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/192","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":false,"comments":false,"username":false,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false}},{"name":"pr/minimal/193","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":false,"comments":false,"username":false,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title"}},{"name":"pr/minimal/194","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":false,"comments":false,"username":false,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"body":"XXXX-1 body"}},{"name":"pr/minimal/195","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":false,"comments":false,"username":false,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body"}},{"name":"pr/minimal/196","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":false,"comments":false,"username":false,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/197","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":false,"comments":false,"username":false,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/198","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":false,"comments":false,"username":false,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/199","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":false,"comments":false,"username":false,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/200","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":true,"comments":false,"username":false,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false}},{"name":"pr/minimal/201","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":true,"comments":false,"username":false,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title"}},{"name":"pr/minimal/202","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":true,"comments":false,"username":false,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"body":"XXXX-1 body"}},{"name":"pr/minimal/203","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":true,"comments":false,"username":false,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body"}},{"name":"pr/minimal/204","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":true,"comments":false,"username":false,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/205","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":true,"comments":false,"username":false,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/206","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":true,"comments":false,"username":false,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/207","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":true,"comments":false,"username":false,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/208","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":false,"comments":true,"username":false,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false}},{"name":"pr/minimal/209","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":false,"comments":true,"username":false,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title"}},{"name":"pr/minimal/210","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":false,"comments":true,"username":false,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"body":"XXXX-1 body"}},{"name":"pr/minimal/211","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":false,"comments":true,"username":false,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body"}},{"name":"pr/minimal/212","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":false,"comments":true,"username":false,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/213","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":false,"comments":true,"username":false,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/214","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":false,"comments":true,"username":false,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/215","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":false,"comments":true,"username":false,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/216","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":true,"comments":true,"username":false,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false}},{"name":"pr/minimal/217","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":true,"comments":true,"username":false,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title"}},{"name":"pr/minimal/218","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":true,"comments":true,"username":false,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"body":"XXXX-1 body"}},{"name":"pr/minimal/219","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":true,"comments":true,"username":false,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body"}},{"name":"pr/minimal/220","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":true,"comments":true,"username":false,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/221","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":true,"comments":true,"username":false,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/222","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":true,"comments":true,"username":false,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/223","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":true,"comments":true,"username":false,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/224","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":false,"comments":false,"username":true,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false}},{"name":"pr/minimal/225","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":false,"comments":false,"username":true,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title"}},{"name":"pr/minimal/226","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":false,"comments":false,"username":true,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"body":"XXXX-1 body"}},{"name":"pr/minimal/227","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":false,"comments":false,"username":true,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body"}},{"name":"pr/minimal/228","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":false,"comments":false,"username":true,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/229","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":false,"comments":false,"username":true,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/230","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":false,"comments":false,"username":true,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/231","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":false,"comments":false,"username":true,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/232","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":true,"comments":false,"username":true,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false}},{"name":"pr/minimal/233","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":true,"comments":false,"username":true,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title"}},{"name":"pr/minimal/234","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":true,"comments":false,"username":true,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"body":"XXXX-1 body"}},{"name":"pr/minimal/235","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":true,"comments":false,"username":true,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body"}},{"name":"pr/minimal/236","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":true,"comments":false,"username":true,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/237","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":true,"comments":false,"username":true,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/238","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":true,"comments":false,"username":true,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/239","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":true,"comments":false,"username":true,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/240","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":false,"comments":true,"username":true,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false}},{"name":"pr/minimal/241","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":false,"comments":true,"username":true,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title"}},{"name":"pr/minimal/242","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":false,"comments":true,"username":true,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"body":"XXXX-1 body"}},{"name":"pr/minimal/243","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":false,"comments":true,"username":true,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body"}},{"name":"pr/minimal/244","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":false,"comments":true,"username":true,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/245","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":false,"comments":true,"username":true,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/246","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":false,"comments":true,"username":true,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/247","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":false,"comments":true,"username":true,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/248","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":true,"comments":true,"username":true,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false}},{"name":"pr/minimal/249","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":true,"comments":true,"username":true,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title"}},{"name":"pr/minimal/250","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":true,"comments":true,"username":true,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"body":"XXXX-1 body"}},{"name":"pr/minimal/251","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":true,"comments":true,"username":true,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body"}},{"name":"pr/minimal/252","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":true,"comments":true,"username":true,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/253","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":true,"comments":true,"username":true,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/254","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":true,"comments":true,"username":true,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/minimal/255","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":true,"comments":true,"username":true,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false}},"operation":"content","expected":{"merged":false,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/rich/0","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":false,"comments":false,"username":false,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false}},{"name":"pr/rich/1","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":false,"comments":false,"username":false,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title"}},{"name":"pr/rich/2","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":false,"comments":false,"username":false,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"body":"XXXX-1 body"}},{"name":"pr/rich/3","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":false,"comments":false,"username":false,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body"}},{"name":"pr/rich/4","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":false,"comments":false,"username":false,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"diff":"- XXXX-1\n+ Bob"}},{"name":"pr/rich/5","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":false,"comments":false,"username":false,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/rich/6","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":false,"comments":false,"username":false,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/rich/7","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":false,"comments":false,"username":false,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/rich/8","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":true,"comments":false,"username":false,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false}},{"name":"pr/rich/9","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":true,"comments":false,"username":false,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title"}},{"name":"pr/rich/10","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":true,"comments":false,"username":false,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"body":"XXXX-1 body"}},{"name":"pr/rich/11","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":true,"comments":false,"username":false,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body"}},{"name":"pr/rich/12","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":true,"comments":false,"username":false,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"diff":"- XXXX-1\n+ Bob"}},{"name":"pr/rich/13","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":true,"comments":false,"username":false,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/rich/14","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":true,"comments":false,"username":false,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/rich/15","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":true,"comments":false,"username":false,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/rich/16","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":false,"comments":true,"username":false,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"comments":[{},{}]}},{"name":"pr/rich/17","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":false,"comments":true,"username":false,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","comments":[{},{}]}},{"name":"pr/rich/18","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":false,"comments":true,"username":false,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"body":"XXXX-1 body","comments":[{"body":"XXXX-1 comment"},{"body":"reply"}]}},{"name":"pr/rich/19","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":false,"comments":true,"username":false,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","comments":[{"body":"XXXX-1 comment"},{"body":"reply"}]}},{"name":"pr/rich/20","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":false,"comments":true,"username":false,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"comments":[{},{}],"diff":"- XXXX-1\n+ Bob"}},{"name":"pr/rich/21","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":false,"comments":true,"username":false,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","comments":[{},{}],"diff":"- XXXX-1\n+ Bob"}},{"name":"pr/rich/22","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":false,"comments":true,"username":false,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"body":"XXXX-1 body","comments":[{"body":"XXXX-1 comment"},{"body":"reply"}],"diff":"- XXXX-1\n+ Bob"}},{"name":"pr/rich/23","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":false,"comments":true,"username":false,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","comments":[{"body":"XXXX-1 comment"},{"body":"reply"}],"diff":"- XXXX-1\n+ Bob"}},{"name":"pr/rich/24","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":true,"comments":true,"username":false,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"comments":[{},{}]}},{"name":"pr/rich/25","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":true,"comments":true,"username":false,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","comments":[{},{}]}},{"name":"pr/rich/26","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":true,"comments":true,"username":false,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"body":"XXXX-1 body","comments":[{"body":"XXXX-1 comment"},{"body":"reply"}]}},{"name":"pr/rich/27","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":true,"comments":true,"username":false,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","comments":[{"body":"XXXX-1 comment"},{"body":"reply"}]}},{"name":"pr/rich/28","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":true,"comments":true,"username":false,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"comments":[{},{}],"diff":"- XXXX-1\n+ Bob"}},{"name":"pr/rich/29","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":true,"comments":true,"username":false,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","comments":[{},{}],"diff":"- XXXX-1\n+ Bob"}},{"name":"pr/rich/30","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":true,"comments":true,"username":false,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"body":"XXXX-1 body","comments":[{"body":"XXXX-1 comment"},{"body":"reply"}],"diff":"- XXXX-1\n+ Bob"}},{"name":"pr/rich/31","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":true,"comments":true,"username":false,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","comments":[{"body":"XXXX-1 comment"},{"body":"reply"}],"diff":"- XXXX-1\n+ Bob"}},{"name":"pr/rich/32","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":false,"comments":false,"username":true,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false}},{"name":"pr/rich/33","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":false,"comments":false,"username":true,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title"}},{"name":"pr/rich/34","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":false,"comments":false,"username":true,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"body":"XXXX-1 body"}},{"name":"pr/rich/35","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":false,"comments":false,"username":true,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body"}},{"name":"pr/rich/36","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":false,"comments":false,"username":true,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"diff":"- XXXX-1\n+ Bob"}},{"name":"pr/rich/37","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":false,"comments":false,"username":true,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/rich/38","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":false,"comments":false,"username":true,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/rich/39","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":false,"comments":false,"username":true,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/rich/40","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":true,"comments":false,"username":true,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false}},{"name":"pr/rich/41","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":true,"comments":false,"username":true,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title"}},{"name":"pr/rich/42","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":true,"comments":false,"username":true,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"body":"XXXX-1 body"}},{"name":"pr/rich/43","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":true,"comments":false,"username":true,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body"}},{"name":"pr/rich/44","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":true,"comments":false,"username":true,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"diff":"- XXXX-1\n+ Bob"}},{"name":"pr/rich/45","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":true,"comments":false,"username":true,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/rich/46","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":true,"comments":false,"username":true,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/rich/47","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":true,"comments":false,"username":true,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob"}},{"name":"pr/rich/48","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":false,"comments":true,"username":true,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"comments":[{"author":"XXXX-1"},{"author":"Bob"}]}},{"name":"pr/rich/49","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":false,"comments":true,"username":true,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","comments":[{"author":"XXXX-1"},{"author":"Bob"}]}},{"name":"pr/rich/50","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":false,"comments":true,"username":true,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"body":"XXXX-1 body","comments":[{"body":"XXXX-1 comment","author":"XXXX-1"},{"body":"reply","author":"Bob"}]}},{"name":"pr/rich/51","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":false,"comments":true,"username":true,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","comments":[{"body":"XXXX-1 comment","author":"XXXX-1"},{"body":"reply","author":"Bob"}]}},{"name":"pr/rich/52","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":false,"comments":true,"username":true,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"comments":[{"author":"XXXX-1"},{"author":"Bob"}],"diff":"- XXXX-1\n+ Bob"}},{"name":"pr/rich/53","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":false,"comments":true,"username":true,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","comments":[{"author":"XXXX-1"},{"author":"Bob"}],"diff":"- XXXX-1\n+ Bob"}},{"name":"pr/rich/54","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":false,"comments":true,"username":true,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"body":"XXXX-1 body","comments":[{"body":"XXXX-1 comment","author":"XXXX-1"},{"body":"reply","author":"Bob"}],"diff":"- XXXX-1\n+ Bob"}},{"name":"pr/rich/55","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":false,"comments":true,"username":true,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","comments":[{"body":"XXXX-1 comment","author":"XXXX-1"},{"body":"reply","author":"Bob"}],"diff":"- XXXX-1\n+ Bob"}},{"name":"pr/rich/56","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":true,"comments":true,"username":true,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"comments":[{"author":"XXXX-1"},{"author":"Bob"}]}},{"name":"pr/rich/57","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":true,"comments":true,"username":true,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","comments":[{"author":"XXXX-1"},{"author":"Bob"}]}},{"name":"pr/rich/58","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":true,"comments":true,"username":true,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"body":"XXXX-1 body","comments":[{"body":"XXXX-1 comment","author":"XXXX-1"},{"body":"reply","author":"Bob"}]}},{"name":"pr/rich/59","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":true,"comments":true,"username":true,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","comments":[{"body":"XXXX-1 comment","author":"XXXX-1"},{"body":"reply","author":"Bob"}]}},{"name":"pr/rich/60","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":true,"comments":true,"username":true,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"comments":[{"author":"XXXX-1"},{"author":"Bob"}],"diff":"- XXXX-1\n+ Bob"}},{"name":"pr/rich/61","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":true,"comments":true,"username":true,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","comments":[{"author":"XXXX-1"},{"author":"Bob"}],"diff":"- XXXX-1\n+ Bob"}},{"name":"pr/rich/62","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":true,"comments":true,"username":true,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"body":"XXXX-1 body","comments":[{"body":"XXXX-1 comment","author":"XXXX-1"},{"body":"reply","author":"Bob"}],"diff":"- XXXX-1\n+ Bob"}},{"name":"pr/rich/63","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":true,"comments":true,"username":true,"date":false,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","comments":[{"body":"XXXX-1 comment","author":"XXXX-1"},{"body":"reply","author":"Bob"}],"diff":"- XXXX-1\n+ Bob"}},{"name":"pr/rich/64","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":false,"comments":false,"username":false,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/65","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":false,"comments":false,"username":false,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/66","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":false,"comments":false,"username":false,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"body":"XXXX-1 body","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/67","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":false,"comments":false,"username":false,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/68","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":false,"comments":false,"username":false,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"diff":"- XXXX-1\n+ Bob","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/69","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":false,"comments":false,"username":false,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","diff":"- XXXX-1\n+ Bob","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/70","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":false,"comments":false,"username":false,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/71","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":false,"comments":false,"username":false,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/72","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":true,"comments":false,"username":false,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/73","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":true,"comments":false,"username":false,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/74","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":true,"comments":false,"username":false,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"body":"XXXX-1 body","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/75","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":true,"comments":false,"username":false,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/76","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":true,"comments":false,"username":false,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"diff":"- XXXX-1\n+ Bob","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/77","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":true,"comments":false,"username":false,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","diff":"- XXXX-1\n+ Bob","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/78","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":true,"comments":false,"username":false,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/79","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":true,"comments":false,"username":false,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/80","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":false,"comments":true,"username":false,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"comments":[{"creationDate":"2025-01-01T00:00:00.000Z"},{}],"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/81","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":false,"comments":true,"username":false,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","comments":[{"creationDate":"2025-01-01T00:00:00.000Z"},{}],"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/82","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":false,"comments":true,"username":false,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"body":"XXXX-1 body","comments":[{"body":"XXXX-1 comment","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply"}],"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/83","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":false,"comments":true,"username":false,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","comments":[{"body":"XXXX-1 comment","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply"}],"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/84","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":false,"comments":true,"username":false,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"comments":[{"creationDate":"2025-01-01T00:00:00.000Z"},{}],"diff":"- XXXX-1\n+ Bob","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/85","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":false,"comments":true,"username":false,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","comments":[{"creationDate":"2025-01-01T00:00:00.000Z"},{}],"diff":"- XXXX-1\n+ Bob","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/86","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":false,"comments":true,"username":false,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"body":"XXXX-1 body","comments":[{"body":"XXXX-1 comment","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply"}],"diff":"- XXXX-1\n+ Bob","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/87","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":false,"comments":true,"username":false,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","comments":[{"body":"XXXX-1 comment","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply"}],"diff":"- XXXX-1\n+ Bob","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/88","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":true,"comments":true,"username":false,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"comments":[{"creationDate":"2025-01-01T00:00:00.000Z"},{}],"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/89","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":true,"comments":true,"username":false,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","comments":[{"creationDate":"2025-01-01T00:00:00.000Z"},{}],"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/90","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":true,"comments":true,"username":false,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"body":"XXXX-1 body","comments":[{"body":"XXXX-1 comment","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply"}],"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/91","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":true,"comments":true,"username":false,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","comments":[{"body":"XXXX-1 comment","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply"}],"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/92","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":true,"comments":true,"username":false,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"comments":[{"creationDate":"2025-01-01T00:00:00.000Z"},{}],"diff":"- XXXX-1\n+ Bob","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/93","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":true,"comments":true,"username":false,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","comments":[{"creationDate":"2025-01-01T00:00:00.000Z"},{}],"diff":"- XXXX-1\n+ Bob","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/94","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":true,"comments":true,"username":false,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"body":"XXXX-1 body","comments":[{"body":"XXXX-1 comment","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply"}],"diff":"- XXXX-1\n+ Bob","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/95","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":true,"comments":true,"username":false,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","comments":[{"body":"XXXX-1 comment","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply"}],"diff":"- XXXX-1\n+ Bob","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/96","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":false,"comments":false,"username":true,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/97","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":false,"comments":false,"username":true,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/98","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":false,"comments":false,"username":true,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"body":"XXXX-1 body","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/99","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":false,"comments":false,"username":true,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/100","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":false,"comments":false,"username":true,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"diff":"- XXXX-1\n+ Bob","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/101","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":false,"comments":false,"username":true,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","diff":"- XXXX-1\n+ Bob","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/102","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":false,"comments":false,"username":true,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/103","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":false,"comments":false,"username":true,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/104","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":true,"comments":false,"username":true,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/105","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":true,"comments":false,"username":true,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/106","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":true,"comments":false,"username":true,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"body":"XXXX-1 body","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/107","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":true,"comments":false,"username":true,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/108","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":true,"comments":false,"username":true,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"diff":"- XXXX-1\n+ Bob","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/109","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":true,"comments":false,"username":true,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","diff":"- XXXX-1\n+ Bob","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/110","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":true,"comments":false,"username":true,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/111","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":true,"comments":false,"username":true,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/112","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":false,"comments":true,"username":true,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"comments":[{"author":"XXXX-1","creationDate":"2025-01-01T00:00:00.000Z"},{"author":"Bob"}],"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/113","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":false,"comments":true,"username":true,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","comments":[{"author":"XXXX-1","creationDate":"2025-01-01T00:00:00.000Z"},{"author":"Bob"}],"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/114","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":false,"comments":true,"username":true,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"body":"XXXX-1 body","comments":[{"body":"XXXX-1 comment","author":"XXXX-1","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}],"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/115","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":false,"comments":true,"username":true,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","comments":[{"body":"XXXX-1 comment","author":"XXXX-1","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}],"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/116","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":false,"comments":true,"username":true,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"comments":[{"author":"XXXX-1","creationDate":"2025-01-01T00:00:00.000Z"},{"author":"Bob"}],"diff":"- XXXX-1\n+ Bob","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/117","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":false,"comments":true,"username":true,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","comments":[{"author":"XXXX-1","creationDate":"2025-01-01T00:00:00.000Z"},{"author":"Bob"}],"diff":"- XXXX-1\n+ Bob","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/118","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":false,"comments":true,"username":true,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"body":"XXXX-1 body","comments":[{"body":"XXXX-1 comment","author":"XXXX-1","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}],"diff":"- XXXX-1\n+ Bob","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/119","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":false,"comments":true,"username":true,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","comments":[{"body":"XXXX-1 comment","author":"XXXX-1","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}],"diff":"- XXXX-1\n+ Bob","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/120","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":true,"comments":true,"username":true,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"comments":[{"author":"XXXX-1","creationDate":"2025-01-01T00:00:00.000Z"},{"author":"Bob"}],"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/121","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":true,"comments":true,"username":true,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","comments":[{"author":"XXXX-1","creationDate":"2025-01-01T00:00:00.000Z"},{"author":"Bob"}],"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/122","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":true,"comments":true,"username":true,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"body":"XXXX-1 body","comments":[{"body":"XXXX-1 comment","author":"XXXX-1","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}],"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/123","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":true,"comments":true,"username":true,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","comments":[{"body":"XXXX-1 comment","author":"XXXX-1","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}],"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/124","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":true,"comments":true,"username":true,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"comments":[{"author":"XXXX-1","creationDate":"2025-01-01T00:00:00.000Z"},{"author":"Bob"}],"diff":"- XXXX-1\n+ Bob","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/125","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":true,"comments":true,"username":true,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","comments":[{"author":"XXXX-1","creationDate":"2025-01-01T00:00:00.000Z"},{"author":"Bob"}],"diff":"- XXXX-1\n+ Bob","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/126","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":true,"comments":true,"username":true,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"body":"XXXX-1 body","comments":[{"body":"XXXX-1 comment","author":"XXXX-1","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}],"diff":"- XXXX-1\n+ Bob","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/127","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":true,"comments":true,"username":true,"date":true,"origin":false},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","comments":[{"body":"XXXX-1 comment","author":"XXXX-1","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}],"diff":"- XXXX-1\n+ Bob","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/128","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":false,"comments":false,"username":false,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"baseRepositoryFullName":"Alice/project"}},{"name":"pr/rich/129","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":false,"comments":false,"username":false,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","baseRepositoryFullName":"Alice/project"}},{"name":"pr/rich/130","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":false,"comments":false,"username":false,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"body":"XXXX-1 body","baseRepositoryFullName":"Alice/project"}},{"name":"pr/rich/131","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":false,"comments":false,"username":false,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","baseRepositoryFullName":"Alice/project"}},{"name":"pr/rich/132","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":false,"comments":false,"username":false,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"diff":"- XXXX-1\n+ Bob","baseRepositoryFullName":"Alice/project"}},{"name":"pr/rich/133","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":false,"comments":false,"username":false,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","diff":"- XXXX-1\n+ Bob","baseRepositoryFullName":"Alice/project"}},{"name":"pr/rich/134","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":false,"comments":false,"username":false,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob","baseRepositoryFullName":"Alice/project"}},{"name":"pr/rich/135","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":false,"comments":false,"username":false,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob","baseRepositoryFullName":"Alice/project"}},{"name":"pr/rich/136","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":true,"comments":false,"username":false,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"baseRepositoryFullName":"Alice/project"}},{"name":"pr/rich/137","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":true,"comments":false,"username":false,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","baseRepositoryFullName":"Alice/project"}},{"name":"pr/rich/138","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":true,"comments":false,"username":false,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"body":"XXXX-1 body","baseRepositoryFullName":"Alice/project"}},{"name":"pr/rich/139","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":true,"comments":false,"username":false,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","baseRepositoryFullName":"Alice/project"}},{"name":"pr/rich/140","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":true,"comments":false,"username":false,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"diff":"- XXXX-1\n+ Bob","baseRepositoryFullName":"Alice/project"}},{"name":"pr/rich/141","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":true,"comments":false,"username":false,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","diff":"- XXXX-1\n+ Bob","baseRepositoryFullName":"Alice/project"}},{"name":"pr/rich/142","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":true,"comments":false,"username":false,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob","baseRepositoryFullName":"Alice/project"}},{"name":"pr/rich/143","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":true,"comments":false,"username":false,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob","baseRepositoryFullName":"Alice/project"}},{"name":"pr/rich/144","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":false,"comments":true,"username":false,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"comments":[{},{}],"baseRepositoryFullName":"Alice/project"}},{"name":"pr/rich/145","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":false,"comments":true,"username":false,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","comments":[{},{}],"baseRepositoryFullName":"Alice/project"}},{"name":"pr/rich/146","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":false,"comments":true,"username":false,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"body":"XXXX-1 body","comments":[{"body":"XXXX-1 comment"},{"body":"reply"}],"baseRepositoryFullName":"Alice/project"}},{"name":"pr/rich/147","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":false,"comments":true,"username":false,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","comments":[{"body":"XXXX-1 comment"},{"body":"reply"}],"baseRepositoryFullName":"Alice/project"}},{"name":"pr/rich/148","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":false,"comments":true,"username":false,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"comments":[{},{}],"diff":"- XXXX-1\n+ Bob","baseRepositoryFullName":"Alice/project"}},{"name":"pr/rich/149","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":false,"comments":true,"username":false,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","comments":[{},{}],"diff":"- XXXX-1\n+ Bob","baseRepositoryFullName":"Alice/project"}},{"name":"pr/rich/150","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":false,"comments":true,"username":false,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"body":"XXXX-1 body","comments":[{"body":"XXXX-1 comment"},{"body":"reply"}],"diff":"- XXXX-1\n+ Bob","baseRepositoryFullName":"Alice/project"}},{"name":"pr/rich/151","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":false,"comments":true,"username":false,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","comments":[{"body":"XXXX-1 comment"},{"body":"reply"}],"diff":"- XXXX-1\n+ Bob","baseRepositoryFullName":"Alice/project"}},{"name":"pr/rich/152","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":true,"comments":true,"username":false,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"comments":[{},{}],"baseRepositoryFullName":"Alice/project"}},{"name":"pr/rich/153","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":true,"comments":true,"username":false,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","comments":[{},{}],"baseRepositoryFullName":"Alice/project"}},{"name":"pr/rich/154","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":true,"comments":true,"username":false,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"body":"XXXX-1 body","comments":[{"body":"XXXX-1 comment"},{"body":"reply"}],"baseRepositoryFullName":"Alice/project"}},{"name":"pr/rich/155","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":true,"comments":true,"username":false,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","comments":[{"body":"XXXX-1 comment"},{"body":"reply"}],"baseRepositoryFullName":"Alice/project"}},{"name":"pr/rich/156","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":true,"comments":true,"username":false,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"comments":[{},{}],"diff":"- XXXX-1\n+ Bob","baseRepositoryFullName":"Alice/project"}},{"name":"pr/rich/157","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":true,"comments":true,"username":false,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","comments":[{},{}],"diff":"- XXXX-1\n+ Bob","baseRepositoryFullName":"Alice/project"}},{"name":"pr/rich/158","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":true,"comments":true,"username":false,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"body":"XXXX-1 body","comments":[{"body":"XXXX-1 comment"},{"body":"reply"}],"diff":"- XXXX-1\n+ Bob","baseRepositoryFullName":"Alice/project"}},{"name":"pr/rich/159","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":true,"comments":true,"username":false,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","comments":[{"body":"XXXX-1 comment"},{"body":"reply"}],"diff":"- XXXX-1\n+ Bob","baseRepositoryFullName":"Alice/project"}},{"name":"pr/rich/160","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":false,"comments":false,"username":true,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"baseRepositoryFullName":"Alice/project"}},{"name":"pr/rich/161","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":false,"comments":false,"username":true,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","baseRepositoryFullName":"Alice/project"}},{"name":"pr/rich/162","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":false,"comments":false,"username":true,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"body":"XXXX-1 body","baseRepositoryFullName":"Alice/project"}},{"name":"pr/rich/163","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":false,"comments":false,"username":true,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","baseRepositoryFullName":"Alice/project"}},{"name":"pr/rich/164","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":false,"comments":false,"username":true,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"diff":"- XXXX-1\n+ Bob","baseRepositoryFullName":"Alice/project"}},{"name":"pr/rich/165","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":false,"comments":false,"username":true,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","diff":"- XXXX-1\n+ Bob","baseRepositoryFullName":"Alice/project"}},{"name":"pr/rich/166","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":false,"comments":false,"username":true,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob","baseRepositoryFullName":"Alice/project"}},{"name":"pr/rich/167","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":false,"comments":false,"username":true,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob","baseRepositoryFullName":"Alice/project"}},{"name":"pr/rich/168","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":true,"comments":false,"username":true,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"baseRepositoryFullName":"Alice/project"}},{"name":"pr/rich/169","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":true,"comments":false,"username":true,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","baseRepositoryFullName":"Alice/project"}},{"name":"pr/rich/170","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":true,"comments":false,"username":true,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"body":"XXXX-1 body","baseRepositoryFullName":"Alice/project"}},{"name":"pr/rich/171","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":true,"comments":false,"username":true,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","baseRepositoryFullName":"Alice/project"}},{"name":"pr/rich/172","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":true,"comments":false,"username":true,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"diff":"- XXXX-1\n+ Bob","baseRepositoryFullName":"Alice/project"}},{"name":"pr/rich/173","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":true,"comments":false,"username":true,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","diff":"- XXXX-1\n+ Bob","baseRepositoryFullName":"Alice/project"}},{"name":"pr/rich/174","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":true,"comments":false,"username":true,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob","baseRepositoryFullName":"Alice/project"}},{"name":"pr/rich/175","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":true,"comments":false,"username":true,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob","baseRepositoryFullName":"Alice/project"}},{"name":"pr/rich/176","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":false,"comments":true,"username":true,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"comments":[{"author":"XXXX-1"},{"author":"Bob"}],"baseRepositoryFullName":"Alice/project"}},{"name":"pr/rich/177","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":false,"comments":true,"username":true,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","comments":[{"author":"XXXX-1"},{"author":"Bob"}],"baseRepositoryFullName":"Alice/project"}},{"name":"pr/rich/178","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":false,"comments":true,"username":true,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"body":"XXXX-1 body","comments":[{"body":"XXXX-1 comment","author":"XXXX-1"},{"body":"reply","author":"Bob"}],"baseRepositoryFullName":"Alice/project"}},{"name":"pr/rich/179","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":false,"comments":true,"username":true,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","comments":[{"body":"XXXX-1 comment","author":"XXXX-1"},{"body":"reply","author":"Bob"}],"baseRepositoryFullName":"Alice/project"}},{"name":"pr/rich/180","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":false,"comments":true,"username":true,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"comments":[{"author":"XXXX-1"},{"author":"Bob"}],"diff":"- XXXX-1\n+ Bob","baseRepositoryFullName":"Alice/project"}},{"name":"pr/rich/181","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":false,"comments":true,"username":true,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","comments":[{"author":"XXXX-1"},{"author":"Bob"}],"diff":"- XXXX-1\n+ Bob","baseRepositoryFullName":"Alice/project"}},{"name":"pr/rich/182","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":false,"comments":true,"username":true,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"body":"XXXX-1 body","comments":[{"body":"XXXX-1 comment","author":"XXXX-1"},{"body":"reply","author":"Bob"}],"diff":"- XXXX-1\n+ Bob","baseRepositoryFullName":"Alice/project"}},{"name":"pr/rich/183","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":false,"comments":true,"username":true,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","comments":[{"body":"XXXX-1 comment","author":"XXXX-1"},{"body":"reply","author":"Bob"}],"diff":"- XXXX-1\n+ Bob","baseRepositoryFullName":"Alice/project"}},{"name":"pr/rich/184","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":true,"comments":true,"username":true,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"comments":[{"author":"XXXX-1"},{"author":"Bob"}],"baseRepositoryFullName":"Alice/project"}},{"name":"pr/rich/185","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":true,"comments":true,"username":true,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","comments":[{"author":"XXXX-1"},{"author":"Bob"}],"baseRepositoryFullName":"Alice/project"}},{"name":"pr/rich/186","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":true,"comments":true,"username":true,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"body":"XXXX-1 body","comments":[{"body":"XXXX-1 comment","author":"XXXX-1"},{"body":"reply","author":"Bob"}],"baseRepositoryFullName":"Alice/project"}},{"name":"pr/rich/187","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":true,"comments":true,"username":true,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","comments":[{"body":"XXXX-1 comment","author":"XXXX-1"},{"body":"reply","author":"Bob"}],"baseRepositoryFullName":"Alice/project"}},{"name":"pr/rich/188","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":true,"comments":true,"username":true,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"comments":[{"author":"XXXX-1"},{"author":"Bob"}],"diff":"- XXXX-1\n+ Bob","baseRepositoryFullName":"Alice/project"}},{"name":"pr/rich/189","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":true,"comments":true,"username":true,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","comments":[{"author":"XXXX-1"},{"author":"Bob"}],"diff":"- XXXX-1\n+ Bob","baseRepositoryFullName":"Alice/project"}},{"name":"pr/rich/190","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":true,"comments":true,"username":true,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"body":"XXXX-1 body","comments":[{"body":"XXXX-1 comment","author":"XXXX-1"},{"body":"reply","author":"Bob"}],"diff":"- XXXX-1\n+ Bob","baseRepositoryFullName":"Alice/project"}},{"name":"pr/rich/191","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":true,"comments":true,"username":true,"date":false,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","comments":[{"body":"XXXX-1 comment","author":"XXXX-1"},{"body":"reply","author":"Bob"}],"diff":"- XXXX-1\n+ Bob","baseRepositoryFullName":"Alice/project"}},{"name":"pr/rich/192","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":false,"comments":false,"username":false,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"baseRepositoryFullName":"Alice/project","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/193","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":false,"comments":false,"username":false,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","baseRepositoryFullName":"Alice/project","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/194","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":false,"comments":false,"username":false,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"body":"XXXX-1 body","baseRepositoryFullName":"Alice/project","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/195","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":false,"comments":false,"username":false,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","baseRepositoryFullName":"Alice/project","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/196","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":false,"comments":false,"username":false,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"diff":"- XXXX-1\n+ Bob","baseRepositoryFullName":"Alice/project","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/197","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":false,"comments":false,"username":false,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","diff":"- XXXX-1\n+ Bob","baseRepositoryFullName":"Alice/project","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/198","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":false,"comments":false,"username":false,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob","baseRepositoryFullName":"Alice/project","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/199","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":false,"comments":false,"username":false,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob","baseRepositoryFullName":"Alice/project","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/200","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":true,"comments":false,"username":false,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"baseRepositoryFullName":"Alice/project","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/201","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":true,"comments":false,"username":false,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","baseRepositoryFullName":"Alice/project","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/202","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":true,"comments":false,"username":false,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"body":"XXXX-1 body","baseRepositoryFullName":"Alice/project","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/203","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":true,"comments":false,"username":false,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","baseRepositoryFullName":"Alice/project","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/204","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":true,"comments":false,"username":false,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"diff":"- XXXX-1\n+ Bob","baseRepositoryFullName":"Alice/project","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/205","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":true,"comments":false,"username":false,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","diff":"- XXXX-1\n+ Bob","baseRepositoryFullName":"Alice/project","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/206","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":true,"comments":false,"username":false,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob","baseRepositoryFullName":"Alice/project","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/207","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":true,"comments":false,"username":false,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob","baseRepositoryFullName":"Alice/project","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/208","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":false,"comments":true,"username":false,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"comments":[{"creationDate":"2025-01-01T00:00:00.000Z"},{}],"baseRepositoryFullName":"Alice/project","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/209","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":false,"comments":true,"username":false,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","comments":[{"creationDate":"2025-01-01T00:00:00.000Z"},{}],"baseRepositoryFullName":"Alice/project","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/210","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":false,"comments":true,"username":false,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"body":"XXXX-1 body","comments":[{"body":"XXXX-1 comment","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply"}],"baseRepositoryFullName":"Alice/project","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/211","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":false,"comments":true,"username":false,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","comments":[{"body":"XXXX-1 comment","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply"}],"baseRepositoryFullName":"Alice/project","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/212","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":false,"comments":true,"username":false,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"comments":[{"creationDate":"2025-01-01T00:00:00.000Z"},{}],"diff":"- XXXX-1\n+ Bob","baseRepositoryFullName":"Alice/project","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/213","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":false,"comments":true,"username":false,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","comments":[{"creationDate":"2025-01-01T00:00:00.000Z"},{}],"diff":"- XXXX-1\n+ Bob","baseRepositoryFullName":"Alice/project","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/214","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":false,"comments":true,"username":false,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"body":"XXXX-1 body","comments":[{"body":"XXXX-1 comment","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply"}],"diff":"- XXXX-1\n+ Bob","baseRepositoryFullName":"Alice/project","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/215","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":false,"comments":true,"username":false,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","comments":[{"body":"XXXX-1 comment","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply"}],"diff":"- XXXX-1\n+ Bob","baseRepositoryFullName":"Alice/project","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/216","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":true,"comments":true,"username":false,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"comments":[{"creationDate":"2025-01-01T00:00:00.000Z"},{}],"baseRepositoryFullName":"Alice/project","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/217","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":true,"comments":true,"username":false,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","comments":[{"creationDate":"2025-01-01T00:00:00.000Z"},{}],"baseRepositoryFullName":"Alice/project","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/218","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":true,"comments":true,"username":false,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"body":"XXXX-1 body","comments":[{"body":"XXXX-1 comment","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply"}],"baseRepositoryFullName":"Alice/project","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/219","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":true,"comments":true,"username":false,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","comments":[{"body":"XXXX-1 comment","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply"}],"baseRepositoryFullName":"Alice/project","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/220","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":true,"comments":true,"username":false,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"comments":[{"creationDate":"2025-01-01T00:00:00.000Z"},{}],"diff":"- XXXX-1\n+ Bob","baseRepositoryFullName":"Alice/project","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/221","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":true,"comments":true,"username":false,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","comments":[{"creationDate":"2025-01-01T00:00:00.000Z"},{}],"diff":"- XXXX-1\n+ Bob","baseRepositoryFullName":"Alice/project","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/222","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":true,"comments":true,"username":false,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"body":"XXXX-1 body","comments":[{"body":"XXXX-1 comment","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply"}],"diff":"- XXXX-1\n+ Bob","baseRepositoryFullName":"Alice/project","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/223","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":true,"comments":true,"username":false,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","comments":[{"body":"XXXX-1 comment","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply"}],"diff":"- XXXX-1\n+ Bob","baseRepositoryFullName":"Alice/project","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/224","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":false,"comments":false,"username":true,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"baseRepositoryFullName":"Alice/project","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/225","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":false,"comments":false,"username":true,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","baseRepositoryFullName":"Alice/project","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/226","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":false,"comments":false,"username":true,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"body":"XXXX-1 body","baseRepositoryFullName":"Alice/project","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/227","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":false,"comments":false,"username":true,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","baseRepositoryFullName":"Alice/project","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/228","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":false,"comments":false,"username":true,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"diff":"- XXXX-1\n+ Bob","baseRepositoryFullName":"Alice/project","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/229","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":false,"comments":false,"username":true,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","diff":"- XXXX-1\n+ Bob","baseRepositoryFullName":"Alice/project","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/230","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":false,"comments":false,"username":true,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob","baseRepositoryFullName":"Alice/project","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/231","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":false,"comments":false,"username":true,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob","baseRepositoryFullName":"Alice/project","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/232","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":true,"comments":false,"username":true,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"baseRepositoryFullName":"Alice/project","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/233","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":true,"comments":false,"username":true,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","baseRepositoryFullName":"Alice/project","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/234","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":true,"comments":false,"username":true,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"body":"XXXX-1 body","baseRepositoryFullName":"Alice/project","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/235","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":true,"comments":false,"username":true,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","baseRepositoryFullName":"Alice/project","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/236","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":true,"comments":false,"username":true,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"diff":"- XXXX-1\n+ Bob","baseRepositoryFullName":"Alice/project","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/237","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":true,"comments":false,"username":true,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","diff":"- XXXX-1\n+ Bob","baseRepositoryFullName":"Alice/project","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/238","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":true,"comments":false,"username":true,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob","baseRepositoryFullName":"Alice/project","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/239","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":true,"comments":false,"username":true,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","diff":"- XXXX-1\n+ Bob","baseRepositoryFullName":"Alice/project","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/240","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":false,"comments":true,"username":true,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"comments":[{"author":"XXXX-1","creationDate":"2025-01-01T00:00:00.000Z"},{"author":"Bob"}],"baseRepositoryFullName":"Alice/project","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/241","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":false,"comments":true,"username":true,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","comments":[{"author":"XXXX-1","creationDate":"2025-01-01T00:00:00.000Z"},{"author":"Bob"}],"baseRepositoryFullName":"Alice/project","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/242","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":false,"comments":true,"username":true,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"body":"XXXX-1 body","comments":[{"body":"XXXX-1 comment","author":"XXXX-1","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}],"baseRepositoryFullName":"Alice/project","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/243","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":false,"comments":true,"username":true,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","comments":[{"body":"XXXX-1 comment","author":"XXXX-1","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}],"baseRepositoryFullName":"Alice/project","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/244","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":false,"comments":true,"username":true,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"comments":[{"author":"XXXX-1","creationDate":"2025-01-01T00:00:00.000Z"},{"author":"Bob"}],"diff":"- XXXX-1\n+ Bob","baseRepositoryFullName":"Alice/project","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/245","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":false,"comments":true,"username":true,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","comments":[{"author":"XXXX-1","creationDate":"2025-01-01T00:00:00.000Z"},{"author":"Bob"}],"diff":"- XXXX-1\n+ Bob","baseRepositoryFullName":"Alice/project","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/246","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":false,"comments":true,"username":true,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"body":"XXXX-1 body","comments":[{"body":"XXXX-1 comment","author":"XXXX-1","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}],"diff":"- XXXX-1\n+ Bob","baseRepositoryFullName":"Alice/project","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/247","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":false,"comments":true,"username":true,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","comments":[{"body":"XXXX-1 comment","author":"XXXX-1","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}],"diff":"- XXXX-1\n+ Bob","baseRepositoryFullName":"Alice/project","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/248","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":false,"content":true,"comments":true,"username":true,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"comments":[{"author":"XXXX-1","creationDate":"2025-01-01T00:00:00.000Z"},{"author":"Bob"}],"baseRepositoryFullName":"Alice/project","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/249","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":false,"content":true,"comments":true,"username":true,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","comments":[{"author":"XXXX-1","creationDate":"2025-01-01T00:00:00.000Z"},{"author":"Bob"}],"baseRepositoryFullName":"Alice/project","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/250","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":false,"content":true,"comments":true,"username":true,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"body":"XXXX-1 body","comments":[{"body":"XXXX-1 comment","author":"XXXX-1","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}],"baseRepositoryFullName":"Alice/project","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/251","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":false,"content":true,"comments":true,"username":true,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","comments":[{"body":"XXXX-1 comment","author":"XXXX-1","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}],"baseRepositoryFullName":"Alice/project","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/252","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":false,"diff":true,"content":true,"comments":true,"username":true,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"comments":[{"author":"XXXX-1","creationDate":"2025-01-01T00:00:00.000Z"},{"author":"Bob"}],"diff":"- XXXX-1\n+ Bob","baseRepositoryFullName":"Alice/project","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/253","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":false,"diff":true,"content":true,"comments":true,"username":true,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","comments":[{"author":"XXXX-1","creationDate":"2025-01-01T00:00:00.000Z"},{"author":"Bob"}],"diff":"- XXXX-1\n+ Bob","baseRepositoryFullName":"Alice/project","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/254","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":false,"body":true,"diff":true,"content":true,"comments":true,"username":true,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"body":"XXXX-1 body","comments":[{"body":"XXXX-1 comment","author":"XXXX-1","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}],"diff":"- XXXX-1\n+ Bob","baseRepositoryFullName":"Alice/project","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"pr/rich/255","kind":"pr","record":{"owner":"111111111111111111111111","gistId":"example","pullRequestId":"example","source":{"gistId":"upstream","repositoryFullName":"Alice/project","pullRequestId":1},"options":{"terms":["Alice"],"link":true,"image":true,"title":true,"body":true,"diff":true,"content":true,"comments":true,"username":true,"date":true,"origin":true},"pullRequest":{"title":"Alice title","body":"Alice body","diff":"- Alice\n+ Bob","description":"Alice snippet","ownerLogin":"Alice","isPublic":false,"merged":false,"state":"open","draft":false,"mergedDate":null,"updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z","baseRepositoryFullName":"Alice/project","files":[{"filename":"Alice.txt","content":"Alice content","size":13},{"filename":"empty","content":"","size":0,"type":"text/plain","language":"Text"}],"comments":[{"body":"Alice comment","author":"Alice","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}]},"anonymizeDate":"2026-02-01T00:00:00.000Z"},"operation":"content","expected":{"anonymizeDate":"2026-02-01T00:00:00.000Z","merged":false,"mergedDate":null,"state":"open","draft":false,"title":"XXXX-1 title","body":"XXXX-1 body","comments":[{"body":"XXXX-1 comment","author":"XXXX-1","creationDate":"2025-01-01T00:00:00.000Z"},{"body":"reply","author":"Bob"}],"diff":"- XXXX-1\n+ Bob","baseRepositoryFullName":"Alice/project","updatedDate":"2026-01-01T00:00:00.000Z","creationDate":"2025-01-01T00:00:00.000Z"}},{"name":"gist/private/ready/false","kind":"gist","operation":"private","record":{"owner":"111111111111111111111111","status":"ready","source":{},"options":{"terms":["Alice"]},"gist":{},"pullRequest":{}},"expected":{"options":{"terms":["Alice"]},"status":"ready","source":{},"gist":{"files":[],"comments":[]}}},{"name":"gist/private/ready/true","kind":"gist","operation":"private","record":{"owner":"111111111111111111111111","status":"ready","source":{"repositoryId":"cached","repositoryName":"Alice/repo","type":"GitHubStream","commit":"abc","branch":"main","gistId":"upstream","repositoryFullName":"Alice/repo","pullRequestId":12},"options":{"terms":["Alice"]},"gist":{"description":"Alice","isPublic":true,"files":[{"filename":"readme","content":"Alice","size":5,"private":"secret"}],"comments":[{"author":"Alice","body":"hello","private":"secret"}]},"pullRequest":{"title":"Alice","state":"closed","merged":true,"mergedDate":null},"repoId":"example","gistId":"example","pullRequestId":"example","size":{"storage":123,"file":2},"coauthors":[{"username":"Bob","githubId":2,"photo":"photo","private":"secret"}],"conference":"conf","statusMessage":"error_message","anonymizeDate":"2026-01-01T00:00:00.000Z"},"expected":{"gistId":"example","options":{"terms":["Alice"]},"conference":"conf","anonymizeDate":"2026-01-01T00:00:00.000Z","status":"ready","isPublic":true,"statusMessage":"error_message","source":{"gistId":"upstream"},"gist":{"description":"Alice","isPublic":true,"files":[{"filename":"readme","content":"Alice","size":5}],"comments":[{"body":"hello","author":"Alice"}]}}},{"name":"gist/private/preparing/false","kind":"gist","operation":"private","record":{"owner":"111111111111111111111111","status":"preparing","source":{},"options":{"terms":["Alice"]},"gist":{},"pullRequest":{}},"expected":{"options":{"terms":["Alice"]},"status":"preparing","source":{},"gist":{"files":[],"comments":[]}}},{"name":"gist/private/preparing/true","kind":"gist","operation":"private","record":{"owner":"111111111111111111111111","status":"preparing","source":{"repositoryId":"cached","repositoryName":"Alice/repo","type":"GitHubStream","commit":"abc","branch":"main","gistId":"upstream","repositoryFullName":"Alice/repo","pullRequestId":12},"options":{"terms":["Alice"]},"gist":{"description":"Alice","isPublic":true,"files":[{"filename":"readme","content":"Alice","size":5,"private":"secret"}],"comments":[{"author":"Alice","body":"hello","private":"secret"}]},"pullRequest":{"title":"Alice","state":"closed","merged":true,"mergedDate":null},"repoId":"example","gistId":"example","pullRequestId":"example","size":{"storage":123,"file":2},"coauthors":[{"username":"Bob","githubId":2,"photo":"photo","private":"secret"}],"conference":"conf","statusMessage":"error_message","anonymizeDate":"2026-01-01T00:00:00.000Z"},"expected":{"gistId":"example","options":{"terms":["Alice"]},"conference":"conf","anonymizeDate":"2026-01-01T00:00:00.000Z","status":"preparing","isPublic":true,"statusMessage":"error_message","source":{"gistId":"upstream"},"gist":{"description":"Alice","isPublic":true,"files":[{"filename":"readme","content":"Alice","size":5}],"comments":[{"body":"hello","author":"Alice"}]}}},{"name":"gist/private/error/false","kind":"gist","operation":"private","record":{"owner":"111111111111111111111111","status":"error","source":{},"options":{"terms":["Alice"]},"gist":{},"pullRequest":{}},"expected":{"options":{"terms":["Alice"]},"status":"error","source":{},"gist":{"files":[],"comments":[]}}},{"name":"gist/private/error/true","kind":"gist","operation":"private","record":{"owner":"111111111111111111111111","status":"error","source":{"repositoryId":"cached","repositoryName":"Alice/repo","type":"GitHubStream","commit":"abc","branch":"main","gistId":"upstream","repositoryFullName":"Alice/repo","pullRequestId":12},"options":{"terms":["Alice"]},"gist":{"description":"Alice","isPublic":true,"files":[{"filename":"readme","content":"Alice","size":5,"private":"secret"}],"comments":[{"author":"Alice","body":"hello","private":"secret"}]},"pullRequest":{"title":"Alice","state":"closed","merged":true,"mergedDate":null},"repoId":"example","gistId":"example","pullRequestId":"example","size":{"storage":123,"file":2},"coauthors":[{"username":"Bob","githubId":2,"photo":"photo","private":"secret"}],"conference":"conf","statusMessage":"error_message","anonymizeDate":"2026-01-01T00:00:00.000Z"},"expected":{"gistId":"example","options":{"terms":["Alice"]},"conference":"conf","anonymizeDate":"2026-01-01T00:00:00.000Z","status":"error","isPublic":true,"statusMessage":"error_message","source":{"gistId":"upstream"},"gist":{"description":"Alice","isPublic":true,"files":[{"filename":"readme","content":"Alice","size":5}],"comments":[{"body":"hello","author":"Alice"}]}}},{"name":"gist/private/removed/false","kind":"gist","operation":"private","record":{"owner":"111111111111111111111111","status":"removed","source":{},"options":{"terms":["Alice"]},"gist":{},"pullRequest":{}},"expected":{"options":{"terms":["Alice"]},"status":"removed","source":{},"gist":{"files":[],"comments":[]}}},{"name":"gist/private/removed/true","kind":"gist","operation":"private","record":{"owner":"111111111111111111111111","status":"removed","source":{"repositoryId":"cached","repositoryName":"Alice/repo","type":"GitHubStream","commit":"abc","branch":"main","gistId":"upstream","repositoryFullName":"Alice/repo","pullRequestId":12},"options":{"terms":["Alice"]},"gist":{"description":"Alice","isPublic":true,"files":[{"filename":"readme","content":"Alice","size":5,"private":"secret"}],"comments":[{"author":"Alice","body":"hello","private":"secret"}]},"pullRequest":{"title":"Alice","state":"closed","merged":true,"mergedDate":null},"repoId":"example","gistId":"example","pullRequestId":"example","size":{"storage":123,"file":2},"coauthors":[{"username":"Bob","githubId":2,"photo":"photo","private":"secret"}],"conference":"conf","statusMessage":"error_message","anonymizeDate":"2026-01-01T00:00:00.000Z"},"expected":{"gistId":"example","options":{"terms":["Alice"]},"conference":"conf","anonymizeDate":"2026-01-01T00:00:00.000Z","status":"removed","isPublic":true,"statusMessage":"error_message","source":{"gistId":"upstream"},"gist":{"description":"Alice","isPublic":true,"files":[{"filename":"readme","content":"Alice","size":5}],"comments":[{"body":"hello","author":"Alice"}]}}},{"name":"pr/private/ready/false","kind":"pr","operation":"private","record":{"owner":"111111111111111111111111","status":"ready","source":{},"options":{"terms":["Alice"]},"gist":{},"pullRequest":{}},"expected":{"options":{"terms":["Alice"]},"status":"ready","source":{},"pullRequest":{}}},{"name":"pr/private/ready/true","kind":"pr","operation":"private","record":{"owner":"111111111111111111111111","status":"ready","source":{"repositoryId":"cached","repositoryName":"Alice/repo","type":"GitHubStream","commit":"abc","branch":"main","gistId":"upstream","repositoryFullName":"Alice/repo","pullRequestId":12},"options":{"terms":["Alice"]},"gist":{"description":"Alice","isPublic":true,"files":[{"filename":"readme","content":"Alice","size":5,"private":"secret"}],"comments":[{"author":"Alice","body":"hello","private":"secret"}]},"pullRequest":{"title":"Alice","state":"closed","merged":true,"mergedDate":null},"repoId":"example","gistId":"example","pullRequestId":"example","size":{"storage":123,"file":2},"coauthors":[{"username":"Bob","githubId":2,"photo":"photo","private":"secret"}],"conference":"conf","statusMessage":"error_message","anonymizeDate":"2026-01-01T00:00:00.000Z"},"expected":{"pullRequestId":"example","options":{"terms":["Alice"]},"conference":"conf","anonymizeDate":"2026-01-01T00:00:00.000Z","status":"ready","state":"closed","merged":true,"mergedDate":null,"statusMessage":"error_message","source":{"pullRequestId":12,"repositoryFullName":"Alice/repo"},"pullRequest":{"title":"Alice","state":"closed","merged":true,"mergedDate":null}}},{"name":"pr/private/preparing/false","kind":"pr","operation":"private","record":{"owner":"111111111111111111111111","status":"preparing","source":{},"options":{"terms":["Alice"]},"gist":{},"pullRequest":{}},"expected":{"options":{"terms":["Alice"]},"status":"preparing","source":{},"pullRequest":{}}},{"name":"pr/private/preparing/true","kind":"pr","operation":"private","record":{"owner":"111111111111111111111111","status":"preparing","source":{"repositoryId":"cached","repositoryName":"Alice/repo","type":"GitHubStream","commit":"abc","branch":"main","gistId":"upstream","repositoryFullName":"Alice/repo","pullRequestId":12},"options":{"terms":["Alice"]},"gist":{"description":"Alice","isPublic":true,"files":[{"filename":"readme","content":"Alice","size":5,"private":"secret"}],"comments":[{"author":"Alice","body":"hello","private":"secret"}]},"pullRequest":{"title":"Alice","state":"closed","merged":true,"mergedDate":null},"repoId":"example","gistId":"example","pullRequestId":"example","size":{"storage":123,"file":2},"coauthors":[{"username":"Bob","githubId":2,"photo":"photo","private":"secret"}],"conference":"conf","statusMessage":"error_message","anonymizeDate":"2026-01-01T00:00:00.000Z"},"expected":{"pullRequestId":"example","options":{"terms":["Alice"]},"conference":"conf","anonymizeDate":"2026-01-01T00:00:00.000Z","status":"preparing","state":"closed","merged":true,"mergedDate":null,"statusMessage":"error_message","source":{"pullRequestId":12,"repositoryFullName":"Alice/repo"},"pullRequest":{"title":"Alice","state":"closed","merged":true,"mergedDate":null}}},{"name":"pr/private/error/false","kind":"pr","operation":"private","record":{"owner":"111111111111111111111111","status":"error","source":{},"options":{"terms":["Alice"]},"gist":{},"pullRequest":{}},"expected":{"options":{"terms":["Alice"]},"status":"error","source":{},"pullRequest":{}}},{"name":"pr/private/error/true","kind":"pr","operation":"private","record":{"owner":"111111111111111111111111","status":"error","source":{"repositoryId":"cached","repositoryName":"Alice/repo","type":"GitHubStream","commit":"abc","branch":"main","gistId":"upstream","repositoryFullName":"Alice/repo","pullRequestId":12},"options":{"terms":["Alice"]},"gist":{"description":"Alice","isPublic":true,"files":[{"filename":"readme","content":"Alice","size":5,"private":"secret"}],"comments":[{"author":"Alice","body":"hello","private":"secret"}]},"pullRequest":{"title":"Alice","state":"closed","merged":true,"mergedDate":null},"repoId":"example","gistId":"example","pullRequestId":"example","size":{"storage":123,"file":2},"coauthors":[{"username":"Bob","githubId":2,"photo":"photo","private":"secret"}],"conference":"conf","statusMessage":"error_message","anonymizeDate":"2026-01-01T00:00:00.000Z"},"expected":{"pullRequestId":"example","options":{"terms":["Alice"]},"conference":"conf","anonymizeDate":"2026-01-01T00:00:00.000Z","status":"error","state":"closed","merged":true,"mergedDate":null,"statusMessage":"error_message","source":{"pullRequestId":12,"repositoryFullName":"Alice/repo"},"pullRequest":{"title":"Alice","state":"closed","merged":true,"mergedDate":null}}},{"name":"pr/private/removed/false","kind":"pr","operation":"private","record":{"owner":"111111111111111111111111","status":"removed","source":{},"options":{"terms":["Alice"]},"gist":{},"pullRequest":{}},"expected":{"options":{"terms":["Alice"]},"status":"removed","source":{},"pullRequest":{}}},{"name":"pr/private/removed/true","kind":"pr","operation":"private","record":{"owner":"111111111111111111111111","status":"removed","source":{"repositoryId":"cached","repositoryName":"Alice/repo","type":"GitHubStream","commit":"abc","branch":"main","gistId":"upstream","repositoryFullName":"Alice/repo","pullRequestId":12},"options":{"terms":["Alice"]},"gist":{"description":"Alice","isPublic":true,"files":[{"filename":"readme","content":"Alice","size":5,"private":"secret"}],"comments":[{"author":"Alice","body":"hello","private":"secret"}]},"pullRequest":{"title":"Alice","state":"closed","merged":true,"mergedDate":null},"repoId":"example","gistId":"example","pullRequestId":"example","size":{"storage":123,"file":2},"coauthors":[{"username":"Bob","githubId":2,"photo":"photo","private":"secret"}],"conference":"conf","statusMessage":"error_message","anonymizeDate":"2026-01-01T00:00:00.000Z"},"expected":{"pullRequestId":"example","options":{"terms":["Alice"]},"conference":"conf","anonymizeDate":"2026-01-01T00:00:00.000Z","status":"removed","state":"closed","merged":true,"mergedDate":null,"statusMessage":"error_message","source":{"pullRequestId":12,"repositoryFullName":"Alice/repo"},"pullRequest":{"title":"Alice","state":"closed","merged":true,"mergedDate":null}}},{"name":"repo/private/ready/false","kind":"repo","operation":"private","record":{"owner":"111111111111111111111111","status":"ready","source":{},"options":{"terms":["Alice"]},"gist":{},"pullRequest":{}},"expected":{"options":{"terms":["Alice"]},"coauthors":[],"status":"ready","source":{}}},{"name":"repo/private/ready/true","kind":"repo","operation":"private","record":{"owner":"111111111111111111111111","status":"ready","source":{"repositoryId":"cached","repositoryName":"Alice/repo","type":"GitHubStream","commit":"abc","branch":"main","gistId":"upstream","repositoryFullName":"Alice/repo","pullRequestId":12},"options":{"terms":["Alice"]},"gist":{"description":"Alice","isPublic":true,"files":[{"filename":"readme","content":"Alice","size":5,"private":"secret"}],"comments":[{"author":"Alice","body":"hello","private":"secret"}]},"pullRequest":{"title":"Alice","state":"closed","merged":true,"mergedDate":null},"repoId":"example","gistId":"example","pullRequestId":"example","size":{"storage":123,"file":2},"coauthors":[{"username":"Bob","githubId":2,"photo":"photo","private":"secret"}],"conference":"conf","statusMessage":"error_message","anonymizeDate":"2026-01-01T00:00:00.000Z"},"expected":{"repoId":"example","options":{"terms":["Alice"]},"coauthors":[{"username":"Bob","githubId":2,"photo":"photo"}],"conference":"conf","anonymizeDate":"2026-01-01T00:00:00.000Z","status":"ready","statusMessage":"error_message","size":{"storage":123,"file":2},"source":{"repositoryID":"cached","fullName":"Alice/repo","commit":"abc","branch":"main","type":"GitHubStream"}}},{"name":"repo/private/preparing/false","kind":"repo","operation":"private","record":{"owner":"111111111111111111111111","status":"preparing","source":{},"options":{"terms":["Alice"]},"gist":{},"pullRequest":{}},"expected":{"options":{"terms":["Alice"]},"coauthors":[],"status":"preparing","size":{"storage":0,"file":0},"source":{}}},{"name":"repo/private/preparing/true","kind":"repo","operation":"private","record":{"owner":"111111111111111111111111","status":"preparing","source":{"repositoryId":"cached","repositoryName":"Alice/repo","type":"GitHubStream","commit":"abc","branch":"main","gistId":"upstream","repositoryFullName":"Alice/repo","pullRequestId":12},"options":{"terms":["Alice"]},"gist":{"description":"Alice","isPublic":true,"files":[{"filename":"readme","content":"Alice","size":5,"private":"secret"}],"comments":[{"author":"Alice","body":"hello","private":"secret"}]},"pullRequest":{"title":"Alice","state":"closed","merged":true,"mergedDate":null},"repoId":"example","gistId":"example","pullRequestId":"example","size":{"storage":123,"file":2},"coauthors":[{"username":"Bob","githubId":2,"photo":"photo","private":"secret"}],"conference":"conf","statusMessage":"error_message","anonymizeDate":"2026-01-01T00:00:00.000Z"},"expected":{"repoId":"example","options":{"terms":["Alice"]},"coauthors":[{"username":"Bob","githubId":2,"photo":"photo"}],"conference":"conf","anonymizeDate":"2026-01-01T00:00:00.000Z","status":"preparing","statusMessage":"error_message","size":{"storage":0,"file":0},"source":{"repositoryID":"cached","fullName":"Alice/repo","commit":"abc","branch":"main","type":"GitHubStream"}}},{"name":"repo/private/error/false","kind":"repo","operation":"private","record":{"owner":"111111111111111111111111","status":"error","source":{},"options":{"terms":["Alice"]},"gist":{},"pullRequest":{}},"expected":{"options":{"terms":["Alice"]},"coauthors":[],"status":"error","size":{"storage":0,"file":0},"source":{}}},{"name":"repo/private/error/true","kind":"repo","operation":"private","record":{"owner":"111111111111111111111111","status":"error","source":{"repositoryId":"cached","repositoryName":"Alice/repo","type":"GitHubStream","commit":"abc","branch":"main","gistId":"upstream","repositoryFullName":"Alice/repo","pullRequestId":12},"options":{"terms":["Alice"]},"gist":{"description":"Alice","isPublic":true,"files":[{"filename":"readme","content":"Alice","size":5,"private":"secret"}],"comments":[{"author":"Alice","body":"hello","private":"secret"}]},"pullRequest":{"title":"Alice","state":"closed","merged":true,"mergedDate":null},"repoId":"example","gistId":"example","pullRequestId":"example","size":{"storage":123,"file":2},"coauthors":[{"username":"Bob","githubId":2,"photo":"photo","private":"secret"}],"conference":"conf","statusMessage":"error_message","anonymizeDate":"2026-01-01T00:00:00.000Z"},"expected":{"repoId":"example","options":{"terms":["Alice"]},"coauthors":[{"username":"Bob","githubId":2,"photo":"photo"}],"conference":"conf","anonymizeDate":"2026-01-01T00:00:00.000Z","status":"error","statusMessage":"error_message","size":{"storage":0,"file":0},"source":{"repositoryID":"cached","fullName":"Alice/repo","commit":"abc","branch":"main","type":"GitHubStream"}}},{"name":"repo/private/removed/false","kind":"repo","operation":"private","record":{"owner":"111111111111111111111111","status":"removed","source":{},"options":{"terms":["Alice"]},"gist":{},"pullRequest":{}},"expected":{"options":{"terms":["Alice"]},"coauthors":[],"status":"removed","size":{"storage":0,"file":0},"source":{}}},{"name":"repo/private/removed/true","kind":"repo","operation":"private","record":{"owner":"111111111111111111111111","status":"removed","source":{"repositoryId":"cached","repositoryName":"Alice/repo","type":"GitHubStream","commit":"abc","branch":"main","gistId":"upstream","repositoryFullName":"Alice/repo","pullRequestId":12},"options":{"terms":["Alice"]},"gist":{"description":"Alice","isPublic":true,"files":[{"filename":"readme","content":"Alice","size":5,"private":"secret"}],"comments":[{"author":"Alice","body":"hello","private":"secret"}]},"pullRequest":{"title":"Alice","state":"closed","merged":true,"mergedDate":null},"repoId":"example","gistId":"example","pullRequestId":"example","size":{"storage":123,"file":2},"coauthors":[{"username":"Bob","githubId":2,"photo":"photo","private":"secret"}],"conference":"conf","statusMessage":"error_message","anonymizeDate":"2026-01-01T00:00:00.000Z"},"expected":{"repoId":"example","options":{"terms":["Alice"]},"coauthors":[{"username":"Bob","githubId":2,"photo":"photo"}],"conference":"conf","anonymizeDate":"2026-01-01T00:00:00.000Z","status":"removed","statusMessage":"error_message","size":{"storage":0,"file":0},"source":{"repositoryID":"cached","fullName":"Alice/repo","commit":"abc","branch":"main","type":"GitHubStream"}}}] diff --git a/backend/internal/server/testdata/shared-http.json b/backend/internal/server/testdata/shared-http.json deleted file mode 100644 index 9d94140..0000000 --- a/backend/internal/server/testdata/shared-http.json +++ /dev/null @@ -1,1652 +0,0 @@ -[ - { - "store": "identity", - "size": 2250, - "accept": "", - "method": "GET", - "expected": { - "status": 200, - "encoding": "", - "length": "2250", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948" - } - }, - { - "store": "identity", - "size": 2250, - "accept": "gzip", - "method": "GET", - "expected": { - "status": 200, - "encoding": "", - "length": "2250", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948" - } - }, - { - "store": "identity", - "size": 2250, - "accept": "identity", - "method": "GET", - "expected": { - "status": 200, - "encoding": "", - "length": "2250", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948" - } - }, - { - "store": "identity", - "size": 2250, - "accept": "br", - "method": "GET", - "expected": { - "status": 200, - "encoding": "", - "length": "2250", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948" - } - }, - { - "store": "identity", - "size": 2250, - "accept": "deflate", - "method": "GET", - "expected": { - "status": 200, - "encoding": "", - "length": "2250", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948" - } - }, - { - "store": "identity", - "size": 2250, - "accept": "*", - "method": "GET", - "expected": { - "status": 200, - "encoding": "", - "length": "2250", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948" - } - }, - { - "store": "identity", - "size": 2250, - "accept": "identity, gzip", - "method": "GET", - "expected": { - "status": 200, - "encoding": "", - "length": "2250", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948" - } - }, - { - "store": "identity", - "size": 2250, - "accept": "gzip, identity", - "method": "GET", - "expected": { - "status": 200, - "encoding": "", - "length": "2250", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948" - } - }, - { - "store": "identity", - "size": 2250, - "accept": "gzip;q=.5,identity;q=1", - "method": "GET", - "expected": { - "status": 200, - "encoding": "", - "length": "2250", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948" - } - }, - { - "store": "identity", - "size": 2250, - "accept": "gzip;q=1,identity;q=.5", - "method": "GET", - "expected": { - "status": 200, - "encoding": "", - "length": "2250", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948" - } - }, - { - "store": "identity", - "size": 2250, - "accept": "gzip;q=0", - "method": "GET", - "expected": { - "status": 200, - "encoding": "", - "length": "2250", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948" - } - }, - { - "store": "identity", - "size": 2250, - "accept": "identity;q=0", - "method": "GET", - "expected": { - "status": 406, - "encoding": "", - "length": "0", - "vary": "Accept-Encoding", - "ranges": "", - "bodyBytes": 0, - "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - } - }, - { - "store": "identity", - "size": 2250, - "accept": "*;q=0", - "method": "GET", - "expected": { - "status": 406, - "encoding": "", - "length": "0", - "vary": "Accept-Encoding", - "ranges": "", - "bodyBytes": 0, - "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - } - }, - { - "store": "identity", - "size": 2250, - "accept": "gzip,identity;q=0", - "method": "GET", - "expected": { - "status": 200, - "encoding": "gzip", - "length": "", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948" - } - }, - { - "store": "identity", - "size": 2250, - "accept": "identity;q=0,br", - "method": "GET", - "expected": { - "status": 406, - "encoding": "", - "length": "0", - "vary": "Accept-Encoding", - "ranges": "", - "bodyBytes": 0, - "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - } - }, - { - "store": "identity", - "size": 2250, - "accept": "gzip;q=0,*;q=1", - "method": "GET", - "expected": { - "status": 200, - "encoding": "", - "length": "2250", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948" - } - }, - { - "store": "identity", - "size": 2250, - "accept": "*;q=0,gzip;q=1", - "method": "GET", - "expected": { - "status": 200, - "encoding": "gzip", - "length": "", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948" - } - }, - { - "store": "identity", - "size": 2250, - "accept": "gzip;q=NaN", - "method": "GET", - "expected": { - "status": 200, - "encoding": "", - "length": "2250", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948" - } - }, - { - "store": "identity", - "size": 2250, - "accept": "gzip;q=-1", - "method": "GET", - "expected": { - "status": 406, - "encoding": "", - "length": "0", - "vary": "Accept-Encoding", - "ranges": "", - "bodyBytes": 0, - "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - } - }, - { - "store": "identity", - "size": 2250, - "accept": "gzip;q=2", - "method": "GET", - "expected": { - "status": 200, - "encoding": "", - "length": "2250", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948" - } - }, - { - "store": "identity", - "size": 2250, - "accept": "gzip;q=Infinity", - "method": "GET", - "expected": { - "status": 200, - "encoding": "", - "length": "2250", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948" - } - }, - { - "store": "identity", - "size": 2250, - "accept": "gzip;q=1junk", - "method": "GET", - "expected": { - "status": 200, - "encoding": "", - "length": "2250", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948" - } - }, - { - "store": "identity", - "size": 2250, - "accept": "gzip;q= 0.5", - "method": "GET", - "expected": { - "status": 200, - "encoding": "", - "length": "2250", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948" - } - }, - { - "store": "identity", - "size": 2250, - "accept": "gzip;Q=0", - "method": "GET", - "expected": { - "status": 200, - "encoding": "", - "length": "2250", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948" - } - }, - { - "store": "identity", - "size": 2250, - "accept": "gzip;q =0", - "method": "GET", - "expected": { - "status": 200, - "encoding": "", - "length": "2250", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948" - } - }, - { - "store": "identity", - "size": 2250, - "accept": "gzip;q=0,gzip;q=1", - "method": "GET", - "expected": { - "status": 200, - "encoding": "", - "length": "2250", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948" - } - }, - { - "store": "identity", - "size": 2250, - "accept": "gzip;q=1,gzip;q=0", - "method": "GET", - "expected": { - "status": 200, - "encoding": "", - "length": "2250", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948" - } - }, - { - "store": "identity", - "size": 2250, - "accept": "gzip garbage", - "method": "GET", - "expected": { - "status": 200, - "encoding": "", - "length": "2250", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948" - } - }, - { - "store": "identity", - "size": 2250, - "accept": "GZIP", - "method": "GET", - "expected": { - "status": 200, - "encoding": "", - "length": "2250", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948" - } - }, - { - "store": "identity", - "size": 2250, - "accept": "unknown;q=-1,gzip", - "method": "GET", - "expected": { - "status": 200, - "encoding": "gzip", - "length": "", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948" - } - }, - { - "store": "identity", - "size": 2250, - "accept": ",,,gzip", - "method": "GET", - "expected": { - "status": 200, - "encoding": "", - "length": "2250", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948" - } - }, - { - "store": "identity", - "size": 2250, - "accept": "gzip,,,", - "method": "GET", - "expected": { - "status": 200, - "encoding": "", - "length": "2250", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948" - } - }, - { - "store": "identity", - "size": 2250, - "accept": "gzip;q=\"0\"", - "method": "GET", - "expected": { - "status": 200, - "encoding": "", - "length": "2250", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948" - } - }, - { - "store": "identity", - "size": 2250, - "accept": "gzip;q=\"0.5,identity;q=0\"", - "method": "GET", - "expected": { - "status": 200, - "encoding": "", - "length": "2250", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948" - } - }, - { - "store": "identity", - "size": 2250, - "accept": "gzip;q=\"\\0\"", - "method": "GET", - "expected": { - "status": 200, - "encoding": "", - "length": "2250", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948" - } - }, - { - "store": "identity", - "size": 2250, - "accept": "gzip;q=\"0", - "method": "GET", - "expected": { - "status": 200, - "encoding": "", - "length": "2250", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948" - } - }, - { - "store": "identity", - "size": 2250, - "accept": "gzip;q=", - "method": "GET", - "expected": { - "status": 200, - "encoding": "", - "length": "2250", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948" - } - }, - { - "store": "identity", - "size": 2250, - "accept": "gzip;q=;q=0", - "method": "GET", - "expected": { - "status": 200, - "encoding": "", - "length": "2250", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948" - } - }, - { - "store": "identity", - "size": 2250, - "accept": "gzip;q=0;q=1", - "method": "GET", - "expected": { - "status": 200, - "encoding": "", - "length": "2250", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948" - } - }, - { - "store": "identity", - "size": 2250, - "accept": "gzip;Q = \"0.5\"", - "method": "GET", - "expected": { - "status": 200, - "encoding": "", - "length": "2250", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948" - } - }, - { - "store": "identity", - "size": 2250, - "accept": "gzip;broken;q=0", - "method": "GET", - "expected": { - "status": 200, - "encoding": "", - "length": "2250", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948" - } - }, - { - "store": "identity", - "size": 2250, - "accept": "gzip garbage;q=-1", - "method": "GET", - "expected": { - "status": 406, - "encoding": "", - "length": "0", - "vary": "Accept-Encoding", - "ranges": "", - "bodyBytes": 0, - "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - } - }, - { - "store": "identity", - "size": 2250, - "accept": "gzip;level=\"a,b;c\";q=0", - "method": "GET", - "expected": { - "status": 200, - "encoding": "", - "length": "2250", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948" - } - }, - { - "store": "identity", - "size": 2250, - "accept": "identity;q=0,*;q=.5", - "method": "GET", - "expected": { - "status": 200, - "encoding": "gzip", - "length": "", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948" - } - }, - { - "store": "gzip", - "size": 2250, - "accept": "", - "method": "GET", - "expected": { - "status": 200, - "encoding": "", - "length": "2250", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948" - } - }, - { - "store": "gzip", - "size": 2250, - "accept": "gzip", - "method": "GET", - "expected": { - "status": 200, - "encoding": "gzip", - "length": "37", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948", - "wire": "H4sIAAAAAAAAA6uoGAWjYBSMglEwCkbBKBiqAAAHzkXWyggAAA==" - } - }, - { - "store": "gzip", - "size": 2250, - "accept": "identity", - "method": "GET", - "expected": { - "status": 200, - "encoding": "", - "length": "2250", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948" - } - }, - { - "store": "gzip", - "size": 2250, - "accept": "br", - "method": "GET", - "expected": { - "status": 200, - "encoding": "", - "length": "2250", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948" - } - }, - { - "store": "gzip", - "size": 2250, - "accept": "deflate", - "method": "GET", - "expected": { - "status": 200, - "encoding": "", - "length": "2250", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948" - } - }, - { - "store": "gzip", - "size": 2250, - "accept": "*", - "method": "GET", - "expected": { - "status": 200, - "encoding": "gzip", - "length": "37", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948", - "wire": "H4sIAAAAAAAAA6uoGAWjYBSMglEwCkbBKBiqAAAHzkXWyggAAA==" - } - }, - { - "store": "gzip", - "size": 2250, - "accept": "identity, gzip", - "method": "GET", - "expected": { - "status": 200, - "encoding": "", - "length": "2250", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948" - } - }, - { - "store": "gzip", - "size": 2250, - "accept": "gzip, identity", - "method": "GET", - "expected": { - "status": 200, - "encoding": "gzip", - "length": "37", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948", - "wire": "H4sIAAAAAAAAA6uoGAWjYBSMglEwCkbBKBiqAAAHzkXWyggAAA==" - } - }, - { - "store": "gzip", - "size": 2250, - "accept": "gzip;q=.5,identity;q=1", - "method": "GET", - "expected": { - "status": 200, - "encoding": "", - "length": "2250", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948" - } - }, - { - "store": "gzip", - "size": 2250, - "accept": "gzip;q=1,identity;q=.5", - "method": "GET", - "expected": { - "status": 200, - "encoding": "gzip", - "length": "37", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948", - "wire": "H4sIAAAAAAAAA6uoGAWjYBSMglEwCkbBKBiqAAAHzkXWyggAAA==" - } - }, - { - "store": "gzip", - "size": 2250, - "accept": "gzip;q=0", - "method": "GET", - "expected": { - "status": 200, - "encoding": "", - "length": "2250", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948" - } - }, - { - "store": "gzip", - "size": 2250, - "accept": "identity;q=0", - "method": "GET", - "expected": { - "status": 406, - "encoding": "", - "length": "0", - "vary": "Accept-Encoding", - "ranges": "", - "bodyBytes": 0, - "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - } - }, - { - "store": "gzip", - "size": 2250, - "accept": "*;q=0", - "method": "GET", - "expected": { - "status": 406, - "encoding": "", - "length": "0", - "vary": "Accept-Encoding", - "ranges": "", - "bodyBytes": 0, - "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - } - }, - { - "store": "gzip", - "size": 2250, - "accept": "gzip,identity;q=0", - "method": "GET", - "expected": { - "status": 200, - "encoding": "gzip", - "length": "37", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948", - "wire": "H4sIAAAAAAAAA6uoGAWjYBSMglEwCkbBKBiqAAAHzkXWyggAAA==" - } - }, - { - "store": "gzip", - "size": 2250, - "accept": "identity;q=0,br", - "method": "GET", - "expected": { - "status": 406, - "encoding": "", - "length": "0", - "vary": "Accept-Encoding", - "ranges": "", - "bodyBytes": 0, - "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - } - }, - { - "store": "gzip", - "size": 2250, - "accept": "gzip;q=0,*;q=1", - "method": "GET", - "expected": { - "status": 200, - "encoding": "", - "length": "2250", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948" - } - }, - { - "store": "gzip", - "size": 2250, - "accept": "*;q=0,gzip;q=1", - "method": "GET", - "expected": { - "status": 200, - "encoding": "gzip", - "length": "37", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948", - "wire": "H4sIAAAAAAAAA6uoGAWjYBSMglEwCkbBKBiqAAAHzkXWyggAAA==" - } - }, - { - "store": "gzip", - "size": 2250, - "accept": "gzip;q=NaN", - "method": "GET", - "expected": { - "status": 200, - "encoding": "", - "length": "2250", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948" - } - }, - { - "store": "gzip", - "size": 2250, - "accept": "gzip;q=-1", - "method": "GET", - "expected": { - "status": 406, - "encoding": "", - "length": "0", - "vary": "Accept-Encoding", - "ranges": "", - "bodyBytes": 0, - "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - } - }, - { - "store": "gzip", - "size": 2250, - "accept": "gzip;q=2", - "method": "GET", - "expected": { - "status": 200, - "encoding": "gzip", - "length": "37", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948", - "wire": "H4sIAAAAAAAAA6uoGAWjYBSMglEwCkbBKBiqAAAHzkXWyggAAA==" - } - }, - { - "store": "gzip", - "size": 2250, - "accept": "gzip;q=Infinity", - "method": "GET", - "expected": { - "status": 200, - "encoding": "gzip", - "length": "37", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948", - "wire": "H4sIAAAAAAAAA6uoGAWjYBSMglEwCkbBKBiqAAAHzkXWyggAAA==" - } - }, - { - "store": "gzip", - "size": 2250, - "accept": "gzip;q=1junk", - "method": "GET", - "expected": { - "status": 200, - "encoding": "gzip", - "length": "37", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948", - "wire": "H4sIAAAAAAAAA6uoGAWjYBSMglEwCkbBKBiqAAAHzkXWyggAAA==" - } - }, - { - "store": "gzip", - "size": 2250, - "accept": "gzip;q= 0.5", - "method": "GET", - "expected": { - "status": 200, - "encoding": "gzip", - "length": "37", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948", - "wire": "H4sIAAAAAAAAA6uoGAWjYBSMglEwCkbBKBiqAAAHzkXWyggAAA==" - } - }, - { - "store": "gzip", - "size": 2250, - "accept": "gzip;Q=0", - "method": "GET", - "expected": { - "status": 200, - "encoding": "", - "length": "2250", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948" - } - }, - { - "store": "gzip", - "size": 2250, - "accept": "gzip;q =0", - "method": "GET", - "expected": { - "status": 200, - "encoding": "", - "length": "2250", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948" - } - }, - { - "store": "gzip", - "size": 2250, - "accept": "gzip;q=0,gzip;q=1", - "method": "GET", - "expected": { - "status": 200, - "encoding": "gzip", - "length": "37", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948", - "wire": "H4sIAAAAAAAAA6uoGAWjYBSMglEwCkbBKBiqAAAHzkXWyggAAA==" - } - }, - { - "store": "gzip", - "size": 2250, - "accept": "gzip;q=1,gzip;q=0", - "method": "GET", - "expected": { - "status": 200, - "encoding": "gzip", - "length": "37", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948", - "wire": "H4sIAAAAAAAAA6uoGAWjYBSMglEwCkbBKBiqAAAHzkXWyggAAA==" - } - }, - { - "store": "gzip", - "size": 2250, - "accept": "gzip garbage", - "method": "GET", - "expected": { - "status": 200, - "encoding": "", - "length": "2250", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948" - } - }, - { - "store": "gzip", - "size": 2250, - "accept": "GZIP", - "method": "GET", - "expected": { - "status": 200, - "encoding": "gzip", - "length": "37", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948", - "wire": "H4sIAAAAAAAAA6uoGAWjYBSMglEwCkbBKBiqAAAHzkXWyggAAA==" - } - }, - { - "store": "gzip", - "size": 2250, - "accept": "unknown;q=-1,gzip", - "method": "GET", - "expected": { - "status": 200, - "encoding": "gzip", - "length": "37", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948", - "wire": "H4sIAAAAAAAAA6uoGAWjYBSMglEwCkbBKBiqAAAHzkXWyggAAA==" - } - }, - { - "store": "gzip", - "size": 2250, - "accept": ",,,gzip", - "method": "GET", - "expected": { - "status": 200, - "encoding": "gzip", - "length": "37", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948", - "wire": "H4sIAAAAAAAAA6uoGAWjYBSMglEwCkbBKBiqAAAHzkXWyggAAA==" - } - }, - { - "store": "gzip", - "size": 2250, - "accept": "gzip,,,", - "method": "GET", - "expected": { - "status": 200, - "encoding": "gzip", - "length": "37", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948", - "wire": "H4sIAAAAAAAAA6uoGAWjYBSMglEwCkbBKBiqAAAHzkXWyggAAA==" - } - }, - { - "store": "gzip", - "size": 2250, - "accept": "gzip;q=\"0\"", - "method": "GET", - "expected": { - "status": 200, - "encoding": "", - "length": "2250", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948" - } - }, - { - "store": "gzip", - "size": 2250, - "accept": "gzip;q=\"0.5,identity;q=0\"", - "method": "GET", - "expected": { - "status": 200, - "encoding": "gzip", - "length": "37", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948", - "wire": "H4sIAAAAAAAAA6uoGAWjYBSMglEwCkbBKBiqAAAHzkXWyggAAA==" - } - }, - { - "store": "gzip", - "size": 2250, - "accept": "gzip;q=\"\\0\"", - "method": "GET", - "expected": { - "status": 200, - "encoding": "", - "length": "2250", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948" - } - }, - { - "store": "gzip", - "size": 2250, - "accept": "gzip;q=\"0", - "method": "GET", - "expected": { - "status": 200, - "encoding": "gzip", - "length": "37", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948", - "wire": "H4sIAAAAAAAAA6uoGAWjYBSMglEwCkbBKBiqAAAHzkXWyggAAA==" - } - }, - { - "store": "gzip", - "size": 2250, - "accept": "gzip;q=", - "method": "GET", - "expected": { - "status": 200, - "encoding": "gzip", - "length": "37", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948", - "wire": "H4sIAAAAAAAAA6uoGAWjYBSMglEwCkbBKBiqAAAHzkXWyggAAA==" - } - }, - { - "store": "gzip", - "size": 2250, - "accept": "gzip;q=;q=0", - "method": "GET", - "expected": { - "status": 200, - "encoding": "gzip", - "length": "37", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948", - "wire": "H4sIAAAAAAAAA6uoGAWjYBSMglEwCkbBKBiqAAAHzkXWyggAAA==" - } - }, - { - "store": "gzip", - "size": 2250, - "accept": "gzip;q=0;q=1", - "method": "GET", - "expected": { - "status": 200, - "encoding": "", - "length": "2250", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948" - } - }, - { - "store": "gzip", - "size": 2250, - "accept": "gzip;Q = \"0.5\"", - "method": "GET", - "expected": { - "status": 200, - "encoding": "gzip", - "length": "37", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948", - "wire": "H4sIAAAAAAAAA6uoGAWjYBSMglEwCkbBKBiqAAAHzkXWyggAAA==" - } - }, - { - "store": "gzip", - "size": 2250, - "accept": "gzip;broken;q=0", - "method": "GET", - "expected": { - "status": 200, - "encoding": "", - "length": "2250", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948" - } - }, - { - "store": "gzip", - "size": 2250, - "accept": "gzip garbage;q=-1", - "method": "GET", - "expected": { - "status": 406, - "encoding": "", - "length": "0", - "vary": "Accept-Encoding", - "ranges": "", - "bodyBytes": 0, - "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - } - }, - { - "store": "gzip", - "size": 2250, - "accept": "gzip;level=\"a,b;c\";q=0", - "method": "GET", - "expected": { - "status": 200, - "encoding": "", - "length": "2250", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948" - } - }, - { - "store": "gzip", - "size": 2250, - "accept": "identity;q=0,*;q=.5", - "method": "GET", - "expected": { - "status": 200, - "encoding": "gzip", - "length": "37", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948", - "wire": "H4sIAAAAAAAAA6uoGAWjYBSMglEwCkbBKBiqAAAHzkXWyggAAA==" - } - }, - { - "store": "identity", - "size": 0, - "accept": "", - "method": "GET", - "expected": { - "status": 200, - "encoding": "", - "length": "0", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 0, - "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - } - }, - { - "store": "identity", - "size": 0, - "accept": "gzip", - "method": "GET", - "expected": { - "status": 200, - "encoding": "", - "length": "0", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 0, - "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - } - }, - { - "store": "identity", - "size": 0, - "accept": "gzip,identity;q=0", - "method": "GET", - "expected": { - "status": 200, - "encoding": "gzip", - "length": "", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 0, - "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - } - }, - { - "store": "identity", - "size": 0, - "accept": "*;q=0", - "method": "GET", - "expected": { - "status": 406, - "encoding": "", - "length": "0", - "vary": "Accept-Encoding", - "ranges": "", - "bodyBytes": 0, - "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - } - }, - { - "store": "identity", - "size": 17, - "accept": "", - "method": "GET", - "expected": { - "status": 200, - "encoding": "", - "length": "17", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 17, - "sha256": "d04fd59f3d9a1fd424c47874ae1dab0dde54fa73ba474245bfac79279afe6df7" - } - }, - { - "store": "identity", - "size": 17, - "accept": "gzip", - "method": "GET", - "expected": { - "status": 200, - "encoding": "", - "length": "17", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 17, - "sha256": "d04fd59f3d9a1fd424c47874ae1dab0dde54fa73ba474245bfac79279afe6df7" - } - }, - { - "store": "identity", - "size": 17, - "accept": "gzip,identity;q=0", - "method": "GET", - "expected": { - "status": 200, - "encoding": "gzip", - "length": "", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 17, - "sha256": "d04fd59f3d9a1fd424c47874ae1dab0dde54fa73ba474245bfac79279afe6df7" - } - }, - { - "store": "identity", - "size": 17, - "accept": "*;q=0", - "method": "GET", - "expected": { - "status": 406, - "encoding": "", - "length": "0", - "vary": "Accept-Encoding", - "ranges": "", - "bodyBytes": 0, - "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - } - }, - { - "store": "gzip", - "size": 2250, - "accept": "gzip", - "method": "GET", - "vary": "Origin", - "expected": { - "status": 200, - "encoding": "gzip", - "length": "37", - "vary": "Origin, Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948", - "wire": "H4sIAAAAAAAAA6uoGAWjYBSMglEwCkbBKBiqAAAHzkXWyggAAA==" - } - }, - { - "store": "gzip", - "size": 2250, - "accept": "gzip", - "method": "GET", - "vary": "accept-encoding", - "expected": { - "status": 200, - "encoding": "gzip", - "length": "37", - "vary": "accept-encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948", - "wire": "H4sIAAAAAAAAA6uoGAWjYBSMglEwCkbBKBiqAAAHzkXWyggAAA==" - } - }, - { - "store": "gzip", - "size": 2250, - "accept": "gzip", - "method": "GET", - "vary": "*", - "expected": { - "status": 200, - "encoding": "gzip", - "length": "37", - "vary": "*", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948", - "wire": "H4sIAAAAAAAAA6uoGAWjYBSMglEwCkbBKBiqAAAHzkXWyggAAA==" - } - }, - { - "store": "gzip", - "size": 2250, - "accept": "gzip", - "method": "GET", - "vary": "Origin, Accept-Language", - "expected": { - "status": 200, - "encoding": "gzip", - "length": "37", - "vary": "Origin, Accept-Language, Accept-Encoding", - "ranges": "none", - "bodyBytes": 2250, - "sha256": "2a7e6391e9ddb195fc5a11d2bf20cac2f435bb3622799a38b3690f75dd8af948", - "wire": "H4sIAAAAAAAAA6uoGAWjYBSMglEwCkbBKBiqAAAHzkXWyggAAA==" - } - }, - { - "store": "identity", - "size": 2250, - "accept": "", - "method": "HEAD", - "expected": { - "status": 200, - "encoding": "", - "length": "2250", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 0, - "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - } - }, - { - "store": "identity", - "size": 2250, - "accept": "gzip", - "method": "HEAD", - "expected": { - "status": 200, - "encoding": "", - "length": "2250", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 0, - "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - } - }, - { - "store": "identity", - "size": 2250, - "accept": "gzip,identity;q=0", - "method": "HEAD", - "expected": { - "status": 200, - "encoding": "gzip", - "length": "", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 0, - "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - } - }, - { - "store": "identity", - "size": 2250, - "accept": "*;q=0", - "method": "HEAD", - "expected": { - "status": 406, - "encoding": "", - "length": "", - "vary": "Accept-Encoding", - "ranges": "", - "bodyBytes": 0, - "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - } - }, - { - "store": "gzip", - "size": 2250, - "accept": "", - "method": "HEAD", - "expected": { - "status": 200, - "encoding": "", - "length": "2250", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 0, - "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - } - }, - { - "store": "gzip", - "size": 2250, - "accept": "gzip", - "method": "HEAD", - "expected": { - "status": 200, - "encoding": "gzip", - "length": "37", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 0, - "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - } - }, - { - "store": "gzip", - "size": 2250, - "accept": "gzip,identity;q=0", - "method": "HEAD", - "expected": { - "status": 200, - "encoding": "gzip", - "length": "37", - "vary": "Accept-Encoding", - "ranges": "none", - "bodyBytes": 0, - "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - } - }, - { - "store": "gzip", - "size": 2250, - "accept": "*;q=0", - "method": "HEAD", - "expected": { - "status": 406, - "encoding": "", - "length": "", - "vary": "Accept-Encoding", - "ranges": "", - "bodyBytes": 0, - "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - } - } -] diff --git a/backend/internal/server/testdata/shared-result-key.json b/backend/internal/server/testdata/shared-result-key.json deleted file mode 100644 index 4e28a40..0000000 --- a/backend/internal/server/testdata/shared-result-key.json +++ /dev/null @@ -1,328 +0,0 @@ -[ - { - "record": { - "repoId": "anonymous-one", - "treeGeneration": "generation", - "anonymizeDate": "2026-01-02T03:04:05.006Z" - }, - "row": { - "path": "nested", - "name": "Alice.txt" - }, - "options": { - "terms": [], - "image": false, - "link": true, - "repoId": "anonymous-one", - "repoName": "team/subgroup/project", - "branchName": "main", - "sourceURLs": [] - }, - "digest": "sha256-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "mask": "XX<>&
", - "hostname": "anonymous.test", - "expected": "f8b1fe5fb9709743073b3253b9dc3914159990103dd1d368597d8537faee57c8" - }, - { - "record": { - "repoId": "anonymous-one", - "treeGeneration": "generation", - "anonymizeDate": "2026-01-02T03:04:05.006Z", - "contentCacheRevision": "reset:two" - }, - "row": { - "path": "nested", - "name": "Alice.txt" - }, - "options": { - "terms": [], - "image": false, - "link": true, - "repoId": "anonymous-one", - "repoName": "team/subgroup/project", - "branchName": "main", - "sourceURLs": [] - }, - "digest": "sha256-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "mask": "XX<>&
", - "hostname": "anonymous.test", - "expected": "5a1b932be9907cf0356f6ff57a99321fde42ab5f3e7947bc5f206c6be60cbae1" - }, - { - "record": { - "repoId": "anonymous-one", - "treeGeneration": "generation", - "anonymizeDate": "2026-01-02T03:04:05.006Z" - }, - "row": { - "path": "nested", - "name": "Alice.txt" - }, - "options": { - "terms": [], - "image": false, - "link": true, - "repoId": "anonymous-one", - "repoName": "team/subgroup/project", - "branchName": "main", - "sourceURLs": [ - "https://forge.test/nested/project" - ] - }, - "digest": "sha256-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "mask": "XX<>&
", - "hostname": "anonymous.test", - "expected": "6df1510473828efcf50e72755d4396bace34786acccab677074712e4deeb04b4" - }, - { - "record": { - "repoId": "anonymous-one", - "treeGeneration": "generation", - "anonymizeDate": "2026-01-02T03:04:05.006Z", - "contentCacheRevision": "reset:two" - }, - "row": { - "path": "nested", - "name": "Alice.txt" - }, - "options": { - "terms": [], - "image": false, - "link": true, - "repoId": "anonymous-one", - "repoName": "team/subgroup/project", - "branchName": "main", - "sourceURLs": [ - "https://forge.test/nested/project" - ] - }, - "digest": "sha256-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "mask": "XX<>&
", - "hostname": "anonymous.test", - "expected": "c7eca32ac8d0547e2435ef698165dfaefebc743bfe25910e581bec9f9950de5f" - }, - { - "record": { - "repoId": "anonymous-one", - "treeGeneration": "generation", - "anonymizeDate": "2026-01-02T03:04:05.006Z" - }, - "row": { - "path": "nested", - "name": "Alice.txt" - }, - "options": { - "terms": [ - "Alice" - ], - "image": false, - "link": true, - "repoId": "anonymous-one", - "repoName": "team/subgroup/project", - "branchName": "main", - "sourceURLs": [] - }, - "digest": "sha256-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "mask": "XX<>&
", - "hostname": "anonymous.test", - "expected": "568c570fd5e74ca92dfd7b52617846b2dc0e153e3a9d84cedbfa388f98ef34ea" - }, - { - "record": { - "repoId": "anonymous-one", - "treeGeneration": "generation", - "anonymizeDate": "2026-01-02T03:04:05.006Z", - "contentCacheRevision": "reset:two" - }, - "row": { - "path": "nested", - "name": "Alice.txt" - }, - "options": { - "terms": [ - "Alice" - ], - "image": false, - "link": true, - "repoId": "anonymous-one", - "repoName": "team/subgroup/project", - "branchName": "main", - "sourceURLs": [] - }, - "digest": "sha256-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "mask": "XX<>&
", - "hostname": "anonymous.test", - "expected": "a6784a8e66e7c996d8169cdb3e23228269162fd7b643a28fee7477b78b727f95" - }, - { - "record": { - "repoId": "anonymous-one", - "treeGeneration": "generation", - "anonymizeDate": "2026-01-02T03:04:05.006Z" - }, - "row": { - "path": "nested", - "name": "Alice.txt" - }, - "options": { - "terms": [ - "Alice" - ], - "image": false, - "link": true, - "repoId": "anonymous-one", - "repoName": "team/subgroup/project", - "branchName": "main", - "sourceURLs": [ - "https://forge.test/nested/project" - ] - }, - "digest": "sha256-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "mask": "XX<>&
", - "hostname": "anonymous.test", - "expected": "cdc9864ddff330d378ad914993154e167113f413b71c404f72a896b8fea5e31b" - }, - { - "record": { - "repoId": "anonymous-one", - "treeGeneration": "generation", - "anonymizeDate": "2026-01-02T03:04:05.006Z", - "contentCacheRevision": "reset:two" - }, - "row": { - "path": "nested", - "name": "Alice.txt" - }, - "options": { - "terms": [ - "Alice" - ], - "image": false, - "link": true, - "repoId": "anonymous-one", - "repoName": "team/subgroup/project", - "branchName": "main", - "sourceURLs": [ - "https://forge.test/nested/project" - ] - }, - "digest": "sha256-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "mask": "XX<>&
", - "hostname": "anonymous.test", - "expected": "096fa45165a1e29fa4320c3f8da5d78877c974ee43eb559e1a07351a613debf3" - }, - { - "record": { - "repoId": "anonymous-one", - "treeGeneration": "generation", - "anonymizeDate": "2026-01-02T03:04:05.006Z" - }, - "row": { - "path": "nested", - "name": "Alice.txt" - }, - "options": { - "terms": [ - "é<>&
", - "\\u2028" - ], - "image": false, - "link": true, - "repoId": "anonymous-one", - "repoName": "team/subgroup/project", - "branchName": "main", - "sourceURLs": [] - }, - "digest": "sha256-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "mask": "XX<>&
", - "hostname": "anonymous.test", - "expected": "846583368bdbf3e5f32d76720c21e2c3b446c1a22d596c01a4c060b446146e4b" - }, - { - "record": { - "repoId": "anonymous-one", - "treeGeneration": "generation", - "anonymizeDate": "2026-01-02T03:04:05.006Z", - "contentCacheRevision": "reset:two" - }, - "row": { - "path": "nested", - "name": "Alice.txt" - }, - "options": { - "terms": [ - "é<>&
", - "\\u2028" - ], - "image": false, - "link": true, - "repoId": "anonymous-one", - "repoName": "team/subgroup/project", - "branchName": "main", - "sourceURLs": [] - }, - "digest": "sha256-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "mask": "XX<>&
", - "hostname": "anonymous.test", - "expected": "3645220d7c1dbd49b51415af98f07864d7ea7e1a97f2712ab543fbf71079111f" - }, - { - "record": { - "repoId": "anonymous-one", - "treeGeneration": "generation", - "anonymizeDate": "2026-01-02T03:04:05.006Z" - }, - "row": { - "path": "nested", - "name": "Alice.txt" - }, - "options": { - "terms": [ - "é<>&
", - "\\u2028" - ], - "image": false, - "link": true, - "repoId": "anonymous-one", - "repoName": "team/subgroup/project", - "branchName": "main", - "sourceURLs": [ - "https://forge.test/nested/project" - ] - }, - "digest": "sha256-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "mask": "XX<>&
", - "hostname": "anonymous.test", - "expected": "31902697ea4e457641016822e4f53d23de59a1ba3b563696ed0def04095d6bbb" - }, - { - "record": { - "repoId": "anonymous-one", - "treeGeneration": "generation", - "anonymizeDate": "2026-01-02T03:04:05.006Z", - "contentCacheRevision": "reset:two" - }, - "row": { - "path": "nested", - "name": "Alice.txt" - }, - "options": { - "terms": [ - "é<>&
", - "\\u2028" - ], - "image": false, - "link": true, - "repoId": "anonymous-one", - "repoName": "team/subgroup/project", - "branchName": "main", - "sourceURLs": [ - "https://forge.test/nested/project" - ] - }, - "digest": "sha256-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "mask": "XX<>&
", - "hostname": "anonymous.test", - "expected": "ae04fc3d0bf3870895cee4558458e82bc93a097bff189eadb1e58ef32f2dee7a" - } -] diff --git a/backend/internal/server/testdata/stats-history.json b/backend/internal/server/testdata/stats-history.json deleted file mode 100644 index aa6cbdc..0000000 --- a/backend/internal/server/testdata/stats-history.json +++ /dev/null @@ -1,706 +0,0 @@ -[ - { - "now": "2026-11-03T00:00:00Z", - "rows": [], - "current": { - "nbRepositories": 12, - "nbUsers": 3, - "nbPageViews": 99, - "nbPullRequests": 2 - }, - "expected": [ - { - "date": "2026-11-03T00:00:00.000Z", - "nbRepositories": 12, - "nbUsers": 3, - "nbPageViews": 99, - "nbPullRequests": 2 - } - ] - }, - { - "now": "2026-11-03T00:00:00Z", - "rows": [ - { - "date": "2026-11-02T00:00:00.000Z", - "nbRepositories": 0, - "nbUsers": 0, - "nbPageViews": 0, - "nbPullRequests": 0 - } - ], - "current": { - "nbRepositories": 12, - "nbUsers": 3, - "nbPageViews": 99, - "nbPullRequests": 2 - }, - "expected": [ - { - "date": "2026-11-02T00:00:00.000Z", - "nbRepositories": 0, - "nbUsers": 0, - "nbPageViews": 0, - "nbPullRequests": 0 - }, - { - "date": "2026-11-03T00:00:00.000Z", - "nbRepositories": 12, - "nbUsers": 3, - "nbPageViews": 99, - "nbPullRequests": 2 - } - ] - }, - { - "now": "2026-11-03T00:00:00Z", - "rows": [ - { - "date": "2026-11-03T12:00:00.000Z", - "nbRepositories": 0, - "nbUsers": 0, - "nbPageViews": 0, - "nbPullRequests": 0 - } - ], - "current": { - "nbRepositories": 12, - "nbUsers": 3, - "nbPageViews": 99, - "nbPullRequests": 2 - }, - "expected": [ - { - "date": "2026-11-03T00:00:00.000Z", - "nbRepositories": 12, - "nbUsers": 3, - "nbPageViews": 99, - "nbPullRequests": 2 - } - ] - }, - { - "now": "2026-11-03T00:00:00Z", - "rows": [ - { - "date": "2026-11-03T13:00:00.000Z", - "nbRepositories": 0, - "nbUsers": 0, - "nbPageViews": 0, - "nbPullRequests": 0 - }, - { - "date": "2026-11-03T12:00:00.000Z", - "nbRepositories": 1, - "nbUsers": 1, - "nbPageViews": 1, - "nbPullRequests": 1 - } - ], - "current": { - "nbRepositories": 12, - "nbUsers": 3, - "nbPageViews": 99, - "nbPullRequests": 2 - }, - "expected": [ - { - "date": "2026-11-03T00:00:00.000Z", - "nbRepositories": 12, - "nbUsers": 3, - "nbPageViews": 99, - "nbPullRequests": 2 - }, - { - "date": "2026-11-03T12:00:00.000Z", - "nbRepositories": 1, - "nbUsers": 1, - "nbPageViews": 1, - "nbPullRequests": 1 - } - ] - }, - { - "now": "2026-11-03T00:00:00Z", - "rows": [ - { - "date": "2026-11-04T00:00:00.000Z", - "nbRepositories": 0, - "nbUsers": 0, - "nbPageViews": 0, - "nbPullRequests": 0 - }, - { - "date": "2026-11-02T00:00:00.000Z", - "nbRepositories": 1, - "nbUsers": 1, - "nbPageViews": 1, - "nbPullRequests": 1 - }, - { - "date": "2026-11-03T00:00:00.001Z", - "nbRepositories": 2, - "nbUsers": 2, - "nbPageViews": 2, - "nbPullRequests": 2 - } - ], - "current": { - "nbRepositories": 12, - "nbUsers": 3, - "nbPageViews": 99, - "nbPullRequests": 2 - }, - "expected": [ - { - "date": "2026-11-02T00:00:00.000Z", - "nbRepositories": 1, - "nbUsers": 1, - "nbPageViews": 1, - "nbPullRequests": 1 - }, - { - "date": "2026-11-03T00:00:00.000Z", - "nbRepositories": 12, - "nbUsers": 3, - "nbPageViews": 99, - "nbPullRequests": 2 - }, - { - "date": "2026-11-04T00:00:00.000Z", - "nbRepositories": 0, - "nbUsers": 0, - "nbPageViews": 0, - "nbPullRequests": 0 - } - ] - }, - { - "now": "2026-11-03T23:59:59.999Z", - "rows": [], - "current": { - "nbRepositories": 12, - "nbUsers": 3, - "nbPageViews": 99, - "nbPullRequests": 2 - }, - "expected": [ - { - "date": "2026-11-03T00:00:00.000Z", - "nbRepositories": 12, - "nbUsers": 3, - "nbPageViews": 99, - "nbPullRequests": 2 - } - ] - }, - { - "now": "2026-11-03T23:59:59.999Z", - "rows": [ - { - "date": "2026-11-02T00:00:00.000Z", - "nbRepositories": 0, - "nbUsers": 0, - "nbPageViews": 0, - "nbPullRequests": 0 - } - ], - "current": { - "nbRepositories": 12, - "nbUsers": 3, - "nbPageViews": 99, - "nbPullRequests": 2 - }, - "expected": [ - { - "date": "2026-11-02T00:00:00.000Z", - "nbRepositories": 0, - "nbUsers": 0, - "nbPageViews": 0, - "nbPullRequests": 0 - }, - { - "date": "2026-11-03T00:00:00.000Z", - "nbRepositories": 12, - "nbUsers": 3, - "nbPageViews": 99, - "nbPullRequests": 2 - } - ] - }, - { - "now": "2026-11-03T23:59:59.999Z", - "rows": [ - { - "date": "2026-11-03T12:00:00.000Z", - "nbRepositories": 0, - "nbUsers": 0, - "nbPageViews": 0, - "nbPullRequests": 0 - } - ], - "current": { - "nbRepositories": 12, - "nbUsers": 3, - "nbPageViews": 99, - "nbPullRequests": 2 - }, - "expected": [ - { - "date": "2026-11-03T00:00:00.000Z", - "nbRepositories": 12, - "nbUsers": 3, - "nbPageViews": 99, - "nbPullRequests": 2 - } - ] - }, - { - "now": "2026-11-03T23:59:59.999Z", - "rows": [ - { - "date": "2026-11-03T13:00:00.000Z", - "nbRepositories": 0, - "nbUsers": 0, - "nbPageViews": 0, - "nbPullRequests": 0 - }, - { - "date": "2026-11-03T12:00:00.000Z", - "nbRepositories": 1, - "nbUsers": 1, - "nbPageViews": 1, - "nbPullRequests": 1 - } - ], - "current": { - "nbRepositories": 12, - "nbUsers": 3, - "nbPageViews": 99, - "nbPullRequests": 2 - }, - "expected": [ - { - "date": "2026-11-03T00:00:00.000Z", - "nbRepositories": 12, - "nbUsers": 3, - "nbPageViews": 99, - "nbPullRequests": 2 - }, - { - "date": "2026-11-03T12:00:00.000Z", - "nbRepositories": 1, - "nbUsers": 1, - "nbPageViews": 1, - "nbPullRequests": 1 - } - ] - }, - { - "now": "2026-11-03T23:59:59.999Z", - "rows": [ - { - "date": "2026-11-04T00:00:00.000Z", - "nbRepositories": 0, - "nbUsers": 0, - "nbPageViews": 0, - "nbPullRequests": 0 - }, - { - "date": "2026-11-02T00:00:00.000Z", - "nbRepositories": 1, - "nbUsers": 1, - "nbPageViews": 1, - "nbPullRequests": 1 - }, - { - "date": "2026-11-03T00:00:00.001Z", - "nbRepositories": 2, - "nbUsers": 2, - "nbPageViews": 2, - "nbPullRequests": 2 - } - ], - "current": { - "nbRepositories": 12, - "nbUsers": 3, - "nbPageViews": 99, - "nbPullRequests": 2 - }, - "expected": [ - { - "date": "2026-11-02T00:00:00.000Z", - "nbRepositories": 1, - "nbUsers": 1, - "nbPageViews": 1, - "nbPullRequests": 1 - }, - { - "date": "2026-11-03T00:00:00.000Z", - "nbRepositories": 12, - "nbUsers": 3, - "nbPageViews": 99, - "nbPullRequests": 2 - }, - { - "date": "2026-11-04T00:00:00.000Z", - "nbRepositories": 0, - "nbUsers": 0, - "nbPageViews": 0, - "nbPullRequests": 0 - } - ] - }, - { - "now": "2024-02-29T12:00:00Z", - "rows": [], - "current": { - "nbRepositories": 12, - "nbUsers": 3, - "nbPageViews": 99, - "nbPullRequests": 2 - }, - "expected": [ - { - "date": "2024-02-29T00:00:00.000Z", - "nbRepositories": 12, - "nbUsers": 3, - "nbPageViews": 99, - "nbPullRequests": 2 - } - ] - }, - { - "now": "2024-02-29T12:00:00Z", - "rows": [ - { - "date": "2024-02-28T00:00:00.000Z", - "nbRepositories": 0, - "nbUsers": 0, - "nbPageViews": 0, - "nbPullRequests": 0 - } - ], - "current": { - "nbRepositories": 12, - "nbUsers": 3, - "nbPageViews": 99, - "nbPullRequests": 2 - }, - "expected": [ - { - "date": "2024-02-28T00:00:00.000Z", - "nbRepositories": 0, - "nbUsers": 0, - "nbPageViews": 0, - "nbPullRequests": 0 - }, - { - "date": "2024-02-29T00:00:00.000Z", - "nbRepositories": 12, - "nbUsers": 3, - "nbPageViews": 99, - "nbPullRequests": 2 - } - ] - }, - { - "now": "2024-02-29T12:00:00Z", - "rows": [ - { - "date": "2024-02-29T12:00:00.000Z", - "nbRepositories": 0, - "nbUsers": 0, - "nbPageViews": 0, - "nbPullRequests": 0 - } - ], - "current": { - "nbRepositories": 12, - "nbUsers": 3, - "nbPageViews": 99, - "nbPullRequests": 2 - }, - "expected": [ - { - "date": "2024-02-29T00:00:00.000Z", - "nbRepositories": 12, - "nbUsers": 3, - "nbPageViews": 99, - "nbPullRequests": 2 - } - ] - }, - { - "now": "2024-02-29T12:00:00Z", - "rows": [ - { - "date": "2024-02-29T13:00:00.000Z", - "nbRepositories": 0, - "nbUsers": 0, - "nbPageViews": 0, - "nbPullRequests": 0 - }, - { - "date": "2024-02-29T12:00:00.000Z", - "nbRepositories": 1, - "nbUsers": 1, - "nbPageViews": 1, - "nbPullRequests": 1 - } - ], - "current": { - "nbRepositories": 12, - "nbUsers": 3, - "nbPageViews": 99, - "nbPullRequests": 2 - }, - "expected": [ - { - "date": "2024-02-29T00:00:00.000Z", - "nbRepositories": 12, - "nbUsers": 3, - "nbPageViews": 99, - "nbPullRequests": 2 - }, - { - "date": "2024-02-29T12:00:00.000Z", - "nbRepositories": 1, - "nbUsers": 1, - "nbPageViews": 1, - "nbPullRequests": 1 - } - ] - }, - { - "now": "2024-02-29T12:00:00Z", - "rows": [ - { - "date": "2024-03-01T00:00:00.000Z", - "nbRepositories": 0, - "nbUsers": 0, - "nbPageViews": 0, - "nbPullRequests": 0 - }, - { - "date": "2024-02-28T00:00:00.000Z", - "nbRepositories": 1, - "nbUsers": 1, - "nbPageViews": 1, - "nbPullRequests": 1 - }, - { - "date": "2024-02-29T00:00:00.001Z", - "nbRepositories": 2, - "nbUsers": 2, - "nbPageViews": 2, - "nbPullRequests": 2 - } - ], - "current": { - "nbRepositories": 12, - "nbUsers": 3, - "nbPageViews": 99, - "nbPullRequests": 2 - }, - "expected": [ - { - "date": "2024-02-28T00:00:00.000Z", - "nbRepositories": 1, - "nbUsers": 1, - "nbPageViews": 1, - "nbPullRequests": 1 - }, - { - "date": "2024-02-29T00:00:00.000Z", - "nbRepositories": 12, - "nbUsers": 3, - "nbPageViews": 99, - "nbPullRequests": 2 - }, - { - "date": "2024-03-01T00:00:00.000Z", - "nbRepositories": 0, - "nbUsers": 0, - "nbPageViews": 0, - "nbPullRequests": 0 - } - ] - }, - { - "now": "2027-01-01T01:00:00+14:00", - "rows": [], - "current": { - "nbRepositories": 12, - "nbUsers": 3, - "nbPageViews": 99, - "nbPullRequests": 2 - }, - "expected": [ - { - "date": "2026-12-31T00:00:00.000Z", - "nbRepositories": 12, - "nbUsers": 3, - "nbPageViews": 99, - "nbPullRequests": 2 - } - ] - }, - { - "now": "2027-01-01T01:00:00+14:00", - "rows": [ - { - "date": "2026-12-30T00:00:00.000Z", - "nbRepositories": 0, - "nbUsers": 0, - "nbPageViews": 0, - "nbPullRequests": 0 - } - ], - "current": { - "nbRepositories": 12, - "nbUsers": 3, - "nbPageViews": 99, - "nbPullRequests": 2 - }, - "expected": [ - { - "date": "2026-12-30T00:00:00.000Z", - "nbRepositories": 0, - "nbUsers": 0, - "nbPageViews": 0, - "nbPullRequests": 0 - }, - { - "date": "2026-12-31T00:00:00.000Z", - "nbRepositories": 12, - "nbUsers": 3, - "nbPageViews": 99, - "nbPullRequests": 2 - } - ] - }, - { - "now": "2027-01-01T01:00:00+14:00", - "rows": [ - { - "date": "2026-12-31T12:00:00.000Z", - "nbRepositories": 0, - "nbUsers": 0, - "nbPageViews": 0, - "nbPullRequests": 0 - } - ], - "current": { - "nbRepositories": 12, - "nbUsers": 3, - "nbPageViews": 99, - "nbPullRequests": 2 - }, - "expected": [ - { - "date": "2026-12-31T00:00:00.000Z", - "nbRepositories": 12, - "nbUsers": 3, - "nbPageViews": 99, - "nbPullRequests": 2 - } - ] - }, - { - "now": "2027-01-01T01:00:00+14:00", - "rows": [ - { - "date": "2026-12-31T13:00:00.000Z", - "nbRepositories": 0, - "nbUsers": 0, - "nbPageViews": 0, - "nbPullRequests": 0 - }, - { - "date": "2026-12-31T12:00:00.000Z", - "nbRepositories": 1, - "nbUsers": 1, - "nbPageViews": 1, - "nbPullRequests": 1 - } - ], - "current": { - "nbRepositories": 12, - "nbUsers": 3, - "nbPageViews": 99, - "nbPullRequests": 2 - }, - "expected": [ - { - "date": "2026-12-31T00:00:00.000Z", - "nbRepositories": 12, - "nbUsers": 3, - "nbPageViews": 99, - "nbPullRequests": 2 - }, - { - "date": "2026-12-31T12:00:00.000Z", - "nbRepositories": 1, - "nbUsers": 1, - "nbPageViews": 1, - "nbPullRequests": 1 - } - ] - }, - { - "now": "2027-01-01T01:00:00+14:00", - "rows": [ - { - "date": "2027-01-01T00:00:00.000Z", - "nbRepositories": 0, - "nbUsers": 0, - "nbPageViews": 0, - "nbPullRequests": 0 - }, - { - "date": "2026-12-30T00:00:00.000Z", - "nbRepositories": 1, - "nbUsers": 1, - "nbPageViews": 1, - "nbPullRequests": 1 - }, - { - "date": "2026-12-31T00:00:00.001Z", - "nbRepositories": 2, - "nbUsers": 2, - "nbPageViews": 2, - "nbPullRequests": 2 - } - ], - "current": { - "nbRepositories": 12, - "nbUsers": 3, - "nbPageViews": 99, - "nbPullRequests": 2 - }, - "expected": [ - { - "date": "2026-12-30T00:00:00.000Z", - "nbRepositories": 1, - "nbUsers": 1, - "nbPageViews": 1, - "nbPullRequests": 1 - }, - { - "date": "2026-12-31T00:00:00.000Z", - "nbRepositories": 12, - "nbUsers": 3, - "nbPageViews": 99, - "nbPullRequests": 2 - }, - { - "date": "2027-01-01T00:00:00.000Z", - "nbRepositories": 0, - "nbUsers": 0, - "nbPageViews": 0, - "nbPullRequests": 0 - } - ] - } -] diff --git a/backend/internal/server/testdata/stats-window.json b/backend/internal/server/testdata/stats-window.json deleted file mode 100644 index 8007f00..0000000 --- a/backend/internal/server/testdata/stats-window.json +++ /dev/null @@ -1,120 +0,0 @@ -[ - { - "input": null, - "expected": 30 - }, - { - "input": "", - "expected": 30 - }, - { - "input": "0", - "expected": 30 - }, - { - "input": "-0", - "expected": 30 - }, - { - "input": "-1", - "expected": 1 - }, - { - "input": "-20", - "expected": 1 - }, - { - "input": "-0x10", - "expected": 1 - }, - { - "input": "-0x0", - "expected": 30 - }, - { - "input": "-+2", - "expected": 30 - }, - { - "input": "- 2", - "expected": 30 - }, - { - "input": "1", - "expected": 1 - }, - { - "input": "30", - "expected": 30 - }, - { - "input": "365", - "expected": 365 - }, - { - "input": "999", - "expected": 365 - }, - { - "input": "4.5", - "expected": 4 - }, - { - "input": "2e2", - "expected": 2 - }, - { - "input": "0x10", - "expected": 16 - }, - { - "input": "0b10", - "expected": 30 - }, - { - "input": "12suffix", - "expected": 12 - }, - { - "input": " +23 ", - "expected": 23 - }, - { - "input": "+ 23", - "expected": 30 - }, - { - "input": "Infinity", - "expected": 30 - }, - { - "input": "NaN", - "expected": 30 - }, - { - "input": [ - "7", - "30" - ], - "expected": 7 - }, - { - "input": [ - "", - "7" - ], - "expected": 30 - }, - { - "input": "-2", - "expected": 1 - }, - { - "input": "…2", - "expected": 30 - }, - { - "input": "999999999999999999999999999999999", - "expected": 365 - } -] diff --git a/backend/internal/server/testdata/token-names.json b/backend/internal/server/testdata/token-names.json deleted file mode 100644 index b992c4c..0000000 --- a/backend/internal/server/testdata/token-names.json +++ /dev/null @@ -1,173 +0,0 @@ -[ - { - "name": "case-0", - "body": {}, - "expected": "unnamed" - }, - { - "name": "case-1", - "body": { - "name": null - }, - "expected": "unnamed" - }, - { - "name": "case-2", - "body": { - "name": false - }, - "expected": "unnamed" - }, - { - "name": "case-3", - "body": { - "name": true - }, - "expected": "true" - }, - { - "name": "case-4", - "body": { - "name": 0 - }, - "expected": "unnamed" - }, - { - "name": "case-5", - "body": { - "name": 1 - }, - "expected": "1" - }, - { - "name": "case-6", - "body": { - "name": -1 - }, - "expected": "-1" - }, - { - "name": "case-7", - "body": { - "name": 1e+21 - }, - "expected": "1e+21" - }, - { - "name": "case-8", - "body": { - "name": [] - }, - "expected": "unnamed" - }, - { - "name": "case-9", - "body": { - "name": [ - null - ] - }, - "expected": "unnamed" - }, - { - "name": "case-10", - "body": { - "name": [ - "Alice", - "Bob" - ] - }, - "expected": "Alice,Bob" - }, - { - "name": "case-11", - "body": { - "name": [ - [ - 1, - null - ], - false - ] - }, - "expected": "1,,false" - }, - { - "name": "case-12", - "body": { - "name": {} - }, - "expected": "[object Object]" - }, - { - "name": "case-13", - "body": { - "name": { - "name": "ignored" - } - }, - "expected": "[object Object]" - }, - { - "name": "case-14", - "body": { - "name": { - "toString": "shadow" - } - }, - "rejected": true - }, - { - "name": "case-15", - "body": { - "name": [ - { - "toString": null - } - ] - }, - "rejected": true - }, - { - "name": "case-16", - "body": { - "name": "" - }, - "expected": "unnamed" - }, - { - "name": "case-17", - "body": { - "name": " Alice " - }, - "expected": "Alice" - }, - { - "name": "case-18", - "body": { - "name": "Alice" - }, - "expected": "Alice" - }, - { - "name": "case-19", - "body": { - "name": "…Alice…" - }, - "expected": "…Alice…" - }, - { - "name": "case-20", - "body": { - "name": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" - }, - "expected": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" - }, - { - "name": "case-21", - "body": { - "name": "éééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééé" - }, - "expected": "éééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééé" - } -] diff --git a/backend/internal/server/testdata/user-defaults.json b/backend/internal/server/testdata/user-defaults.json deleted file mode 100644 index 02b2222..0000000 --- a/backend/internal/server/testdata/user-defaults.json +++ /dev/null @@ -1,834 +0,0 @@ -{ - "cases": [ - { - "name": "case-0", - "body": {}, - "rejected": false, - "stored": {}, - "expected": { - "options": {}, - "terms": [] - } - }, - { - "name": "case-1", - "body": { - "terms": [ - "Alice", - "" - ] - }, - "rejected": false, - "stored": { - "terms": [ - "Alice", - "" - ] - }, - "expected": { - "options": {}, - "terms": [ - "Alice", - "" - ] - } - }, - { - "name": "case-2", - "body": { - "terms": [ - 1, - true, - false, - null, - 0, - 1e+21 - ] - }, - "rejected": false, - "stored": { - "terms": [ - "1", - "true", - "false", - null, - "0", - "1e+21" - ] - }, - "expected": { - "options": {}, - "terms": [ - "1", - "true", - "false", - null, - "0", - "1e+21" - ] - } - }, - { - "name": "case-3", - "body": { - "terms": "Alice" - }, - "rejected": false, - "stored": { - "terms": [ - "Alice" - ] - }, - "expected": { - "options": {}, - "terms": [ - "Alice" - ] - } - }, - { - "name": "case-4", - "body": { - "terms": null - }, - "rejected": false, - "stored": { - "terms": null - }, - "expected": { - "options": {}, - "terms": null - } - }, - { - "name": "case-5", - "body": { - "terms": [ - {} - ] - }, - "rejected": true - }, - { - "name": "case-6", - "body": { - "terms": [] - }, - "rejected": false, - "stored": { - "terms": [] - }, - "expected": { - "options": {}, - "terms": [] - } - }, - { - "name": "case-7", - "body": { - "options": {} - }, - "rejected": false, - "stored": { - "options": {} - }, - "expected": { - "options": {}, - "terms": [] - } - }, - { - "name": "case-8", - "body": { - "options": null - }, - "rejected": false, - "stored": { - "options": null - }, - "expected": { - "options": null, - "terms": [] - } - }, - { - "name": "case-9", - "body": { - "unknown": "discard", - "options": { - "unknown": true, - "expirationDate": "2030-01-01", - "pageSource": { - "branch": "main" - } - } - }, - "rejected": false, - "stored": { - "options": {} - }, - "expected": { - "options": {}, - "terms": [] - } - }, - { - "name": "case-10", - "body": { - "options": { - "update": true, - "image": true, - "pdf": true, - "notebook": true, - "link": true - } - }, - "rejected": false, - "stored": { - "options": { - "update": true, - "image": true, - "pdf": true, - "notebook": true, - "link": true - } - }, - "expected": { - "options": { - "update": true, - "image": true, - "pdf": true, - "notebook": true, - "link": true - }, - "terms": [] - } - }, - { - "name": "case-11", - "body": { - "options": { - "update": false, - "image": false, - "pdf": false, - "notebook": false, - "link": false - } - }, - "rejected": false, - "stored": { - "options": { - "update": false, - "image": false, - "pdf": false, - "notebook": false, - "link": false - } - }, - "expected": { - "options": { - "update": false, - "image": false, - "pdf": false, - "notebook": false, - "link": false - }, - "terms": [] - } - }, - { - "name": "case-12", - "body": { - "options": { - "update": null, - "image": null, - "pdf": null, - "notebook": null, - "link": null - } - }, - "rejected": false, - "stored": { - "options": { - "update": null, - "image": null, - "pdf": null, - "notebook": null, - "link": null - } - }, - "expected": { - "options": { - "update": null, - "image": null, - "pdf": null, - "notebook": null, - "link": null - }, - "terms": [] - } - }, - { - "name": "case-13", - "body": { - "options": { - "update": 0, - "image": 0, - "pdf": 0, - "notebook": 0, - "link": 0 - } - }, - "rejected": false, - "stored": { - "options": { - "update": false, - "image": false, - "pdf": false, - "notebook": false, - "link": false - } - }, - "expected": { - "options": { - "update": false, - "image": false, - "pdf": false, - "notebook": false, - "link": false - }, - "terms": [] - } - }, - { - "name": "case-14", - "body": { - "options": { - "update": 1, - "image": 1, - "pdf": 1, - "notebook": 1, - "link": 1 - } - }, - "rejected": false, - "stored": { - "options": { - "update": true, - "image": true, - "pdf": true, - "notebook": true, - "link": true - } - }, - "expected": { - "options": { - "update": true, - "image": true, - "pdf": true, - "notebook": true, - "link": true - }, - "terms": [] - } - }, - { - "name": "case-15", - "body": { - "options": { - "update": "0", - "image": "0", - "pdf": "0", - "notebook": "0", - "link": "0" - } - }, - "rejected": false, - "stored": { - "options": { - "update": false, - "image": false, - "pdf": false, - "notebook": false, - "link": false - } - }, - "expected": { - "options": { - "update": false, - "image": false, - "pdf": false, - "notebook": false, - "link": false - }, - "terms": [] - } - }, - { - "name": "case-16", - "body": { - "options": { - "update": "1", - "image": "1", - "pdf": "1", - "notebook": "1", - "link": "1" - } - }, - "rejected": false, - "stored": { - "options": { - "update": true, - "image": true, - "pdf": true, - "notebook": true, - "link": true - } - }, - "expected": { - "options": { - "update": true, - "image": true, - "pdf": true, - "notebook": true, - "link": true - }, - "terms": [] - } - }, - { - "name": "case-17", - "body": { - "options": { - "update": "true", - "image": "true", - "pdf": "true", - "notebook": "true", - "link": "true" - } - }, - "rejected": false, - "stored": { - "options": { - "update": true, - "image": true, - "pdf": true, - "notebook": true, - "link": true - } - }, - "expected": { - "options": { - "update": true, - "image": true, - "pdf": true, - "notebook": true, - "link": true - }, - "terms": [] - } - }, - { - "name": "case-18", - "body": { - "options": { - "update": "false", - "image": "false", - "pdf": "false", - "notebook": "false", - "link": "false" - } - }, - "rejected": false, - "stored": { - "options": { - "update": false, - "image": false, - "pdf": false, - "notebook": false, - "link": false - } - }, - "expected": { - "options": { - "update": false, - "image": false, - "pdf": false, - "notebook": false, - "link": false - }, - "terms": [] - } - }, - { - "name": "case-19", - "body": { - "options": { - "update": "yes", - "image": "yes", - "pdf": "yes", - "notebook": "yes", - "link": "yes" - } - }, - "rejected": false, - "stored": { - "options": { - "update": true, - "image": true, - "pdf": true, - "notebook": true, - "link": true - } - }, - "expected": { - "options": { - "update": true, - "image": true, - "pdf": true, - "notebook": true, - "link": true - }, - "terms": [] - } - }, - { - "name": "case-20", - "body": { - "options": { - "update": "no", - "image": "no", - "pdf": "no", - "notebook": "no", - "link": "no" - } - }, - "rejected": false, - "stored": { - "options": { - "update": false, - "image": false, - "pdf": false, - "notebook": false, - "link": false - } - }, - "expected": { - "options": { - "update": false, - "image": false, - "pdf": false, - "notebook": false, - "link": false - }, - "terms": [] - } - }, - { - "name": "case-21", - "body": { - "options": { - "update": "", - "image": "", - "pdf": "", - "notebook": "", - "link": "" - } - }, - "rejected": true - }, - { - "name": "case-22", - "body": { - "options": { - "update": 2, - "image": 2, - "pdf": 2, - "notebook": 2, - "link": 2 - } - }, - "rejected": true - }, - { - "name": "case-23", - "body": { - "options": { - "update": [], - "image": [], - "pdf": [], - "notebook": [], - "link": [] - } - }, - "rejected": true - }, - { - "name": "case-24", - "body": { - "options": { - "update": {}, - "image": {}, - "pdf": {}, - "notebook": {}, - "link": {} - } - }, - "rejected": true - }, - { - "name": "case-25", - "body": { - "options": { - "page": null, - "expirationMode": null - } - }, - "rejected": false, - "stored": { - "options": { - "page": null, - "expirationMode": null - } - }, - "expected": { - "options": { - "page": null, - "expirationMode": null - }, - "terms": [] - } - }, - { - "name": "case-26", - "body": { - "options": { - "page": true, - "expirationMode": true - } - }, - "rejected": false, - "stored": { - "options": { - "page": "true", - "expirationMode": "true" - } - }, - "expected": { - "options": { - "page": "true", - "expirationMode": "true" - }, - "terms": [] - } - }, - { - "name": "case-27", - "body": { - "options": { - "page": false, - "expirationMode": false - } - }, - "rejected": false, - "stored": { - "options": { - "page": "false", - "expirationMode": "false" - } - }, - "expected": { - "options": { - "page": "false", - "expirationMode": "false" - }, - "terms": [] - } - }, - { - "name": "case-28", - "body": { - "options": { - "page": 0, - "expirationMode": 0 - } - }, - "rejected": false, - "stored": { - "options": { - "page": "0", - "expirationMode": "0" - } - }, - "expected": { - "options": { - "page": "0", - "expirationMode": "0" - }, - "terms": [] - } - }, - { - "name": "case-29", - "body": { - "options": { - "page": "docs", - "expirationMode": "docs" - } - }, - "rejected": false, - "stored": { - "options": { - "page": "docs", - "expirationMode": "docs" - } - }, - "expected": { - "options": { - "page": "docs", - "expirationMode": "docs" - }, - "terms": [] - } - }, - { - "name": "case-30", - "body": { - "options": { - "page": {}, - "expirationMode": {} - } - }, - "rejected": true - }, - { - "name": "case-31", - "body": { - "options": { - "page": [], - "expirationMode": [] - } - }, - "rejected": true - }, - { - "name": "case-32", - "body": { - "options": false - }, - "rejected": false, - "stored": { - "options": false - }, - "expected": { - "options": false, - "terms": [] - } - }, - { - "name": "case-33", - "body": { - "options": true - }, - "rejected": false, - "stored": { - "options": true - }, - "expected": { - "options": true, - "terms": [] - } - }, - { - "name": "case-34", - "body": { - "options": 0 - }, - "rejected": false, - "stored": { - "options": 0 - }, - "expected": { - "options": 0, - "terms": [] - } - }, - { - "name": "case-35", - "body": { - "options": 1 - }, - "rejected": false, - "stored": { - "options": 1 - }, - "expected": { - "options": 1, - "terms": [] - } - }, - { - "name": "case-36", - "body": { - "options": "bad" - }, - "rejected": false, - "stored": { - "options": "bad" - }, - "expected": { - "options": "bad", - "terms": [] - } - }, - { - "name": "case-37", - "body": { - "options": [] - }, - "rejected": false, - "stored": { - "options": [] - }, - "expected": { - "options": [], - "terms": [] - } - } - ], - "initial": [ - { - "user": {}, - "expected": { - "options": {}, - "terms": [] - } - }, - { - "user": { - "default": null - }, - "expected": null - }, - { - "user": { - "default": {} - }, - "expected": { - "options": {}, - "terms": [] - } - }, - { - "user": { - "default": { - "options": {} - } - }, - "expected": { - "options": {}, - "terms": [] - } - } - ] -} diff --git a/backend/internal/server/testdata/user-membership.json b/backend/internal/server/testdata/user-membership.json deleted file mode 100644 index f64bb3c..0000000 --- a/backend/internal/server/testdata/user-membership.json +++ /dev/null @@ -1,273 +0,0 @@ -[ - { - "user": { - "_id": "local-owner", - "externalIDs": {} - }, - "expected": { - "$or": [ - { - "owner": "local-owner" - } - ] - } - }, - { - "user": { - "_id": "local-owner", - "externalIDs": { - "github": null - } - }, - "expected": { - "$or": [ - { - "owner": "local-owner" - } - ] - } - }, - { - "user": { - "_id": "local-owner", - "externalIDs": { - "github": "" - } - }, - "expected": { - "$or": [ - { - "owner": "local-owner" - } - ] - } - }, - { - "user": { - "_id": "local-owner", - "externalIDs": { - "github": "12345" - } - }, - "expected": { - "$or": [ - { - "owner": "local-owner" - }, - { - "coauthors.githubId": "12345" - } - ] - } - }, - { - "user": { - "_id": "local-owner", - "username": "", - "externalIDs": {} - }, - "expected": { - "$or": [ - { - "owner": "local-owner" - } - ] - } - }, - { - "user": { - "_id": "local-owner", - "username": "", - "externalIDs": { - "github": null - } - }, - "expected": { - "$or": [ - { - "owner": "local-owner" - } - ] - } - }, - { - "user": { - "_id": "local-owner", - "username": "", - "externalIDs": { - "github": "" - } - }, - "expected": { - "$or": [ - { - "owner": "local-owner" - } - ] - } - }, - { - "user": { - "_id": "local-owner", - "username": "", - "externalIDs": { - "github": "12345" - } - }, - "expected": { - "$or": [ - { - "owner": "local-owner" - }, - { - "coauthors.githubId": "12345" - } - ] - } - }, - { - "user": { - "_id": "local-owner", - "username": "alice", - "externalIDs": {} - }, - "expected": { - "$or": [ - { - "owner": "local-owner" - }, - { - "coauthors": { - "$elemMatch": { - "username": "alice", - "$or": [ - { - "githubId": { - "$exists": false - } - }, - { - "githubId": null - }, - { - "githubId": "" - } - ] - } - } - } - ] - } - }, - { - "user": { - "_id": "local-owner", - "username": "alice", - "externalIDs": { - "github": null - } - }, - "expected": { - "$or": [ - { - "owner": "local-owner" - }, - { - "coauthors": { - "$elemMatch": { - "username": "alice", - "$or": [ - { - "githubId": { - "$exists": false - } - }, - { - "githubId": null - }, - { - "githubId": "" - } - ] - } - } - } - ] - } - }, - { - "user": { - "_id": "local-owner", - "username": "alice", - "externalIDs": { - "github": "" - } - }, - "expected": { - "$or": [ - { - "owner": "local-owner" - }, - { - "coauthors": { - "$elemMatch": { - "username": "alice", - "$or": [ - { - "githubId": { - "$exists": false - } - }, - { - "githubId": null - }, - { - "githubId": "" - } - ] - } - } - } - ] - } - }, - { - "user": { - "_id": "local-owner", - "username": "alice", - "externalIDs": { - "github": "12345" - } - }, - "expected": { - "$or": [ - { - "owner": "local-owner" - }, - { - "coauthors.githubId": "12345" - }, - { - "coauthors": { - "$elemMatch": { - "username": "alice", - "$or": [ - { - "githubId": { - "$exists": false - } - }, - { - "githubId": null - }, - { - "githubId": "" - } - ] - } - } - } - ] - } - } -] diff --git a/backend/internal/server/testdata/user-search.json b/backend/internal/server/testdata/user-search.json deleted file mode 100644 index c9c30b3..0000000 --- a/backend/internal/server/testdata/user-search.json +++ /dev/null @@ -1,127 +0,0 @@ -[ - { - "query": "", - "tokenCalls": 0, - "response": [] - }, - { - "query": "q=", - "tokenCalls": 0, - "response": [] - }, - { - "query": "q=a", - "tokenCalls": 0, - "response": [] - }, - { - "query": "q=ab", - "tokenCalls": 1, - "upstreamQuery": "ab", - "response": [] - }, - { - "query": "q=%F0%9F%98%80", - "tokenCalls": 1, - "upstreamQuery": "😀", - "response": [] - }, - { - "query": "q=%C3%A9", - "tokenCalls": 0, - "response": [] - }, - { - "query": "q=++", - "tokenCalls": 1, - "upstreamQuery": " ", - "response": [] - }, - { - "query": "q=a%2Bb", - "tokenCalls": 1, - "upstreamQuery": "a b", - "response": [] - }, - { - "query": "q=a%26b", - "tokenCalls": 1, - "upstreamQuery": "a&b", - "response": [] - }, - { - "query": "q[]=ab", - "tokenCalls": 0, - "response": [] - }, - { - "query": "q[]=a&q[]=b", - "tokenCalls": 1, - "error": true - }, - { - "query": "q=ab&q=cd", - "tokenCalls": 1, - "error": true - }, - { - "query": "q[1]=ab", - "tokenCalls": 0, - "response": [] - }, - { - "query": "q[0]=a&q[2]=b", - "tokenCalls": 1, - "error": true - }, - { - "query": "q[x]=ab", - "tokenCalls": 1, - "error": true - }, - { - "query": "q[length]=0", - "tokenCalls": 0, - "response": [] - }, - { - "query": "q[length]=1", - "tokenCalls": 0, - "response": [] - }, - { - "query": "q[length]=2", - "tokenCalls": 1, - "error": true - }, - { - "query": "q[length]=abc", - "tokenCalls": 1, - "error": true - }, - { - "query": "q[length][]=1", - "tokenCalls": 0, - "response": [] - }, - { - "query": "q[length][toString]=1", - "tokenCalls": 0, - "error": true - }, - { - "query": "q[toString]=ab", - "tokenCalls": 1, - "error": true - }, - { - "query": "q[21]=ab", - "tokenCalls": 1, - "error": true - }, - { - "query": "q=ab&q[x]=cd", - "tokenCalls": 1, - "error": true - } -] diff --git a/backend/internal/server/testdata/validation.json b/backend/internal/server/testdata/validation.json deleted file mode 100644 index b623fd3..0000000 --- a/backend/internal/server/testdata/validation.json +++ /dev/null @@ -1,1731 +0,0 @@ -[ - { - "name": "repo/valid", - "kind": "repo", - "body": { - "repoId": "example", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": 42 - }, - "options": {}, - "terms": [] - }, - "expected": null - }, - { - "name": "repo/id/\"\"", - "kind": "repo", - "body": { - "repoId": "", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": 42 - }, - "options": {}, - "terms": [] - }, - "expected": { - "code": "invalid_repoId", - "status": 400 - } - }, - { - "name": "repo/id/\"ab\"", - "kind": "repo", - "body": { - "repoId": "ab", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": 42 - }, - "options": {}, - "terms": [] - }, - "expected": { - "code": "invalid_repoId", - "status": 400 - } - }, - { - "name": "repo/id/\"bad/name\"", - "kind": "repo", - "body": { - "repoId": "bad/name", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": 42 - }, - "options": {}, - "terms": [] - }, - "expected": { - "code": "invalid_repoId", - "status": 400 - } - }, - { - "name": "repo/id/\"a b\"", - "kind": "repo", - "body": { - "repoId": "a b", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": 42 - }, - "options": {}, - "terms": [] - }, - "expected": { - "code": "invalid_repoId", - "status": 400 - } - }, - { - "name": "repo/id/\"ééé\"", - "kind": "repo", - "body": { - "repoId": "ééé", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": 42 - }, - "options": {}, - "terms": [] - }, - "expected": { - "code": "invalid_repoId", - "status": 400 - } - }, - { - "name": "repo/id/\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"", - "kind": "repo", - "body": { - "repoId": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": 42 - }, - "options": {}, - "terms": [] - }, - "expected": null - }, - { - "name": "repo/source/branch/null", - "kind": "repo", - "body": { - "repoId": "example", - "source": { - "branch": null, - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": 42 - }, - "options": {}, - "terms": [] - }, - "expected": { - "code": "branch_not_specified", - "status": 400 - } - }, - { - "name": "repo/source/branch/\"\"", - "kind": "repo", - "body": { - "repoId": "example", - "source": { - "branch": "", - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": 42 - }, - "options": {}, - "terms": [] - }, - "expected": { - "code": "branch_not_specified", - "status": 400 - } - }, - { - "name": "repo/source/branch/false", - "kind": "repo", - "body": { - "repoId": "example", - "source": { - "branch": false, - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": 42 - }, - "options": {}, - "terms": [] - }, - "expected": { - "code": "branch_not_specified", - "status": 400 - } - }, - { - "name": "repo/source/branch/0", - "kind": "repo", - "body": { - "repoId": "example", - "source": { - "branch": 0, - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": 42 - }, - "options": {}, - "terms": [] - }, - "expected": { - "code": "branch_not_specified", - "status": 400 - } - }, - { - "name": "repo/source/commit/null", - "kind": "repo", - "body": { - "repoId": "example", - "source": { - "branch": "main", - "commit": null, - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": 42 - }, - "options": {}, - "terms": [] - }, - "expected": { - "code": "commit_not_specified", - "status": 400 - } - }, - { - "name": "repo/source/commit/\"\"", - "kind": "repo", - "body": { - "repoId": "example", - "source": { - "branch": "main", - "commit": "", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": 42 - }, - "options": {}, - "terms": [] - }, - "expected": { - "code": "commit_not_specified", - "status": 400 - } - }, - { - "name": "repo/source/commit/false", - "kind": "repo", - "body": { - "repoId": "example", - "source": { - "branch": "main", - "commit": false, - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": 42 - }, - "options": {}, - "terms": [] - }, - "expected": { - "code": "commit_not_specified", - "status": 400 - } - }, - { - "name": "repo/source/commit/0", - "kind": "repo", - "body": { - "repoId": "example", - "source": { - "branch": "main", - "commit": 0, - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": 42 - }, - "options": {}, - "terms": [] - }, - "expected": { - "code": "commit_not_specified", - "status": 400 - } - }, - { - "name": "repo/options/null", - "kind": "repo", - "body": { - "repoId": "example", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": 42 - }, - "options": null, - "terms": [] - }, - "expected": { - "code": "options_not_provided", - "status": 400 - } - }, - { - "name": "repo/options/false", - "kind": "repo", - "body": { - "repoId": "example", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": 42 - }, - "options": false, - "terms": [] - }, - "expected": { - "code": "options_not_provided", - "status": 400 - } - }, - { - "name": "repo/options/\"\"", - "kind": "repo", - "body": { - "repoId": "example", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": 42 - }, - "options": "", - "terms": [] - }, - "expected": { - "code": "options_not_provided", - "status": 400 - } - }, - { - "name": "repo/options/0", - "kind": "repo", - "body": { - "repoId": "example", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": 42 - }, - "options": 0, - "terms": [] - }, - "expected": { - "code": "options_not_provided", - "status": 400 - } - }, - { - "name": "repo/terms/null", - "kind": "repo", - "body": { - "repoId": "example", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": 42 - }, - "options": {}, - "terms": null - }, - "expected": { - "code": "invalid_terms_format", - "status": 400 - } - }, - { - "name": "repo/terms/\"terms\"", - "kind": "repo", - "body": { - "repoId": "example", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": 42 - }, - "options": {}, - "terms": "terms" - }, - "expected": { - "code": "invalid_terms_format", - "status": 400 - } - }, - { - "name": "repo/terms/{}", - "kind": "repo", - "body": { - "repoId": "example", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": 42 - }, - "options": {}, - "terms": {} - }, - "expected": { - "code": "invalid_terms_format", - "status": 400 - } - }, - { - "name": "repo/terms/42", - "kind": "repo", - "body": { - "repoId": "example", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": 42 - }, - "options": {}, - "terms": 42 - }, - "expected": { - "code": "invalid_terms_format", - "status": 400 - } - }, - { - "name": "repo/precedence/source-options-terms", - "kind": "repo", - "body": { - "repoId": "example", - "source": {}, - "options": null, - "terms": null - }, - "expected": { - "code": "branch_not_specified", - "status": 400 - } - }, - { - "name": "repo/precedence/options-terms", - "kind": "repo", - "body": { - "repoId": "example", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": 42 - }, - "options": null, - "terms": null - }, - "expected": { - "code": "options_not_provided", - "status": 400 - } - }, - { - "name": "repo/missing-source", - "kind": "repo", - "body": { - "repoId": "example", - "options": {}, - "terms": [] - }, - "expected": { - "code": "source_not_provided", - "status": 400 - } - }, - { - "name": "repo/commit/\"xyz\"", - "kind": "repo", - "body": { - "repoId": "example", - "source": { - "branch": "main", - "commit": "xyz", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": 42 - }, - "options": {}, - "terms": [] - }, - "expected": { - "code": "invalid_commit_format", - "status": 400 - } - }, - { - "name": "repo/commit/\"a-b\"", - "kind": "repo", - "body": { - "repoId": "example", - "source": { - "branch": "main", - "commit": "a-b", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": 42 - }, - "options": {}, - "terms": [] - }, - "expected": { - "code": "invalid_commit_format", - "status": 400 - } - }, - { - "name": "repo/commit/\"abc\\n\"", - "kind": "repo", - "body": { - "repoId": "example", - "source": { - "branch": "main", - "commit": "abc\n", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": 42 - }, - "options": {}, - "terms": [] - }, - "expected": { - "code": "invalid_commit_format", - "status": 400 - } - }, - { - "name": "repo/commit/\"123\"", - "kind": "repo", - "body": { - "repoId": "example", - "source": { - "branch": "main", - "commit": "123", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": 42 - }, - "options": {}, - "terms": [] - }, - "expected": null - }, - { - "name": "repo/precedence/terms-commit", - "kind": "repo", - "body": { - "repoId": "example", - "source": { - "branch": "main", - "commit": "xyz", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": 42 - }, - "options": {}, - "terms": null - }, - "expected": { - "code": "invalid_terms_format", - "status": 400 - } - }, - { - "name": "gist/valid", - "kind": "gist", - "body": { - "gistId": "example", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": 42 - }, - "options": {}, - "terms": [] - }, - "expected": null - }, - { - "name": "gist/id/\"\"", - "kind": "gist", - "body": { - "gistId": "", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": 42 - }, - "options": {}, - "terms": [] - }, - "expected": { - "code": "invalid_gistId", - "status": 400 - } - }, - { - "name": "gist/id/\"ab\"", - "kind": "gist", - "body": { - "gistId": "ab", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": 42 - }, - "options": {}, - "terms": [] - }, - "expected": { - "code": "invalid_gistId", - "status": 400 - } - }, - { - "name": "gist/id/\"bad/name\"", - "kind": "gist", - "body": { - "gistId": "bad/name", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": 42 - }, - "options": {}, - "terms": [] - }, - "expected": { - "code": "invalid_gistId", - "status": 400 - } - }, - { - "name": "gist/id/\"a b\"", - "kind": "gist", - "body": { - "gistId": "a b", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": 42 - }, - "options": {}, - "terms": [] - }, - "expected": { - "code": "invalid_gistId", - "status": 400 - } - }, - { - "name": "gist/id/\"ééé\"", - "kind": "gist", - "body": { - "gistId": "ééé", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": 42 - }, - "options": {}, - "terms": [] - }, - "expected": { - "code": "invalid_gistId", - "status": 400 - } - }, - { - "name": "gist/id/\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"", - "kind": "gist", - "body": { - "gistId": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": 42 - }, - "options": {}, - "terms": [] - }, - "expected": null - }, - { - "name": "gist/source/gistId/null", - "kind": "gist", - "body": { - "gistId": "example", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": null, - "repositoryFullName": "owner/repo", - "pullRequestId": 42 - }, - "options": {}, - "terms": [] - }, - "expected": { - "code": "gistId_not_specified", - "status": 400 - } - }, - { - "name": "gist/source/gistId/\"\"", - "kind": "gist", - "body": { - "gistId": "example", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": "", - "repositoryFullName": "owner/repo", - "pullRequestId": 42 - }, - "options": {}, - "terms": [] - }, - "expected": { - "code": "gistId_not_specified", - "status": 400 - } - }, - { - "name": "gist/source/gistId/false", - "kind": "gist", - "body": { - "gistId": "example", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": false, - "repositoryFullName": "owner/repo", - "pullRequestId": 42 - }, - "options": {}, - "terms": [] - }, - "expected": { - "code": "gistId_not_specified", - "status": 400 - } - }, - { - "name": "gist/source/gistId/0", - "kind": "gist", - "body": { - "gistId": "example", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": 0, - "repositoryFullName": "owner/repo", - "pullRequestId": 42 - }, - "options": {}, - "terms": [] - }, - "expected": { - "code": "gistId_not_specified", - "status": 400 - } - }, - { - "name": "gist/options/null", - "kind": "gist", - "body": { - "gistId": "example", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": 42 - }, - "options": null, - "terms": [] - }, - "expected": { - "code": "options_not_provided", - "status": 400 - } - }, - { - "name": "gist/options/false", - "kind": "gist", - "body": { - "gistId": "example", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": 42 - }, - "options": false, - "terms": [] - }, - "expected": { - "code": "options_not_provided", - "status": 400 - } - }, - { - "name": "gist/options/\"\"", - "kind": "gist", - "body": { - "gistId": "example", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": 42 - }, - "options": "", - "terms": [] - }, - "expected": { - "code": "options_not_provided", - "status": 400 - } - }, - { - "name": "gist/options/0", - "kind": "gist", - "body": { - "gistId": "example", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": 42 - }, - "options": 0, - "terms": [] - }, - "expected": { - "code": "options_not_provided", - "status": 400 - } - }, - { - "name": "gist/terms/null", - "kind": "gist", - "body": { - "gistId": "example", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": 42 - }, - "options": {}, - "terms": null - }, - "expected": { - "code": "invalid_terms_format", - "status": 400 - } - }, - { - "name": "gist/terms/\"terms\"", - "kind": "gist", - "body": { - "gistId": "example", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": 42 - }, - "options": {}, - "terms": "terms" - }, - "expected": { - "code": "invalid_terms_format", - "status": 400 - } - }, - { - "name": "gist/terms/{}", - "kind": "gist", - "body": { - "gistId": "example", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": 42 - }, - "options": {}, - "terms": {} - }, - "expected": { - "code": "invalid_terms_format", - "status": 400 - } - }, - { - "name": "gist/terms/42", - "kind": "gist", - "body": { - "gistId": "example", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": 42 - }, - "options": {}, - "terms": 42 - }, - "expected": { - "code": "invalid_terms_format", - "status": 400 - } - }, - { - "name": "gist/precedence/source-options-terms", - "kind": "gist", - "body": { - "gistId": "example", - "source": {}, - "options": null, - "terms": null - }, - "expected": { - "code": "gistId_not_specified", - "status": 400 - } - }, - { - "name": "gist/precedence/options-terms", - "kind": "gist", - "body": { - "gistId": "example", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": 42 - }, - "options": null, - "terms": null - }, - "expected": { - "code": "options_not_provided", - "status": 400 - } - }, - { - "name": "gist/missing-source", - "kind": "gist", - "body": { - "gistId": "example", - "options": {}, - "terms": [] - }, - "expected": { - "code": "gistId_not_specified", - "status": 400 - } - }, - { - "name": "pr/valid", - "kind": "pr", - "body": { - "pullRequestId": "example", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": 42 - }, - "options": {}, - "terms": [] - }, - "expected": null - }, - { - "name": "pr/id/\"\"", - "kind": "pr", - "body": { - "pullRequestId": "", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": 42 - }, - "options": {}, - "terms": [] - }, - "expected": { - "code": "invalid_pullRequestId", - "status": 400 - } - }, - { - "name": "pr/id/\"ab\"", - "kind": "pr", - "body": { - "pullRequestId": "ab", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": 42 - }, - "options": {}, - "terms": [] - }, - "expected": { - "code": "invalid_pullRequestId", - "status": 400 - } - }, - { - "name": "pr/id/\"bad/name\"", - "kind": "pr", - "body": { - "pullRequestId": "bad/name", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": 42 - }, - "options": {}, - "terms": [] - }, - "expected": { - "code": "invalid_pullRequestId", - "status": 400 - } - }, - { - "name": "pr/id/\"a b\"", - "kind": "pr", - "body": { - "pullRequestId": "a b", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": 42 - }, - "options": {}, - "terms": [] - }, - "expected": { - "code": "invalid_pullRequestId", - "status": 400 - } - }, - { - "name": "pr/id/\"ééé\"", - "kind": "pr", - "body": { - "pullRequestId": "ééé", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": 42 - }, - "options": {}, - "terms": [] - }, - "expected": { - "code": "invalid_pullRequestId", - "status": 400 - } - }, - { - "name": "pr/id/\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"", - "kind": "pr", - "body": { - "pullRequestId": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": 42 - }, - "options": {}, - "terms": [] - }, - "expected": null - }, - { - "name": "pr/source/repositoryFullName/null", - "kind": "pr", - "body": { - "pullRequestId": "example", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": null, - "pullRequestId": 42 - }, - "options": {}, - "terms": [] - }, - "expected": { - "code": "repository_not_specified", - "status": 400 - } - }, - { - "name": "pr/source/repositoryFullName/\"\"", - "kind": "pr", - "body": { - "pullRequestId": "example", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": "", - "pullRequestId": 42 - }, - "options": {}, - "terms": [] - }, - "expected": { - "code": "repository_not_specified", - "status": 400 - } - }, - { - "name": "pr/source/repositoryFullName/false", - "kind": "pr", - "body": { - "pullRequestId": "example", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": false, - "pullRequestId": 42 - }, - "options": {}, - "terms": [] - }, - "expected": { - "code": "repository_not_specified", - "status": 400 - } - }, - { - "name": "pr/source/repositoryFullName/0", - "kind": "pr", - "body": { - "pullRequestId": "example", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": 0, - "pullRequestId": 42 - }, - "options": {}, - "terms": [] - }, - "expected": { - "code": "repository_not_specified", - "status": 400 - } - }, - { - "name": "pr/source/pullRequestId/null", - "kind": "pr", - "body": { - "pullRequestId": "example", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": null - }, - "options": {}, - "terms": [] - }, - "expected": { - "code": "pullRequestId_not_specified", - "status": 400 - } - }, - { - "name": "pr/source/pullRequestId/\"\"", - "kind": "pr", - "body": { - "pullRequestId": "example", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": "" - }, - "options": {}, - "terms": [] - }, - "expected": { - "code": "pullRequestId_not_specified", - "status": 400 - } - }, - { - "name": "pr/source/pullRequestId/false", - "kind": "pr", - "body": { - "pullRequestId": "example", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": false - }, - "options": {}, - "terms": [] - }, - "expected": { - "code": "pullRequestId_not_specified", - "status": 400 - } - }, - { - "name": "pr/source/pullRequestId/0", - "kind": "pr", - "body": { - "pullRequestId": "example", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": 0 - }, - "options": {}, - "terms": [] - }, - "expected": { - "code": "pullRequestId_not_specified", - "status": 400 - } - }, - { - "name": "pr/options/null", - "kind": "pr", - "body": { - "pullRequestId": "example", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": 42 - }, - "options": null, - "terms": [] - }, - "expected": { - "code": "options_not_provided", - "status": 400 - } - }, - { - "name": "pr/options/false", - "kind": "pr", - "body": { - "pullRequestId": "example", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": 42 - }, - "options": false, - "terms": [] - }, - "expected": { - "code": "options_not_provided", - "status": 400 - } - }, - { - "name": "pr/options/\"\"", - "kind": "pr", - "body": { - "pullRequestId": "example", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": 42 - }, - "options": "", - "terms": [] - }, - "expected": { - "code": "options_not_provided", - "status": 400 - } - }, - { - "name": "pr/options/0", - "kind": "pr", - "body": { - "pullRequestId": "example", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": 42 - }, - "options": 0, - "terms": [] - }, - "expected": { - "code": "options_not_provided", - "status": 400 - } - }, - { - "name": "pr/terms/null", - "kind": "pr", - "body": { - "pullRequestId": "example", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": 42 - }, - "options": {}, - "terms": null - }, - "expected": { - "code": "invalid_terms_format", - "status": 400 - } - }, - { - "name": "pr/terms/\"terms\"", - "kind": "pr", - "body": { - "pullRequestId": "example", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": 42 - }, - "options": {}, - "terms": "terms" - }, - "expected": { - "code": "invalid_terms_format", - "status": 400 - } - }, - { - "name": "pr/terms/{}", - "kind": "pr", - "body": { - "pullRequestId": "example", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": 42 - }, - "options": {}, - "terms": {} - }, - "expected": { - "code": "invalid_terms_format", - "status": 400 - } - }, - { - "name": "pr/terms/42", - "kind": "pr", - "body": { - "pullRequestId": "example", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": 42 - }, - "options": {}, - "terms": 42 - }, - "expected": { - "code": "invalid_terms_format", - "status": 400 - } - }, - { - "name": "pr/precedence/source-options-terms", - "kind": "pr", - "body": { - "pullRequestId": "example", - "source": {}, - "options": null, - "terms": null - }, - "expected": { - "code": "repository_not_specified", - "status": 400 - } - }, - { - "name": "pr/precedence/options-terms", - "kind": "pr", - "body": { - "pullRequestId": "example", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": 42 - }, - "options": null, - "terms": null - }, - "expected": { - "code": "options_not_provided", - "status": 400 - } - }, - { - "name": "pr/number/1.5", - "kind": "pr", - "body": { - "pullRequestId": "example", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": 1.5 - }, - "options": {}, - "terms": [] - }, - "expected": { - "code": "pullRequestId_is_not_a_number", - "status": 400 - } - }, - { - "name": "pr/number/100000000000000000000", - "kind": "pr", - "body": { - "pullRequestId": "example", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": 100000000000000000000 - }, - "options": {}, - "terms": [] - }, - "expected": null - }, - { - "name": "pr/number/1e+21", - "kind": "pr", - "body": { - "pullRequestId": "example", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": 1e+21 - }, - "options": {}, - "terms": [] - }, - "expected": { - "code": "pullRequestId_is_not_a_number", - "status": 400 - } - }, - { - "name": "pr/number/-1e+21", - "kind": "pr", - "body": { - "pullRequestId": "example", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": -1e+21 - }, - "options": {}, - "terms": [] - }, - "expected": { - "code": "pullRequestId_is_not_a_number", - "status": 400 - } - }, - { - "name": "pr/number/\"1.0\"", - "kind": "pr", - "body": { - "pullRequestId": "example", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": "1.0" - }, - "options": {}, - "terms": [] - }, - "expected": null - }, - { - "name": "pr/number/\"1e3\"", - "kind": "pr", - "body": { - "pullRequestId": "example", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": "1e3" - }, - "options": {}, - "terms": [] - }, - "expected": { - "code": "pullRequestId_is_not_a_number", - "status": 400 - } - }, - { - "name": "pr/number/\" 42 \"", - "kind": "pr", - "body": { - "pullRequestId": "example", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": " 42 " - }, - "options": {}, - "terms": [] - }, - "expected": null - }, - { - "name": "pr/number/\"42abc\"", - "kind": "pr", - "body": { - "pullRequestId": "example", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": "42abc" - }, - "options": {}, - "terms": [] - }, - "expected": { - "code": "pullRequestId_is_not_a_number", - "status": 400 - } - }, - { - "name": "pr/number/\"0x10\"", - "kind": "pr", - "body": { - "pullRequestId": "example", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": "0x10" - }, - "options": {}, - "terms": [] - }, - "expected": null - }, - { - "name": "pr/number/true", - "kind": "pr", - "body": { - "pullRequestId": "example", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": true - }, - "options": {}, - "terms": [] - }, - "expected": { - "code": "pullRequestId_is_not_a_number", - "status": 400 - } - }, - { - "name": "pr/number/\"0\"", - "kind": "pr", - "body": { - "pullRequestId": "example", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": "0" - }, - "options": {}, - "terms": [] - }, - "expected": null - }, - { - "name": "pr/number/-1", - "kind": "pr", - "body": { - "pullRequestId": "example", - "source": { - "branch": "main", - "commit": "abc123", - "gistId": "snippet", - "repositoryFullName": "owner/repo", - "pullRequestId": -1 - }, - "options": {}, - "terms": [] - }, - "expected": null - } -] diff --git a/backend/internal/server/testdata/webhook-http.json b/backend/internal/server/testdata/webhook-http.json deleted file mode 100644 index 04e8d5a..0000000 --- a/backend/internal/server/testdata/webhook-http.json +++ /dev/null @@ -1,663 +0,0 @@ -[ - { - "name": "ping-0", - "event": "ping", - "body": "{}", - "contentType": "application/json", - "status": 204 - }, - { - "name": "ping-1", - "event": "ping", - "body": "null", - "contentType": "application/json", - "status": 204 - }, - { - "name": "ping-2", - "event": "ping", - "body": "[]", - "contentType": "application/json", - "status": 204 - }, - { - "name": "ping-3", - "event": "ping", - "body": "true", - "contentType": "application/json", - "status": 204 - }, - { - "name": "ping-4", - "event": "ping", - "body": "42", - "contentType": "application/json", - "status": 204 - }, - { - "name": "ping-5", - "event": "ping", - "body": "\"hello\"", - "contentType": "application/json", - "status": 204 - }, - { - "name": "ping-6", - "event": "ping", - "body": "{", - "contentType": "application/json", - "status": 503, - "error": "webhook_processing_failed" - }, - { - "name": "ping-7", - "event": "ping", - "body": "", - "contentType": "application/json", - "status": 503, - "error": "webhook_processing_failed" - }, - { - "name": "ping-8", - "event": "ping", - "body": "{\"action\":\"revoked\"}", - "contentType": "application/json", - "status": 204 - }, - { - "name": "ping-9", - "event": "ping", - "body": "{\"action\":\"revoked\",\"sender\":null}", - "contentType": "application/json", - "status": 204 - }, - { - "name": "installation-10", - "event": "installation", - "body": "{}", - "contentType": "application/json", - "status": 204 - }, - { - "name": "installation-11", - "event": "installation", - "body": "null", - "contentType": "application/json", - "status": 503, - "error": "webhook_processing_failed" - }, - { - "name": "installation-12", - "event": "installation", - "body": "[]", - "contentType": "application/json", - "status": 204 - }, - { - "name": "installation-13", - "event": "installation", - "body": "true", - "contentType": "application/json", - "status": 204 - }, - { - "name": "installation-14", - "event": "installation", - "body": "42", - "contentType": "application/json", - "status": 204 - }, - { - "name": "installation-15", - "event": "installation", - "body": "\"hello\"", - "contentType": "application/json", - "status": 204 - }, - { - "name": "installation-16", - "event": "installation", - "body": "{", - "contentType": "application/json", - "status": 503, - "error": "webhook_processing_failed" - }, - { - "name": "installation-17", - "event": "installation", - "body": "", - "contentType": "application/json", - "status": 503, - "error": "webhook_processing_failed" - }, - { - "name": "installation-18", - "event": "installation", - "body": "{\"action\":\"revoked\"}", - "contentType": "application/json", - "status": 204 - }, - { - "name": "installation-19", - "event": "installation", - "body": "{\"action\":\"revoked\",\"sender\":null}", - "contentType": "application/json", - "status": 204 - }, - { - "name": "installation_repositories-20", - "event": "installation_repositories", - "body": "{}", - "contentType": "application/json", - "status": 204 - }, - { - "name": "installation_repositories-21", - "event": "installation_repositories", - "body": "null", - "contentType": "application/json", - "status": 503, - "error": "webhook_processing_failed" - }, - { - "name": "installation_repositories-22", - "event": "installation_repositories", - "body": "[]", - "contentType": "application/json", - "status": 204 - }, - { - "name": "installation_repositories-23", - "event": "installation_repositories", - "body": "true", - "contentType": "application/json", - "status": 204 - }, - { - "name": "installation_repositories-24", - "event": "installation_repositories", - "body": "42", - "contentType": "application/json", - "status": 204 - }, - { - "name": "installation_repositories-25", - "event": "installation_repositories", - "body": "\"hello\"", - "contentType": "application/json", - "status": 204 - }, - { - "name": "installation_repositories-26", - "event": "installation_repositories", - "body": "{", - "contentType": "application/json", - "status": 503, - "error": "webhook_processing_failed" - }, - { - "name": "installation_repositories-27", - "event": "installation_repositories", - "body": "", - "contentType": "application/json", - "status": 503, - "error": "webhook_processing_failed" - }, - { - "name": "installation_repositories-28", - "event": "installation_repositories", - "body": "{\"action\":\"revoked\"}", - "contentType": "application/json", - "status": 204 - }, - { - "name": "installation_repositories-29", - "event": "installation_repositories", - "body": "{\"action\":\"revoked\",\"sender\":null}", - "contentType": "application/json", - "status": 204 - }, - { - "name": "github_app_authorization-30", - "event": "github_app_authorization", - "body": "{}", - "contentType": "application/json", - "status": 204 - }, - { - "name": "github_app_authorization-31", - "event": "github_app_authorization", - "body": "null", - "contentType": "application/json", - "status": 503, - "error": "webhook_processing_failed" - }, - { - "name": "github_app_authorization-32", - "event": "github_app_authorization", - "body": "[]", - "contentType": "application/json", - "status": 204 - }, - { - "name": "github_app_authorization-33", - "event": "github_app_authorization", - "body": "true", - "contentType": "application/json", - "status": 204 - }, - { - "name": "github_app_authorization-34", - "event": "github_app_authorization", - "body": "42", - "contentType": "application/json", - "status": 204 - }, - { - "name": "github_app_authorization-35", - "event": "github_app_authorization", - "body": "\"hello\"", - "contentType": "application/json", - "status": 204 - }, - { - "name": "github_app_authorization-36", - "event": "github_app_authorization", - "body": "{", - "contentType": "application/json", - "status": 503, - "error": "webhook_processing_failed" - }, - { - "name": "github_app_authorization-37", - "event": "github_app_authorization", - "body": "", - "contentType": "application/json", - "status": 503, - "error": "webhook_processing_failed" - }, - { - "name": "github_app_authorization-38", - "event": "github_app_authorization", - "body": "{\"action\":\"revoked\"}", - "contentType": "application/json", - "status": 204 - }, - { - "name": "github_app_authorization-39", - "event": "github_app_authorization", - "body": "{\"action\":\"revoked\",\"sender\":null}", - "contentType": "application/json", - "status": 204 - }, - { - "name": "content-type-40", - "event": "ping", - "body": "{}", - "contentType": "", - "status": 401, - "error": "invalid_webhook_signature" - }, - { - "name": "content-type-41", - "event": "ping", - "body": "{}", - "contentType": "text/plain", - "status": 401, - "error": "invalid_webhook_signature" - }, - { - "name": "content-type-42", - "event": "ping", - "body": "{}", - "contentType": "application/vnd.github+json", - "status": 401, - "error": "invalid_webhook_signature" - }, - { - "name": "content-type-43", - "event": "ping", - "body": "{}", - "contentType": "application/json; charset=utf-8", - "status": 204 - }, - { - "name": "content-type-44", - "event": "ping", - "body": "{}", - "contentType": "Application/JSON", - "status": 204 - }, - { - "name": "invalid-signature", - "event": "ping", - "body": "{}", - "contentType": "application/json", - "tampered": true, - "status": 401, - "error": "invalid_webhook_signature" - }, - { - "name": "disabled-app", - "event": "ping", - "body": "{}", - "contentType": "application/json", - "disabled": true, - "status": 401, - "error": "invalid_webhook_signature" - }, - { - "name": "body-size-1048577", - "event": "ping", - "size": 1048577, - "contentType": "application/json", - "status": 204 - }, - { - "name": "body-size-2097152", - "event": "ping", - "size": 2097152, - "contentType": "application/json", - "status": 204 - }, - { - "name": "body-size-2097153", - "event": "ping", - "size": 2097153, - "contentType": "application/json", - "status": 413 - }, - { - "name": "gzip-valid", - "event": "ping", - "body": "{}", - "contentType": "application/json", - "encoding": "gzip", - "mode": "valid", - "wire": "H4sIAAAAAAAAA6uuBQBDv6ajAgAAAA==", - "status": 204 - }, - { - "name": "gzip-truncated", - "event": "ping", - "body": "{}", - "contentType": "application/json", - "encoding": "gzip", - "mode": "truncated", - "wire": "H4sIAAAAAAAAA6uuBQBDv6ajAgA=", - "status": 400 - }, - { - "name": "gzip-corrupt", - "event": "ping", - "body": "{}", - "contentType": "application/json", - "encoding": "gzip", - "mode": "corrupt", - "wire": "bm90IGEgY29tcHJlc3NlZCBzdHJlYW0=", - "status": 400 - }, - { - "name": "gzip-wire-signature", - "event": "ping", - "body": "{}", - "contentType": "application/json", - "encoding": "gzip", - "mode": "wire-signature", - "wire": "H4sIAAAAAAAAA6uuBQBDv6ajAgAAAA==", - "status": 401, - "error": "invalid_webhook_signature" - }, - { - "name": "gzip-boundary", - "event": "ping", - "body": "{}", - "contentType": "application/json", - "encoding": "gzip", - "mode": "boundary", - "size": 2097152, - "wire": "H4sIAAAAAAAAA+3BMQkAIAAEwC4fwzaCIC7iKIjdbeF0dyertjZmT8kGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA+C73AWWVcGUAACAA", - "status": 204 - }, - { - "name": "gzip-oversized", - "event": "ping", - "body": "{}", - "contentType": "application/json", - "encoding": "gzip", - "mode": "oversized", - "size": 2097153, - "wire": "H4sIAAAAAAAAA+3BMQkAIAAEwC4fwzaCIC7iKIjdbeF0dyertjZmT8kGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA+C/3AbPtA50BACAA", - "status": 413 - }, - { - "name": "deflate-valid", - "event": "ping", - "body": "{}", - "contentType": "application/json", - "encoding": "deflate", - "mode": "valid", - "wire": "eJyrrgUAAXUA+Q==", - "status": 204 - }, - { - "name": "deflate-truncated", - "event": "ping", - "body": "{}", - "contentType": "application/json", - "encoding": "deflate", - "mode": "truncated", - "wire": "eJyrrgUAAXU=", - "status": 400 - }, - { - "name": "deflate-corrupt", - "event": "ping", - "body": "{}", - "contentType": "application/json", - "encoding": "deflate", - "mode": "corrupt", - "wire": "bm90IGEgY29tcHJlc3NlZCBzdHJlYW0=", - "status": 400 - }, - { - "name": "deflate-wire-signature", - "event": "ping", - "body": "{}", - "contentType": "application/json", - "encoding": "deflate", - "mode": "wire-signature", - "wire": "eJyrrgUAAXUA+Q==", - "status": 401, - "error": "invalid_webhook_signature" - }, - { - "name": "deflate-boundary", - "event": "ping", - "body": "{}", - "contentType": "application/json", - "encoding": "deflate", - "mode": "boundary", - "size": 2097152, - "wire": "eJztwTEJACAABMAuH8M2giAu4iiI3W3hdHcnq7Y2Zk/JBgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPgu9wFTVN8C", - "status": 204 - }, - { - "name": "deflate-oversized", - "event": "ping", - "body": "{}", - "contentType": "application/json", - "encoding": "deflate", - "mode": "oversized", - "size": 2097153, - "wire": "eJztwTEJACAABMAuH8M2giAu4iiI3W3hdHcnq7Y2Zk/JBgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPgv9wEzLt96", - "status": 413 - }, - { - "name": "br-valid", - "event": "ping", - "body": "{}", - "contentType": "application/json", - "encoding": "br", - "mode": "valid", - "wire": "iwCAe30D", - "status": 204 - }, - { - "name": "br-truncated", - "event": "ping", - "body": "{}", - "contentType": "application/json", - "encoding": "br", - "mode": "truncated", - "wire": "iwCAew==", - "status": 400 - }, - { - "name": "br-corrupt", - "event": "ping", - "body": "{}", - "contentType": "application/json", - "encoding": "br", - "mode": "corrupt", - "wire": "bm90IGEgY29tcHJlc3NlZCBzdHJlYW0=", - "status": 400 - }, - { - "name": "br-wire-signature", - "event": "ping", - "body": "{}", - "contentType": "application/json", - "encoding": "br", - "mode": "wire-signature", - "wire": "iwCAe30D", - "status": 401, - "error": "invalid_webhook_signature" - }, - { - "name": "br-boundary", - "event": "ping", - "body": "{}", - "contentType": "application/json", - "encoding": "br", - "mode": "boundary", - "size": 2097152, - "wire": "m///H/iN1GLNGe6UInh7pdOXklTyWSGgUhu3V+8/CAE=", - "status": 204 - }, - { - "name": "br-oversized", - "event": "ping", - "body": "{}", - "contentType": "application/json", - "encoding": "br", - "mode": "oversized", - "size": 2097153, - "wire": "mwAAIPiN1GLNGe6UInh7pdOXklTyWSGgUhu3We8/CAE=", - "status": 413 - }, - { - "name": "zstd-valid", - "event": "ping", - "body": "{}", - "contentType": "application/json", - "encoding": "zstd", - "mode": "valid", - "wire": "KLUv/SACEQAAe30=", - "status": 204 - }, - { - "name": "zstd-truncated", - "event": "ping", - "body": "{}", - "contentType": "application/json", - "encoding": "zstd", - "mode": "truncated", - "wire": "KLUv/SACEQAA", - "status": 401, - "error": "invalid_webhook_signature" - }, - { - "name": "zstd-corrupt", - "event": "ping", - "body": "{}", - "contentType": "application/json", - "encoding": "zstd", - "mode": "corrupt", - "wire": "bm90IGEgY29tcHJlc3NlZCBzdHJlYW0=", - "status": 400 - }, - { - "name": "zstd-wire-signature", - "event": "ping", - "body": "{}", - "contentType": "application/json", - "encoding": "zstd", - "mode": "wire-signature", - "wire": "KLUv/SACEQAAe30=", - "status": 401, - "error": "invalid_webhook_signature" - }, - { - "name": "zstd-boundary", - "event": "ping", - "body": "{}", - "contentType": "application/json", - "encoding": "zstd", - "mode": "boundary", - "size": 2097152, - "wire": "KLUv/aAAACAArAAAaHsicGFkZGluZyI6IngBAPD/OfgCAgAQeAIAEHgCABB4AgAQeAIAEHgCABB4AgAQeAIAEHgCABB4AgAQeAIAEHgCABB4AgAQeAIAEHhdAAAYeCJ9AQD6/zkQAg==", - "status": 204 - }, - { - "name": "zstd-oversized", - "event": "ping", - "body": "{}", - "contentType": "application/json", - "encoding": "zstd", - "mode": "oversized", - "size": 2097153, - "wire": "KLUv/YBYAQAgAKwAAGh7InBhZGRpbmciOiJ4AQDw/zn4AgIAEHgCABB4AgAQeAIAEHgCABB4AgAQeAIAEHgCABB4AgAQeAIAEHgCABB4AgAQeAIAEHgCABB4VAAAEHgiAQD7/zkQAgkAAH0=", - "status": 413 - }, - { - "name": "encoding-identity", - "event": "ping", - "body": "{}", - "contentType": "application/json", - "encoding": "identity", - "mode": "valid", - "wire": "e30=", - "status": 204 - }, - { - "name": "encoding-GZIP", - "event": "ping", - "body": "{}", - "contentType": "application/json", - "encoding": "GZIP", - "mode": "valid", - "wire": "H4sIAAAAAAAAA6uuBQBDv6ajAgAAAA==", - "status": 204 - }, - { - "name": "encoding-unknown", - "event": "ping", - "body": "{}", - "contentType": "application/json", - "encoding": "unknown", - "mode": "valid", - "wire": "e30=", - "status": 415 - }, - { - "name": "encoding-gzip, deflate", - "event": "ping", - "body": "{}", - "contentType": "application/json", - "encoding": "gzip, deflate", - "mode": "valid", - "wire": "e30=", - "status": 415 - } -] diff --git a/backend/internal/server/testdata/worker-queues.json b/backend/internal/server/testdata/worker-queues.json deleted file mode 100644 index 680a304..0000000 --- a/backend/internal/server/testdata/worker-queues.json +++ /dev/null @@ -1,14 +0,0 @@ -[ - { - "name": "cache", - "concurrency": 5 - }, - { - "name": "download", - "concurrency": 3 - }, - { - "name": "remove", - "concurrency": 5 - } -] diff --git a/backend/internal/server/token_names.go b/backend/internal/server/token_names.go deleted file mode 100644 index 989200e..0000000 --- a/backend/internal/server/token_names.go +++ /dev/null @@ -1,48 +0,0 @@ -package server - -import ( - "strings" - "unicode" -) - -func adminTokenName(value any) (string, error) { - if !inputTruthy(value) { - return "unnamed", nil - } - name, err := tokenNameString(value) - if err != nil { - return "", err - } - name = strings.TrimFunc(name, func(r rune) bool { return unicode.IsSpace(r) && r != '\u0085' || r == '\ufeff' }) - if name == "" { - name = "unnamed" - } - return name, nil -} - -// JSON values use JavaScript's toString/Array.join semantics for token names. -func tokenNameString(value any) (string, error) { - if value == nil { - return "", nil - } - if text, ok := termString(value); ok { - return text, nil - } - switch value.(type) { - case []any: - parts := []string{} - for _, v := range arr(value) { - text, err := tokenNameString(v) - if err != nil { - return "", err - } - parts = append(parts, text) - } - return strings.Join(parts, ","), nil - default: - if _, shadowed := obj(value)["toString"]; shadowed { - return "", fail("internal_error", 500) - } - return "[object Object]", nil - } -} diff --git a/backend/internal/server/token_names_test.go b/backend/internal/server/token_names_test.go deleted file mode 100644 index 4544314..0000000 --- a/backend/internal/server/token_names_test.go +++ /dev/null @@ -1,37 +0,0 @@ -package server - -import ( - "encoding/json" - "os" - "testing" -) - -func TestTypeScriptTokenNames(t *testing.T) { - raw, err := os.ReadFile("testdata/token-names.json") - if err != nil { - t.Fatal(err) - } - var cases []struct { - Name string - Body M - Expected string - Rejected bool - } - if err := json.Unmarshal(raw, &cases); err != nil { - t.Fatal(err) - } - for _, c := range cases { - t.Run(c.Name, func(t *testing.T) { - got, err := adminTokenName(c.Body["name"]) - if c.Rejected { - if err == nil { - t.Fatal("accepted shadowed toString") - } - return - } - if err != nil || got != c.Expected { - t.Fatalf("got %q %v want %q", got, err, c.Expected) - } - }) - } -} diff --git a/backend/internal/server/transform_error.go b/backend/internal/server/transform_error.go deleted file mode 100644 index 9d8cacd..0000000 --- a/backend/internal/server/transform_error.go +++ /dev/null @@ -1,19 +0,0 @@ -package server - -import ( - "errors" - "io" - - "github.com/tdurieux/anonymous_github/backend/internal/anonymize" -) - -func transformFailure(err error) error { - var input *anonymize.InputError - if errors.As(err, &input) { - if errors.Is(err, io.ErrUnexpectedEOF) { - return fail("storage_write_size_mismatch", 502) - } - return fail("file_not_available", 502) - } - return fail("anonymization_failed", 422) -} diff --git a/backend/internal/server/transformed_cache_integration_test.go b/backend/internal/server/transformed_cache_integration_test.go deleted file mode 100644 index 7b6d142..0000000 --- a/backend/internal/server/transformed_cache_integration_test.go +++ /dev/null @@ -1,131 +0,0 @@ -package server - -import ( - "context" - "github.com/tdurieux/anonymous_github/backend/internal/anonymize" - "io" - "os" - "strings" - "sync" - "testing" - "time" - - "github.com/tdurieux/anonymous_github/backend/internal/provider" - "go.mongodb.org/mongo-driver/v2/bson" -) - -func runTransformedCacheIntegration(t *testing.T, base *Server, p *fixtureProvider) { - t.Run("transformed output cache", func(t *testing.T) { - ctx := context.Background() - original, err := base.Store.one(ctx, collection("repo"), M{"repoId": "second-provider"}) - if err != nil { - t.Fatal(err) - } - r := selectFields(original, "owner", "source", "providerAccess", "options") - r["_id"], r["repoId"], r["status"] = bson.NewObjectID(), "transformed-cache-fixture", "ready" - r["treeGeneration"], r["anonymizeDate"] = "transform-generation", time.Now().Truncate(time.Millisecond) - if _, err = base.Store.DB.Collection(collection("repo")).InsertOne(ctx, r); err != nil { - t.Fatal(err) - } - s := &Server{Config: base.Config, Store: base.Store, providers: base.providers, content: base.content, pool: base.pool, cacheMetrics: testCacheMetrics()} - defer s.pool.RemoveResults(str(r["repoId"])) - row := M{"path": "", "name": "Alice.txt", "sha": "blob:one", "size": len(fixtureContent)} - read := func() (string, error) { - reader, cleanup, text, err := s.transformed(ctx, r, row) - if err != nil { - return "", err - } - defer cleanup() - if !text { - t.Fatal("text output misclassified") - } - b, err := io.ReadAll(reader) - return string(b), err - } - first, err := read() - if err != nil || strings.Contains(first, "Alice") { - t.Fatal(first, err) - } - second, err := read() - if err != nil || first != second { - t.Fatal("cache changed output", second, err) - } - counts := func() map[string]int64 { - out := map[string]int64{} - for k, v := range s.cacheMetrics.pending { - out[k.name] += v.count - } - return out - } - if n := counts(); n["legacy_result_miss"] != 1 || n["legacy_result_hit"] != 1 { - t.Fatal("worker output not reused", n) - } - // A provider revision is not a substitute for hashing actual source bytes. - access, err := s.providerAccess(r) - if err != nil { - t.Fatal(err) - } - key := rawCachePath(r, access, provider.Entry{Path: "Alice.txt", Revision: "blob:one"}) - replaced := strings.ReplaceAll(fixtureContent, "Alice", "Carol") - if err = s.content.Put(ctx, str(r["repoId"]), key, strings.NewReader(replaced), int64(len(replaced)), int64(len(replaced))); err != nil { - t.Fatal(err) - } - changed, err := read() - if err != nil || changed == first || !strings.Contains(changed, "Carol") { - t.Fatal("actual-content cache collision", changed, err) - } - if err = s.content.Put(ctx, str(r["repoId"]), key, strings.NewReader(fixtureContent), int64(len(fixtureContent)), int64(len(fixtureContent))); err != nil { - t.Fatal(err) - } - p.revoked = true - _, err = read() - p.revoked = false - if err == nil || err.Error() != "fixture_access_revoked" { - t.Fatal("cached result bypassed authorization", err) - } - if err = s.resetContentCache(ctx, r); err != nil { - t.Fatal(err) - } - r, err = s.Store.one(ctx, collection("repo"), M{"_id": r["_id"]}) - if err != nil { - t.Fatal(err) - } - third, err := read() - if err != nil || third != first { - t.Fatal("reset changed output", third, err) - } - if n := counts(); n["legacy_result_miss"] != 3 { - t.Fatal("reset retained transformed cache", n) - } - // Different anonymization settings cannot reuse an old output. - r["options"] = M{"terms": []string{"hello"}, "link": true} - stamp := time.Now().Add(time.Second).Truncate(time.Millisecond) - r["settingsSavedAt"] = stamp - if _, err = s.Store.update(ctx, collection("repo"), M{"_id": r["_id"]}, M{"$set": M{"options": r["options"], "settingsSavedAt": stamp}}); err != nil { - t.Fatal(err) - } - fourth, err := read() - if err != nil || fourth == first || strings.Contains(fourth, "hello") { - t.Fatal("settings cache collision", fourth, err) - } - parallelPool := anonymize.NewPool(os.Getenv("GO_TEST_SERVER_BINARY"), 4) - defer parallelPool.Close() - s.pool = parallelPool - var wg sync.WaitGroup - for i := 0; i < 8; i++ { - wg.Add(1) - go func() { - defer wg.Done() - out, err := read() - if err != nil || out != fourth { - t.Errorf("concurrent cached output: %q, %v", out, err) - } - }() - } - wg.Wait() - if parallelPool.Stats()["workerStarts"] != uint64(1) { - t.Fatal("duplicate workers for identical output", parallelPool.Stats()) - } - - }) -} diff --git a/backend/internal/server/tree_retirement_integration_test.go b/backend/internal/server/tree_retirement_integration_test.go deleted file mode 100644 index d317bfc..0000000 --- a/backend/internal/server/tree_retirement_integration_test.go +++ /dev/null @@ -1,177 +0,0 @@ -package server - -import ( - "context" - "go.mongodb.org/mongo-driver/v2/bson" - "net/http/httptest" - "strings" - "testing" - "time" -) - -func runTreeRetirementIntegration(t *testing.T, s *Server, p *fixtureProvider, call func(string, string, string, any) *httptest.ResponseRecorder, source M) { - ctx := context.Background() - t.Run("tree leases legacy retirement and late inserts", func(t *testing.T) { - id := "retirement-fixture" - now := time.Now() - r := M{"_id": bson.NewObjectID(), "repoId": id, "status": "ready", "treeGeneration": "active", "retiredTreeGenerations": []string{"", "retired", "active"}, "stagedFileTrees": []M{{"generation": "expired", "until": now.Add(-time.Minute)}, {"generation": "live", "until": now.Add(time.Hour)}}} - if _, e := s.Store.DB.Collection(collection("repo")).InsertOne(ctx, r); e != nil { - t.Fatal(e) - } - for _, g := range []string{"", "retired", "active", "expired", "live"} { - row := M{"repoId": id, "name": g + "file", "path": "", "size": 1} - if g != "" { - row["treeGeneration"] = g - row["treeStaged"] = true - } - if _, e := s.Store.DB.Collection("files").InsertOne(ctx, row); e != nil { - t.Fatal(e) - } - } - if e := s.cleanupRepositoryTrees(ctx, r); e != nil { - t.Fatal(e) - } - if ok, e := s.Store.update(ctx, collection("repo"), treePublicationFilter(r, "expired", time.Now()), M{"$set": M{"treeGeneration": "expired"}}); e != nil || ok { - t.Fatal("retired lease published", ok, e) - } - if ok, e := s.Store.update(ctx, collection("repo"), treePublicationFilter(r, "live", time.Now()), M{"$set": M{"testLease": "valid"}}); e != nil || !ok { - t.Fatal("live lease rejected", ok, e) - } - // The late write occurs after its stage and retirement record were removed. - if _, e := s.Store.DB.Collection("files").InsertOne(ctx, M{"repoId": id, "treeGeneration": "expired", "treeStaged": true, "name": "late", "path": ""}); e != nil { - t.Fatal(e) - } - s.cleanupTrees(ctx) - rows, e := s.Store.list(ctx, "files", M{"repoId": id}, 100, nil) - if e != nil || len(rows) != 2 { - t.Fatal("wrong retained rows", rows, e) - } - for _, row := range rows { - switch str(row["treeGeneration"]) { - case "active": - if row["treeStaged"] != nil { - t.Fatal("active publication marker retained", row) - } - case "live": - if !boolean(row["treeStaged"]) { - t.Fatal("live stage marker removed", row) - } - default: - t.Fatal("retired row retained", row) - } - } - }) - t.Run("missing branch retires tree without treating revoked access as deletion", func(t *testing.T) { - r := M{} - for k, v := range source { - r[k] = v - } - r["_id"] = bson.NewObjectID() - r["repoId"] = "missing-branch" - r["status"] = "ready" - r["treeGeneration"] = "old-branch-tree" - r["lastView"] = time.Now().Add(-48 * time.Hour) - r["options"] = M{"expirationMode": "never", "update": true, "terms": []string{}} - if _, e := s.Store.DB.Collection(collection("repo")).InsertOne(ctx, r); e != nil { - t.Fatal(e) - } - if _, e := s.Store.DB.Collection("files").InsertOne(ctx, M{"repoId": r["repoId"], "treeGeneration": "old-branch-tree", "name": "old.txt", "path": "", "size": 1}); e != nil { - t.Fatal(e) - } - cachedPath := contentPrefix(r) + "/old.txt" - if e := s.content.Put(ctx, str(r["repoId"]), cachedPath, strings.NewReader("data"), 4, 4); e != nil { - t.Fatal(e) - } - defer func() { p.revoked = false; p.missingBranch = false }() - p.revoked = true - w := call("GET", "/api/repo/missing-branch/options", "", nil) - if w.Code != 403 { - t.Fatal(w.Code, w.Body) - } - current, e := s.Store.one(ctx, collection("repo"), M{"_id": r["_id"]}) - if e != nil || str(current["status"]) != "ready" { - t.Fatal("access error destroyed repository", current, e) - } - p.revoked = false - p.missingBranch = true - w = call("GET", "/api/repo/missing-branch/options", "", nil) - if w.Code != 404 { - t.Fatal(w.Code, w.Body) - } - current, e = s.Store.one(ctx, collection("repo"), M{"_id": r["_id"]}) - if e != nil || str(current["status"]) != "error" || str(current["statusMessage"]) != "branch_not_found" || number(obj(current["size"])["file"]) != 0 { - t.Fatal("branch failure not persisted", current, e) - } - body, readErr := s.content.Read(ctx, str(r["repoId"]), cachedPath) - if body != nil { - body.Close() - } - if readErr == nil { - t.Fatal("missing branch cache retained") - } - rows, e := s.Store.list(ctx, "files", M{"repoId": r["repoId"]}, 100, nil) - if e != nil || len(rows) != 0 { - t.Fatal("old tree survived missing branch", rows, e) - } - }) -} - -func runContentRetirementIntegration(t *testing.T, s *Server) { - t.Run("retired content and legacy cleanup preserve current data and ZIP sources", func(t *testing.T) { - ctx := context.Background() - r := M{"_id": bson.NewObjectID(), "repoId": "content-retirement", "status": "ready", "treeGeneration": "current", "anonymizeDate": time.Date(2026, 1, 1, 0, 0, 0, 0, time.UTC), "source": M{"type": "GitHubStream"}, "legacyContentCleanupPending": true} - active := contentPrefix(r) - retired := "__content/" + strings.Repeat("a", 64) - r["retiredContentPrefixes"] = []string{retired, active, "../../outside"} - if _, e := s.Store.DB.Collection(collection("repo")).InsertOne(ctx, r); e != nil { - t.Fatal(e) - } - paths := []string{active + "/current.txt", retired + "/old.txt", "legacy.txt", "__content/invalid/file.txt"} - for _, path := range paths { - if e := s.content.Put(ctx, str(r["repoId"]), path, strings.NewReader("data"), 4, 4); e != nil { - t.Fatal(e) - } - } - if e := s.cleanupContent(ctx, r); e != nil { - t.Fatal(e) - } - for _, path := range paths { - body, e := s.content.Read(ctx, str(r["repoId"]), path) - if body != nil { - body.Close() - } - if path == paths[0] { - if e != nil { - t.Fatal("active content removed", e) - } - } else if e == nil { - t.Fatal("retired or legacy content retained", path) - } - } - marker := "__content/__retired/" + strings.Repeat("a", 64) + ".txt" - body, e := s.content.Read(ctx, str(r["repoId"]), marker) - if e != nil { - t.Fatal("retirement fence absent", e) - } - body.Close() - current, e := s.Store.one(ctx, collection("repo"), M{"_id": r["_id"]}) - if e != nil || current["legacyContentCleanupPending"] != nil { - t.Fatal("legacy cleanup not acknowledged", current, e) - } - archive := M{"_id": bson.NewObjectID(), "repoId": "archive-retirement", "status": "ready", "source": M{"type": "Zip"}, "legacyContentCleanupPending": true, "retiredContentPrefixes": []string{retired}} - if _, e = s.Store.DB.Collection(collection("repo")).InsertOne(ctx, archive); e != nil { - t.Fatal(e) - } - if e = s.content.Put(ctx, str(archive["repoId"]), "source.txt", strings.NewReader("data"), 4, 4); e != nil { - t.Fatal(e) - } - if e = s.cleanupContent(ctx, archive); e != nil { - t.Fatal(e) - } - body, e = s.content.Read(ctx, str(archive["repoId"]), "source.txt") - if e != nil { - t.Fatal("ZIP source deleted", e) - } - body.Close() - }) -} diff --git a/backend/internal/server/user_defaults.go b/backend/internal/server/user_defaults.go deleted file mode 100644 index b7cc73b..0000000 --- a/backend/internal/server/user_defaults.go +++ /dev/null @@ -1,66 +0,0 @@ -package server - -// Cast the fields handled by Mongoose's user-default update. This is separate -// from repository option validation: saved defaults can contain null terms and -// page is a string here, while repository creation validates runnable settings. -func castUserDefaults(body M) (M, error) { - out := selectFields(body, "terms", "options") - if value, present := out["terms"]; present && value != nil { - values, ok := value.([]any) - if !ok { - values = []any{value} - } - terms := []any{} - for _, value := range values { - if value == nil { - terms = append(terms, nil) - continue - } - text, valid := termString(value) - if !valid { - return nil, fail("invalid_defaults", 400) - } - terms = append(terms, text) - } - out["terms"] = terms - } - if value, present := out["options"]; present { - switch value.(type) { - case M, map[string]any: - options := selectFields(obj(value), "expirationMode", "update", "image", "pdf", "notebook", "link", "page") - for _, key := range []string{"update", "image", "pdf", "notebook", "link"} { - if value, ok := options[key]; ok { - converted, valid := optionBoolean(value) - if !valid { - return nil, fail("invalid_defaults", 400) - } - options[key] = converted - } - } - for _, key := range []string{"expirationMode", "page"} { - if value, ok := options[key]; ok && value != nil { - text, valid := termString(value) - if !valid { - return nil, fail("invalid_defaults", 400) - } - options[key] = text - } - } - out["options"] = options - } - } - return out, nil -} -func userDefaults(user M) any { - if value, present := user["default"]; present && value == nil { - return nil - } - out := selectFields(obj(user["default"]), "terms", "options") - defaults(out, M{"terms": []any{}, "options": M{}}) - return out -} -func userProfile(user M) M { - out := selectFields(user, "username", "photo") - out["isAdmin"] = boolean(user["isAdmin"]) - return out -} diff --git a/backend/internal/server/user_defaults_integration_test.go b/backend/internal/server/user_defaults_integration_test.go deleted file mode 100644 index 2291db6..0000000 --- a/backend/internal/server/user_defaults_integration_test.go +++ /dev/null @@ -1,104 +0,0 @@ -package server - -import ( - "bytes" - "context" - "encoding/json" - "net/http/httptest" - "reflect" - "testing" - - "github.com/tdurieux/anonymous_github/backend/internal/security" - "go.mongodb.org/mongo-driver/v2/bson" -) - -func runUserDefaultsIntegration(t *testing.T, s *Server) { - t.Run("user defaults match schema casts through HTTP", func(t *testing.T) { - ctx := context.Background() - id := bson.NewObjectID() - token := "synthetic-user-defaults" - if _, err := s.Store.DB.Collection("users").InsertOne(ctx, M{"_id": id, "username": "user-defaults-fixture", "status": "active", "apiTokens": []M{{"tokenHash": security.HashToken(token)}}}); err != nil { - t.Fatal(err) - } - call := func(method, path string, body any) *httptest.ResponseRecorder { - raw, _ := json.Marshal(body) - req := httptest.NewRequest(method, path, bytes.NewReader(raw)) - req.RemoteAddr = "198.51.100.20:1234" - req.Header.Set("Authorization", "Bearer "+token) - req.Header.Set("Content-Type", "application/json") - w := httptest.NewRecorder() - s.ServeHTTP(w, req) - return w - } - read := func() any { - t.Helper() - w := call("GET", "/api/user/default", nil) - if w.Code != 200 { - t.Fatal(w.Code, w.Body) - } - var value any - if err := json.Unmarshal(w.Body.Bytes(), &value); err != nil { - t.Fatal(err, w.Body) - } - return value - } - fixture := userDefaultsFixture(t) - for _, c := range fixture.Initial { - update := M{"$unset": M{"default": ""}} - if value, present := c.User["default"]; present { - update = M{"$set": M{"default": value}} - } - if _, err := s.Store.update(ctx, "users", M{"_id": id}, update); err != nil { - t.Fatal(err) - } - if got := read(); !reflect.DeepEqual(got, c.Expected) { - t.Fatal("initial", got, c.Expected) - } - } - for _, c := range fixture.Cases { - original := M{"terms": []any{"Old"}, "options": M{"image": true}} - if _, err := s.Store.update(ctx, "users", M{"_id": id}, M{"$set": M{"default": original}}); err != nil { - t.Fatal(err) - } - w := call("POST", "/api/user/default", c.Body) - stored, err := s.Store.one(ctx, "users", M{"_id": id}) - if err != nil { - t.Fatal(err) - } - if c.Rejected { - if w.Code != 400 || !reflect.DeepEqual(defaultsJSON(t, stored["default"]), defaultsJSON(t, original)) { - t.Fatal(c.Name, "invalid update changed defaults", w.Code, w.Body) - } - continue - } - if w.Code != 200 || w.Body.String() != "ok" { - t.Fatal(c.Name, w.Code, w.Body) - } - if !reflect.DeepEqual(defaultsJSON(t, stored["default"]), defaultsJSON(t, c.Stored)) { - t.Fatal(c.Name, "stored", stored["default"], c.Stored) - } - if got := read(); !reflect.DeepEqual(got, c.Expected) { - t.Fatal(c.Name, "read", got, c.Expected) - } - } - w := call("GET", "/api/user", nil) - var profile M - if err := json.Unmarshal(w.Body.Bytes(), &profile); err != nil { - t.Fatal(err) - } - if w.Code != 200 || !reflect.DeepEqual(profile, M{"username": "user-defaults-fixture", "isAdmin": false}) { - t.Fatal("absent photo", w.Code, w.Body) - } - if _, err := s.Store.update(ctx, "users", M{"_id": id}, M{"$set": M{"photo": nil}}); err != nil { - t.Fatal(err) - } - w = call("GET", "/api/user", nil) - profile = M{} - if err := json.Unmarshal(w.Body.Bytes(), &profile); err != nil { - t.Fatal(err) - } - if _, present := profile["photo"]; !present || profile["photo"] != nil { - t.Fatal("explicit null photo", profile) - } - }) -} diff --git a/backend/internal/server/user_defaults_test.go b/backend/internal/server/user_defaults_test.go deleted file mode 100644 index 2c6346d..0000000 --- a/backend/internal/server/user_defaults_test.go +++ /dev/null @@ -1,86 +0,0 @@ -package server - -import ( - "encoding/json" - "os" - "reflect" - "testing" -) - -type defaultsCase struct { - Name string - Body, Stored M - Expected any - Rejected bool -} -type defaultsFixture struct { - Cases []defaultsCase - Initial []struct { - User M - Expected any - } -} - -func userDefaultsFixture(t *testing.T) defaultsFixture { - t.Helper() - raw, err := os.ReadFile("testdata/user-defaults.json") - if err != nil { - t.Fatal(err) - } - var fixture defaultsFixture - if err := json.Unmarshal(raw, &fixture); err != nil { - t.Fatal(err) - } - return fixture -} -func defaultsJSON(t *testing.T, value any) any { - t.Helper() - raw, err := json.Marshal(value) - if err != nil { - t.Fatal(err) - } - var out any - if err := json.Unmarshal(raw, &out); err != nil { - t.Fatal(err) - } - return out -} -func TestTypeScriptUserDefaults(t *testing.T) { - fixture := userDefaultsFixture(t) - for _, c := range fixture.Cases { - t.Run(c.Name, func(t *testing.T) { - stored, err := castUserDefaults(c.Body) - if c.Rejected { - if err == nil { - t.Fatal("invalid defaults accepted") - } - return - } - if err != nil { - t.Fatal(err) - } - if !reflect.DeepEqual(defaultsJSON(t, stored), defaultsJSON(t, c.Stored)) { - t.Fatalf("stored %#v; expected %#v", stored, c.Stored) - } - got := userDefaults(M{"default": stored}) - if !reflect.DeepEqual(defaultsJSON(t, got), c.Expected) { - t.Fatalf("read %#v; expected %#v", got, c.Expected) - } - }) - } - for _, c := range fixture.Initial { - if got := defaultsJSON(t, userDefaults(c.User)); !reflect.DeepEqual(got, c.Expected) { - t.Fatalf("initial %#v; expected %#v", got, c.Expected) - } - } -} -func TestUserProfileOptionalPhoto(t *testing.T) { - for _, u := range []M{{"username": "alice"}, {"username": "alice", "photo": nil}, {"username": "alice", "photo": "https://avatar.test", "isAdmin": true}} { - got := userProfile(u) - _, hasPhoto := got["photo"] - _, wantPhoto := u["photo"] - if hasPhoto != wantPhoto || got["username"] != "alice" || got["isAdmin"] != boolean(u["isAdmin"]) { - t.Fatal(got) - } - } -} diff --git a/backend/internal/server/user_list_capacity_integration_test.go b/backend/internal/server/user_list_capacity_integration_test.go deleted file mode 100644 index 20dcd57..0000000 --- a/backend/internal/server/user_list_capacity_integration_test.go +++ /dev/null @@ -1,108 +0,0 @@ -package server - -import ( - "context" - "fmt" - "net/http/httptest" - "testing" - "time" - - "go.mongodb.org/mongo-driver/v2/bson" -) - -func runUserListCapacityIntegration(t *testing.T, s *Server) { - t.Run("resource lists exceed legacy Go cap", func(t *testing.T) { - ctx := context.Background() - owner, other := bson.NewObjectID(), bson.NewObjectID() - prefix := "list-capacity-" + owner.Hex() - user := M{"_id": owner, "username": prefix, "status": "active", "externalIDs": M{"github": prefix}, "projectNames": M{}} - const count = 10001 - for _, kind := range []string{"repo", "pr", "gist"} { - obj(user["projectNames"])[projectNameKey(kind, fmt.Sprintf("%s-%s-%05d", prefix, kind, count-1))] = "Last private name" - } - if _, err := s.Store.DB.Collection("users").InsertOne(ctx, user); err != nil { - t.Fatal(err) - } - defer func() { - for _, kind := range []string{"repo", "pr", "gist"} { - s.Store.DB.Collection(collection(kind)).DeleteMany(context.Background(), M{"capacityFixture": prefix}) - } - s.Store.DB.Collection("users").DeleteOne(context.Background(), M{"_id": owner}) - }() - q := &request{Server: s, User: user, Identity: identity(user), R: httptest.NewRequest("GET", "/", nil), Params: map[string]string{"username": prefix}} - for _, kind := range []string{"repo", "pr", "gist"} { - t.Run(kind, func(t *testing.T) { - records := make([]any, 0, count) - for i := 0; i < count; i++ { - row := M{"_id": bson.NewObjectID(), idKey(kind): fmt.Sprintf("%s-%s-%05d", prefix, kind, i), "owner": owner, "status": "error", "capacityFixture": prefix, "source": M{"provider": "fixture"}} - if i == count-1 { - row["status"] = "ready" - row["options"] = M{"expirationMode": "redirect", "expirationDate": time.Now().Add(-time.Hour)} - if kind == "repo" { - row["owner"] = other - row["coauthors"] = []M{{"username": "prior-login", "githubId": prefix}} - } - } - records = append(records, row) - } - if _, err := s.Store.DB.Collection(collection(kind)).InsertMany(ctx, records); err != nil { - t.Fatal(err) - } - result, err := s.userResources(kind)(q) - if err != nil { - t.Fatal(err) - } - rows := result.([]M) - if len(rows) != count { - t.Fatalf("returned %d rows; want %d", len(rows), count) - } - lastID := fmt.Sprintf("%s-%s-%05d", prefix, kind, count-1) - seen := map[string]bool{} - for _, row := range rows { - id := str(row[idKey(kind)]) - if seen[id] { - t.Fatal("duplicate", id) - } - seen[id] = true - if id == lastID { - if row["status"] != "expiring" || row["projectName"] != "Last private name" { - t.Fatal("tail record lost expiry or private name", row) - } - if kind == "repo" && row["role"] != "coauthor" { - t.Fatal("tail membership role", row) - } - } - } - if !seen[lastID] { - t.Fatal("tail record omitted") - } - saved, err := s.Store.one(ctx, collection(kind), M{idKey(kind): lastID}) - if err != nil || saved["status"] != "expiring" { - t.Fatal("tail expiry not persisted", err) - } - if kind == "repo" { - result, err := s.adminUser("repos")(q) - if err != nil { - t.Fatal(err) - } - adminRows := result.([]M) - if len(adminRows) != count { - t.Fatalf("admin list returned %d rows", len(adminRows)) - } - found := false - for _, row := range adminRows { - if row["repoId"] == lastID { - found = true - } - } - if !found { - t.Fatal("admin list omitted coauthor tail") - } - } - if _, err := s.Store.DB.Collection(collection(kind)).DeleteMany(ctx, M{"capacityFixture": prefix}); err != nil { - t.Fatal(err) - } - }) - } - }) -} diff --git a/backend/internal/server/user_lists.go b/backend/internal/server/user_lists.go deleted file mode 100644 index 19febf6..0000000 --- a/backend/internal/server/user_lists.go +++ /dev/null @@ -1,58 +0,0 @@ -package server - -import ( - "context" - "time" -) - -func repositoryMembership(user M) M { - clauses := []M{{"owner": user["_id"]}} - if id := str(obj(user["externalIDs"])["github"]); id != "" { - clauses = append(clauses, M{"coauthors.githubId": id}) - } - if username := str(user["username"]); username != "" { - clauses = append(clauses, M{"coauthors": M{"$elemMatch": M{"username": username, "$or": []M{{"githubId": M{"$exists": false}}, {"githubId": nil}, {"githubId": ""}}}}}) - } - return M{"$or": clauses} -} - -// Lists mark only overdue ready resources, then reload affected rows so a -// concurrent extension, removal or deletion is reflected in the response. -func (s *Server) markListExpired(ctx context.Context, kind string, rows []M) ([]M, error) { - now := time.Now().Truncate(time.Millisecond) - ids := []any{} - affected := map[string]bool{} - for _, row := range rows { - options := obj(row["options"]) - expires := date(options["expirationDate"]) - if str(row["status"]) == "ready" && str(options["expirationMode"]) != "never" && inputTruthy(options["expirationDate"]) && !expires.After(now) { - ids = append(ids, row["_id"]) - affected[str(row["_id"])] = true - } - } - if len(ids) == 0 { - return rows, nil - } - _, err := s.Store.DB.Collection(collection(kind)).UpdateMany(ctx, M{"_id": M{"$in": ids}, "status": "ready", "options.expirationMode": M{"$ne": "never"}, "options.expirationDate": M{"$lte": now}}, M{"$set": M{"status": "expiring", "statusDate": now}}) - if err != nil { - return nil, err - } - fresh, err := s.Store.list(ctx, collection(kind), M{"_id": M{"$in": ids}}, int64(len(ids)), nil) - if err != nil { - return nil, err - } - current := map[string]M{} - for _, row := range fresh { - current[str(row["_id"])] = row - } - out := []M{} - for _, row := range rows { - id := str(row["_id"]) - if !affected[id] { - out = append(out, row) - } else if value := current[id]; value != nil { - out = append(out, value) - } - } - return out, nil -} diff --git a/backend/internal/server/user_lists_integration_test.go b/backend/internal/server/user_lists_integration_test.go deleted file mode 100644 index 4a06338..0000000 --- a/backend/internal/server/user_lists_integration_test.go +++ /dev/null @@ -1,160 +0,0 @@ -package server - -import ( - "context" - "encoding/json" - "net/http/httptest" - "reflect" - "sort" - "testing" - "time" - - "github.com/tdurieux/anonymous_github/backend/internal/security" - "go.mongodb.org/mongo-driver/v2/bson" -) - -func runUserListsIntegration(t *testing.T, s *Server) { - t.Run("resource expiry recognizes zero date and epoch", func(t *testing.T) { - ctx := context.Background() - for _, kind := range []string{"repo", "gist", "pr"} { - for _, expires := range []time.Time{time.Time{}, time.UnixMilli(0)} { - row := M{"_id": bson.NewObjectID(), idKey(kind): "resource-expiry-" + kind + expires.Format("2006"), "status": "ready", "statusDate": time.Now().Add(-time.Hour), "options": M{"expirationMode": "date", "expirationDate": expires}} - if _, err := s.Store.DB.Collection(collection(kind)).InsertOne(ctx, row); err != nil { - t.Fatal(err) - } - stored, err := s.Store.one(ctx, collection(kind), M{"_id": row["_id"]}) - if err != nil { - t.Fatal(err) - } - failure, ok := s.checkResource(ctx, kind, stored).(*APIError) - if !ok || failure.Status != 410 { - t.Fatalf("%s expiry was not enforced: %v", kind, failure) - } - stored, err = s.Store.one(ctx, collection(kind), M{"_id": row["_id"]}) - if err != nil || stored["status"] != "expiring" { - t.Fatal(kind, stored, err) - } - } - } - }) - - t.Run("user and admin lists share membership and expire overdue rows", func(t *testing.T) { - ctx := context.Background() - owner := bson.NewObjectID() - other := bson.NewObjectID() - token, adminToken := "synthetic-list-user", "synthetic-list-admin" - for _, u := range []M{{"_id": owner, "username": "list-user", "externalIDs": M{"github": "9917000999"}, "status": "active", "apiTokens": []M{{"tokenHash": security.HashToken(token)}}}, {"_id": bson.NewObjectID(), "username": "list-admin", "status": "active", "isAdmin": true, "apiTokens": []M{{"tokenHash": security.HashToken(adminToken)}}}} { - if _, err := s.Store.DB.Collection("users").InsertOne(ctx, u); err != nil { - t.Fatal(err) - } - } - call := func(path, auth string) []M { - t.Helper() - req := httptest.NewRequest("GET", path, nil) - req.RemoteAddr = "198.51.100.17:1234" - req.Header.Set("Authorization", "Bearer "+auth) - w := httptest.NewRecorder() - s.ServeHTTP(w, req) - if w.Code != 200 { - t.Fatal(path, w.Code, w.Body) - } - var rows []M - if err := json.Unmarshal(w.Body.Bytes(), &rows); err != nil { - t.Fatal(err) - } - return rows - } - cases := []struct { - name string - coauthors []M - own, visible bool - }{ - {"owned", nil, true, true}, {"stable", []M{{"username": "renamed", "githubId": "9917000999"}}, false, true}, - {"legacy-missing", []M{{"username": "list-user"}}, false, true}, {"legacy-null", []M{{"username": "list-user", "githubId": nil}}, false, true}, {"legacy-empty", []M{{"username": "list-user", "githubId": ""}}, false, true}, - {"wrong-id", []M{{"username": "list-user", "githubId": "different"}}, false, false}, {"wrong-name", []M{{"username": "different"}}, false, false}, - {"split-fields", []M{{"username": "list-user", "githubId": "different"}, {"username": "other"}}, false, false}, - } - expected := []string{} - for _, c := range cases { - rowOwner := other - if c.own { - rowOwner = owner - } - id := "list-membership-" + c.name - if _, err := s.Store.DB.Collection(collection("repo")).InsertOne(ctx, M{"_id": bson.NewObjectID(), "repoId": id, "owner": rowOwner, "coauthors": c.coauthors, "status": "ready", "options": M{"expirationMode": "never"}}); err != nil { - t.Fatal(err) - } - if c.visible { - expected = append(expected, id) - } - } - sort.Strings(expected) - for _, c := range []struct{ path, token string }{{"/api/user/anonymized_repositories", token}, {"/api/admin/users/list-user/repos", adminToken}} { - got := []string{} - for _, row := range call(c.path, c.token) { - got = append(got, str(row["repoId"])) - } - sort.Strings(got) - if !reflect.DeepEqual(got, expected) { - t.Fatal(c.path, got, expected) - } - } - before := time.Now().Add(-time.Hour).Truncate(time.Millisecond) - for kind, suffix := range map[string]string{"repo": "repositories", "gist": "gists", "pr": "pull_requests"} { - type stateCase struct { - name, status, mode, want string - expires any - } - states := []stateCase{{"zero-date", "ready", "date", "expiring", time.Time{}}, {"epoch", "ready", "date", "expiring", time.UnixMilli(0)}, {"zero-never", "ready", "never", "ready", time.Time{}}, {"due", "ready", "date", "expiring", before}, {"never", "ready", "never", "ready", before}, {"future", "ready", "date", "ready", time.Now().Add(time.Hour)}, {"null", "ready", "date", "ready", nil}, {"expired", "expired", "date", "expired", before}, {"preparing", "preparing", "date", "preparing", before}, {"archived", "archived", "date", "archived", before}} - for _, c := range states { - if _, err := s.Store.DB.Collection(collection(kind)).InsertOne(ctx, M{"_id": bson.NewObjectID(), idKey(kind): "list-expiry-" + kind + "-" + c.name, "owner": owner, "status": c.status, "statusDate": before, "options": M{"expirationMode": c.mode, "expirationDate": c.expires}}); err != nil { - t.Fatal(err) - } - } - output := map[string]M{} - for _, row := range call("/api/user/anonymized_"+suffix, token) { - output[str(row[idKey(kind)])] = row - } - for _, c := range states { - id := "list-expiry-" + kind + "-" + c.name - if output[id]["status"] != c.want { - t.Fatal(id, output[id], c.want) - } - stored, err := s.Store.one(ctx, collection(kind), M{idKey(kind): id}) - if err != nil { - t.Fatal(err) - } - if stored["status"] != c.want { - t.Fatal("not persisted", id, stored) - } - if c.want == "expiring" { - if !date(stored["statusDate"]).After(before) { - t.Fatal("missing expiry timestamp") - } - } else if !date(stored["statusDate"]).Equal(before) { - t.Fatal("inactive timestamp changed", id) - } - } - } - // A stale list snapshot must return a concurrent extension rather than expire it. - row, err := s.Store.one(ctx, collection("repo"), M{"repoId": "list-expiry-repo-due"}) - if err != nil { - t.Fatal(err) - } - row["status"] = "ready" - if _, err := s.Store.update(ctx, collection("repo"), M{"_id": row["_id"]}, M{"$set": M{"status": "ready", "options.expirationDate": time.Now().Add(time.Hour)}}); err != nil { - t.Fatal(err) - } - fresh, err := s.markListExpired(ctx, "repo", []M{row}) - if err != nil || len(fresh) != 1 || fresh[0]["status"] != "ready" { - t.Fatal("extension lost", fresh, err) - } - if _, err := s.Store.DB.Collection(collection("repo")).DeleteOne(ctx, M{"_id": row["_id"]}); err != nil { - t.Fatal(err) - } - fresh, err = s.markListExpired(ctx, "repo", []M{row}) - if err != nil || len(fresh) != 0 { - t.Fatal("deleted row retained", fresh, err) - } - }) -} diff --git a/backend/internal/server/user_lists_test.go b/backend/internal/server/user_lists_test.go deleted file mode 100644 index 579a4fb..0000000 --- a/backend/internal/server/user_lists_test.go +++ /dev/null @@ -1,32 +0,0 @@ -package server - -import ( - "encoding/json" - "os" - "reflect" - "testing" -) - -func TestTypeScriptUserMembership(t *testing.T) { - raw, err := os.ReadFile("testdata/user-membership.json") - if err != nil { - t.Fatal(err) - } - var cases []struct{ User, Expected M } - if err := json.Unmarshal(raw, &cases); err != nil { - t.Fatal(err) - } - for _, c := range cases { - raw, err := json.Marshal(repositoryMembership(c.User)) - if err != nil { - t.Fatal(err) - } - var got M - if err := json.Unmarshal(raw, &got); err != nil { - t.Fatal(err) - } - if !reflect.DeepEqual(got, c.Expected) { - t.Fatalf("got %s; expected %#v", raw, c.Expected) - } - } -} diff --git a/backend/internal/server/user_search_integration_test.go b/backend/internal/server/user_search_integration_test.go deleted file mode 100644 index 5214152..0000000 --- a/backend/internal/server/user_search_integration_test.go +++ /dev/null @@ -1,57 +0,0 @@ -package server - -import ( - "context" - "io" - "net/http" - "net/http/httptest" - "reflect" - "strings" - "testing" - - "go.mongodb.org/mongo-driver/v2/bson" -) - -func runUserSearchIntegration(t *testing.T, base *Server) { - t.Run("legacy user search query and credential ordering", func(t *testing.T) { - ctx := context.Background() - owner := bson.NewObjectID() - db := base.Store.DB.Client().Database("user_search_" + owner.Hex()) - defer db.Drop(ctx) - s := &Server{Config: base.Config, Store: &Store{DB: db, Redis: base.Store.Redis}} - user := M{"_id": owner, "username": "owner", "status": "active"} - if _, err := db.Collection("users").InsertOne(ctx, user); err != nil { - t.Fatal(err) - } - q := &request{Server: s, User: user, Identity: identity(user), R: httptest.NewRequest("GET", "/", nil)} - if err := s.saveGrant(q, owner, "github", M{"access_token": "synthetic-search"}); err != nil { - t.Fatal(err) - } - calls := 0 - actualQuery := "" - s.HTTP = &http.Client{Transport: roundTrip(func(r *http.Request) (*http.Response, error) { - calls++ - if r.URL.Path != "/search/users" || r.URL.Query().Get("per_page") != "10" || r.Header.Get("Authorization") != "Bearer synthetic-search" { - t.Fatal("incorrect search request") - } - actualQuery = r.URL.Query().Get("q") - return &http.Response{StatusCode: 200, Header: http.Header{}, Body: io.NopCloser(strings.NewReader(`{"items":[{"login":"result","id":123,"avatar_url":"https://example.test/avatar"}]}`))}, nil - })} - for _, row := range userSearchContracts(t) { - q.R = httptest.NewRequest("GET", "/?"+row.Query, nil) - before := calls - got, err := s.githubUsers(q) - if (err != nil) != row.Error { - t.Fatal(row, err) - } - if row.UpstreamQuery != nil { - want := []M{{"username": "result", "githubId": "123", "photo": "https://example.test/avatar"}} - if calls != before+1 || actualQuery != *row.UpstreamQuery || !reflect.DeepEqual(got, want) { - t.Fatal(row, actualQuery, got) - } - } else if calls != before { - t.Fatal("unexpected upstream call", row) - } - } - }) -} diff --git a/backend/internal/server/user_search_query.go b/backend/internal/server/user_search_query.go deleted file mode 100644 index 282116a..0000000 --- a/backend/internal/server/user_search_query.go +++ /dev/null @@ -1,43 +0,0 @@ -package server - -import ( - "errors" - "strings" -) - -// The legacy route tests q.length before obtaining credentials. Arrays use -// their compacted element count; objects may supply their own length property. -func userSearchQuery(raw string) (*queryValue, bool, error) { - value := parseExtendedQuery(raw).object["q"] - if !value.truthy() { - return value, false, nil - } - switch value.kind { - case 's': - return value, githubUserSearchable(value.scalar), nil - case 'a': - count := 0 - for _, item := range value.array { - if item != nil { - count++ - } - } - return value, count >= 2, nil - default: - length, err := value.object["length"].stringValue() - if err != nil { - return value, false, err - } - return value, !(queryWindowNumber(length) < 2), nil - } -} - -// Octokit's search endpoint calls split on q after credential lookup. Preserve -// that rejection timing and its treatment of literal plus signs as separators. -func userSearchPath(value *queryValue) (string, error) { - query, scalar := value.scalarValue() - if !scalar { - return "", errors.New("invalid_query_value") - } - return "/search/users?q=" + strings.ReplaceAll(queryEscape(query), "%2B", "+") + "&per_page=10", nil -} diff --git a/backend/internal/server/user_search_query_test.go b/backend/internal/server/user_search_query_test.go deleted file mode 100644 index 43d7db4..0000000 --- a/backend/internal/server/user_search_query_test.go +++ /dev/null @@ -1,53 +0,0 @@ -package server - -import ( - "encoding/json" - "net/url" - "os" - "testing" -) - -type userSearchContract struct { - Query string - TokenCalls int - Error bool - UpstreamQuery *string -} - -func userSearchContracts(t *testing.T) []userSearchContract { - t.Helper() - raw, err := os.ReadFile("testdata/user-search.json") - if err != nil { - t.Fatal(err) - } - var rows []userSearchContract - if err = json.Unmarshal(raw, &rows); err != nil { - t.Fatal(err) - } - return rows -} -func TestUserSearchQueryContracts(t *testing.T) { - for _, row := range userSearchContracts(t) { - t.Run(row.Query, func(t *testing.T) { - value, search, err := userSearchQuery(row.Query) - calls := 0 - var upstream *string - if err == nil && search { - calls++ - var path string - path, err = userSearchPath(value) - if err == nil { - u, e := url.Parse(path) - if e != nil { - t.Fatal(e) - } - q := u.Query().Get("q") - upstream = &q - } - } - if (err != nil) != row.Error || calls != row.TokenCalls || (upstream == nil) != (row.UpstreamQuery == nil) || upstream != nil && *upstream != *row.UpstreamQuery { - t.Fatalf("contract %+v: calls=%d upstream=%v err=%v", row, calls, upstream, err) - } - }) - } -} diff --git a/backend/internal/server/user_search_test.go b/backend/internal/server/user_search_test.go deleted file mode 100644 index e9c9ed5..0000000 --- a/backend/internal/server/user_search_test.go +++ /dev/null @@ -1,36 +0,0 @@ -package server - -import ( - "net/http/httptest" - "net/url" - "reflect" - "testing" -) - -func TestGitHubUserSearchLength(t *testing.T) { - // Expected values follow the TypeScript route's q.length >= 2 condition. - for _, c := range []struct { - query string - search bool - }{ - {"", false}, {"a", false}, {"é", false}, {"中", false}, - {"\uffff", false}, {" ", false}, {"ab", true}, {"éa", true}, - {"中文", true}, {"e\u0301", true}, {"😀", true}, {" ", true}, - } { - t.Run(c.query, func(t *testing.T) { - if got := githubUserSearchable(c.query); got != c.search { - t.Fatalf("searchable = %v, want %v", got, c.search) - } - if !c.search { - // No store or HTTP client: short queries must return before - // credential lookup or an upstream call. - s := &Server{} - q := &request{R: httptest.NewRequest("GET", "/?q="+url.QueryEscape(c.query), nil)} - got, err := s.githubUsers(q) - if err != nil || !reflect.DeepEqual(got, []any{}) { - t.Fatalf("response = %#v, %v", got, err) - } - } - }) - } -} diff --git a/backend/internal/server/users.go b/backend/internal/server/users.go deleted file mode 100644 index 3e03870..0000000 --- a/backend/internal/server/users.go +++ /dev/null @@ -1,290 +0,0 @@ -package server - -import ( - "crypto/sha256" - "encoding/hex" - "github.com/tdurieux/anonymous_github/backend/internal/provider" - "github.com/tdurieux/anonymous_github/backend/internal/security" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/mongo/options" - "strings" - "time" -) - -func membership(q *request, kind string) M { - if kind != "repo" { - return M{"owner": q.User["_id"]} - } - return repositoryMembership(q.User) -} -func (s *Server) userResources(kind string) handler { - return func(q *request) (any, error) { - rows, err := s.Store.list(q.ctx(), collection(kind), membership(q, kind), 0, nil) - if err != nil { - return nil, err - } - rows, err = s.markListExpired(q.ctx(), kind, rows) - if err != nil { - return nil, err - } - out := []M{} - for _, r := range rows { - v := resourceJSON(kind, r) - if kind == "repo" { - v["role"] = "coauthor" - if str(r["owner"]) == q.Identity.ID { - v["role"] = "owner" - } - } - key := projectNameKey(kind, str(r[idKey(kind)])) - if name, ok := obj(q.User["projectNames"])[key]; ok { - v["projectName"] = name - } - out = append(out, v) - } - return out, nil - } -} -func (s *Server) projectName(q *request) (any, error) { - kind, id, name, err := validateProjectName(q.Body) - if err != nil { - return nil, err - } - rows, err := s.Store.list(q.ctx(), collection(kind), membership(q, kind), 0, nil) - if err != nil { - return nil, err - } - rows, err = s.markListExpired(q.ctx(), kind, rows) - if err != nil { - return nil, err - } - authorized := false - for _, row := range rows { - if str(row[idKey(kind)]) == id { - authorized = true - break - } - } - if !authorized { - return nil, fail("not_authorized", 403) - } - key := projectNameKey(kind, id) - update := M{"$set": M{"projectNames." + key: name}} - if name == "" { - update = M{"$unset": M{"projectNames." + key: ""}} - } - if _, err = s.Store.update(q.ctx(), "users", M{"_id": q.User["_id"]}, update); err != nil { - return nil, err - } - s.dashboardNames.clear() - filter := M{"owner": q.User["_id"], "type": kind, "artifactId": id} - if name == "" { - _, err = s.Store.DB.Collection("dashboardnames").DeleteOne(q.ctx(), filter) - } else { - _, err = s.Store.DB.Collection("dashboardnames").UpdateOne(q.ctx(), filter, M{"$set": M{"name": name}}, options.UpdateOne().SetUpsert(true)) - } - return M{"name": name}, err -} -func (s *Server) githubUsers(q *request) (any, error) { - query, search, err := userSearchQuery(q.R.URL.RawQuery) - if err != nil { - return nil, err - } - if !search { - return []any{}, nil - } - token, err := s.userToken(q.ctx(), q.User["_id"]) - if err != nil { - return nil, err - } - path, err := userSearchPath(query) - if err != nil { - return nil, err - } - data, err := s.githubObject(q.ctx(), "GET", path, token, nil) - if err != nil { - return nil, err - } - out := []M{} - for _, v := range arr(data["items"]) { - u := obj(v) - out = append(out, M{"username": u["login"], "githubId": str(u["id"]), "photo": u["avatar_url"]}) - } - return out, nil -} - -// JavaScript String.length counts UTF-16 code units, not UTF-8 bytes or -// Unicode characters. Stop once the search route's two-unit minimum is met. -func githubUserSearchable(query string) bool { - units := 0 - for _, r := range query { - units++ - if r > 0xffff { - units++ - } - if units >= 2 { - return true - } - } - return false -} - -func (s *Server) allRepositories(q *request) (any, error) { - owner := q.User["_id"] - if username := q.Params["username"]; username != "" && username != q.Identity.Username { - if !q.Identity.Admin { - return nil, fail("not_authorized", 403) - } - u, err := s.Store.one(q.ctx(), "users", M{"username": username}) - if err != nil { - return nil, err - } - if u == nil { - return nil, fail("user_not_found", 404) - } - owner = u["_id"] - } - - id := q.Params["provider"] - if id == "" { - id = "github" - } - p, e := s.providers.Get(id) - if e != nil { - return nil, providerFailure(e) - } - d, ok := p.(provider.Discovery) - if !ok { - return nil, providerFailure(provider.ErrCapability) - } - force, err := parseExtendedQuery(q.R.URL.RawQuery).object["force"].looseStringEqual("1") - if err != nil { - return nil, err - } - repos, e := d.List(q.ctx(), provider.ListRequest{OwnerID: str(owner), Force: force}) - if e != nil { - return nil, e - } - out := []M{} - for _, r := range repos { - out = append(out, M{"fullName": r.Name, "id": externalRepositoryID(id, r.ID)}) - } - return out, nil -} - -func (s *Server) coauthors(q *request) (any, error) { - r, original, err := coauthorResource(q) - if err != nil { - return nil, err - } - list := arr(r["coauthors"]) - if q.R.Method == "GET" { - if !canEdit(q.Identity, r) { - return nil, fail("not_authorized", 403) - } - return list, nil - } - owner := q.Identity.Owns(str(r["owner"])) - if q.R.Method == "POST" { - if !owner { - return nil, fail("not_authorized", 401) - } - username := strings.TrimSpace(str(q.Body["username"])) - if username == "" { - return nil, fail("username_not_defined", 400) - } - token, err := s.userToken(q.ctx(), q.User["_id"]) - if err != nil { - return nil, err - } - user, err := s.githubObject(q.ctx(), "GET", "/users/"+segment(username), token, nil) - if err != nil { - return nil, fail("github_user_not_found", 404) - } - name := str(user["login"]) - if strings.EqualFold(name, q.Identity.Username) { - return nil, fail("cannot_coauthor_self", 400) - } - for _, v := range list { - if strings.EqualFold(str(obj(v)["username"]), name) { - return list, nil - } - } - list = append(list, M{"username": name, "githubId": str(user["id"]), "photo": user["avatar_url"], "addedAt": time.Now()}) - } else { - target := q.Params["username"] - if !owner && !coauthorSelf(q.Identity, list, target) { - return nil, fail("not_authorized", 401) - } - keep := []any{} - for _, v := range list { - if !strings.EqualFold(str(obj(v)["username"]), target) { - keep = append(keep, v) - } - } - list = keep - } - filter := revisionFilter(r) - filter["coauthors"] = original - ok, err := s.Store.update(q.ctx(), "anonymizedrepositories", filter, M{"$set": M{"coauthors": list}}) - if err != nil { - return nil, err - } - if !ok { - return nil, fail("repository_changed", 409) - } - return list, nil -} -func (s *Server) tokens(q *request) (any, error) { - if q.R.Method == "GET" { - current, err := s.Store.one(q.ctx(), "users", M{"_id": q.User["_id"]}) - if err != nil { - return nil, err - } - if current == nil { - return nil, fail("user_not_found", 404) - } - list := arr(current["apiTokens"]) - out := []M{} - for _, v := range list { - t := obj(v) - m := selectFields(t, "name", "createdAt", "lastUsedAt") - m["id"] = t["_id"] - out = append(out, m) - } - return out, nil - } - if q.R.Method == "DELETE" { - id, err := oid(q.Params["id"]) - if err != nil { - return nil, fail("internal_error", 500) - } - r, err := s.Store.DB.Collection("users").UpdateOne(q.ctx(), M{"_id": q.User["_id"]}, M{"$pull": M{"apiTokens": M{"_id": id}}}) - if err != nil { - return nil, err - } - return M{"removed": r.ModifiedCount}, nil - } - token, err := security.RandomToken() - if err != nil { - return nil, err - } - name, err := adminTokenName(q.Body["name"]) - if err != nil { - return nil, err - } - entry := M{"_id": bson.NewObjectID(), "tokenHash": security.HashToken(token), "name": name, "createdAt": time.Now()} - matched, err := s.Store.update(q.ctx(), "users", M{"_id": q.User["_id"]}, M{"$push": M{"apiTokens": entry}}) - if err != nil { - return nil, err - } - if !matched { - return nil, fail("user_not_found", 404) - } - return M{"id": entry["_id"], "name": name, "createdAt": entry["createdAt"], "token": token}, nil -} - -func projectNameKey(kind, id string) string { - digest := sha256.Sum256([]byte(kind + ":" + id)) - return hex.EncodeToString(digest[:]) -} diff --git a/backend/internal/server/validation.go b/backend/internal/server/validation.go deleted file mode 100644 index c14fa70..0000000 --- a/backend/internal/server/validation.go +++ /dev/null @@ -1,211 +0,0 @@ -package server - -import ( - "encoding/json" - "math" - "strconv" - "strings" - "time" -) - -// Keep the client-visible validation order separate from provider connection and -// authorization. Adapters still validate their own repository/revision syntax. -func validateResourceInput(kind string, body M) error { - return validateResourceProviderInput(kind, body, "") -} -func validateResourceProviderInput(kind string, body M, existingProvider string) error { - id, ok := body[idKey(kind)].(string) - if !ok || !resourceID.MatchString(id) { - return fail("invalid_"+idKey(kind), 400) - } - source := obj(body["source"]) - switch kind { - case "repo": - if !inputTruthy(body["source"]) { - return fail("source_not_provided", 400) - } - if !inputTruthy(source["branch"]) { - return fail("branch_not_specified", 400) - } - if !inputTruthy(source["commit"]) { - return fail("commit_not_specified", 400) - } - case "gist": - if !inputTruthy(source["gistId"]) { - return fail("gistId_not_specified", 400) - } - case "pr": - if !inputTruthy(source["repositoryFullName"]) { - return fail("repository_not_specified", 400) - } - if !inputTruthy(source["pullRequestId"]) { - return fail("pullRequestId_not_specified", 400) - } - if !integerInput(source["pullRequestId"]) { - return fail("pullRequestId_is_not_a_number", 400) - } - } - if !inputTruthy(body["options"]) { - return fail("options_not_provided", 400) - } - if _, ok := body["terms"].([]any); !ok { - return fail("invalid_terms_format", 400) - } - if kind == "repo" { - id, e := sourceProvider(source) - if source["provider"] == nil && existingProvider != "" { - id, e = existingProvider, nil - } - if e == nil && id == "github" && !commitID.MatchString(str(source["commit"])) { - return fail("invalid_commit_format", 400) - } - } - return nil -} -func inputTruthy(v any) bool { - switch x := v.(type) { - case nil: - return false - case bool: - return x - case string: - return x != "" - case float64: - return x != 0 && !math.IsNaN(x) - case int: - return x != 0 - case int64: - return x != 0 - } - return true -} -func integerInput(v any) bool { - switch x := v.(type) { - case float64: - return !math.IsNaN(x) && !math.IsInf(x, 0) && math.Trunc(x) == x && math.Abs(x) < 1e21 - case int, int64: - return true - case string: - text := strings.TrimSpace(x) - if text == "" { - return false - } - if strings.HasPrefix(text, "0x") || strings.HasPrefix(text, "0X") { - _, e := strconv.ParseUint(text[2:], 16, 64) - return e == nil - } - n, e := strconv.ParseFloat(text, 64) - if e != nil || math.IsNaN(n) || math.IsInf(n, 0) { - return false - } - end := 0 - if text[0] == '+' || text[0] == '-' { - end = 1 - } - start := end - for end < len(text) && text[end] >= '0' && text[end] <= '9' { - end++ - } - if end == start { - return false - } - integer, e := strconv.ParseFloat(text[:end], 64) - return e == nil && integer == n - } - return false -} - -func normalizedIntegerInput(v any) any { - if text, ok := v.(string); ok { - text = strings.TrimSpace(text) - if strings.HasPrefix(text, "0x") || strings.HasPrefix(text, "0X") { - n, e := strconv.ParseUint(text[2:], 16, 64) - if e == nil { - return float64(n) - } - } - if n, e := strconv.ParseFloat(text, 64); e == nil { - return n - } - } - return v -} - -// Mongoose Boolean casting is an explicit set, not JavaScript truthiness. -// In particular "false" must disable the option, and null stays null. -func optionBoolean(value any) (any, bool) { - switch v := value.(type) { - case nil, bool: - return value, true - case string: - switch v { - case "true", "1", "yes": - return true, true - case "false", "0", "no": - return false, true - } - case float64: - if v == 0 || v == 1 { - return v == 1, true - } - case int: - if v == 0 || v == 1 { - return v == 1, true - } - case int64: - if v == 0 || v == 1 { - return v == 1, true - } - } - return nil, false -} - -// JSON numbers use the same shortest decimal/exponent form as JavaScript. -// Explicitly normalize negative zero, whose String() representation is "0". -func termString(value any) (string, bool) { - switch v := value.(type) { - case string: - return v, true - case bool: - return strconv.FormatBool(v), true - case int: - return termString(float64(v)) - case int64: - return termString(float64(v)) - case float64: - if v == 0 { - return "0", true - } - data, err := json.Marshal(v) - return string(data), err == nil - } - return "", false -} - -func shouldReactivateRepository(status string, options M, now time.Time) bool { - if status != "expired" && status != "removed" { - return false - } - return str(options["expirationMode"]) == "never" || date(options["expirationDate"]).After(now) -} - -// jsonSafeInteger matches JavaScript Number.isSafeInteger for decoded JSON; -// strings and booleans must never be coerced into upstream identity numbers. -func jsonSafeInteger(value any) bool { - id, ok := value.(float64) - return ok && !math.IsNaN(id) && !math.IsInf(id, 0) && math.Trunc(id) == id && math.Abs(id) <= 9007199254740991 -} - -// MongoDB may decode integral fields as BSON integers rather than JSON doubles. -func storedSafeInteger(value any) bool { - switch v := value.(type) { - case int: - return jsonSafeInteger(float64(v)) - case int32: - return jsonSafeInteger(float64(v)) - case int64: - return jsonSafeInteger(float64(v)) - default: - return jsonSafeInteger(value) - } -} diff --git a/backend/internal/server/validation_contract_test.go b/backend/internal/server/validation_contract_test.go deleted file mode 100644 index 40bd466..0000000 --- a/backend/internal/server/validation_contract_test.go +++ /dev/null @@ -1,41 +0,0 @@ -package server - -import ( - "encoding/json" - "errors" - "os" - "testing" -) - -func TestTypeScriptValidation(t *testing.T) { - raw, e := os.ReadFile("testdata/validation.json") - if e != nil { - t.Fatal(e) - } - var cases []struct { - Name, Kind string - Body M - Expected *struct { - Code string - Status int - } - } - if e = json.Unmarshal(raw, &cases); e != nil { - t.Fatal(e) - } - for _, c := range cases { - t.Run(c.Name, func(t *testing.T) { - e := validateResourceInput(c.Kind, c.Body) - if c.Expected == nil { - if e != nil { - t.Fatal(e) - } - return - } - var api *APIError - if !errors.As(e, &api) || api.Code != c.Expected.Code || api.Status != c.Expected.Status { - t.Fatalf("got %v; expected %+v", e, c.Expected) - } - }) - } -} diff --git a/backend/internal/server/validation_integration_test.go b/backend/internal/server/validation_integration_test.go deleted file mode 100644 index 546a521..0000000 --- a/backend/internal/server/validation_integration_test.go +++ /dev/null @@ -1,158 +0,0 @@ -package server - -import ( - "bytes" - "context" - "encoding/json" - "fmt" - "net/http/httptest" - "os" - "reflect" - "testing" -) - -func runValidationIntegration(t *testing.T, s *Server, p *fixtureProvider, call func(string, string, string, any) *httptest.ResponseRecorder, token, otherToken string) { - // Give this contract batch its own client address so unrelated lifecycle - // fixtures do not share the 120-attempt authentication budget. - clientAddress := "198.51.100.2:1234" - call = func(method, path, credential string, body any) *httptest.ResponseRecorder { - raw, _ := json.Marshal(body) - req := httptest.NewRequest(method, path, bytes.NewReader(raw)) - req.RemoteAddr = clientAddress - req.Header.Set("Content-Type", "application/json") - if credential != "" { - req.Header.Set("Authorization", "Bearer "+credential) - } - w := httptest.NewRecorder() - s.ServeHTTP(w, req) - return w - } - t.Run("TypeScript validation errors through HTTP", func(t *testing.T) { - raw, e := os.ReadFile("testdata/validation.json") - if e != nil { - t.Fatal(e) - } - var cases []struct { - Name, Kind string - Body M - Expected *struct { - Code string - Status int - } - } - if e = json.Unmarshal(raw, &cases); e != nil { - t.Fatal(e) - } - for _, c := range cases { - if c.Expected == nil { - continue - } - w := call("POST", "/api/"+c.Kind, token, c.Body) - var result M - json.Unmarshal(w.Body.Bytes(), &result) - if w.Code != c.Expected.Status || str(result["error"]) != c.Expected.Code { - t.Fatalf("%s: %d %s", c.Name, w.Code, w.Body) - } - } - }) - t.Run("TypeScript option persistence through HTTP", func(t *testing.T) { - clientAddress = "198.51.100.3:1234" - defer func() { clientAddress = "198.51.100.2:1234" }() - raw, err := os.ReadFile("testdata/options.json") - if err != nil { - t.Fatal(err) - } - var cases []struct { - Rejected bool - Name, Kind string - Body, Expected M - } - if err := json.Unmarshal(raw, &cases); err != nil { - t.Fatal(err) - } - for i, c := range cases { - clientAddress = fmt.Sprintf("198.51.102.%d:1234", i/30+1) - id := fmt.Sprintf("option-contract-%d", i) - c.Body[idKey(c.Kind)] = id - c.Body["fullName"] = p.name - c.Body["source"] = M{"provider": "fixture", "branch": "main", "commit": p.commit, "gistId": "snippet", "repositoryFullName": p.name, "pullRequestId": 1} - w := call("POST", "/api/"+c.Kind, token, c.Body) - if c.Rejected { - var response M - if err := json.Unmarshal(w.Body.Bytes(), &response); err != nil { - t.Fatal(err) - } - if w.Code != 400 || response["error"] != "invalid_options" { - t.Fatalf("%s: %d %s", c.Name, w.Code, w.Body) - } - continue - } - if w.Code != 200 { - t.Fatalf("%s: %d %s", c.Name, w.Code, w.Body) - } - if c.Kind == "repo" { - w = call("GET", "/api/repo/"+id, token, nil) - if w.Code != 200 { - t.Fatalf("%s: %d %s", c.Name, w.Code, w.Body) - } - } - var response M - if err := json.Unmarshal(w.Body.Bytes(), &response); err != nil { - t.Fatal(err) - } - if !reflect.DeepEqual(obj(response["options"]), c.Expected) { - t.Fatalf("%s HTTP options: got %s; expected %#v", c.Name, w.Body, c.Expected) - } - r, err := s.Store.one(context.Background(), collection(c.Kind), M{idKey(c.Kind): id}) - if err != nil { - t.Fatal(err) - } - stored := obj(r["options"]) - if value, exists := stored["expirationDate"]; exists { - stored["expirationDate"] = responseDate(date(value)) - } - data, err := json.Marshal(stored) - if err != nil { - t.Fatal(err) - } - var actual M - if err := json.Unmarshal(data, &actual); err != nil { - t.Fatal(err) - } - if !reflect.DeepEqual(actual, c.Expected) { - t.Fatalf("%s: got %s; expected %#v", c.Name, data, c.Expected) - } - } - }) - t.Run("authorize edits before validating request", func(t *testing.T) { - w := call("POST", "/api/repo/second-provider", otherToken, M{}) - if w.Code != 403 { - t.Fatal(w.Code, w.Body) - } - }) - t.Run("implicit existing provider retains opaque revisions", func(t *testing.T) { - p.revoked = true - defer func() { p.revoked = false }() - body := M{"repoId": "second-provider", "fullName": p.name, "source": M{"branch": "main", "commit": p.commit}, "terms": []string{"Alice"}, "options": M{"expirationMode": "never", "image": true, "pdf": true, "link": true}} - w := call("POST", "/api/repo/second-provider", token, body) - if w.Code != 200 { - t.Fatal("settings save required GitHub revision or live credentials", w.Code, w.Body) - } - }) - t.Run("numeric strings retain their TypeScript number value", func(t *testing.T) { - for i, c := range []struct { - input string - want int64 - }{{"1.0", 1}, {"0x10", 16}, {" 42 ", 42}} { - id := []string{"numeric-one", "numeric-hex", "numeric-space"}[i] - w := call("POST", "/api/pr", token, M{"pullRequestId": id, "source": M{"provider": "fixture", "repositoryFullName": p.name, "pullRequestId": c.input}, "terms": []string{}, "options": M{}}) - if w.Code != 200 { - t.Fatal(w.Code, w.Body) - } - r, e := s.Store.one(context.Background(), collection("pr"), M{"pullRequestId": id}) - if e != nil || number(obj(r["source"])["pullRequestId"]) != c.want { - t.Fatal(c, r, e) - } - } - }) -} diff --git a/backend/internal/server/web_file_cache.go b/backend/internal/server/web_file_cache.go deleted file mode 100644 index 2cc3430..0000000 --- a/backend/internal/server/web_file_cache.go +++ /dev/null @@ -1,44 +0,0 @@ -package server - -import ( - "encoding/json" - "sync" - "time" -) - -type webFileCacheEntry struct { - data []byte - expires time.Time -} -type webFileCache struct { - mu sync.Mutex - entries map[string]webFileCacheEntry -} - -// Cache only a proven unique, unchanged file path. The key includes repository -// path/settings revisions; callers still validate the live snapshot and access. -func (s *Server) cachedPlainWebFile(key string) M { - s.webFiles.mu.Lock() - entry := s.webFiles.entries[key] - s.webFiles.mu.Unlock() - if !time.Now().Before(entry.expires) { - return nil - } - var row M - if json.Unmarshal(entry.data, &row) != nil { - return nil - } - return row -} -func (s *Server) cachePlainWebFile(key string, row M) { - data, err := json.Marshal(selectFields(row, "path", "name", "size", "sha")) - if err != nil { - return - } - s.webFiles.mu.Lock() - defer s.webFiles.mu.Unlock() - if s.webFiles.entries == nil || len(s.webFiles.entries) >= 1000 { - s.webFiles.entries = map[string]webFileCacheEntry{} - } - s.webFiles.entries[key] = webFileCacheEntry{data, time.Now().Add(10 * time.Minute)} -} diff --git a/backend/internal/server/webhook.go b/backend/internal/server/webhook.go deleted file mode 100644 index 0b2d0e1..0000000 --- a/backend/internal/server/webhook.go +++ /dev/null @@ -1,212 +0,0 @@ -package server - -import ( - "context" - "encoding/json" - "errors" - "fmt" - "github.com/tdurieux/anonymous_github/backend/internal/security" - "go.mongodb.org/mongo-driver/v2/mongo/options" - "mime" - "net/http" - "time" -) - -func (s *Server) webhook(w http.ResponseWriter, r *http.Request) { - if r.Method != "POST" { - writeError(w, fail("not_found", 404)) - return - } - mediaType, _, _ := mime.ParseMediaType(r.Header.Get("Content-Type")) - if mediaType != "application/json" { - writeError(w, fail("invalid_webhook_signature", 401)) - return - } - body, err := readWebhookBody(w, r) - if err != nil { - var api *APIError - if errors.As(err, &api) { - writeError(w, api) - return - } - var oversized *http.MaxBytesError - if errors.As(err, &oversized) { - writeError(w, fail("invalid_webhook_request", 413)) - return - } - writeError(w, fail("invalid_webhook_request", 400)) - return - } - if !s.Config.AppEnabled || !security.VerifyWebhook(body, r.Header.Get("X-Hub-Signature-256"), s.Config.AppWebhookSecret) { - writeError(w, fail("invalid_webhook_signature", 401)) - return - } - var decoded any - if json.Unmarshal(body, &decoded) != nil { - writeError(w, fail("webhook_processing_failed", 503)) - return - } - eventName := r.Header.Get("X-GitHub-Event") - if decoded == nil && (eventName == "installation" || eventName == "installation_repositories" || eventName == "github_app_authorization") { - writeError(w, fail("webhook_processing_failed", 503)) - return - } - event := obj(decoded) - installation := obj(event["installation"]) - if (eventName == "installation" || eventName == "installation_repositories") && jsonSafeInteger(installation["id"]) && str(installation["app_id"]) == s.Config.AppID { - revision, err := security.RandomToken() - if err != nil { - writeError(w, fail("webhook_processing_failed", 503)) - return - } - filter := M{"appId": s.Config.AppID, "installationId": installation["id"]} - _, err = s.Store.DB.Collection("githubinstallations").UpdateOne(r.Context(), filter, M{"$set": M{"blocked": true, "revision": revision, "reconciliationPending": str(event["action"]) != "deleted"}}, options.UpdateOne().SetUpsert(true)) - if err != nil { - writeError(w, fail("webhook_processing_failed", 503)) - return - } - if str(event["action"]) != "deleted" { - jwt, err := s.appJWT() - if err != nil { - writeError(w, fail("webhook_processing_failed", 503)) - return - } - err = s.reconcileInstallation(r.Context(), number(installation["id"]), revision, jwt) - if err != nil { - writeError(w, fail("webhook_processing_failed", 503)) - return - } - } - } - if eventName == "github_app_authorization" && str(event["action"]) == "revoked" && inputTruthy(obj(event["sender"])["id"]) { - users, err := s.Store.list(r.Context(), "users", M{"externalIDs.github": str(obj(event["sender"])["id"])}, 0, nil) - if err != nil { - writeError(w, fail("webhook_processing_failed", 503)) - return - } - for _, u := range users { - row, err := s.Store.one(r.Context(), "credentials", M{"ownerId": u["_id"], "provider": "github-app-user"}) - if err != nil { - writeError(w, fail("webhook_processing_failed", 503)) - return - } - if row == nil || boolean(row["revoked"]) { - continue - } - ok, err := s.Store.update(r.Context(), "credentials", M{"_id": row["_id"], "revision": row["revision"]}, M{"$set": M{"reconciliationPending": true}}) - if err != nil { - writeError(w, fail("webhook_processing_failed", 503)) - return - } - if ok { - if err = s.reconcileGrant(r.Context(), row); err != nil { - writeError(w, fail("webhook_processing_failed", 503)) - return - } - } - - } - } - w.WriteHeader(http.StatusNoContent) -} - -func (s *Server) reconcileInstallations(ctx context.Context) { - if !s.Config.AppEnabled { - return - } - rows, e := s.Store.list(ctx, "githubinstallations", M{"appId": s.Config.AppID, "reconciliationPending": true}, 100, nil) - if e != nil || len(rows) == 0 { - return - } - jwt, e := s.appJWT() - if e != nil { - return - } - for _, row := range rows { - s.reconcileInstallation(ctx, number(row["installationId"]), str(row["revision"]), jwt) - } -} - -// A completed reconciliation consumes its revision. Replayed or in-flight -// responses cannot overwrite a newer webhook or another completed response. -func (s *Server) reconcileInstallation(ctx context.Context, id int64, revision, jwt string) error { - current, err := s.githubObject(ctx, "GET", fmt.Sprintf("/app/installations/%d", id), jwt, nil) - if err != nil { - return err - } - if str(current["app_id"]) != s.Config.AppID { - return fail("invalid_installation", 502) - } - account := obj(current["account"]) - if current["account"] == nil { - return fail("invalid_installation", 502) - } - nextRevision, err := security.RandomToken() - if err != nil { - return err - } - fields := M{"blocked": inputTruthy(current["suspended_at"]), "reconciliationPending": false, - "checkedAt": time.Now(), "revision": nextRevision} - // Mongoose ignores undefined values but preserves explicit nulls. - for source, target := range map[string]string{"id": "accountId", "login": "accountLogin", "type": "accountType"} { - if value, exists := account[source]; exists { - fields[target] = value - } - } - _, err = s.Store.update(ctx, "githubinstallations", M{"appId": s.Config.AppID, "installationId": id, "revision": revision}, M{"$set": fields}) - return err -} - -func (s *Server) reconcileGrant(ctx context.Context, row M) error { - if row == nil || boolean(row["revoked"]) { - return nil - } - checkedRevision := row["revision"] - token, e := s.credentialForReconciliation(ctx, row["ownerId"], "github-app-user", true) - if e == nil { - // Refresh can replace the revision while retaining the pending flag. - // Only clear that flag for the exact token checked below; a concurrent - // login or revocation must retain its own state. - current, err := s.Store.one(ctx, "credentials", M{"_id": row["_id"]}) - if err != nil { - return err - } - if current != nil && !boolean(current["revoked"]) { - if encrypted, err := envelope(current["encryptedToken"]); err == nil { - if stored, err := s.Config.Cipher.Decrypt(encrypted, str(row["ownerId"]), "github-app-user", ""); err == nil && stored == token { - checkedRevision = current["revision"] - } - } - } - _, e = s.githubObject(ctx, "GET", "/user", token, nil) - } - if e != nil && e.Error() != "github_app_reconnect_required" { - return e - } - filter := M{"_id": row["_id"], "revision": checkedRevision, "revoked": M{"$ne": true}} - fields := M{"reconciliationPending": false} - if e != nil { - revision, err := security.RandomToken() - if err != nil { - return err - } - // Match TypeScript's original-grant guard on revocation. - filter["revision"] = row["revision"] - fields["revoked"] = true - fields["revision"] = revision - } - _, err := s.Store.update(ctx, "credentials", filter, M{"$set": fields}) - return err -} -func (s *Server) reconcileGrants(ctx context.Context) { - if !s.Config.AppEnabled { - return - } - rows, e := s.Store.list(ctx, "credentials", M{"provider": "github-app-user", "reconciliationPending": true}, 100, nil) - if e != nil { - return - } - for _, row := range rows { - s.reconcileGrant(ctx, row) - } -} diff --git a/backend/internal/server/webhook_body.go b/backend/internal/server/webhook_body.go deleted file mode 100644 index 706eebf..0000000 --- a/backend/internal/server/webhook_body.go +++ /dev/null @@ -1,60 +0,0 @@ -package server - -import ( - "compress/gzip" - "compress/zlib" - "errors" - "io" - "net/http" - "strings" - - "github.com/andybalholm/brotli" - "github.com/klauspost/compress/zstd" -) - -const webhookBodyLimit = 2 * 1024 * 1024 - -// Express verifies the decompressed bytes. Bound output independently of wire -// size so compression cannot bypass the webhook payload limit. -func readWebhookBody(w http.ResponseWriter, r *http.Request) ([]byte, error) { - var reader io.Reader = http.MaxBytesReader(w, r.Body, 8*1024*1024) - encoding := strings.ToLower(r.Header.Get("Content-Encoding")) - switch encoding { - case "", "identity": - case "gzip": - decoded, err := gzip.NewReader(reader) - if err != nil { - return nil, err - } - defer decoded.Close() - reader = decoded - case "deflate": - decoded, err := zlib.NewReader(reader) - if err != nil { - return nil, err - } - defer decoded.Close() - reader = decoded - case "br": - reader = brotli.NewReader(reader) - case "zstd": - decoded, err := zstd.NewReader(reader, zstd.WithDecoderConcurrency(1), zstd.WithDecoderMaxMemory(32*1024*1024), zstd.WithDecoderMaxWindow(32*1024*1024)) - if err != nil { - return nil, err - } - defer decoded.Close() - reader = decoded - default: - return nil, fail("unsupported_content_encoding", 415) - } - body, err := io.ReadAll(io.LimitReader(reader, webhookBodyLimit+1)) - if len(body) > webhookBodyLimit { - return nil, &http.MaxBytesError{Limit: webhookBodyLimit} - } - // Node's Zstandard stream accepts an incomplete final frame and yields - // the bytes decoded so far. Those bytes still require a valid signature. - if encoding == "zstd" && errors.Is(err, io.ErrUnexpectedEOF) { - err = nil - } - return body, err -} diff --git a/backend/internal/server/webhook_http_test.go b/backend/internal/server/webhook_http_test.go deleted file mode 100644 index bea058a..0000000 --- a/backend/internal/server/webhook_http_test.go +++ /dev/null @@ -1,82 +0,0 @@ -package server - -import ( - "bytes" - "crypto/hmac" - "crypto/sha256" - "encoding/base64" - "encoding/hex" - "encoding/json" - "net/http/httptest" - "os" - "strings" - "testing" -) - -func TestWebhookHTTPContracts(t *testing.T) { - data, err := os.ReadFile("testdata/webhook-http.json") - if err != nil { - t.Fatal(err) - } - var cases []struct { - Name, Event, Body, ContentType, Error, Encoding, Wire, Mode string - Status, Size int - Tampered, Disabled bool - } - if err = json.Unmarshal(data, &cases); err != nil { - t.Fatal(err) - } - for _, tc := range cases { - t.Run(tc.Name, func(t *testing.T) { - s := &Server{} - s.Config.AppEnabled = !tc.Disabled - s.Config.AppID = "123" - s.Config.AppWebhookSecret = "synthetic-webhook-contract" - body := tc.Body - if tc.Size > 0 { - body = `{"padding":"` + strings.Repeat("x", tc.Size-14) + `"}` - } - wire := []byte(body) - if tc.Encoding != "" { - var err error - wire, err = base64.StdEncoding.DecodeString(tc.Wire) - if err != nil { - t.Fatal(err) - } - } - signed := []byte(body) - if tc.Mode == "wire-signature" { - signed = wire - } - mac := hmac.New(sha256.New, []byte(s.Config.AppWebhookSecret)) - mac.Write(signed) - signature := "sha256=" + hex.EncodeToString(mac.Sum(nil)) - if tc.Tampered { - signature = "sha256=" + strings.Repeat("0", 64) - } - r := httptest.NewRequest("POST", "/github/app/webhook", bytes.NewReader(wire)) - if tc.ContentType != "" { - r.Header.Set("Content-Type", tc.ContentType) - } - r.Header.Set("X-Hub-Signature-256", signature) - r.Header.Set("X-GitHub-Event", tc.Event) - if tc.Encoding != "" { - r.Header.Set("Content-Encoding", tc.Encoding) - } - w := httptest.NewRecorder() - s.webhook(w, r) - if w.Code != tc.Status { - t.Fatalf("status=%d want=%d body=%s", w.Code, tc.Status, w.Body.String()) - } - if tc.Error != "" { - var result M - if err := json.Unmarshal(w.Body.Bytes(), &result); err != nil || result["error"] != tc.Error { - t.Fatal("error response differs", w.Body.String(), err) - } - } - if tc.Status == 204 && w.Body.Len() != 0 { - t.Fatal("204 response has a body") - } - }) - } -} diff --git a/backend/internal/server/webhook_integration_test.go b/backend/internal/server/webhook_integration_test.go deleted file mode 100644 index d4735ce..0000000 --- a/backend/internal/server/webhook_integration_test.go +++ /dev/null @@ -1,143 +0,0 @@ -package server - -import ( - "bytes" - "context" - "crypto/hmac" - "crypto/sha256" - "encoding/hex" - "encoding/json" - "io" - "net/http" - "net/http/httptest" - "strings" - "testing" - - "go.mongodb.org/mongo-driver/v2/bson" -) - -func runWebhookIntegration(t *testing.T, base *Server) { - t.Run("signed webhook admission and complete grant reconciliation", func(t *testing.T) { - ctx := context.Background() - db := base.Store.DB.Client().Database("webhooks_" + bson.NewObjectID().Hex()) - defer db.Drop(ctx) - s := &Server{Config: base.Config, Store: &Store{DB: db, Redis: base.Store.Redis}} - s.Config.AppEnabled = true - s.Config.AppID = "123" - s.Config.AppWebhookSecret = "synthetic-webhook-secret" - calls := 0 - s.HTTP = &http.Client{Transport: roundTrip(func(r *http.Request) (*http.Response, error) { - if r.Method != "GET" || r.URL.Path != "/user" { - t.Fatal("unexpected upstream request", r.Method, r.URL) - } - calls++ - return &http.Response{StatusCode: 200, Header: http.Header{}, Body: io.NopCloser(strings.NewReader(`{"id":789}`))}, nil - })} - send := func(event string, payload M, tampered bool) *httptest.ResponseRecorder { - t.Helper() - body, err := json.Marshal(payload) - if err != nil { - t.Fatal(err) - } - mac := hmac.New(sha256.New, []byte(s.Config.AppWebhookSecret)) - mac.Write(body) - signature := "sha256=" + hex.EncodeToString(mac.Sum(nil)) - if tampered { - body = append(body, ' ') - } - r := httptest.NewRequest("POST", "/github/app/webhook", bytes.NewReader(body)) - r.Header.Set("Content-Type", "application/json") - r.Header.Set("X-Hub-Signature-256", signature) - r.Header.Set("X-GitHub-Event", event) - w := httptest.NewRecorder() - s.webhook(w, r) - return w - } - for _, event := range []string{"installation", "installation_repositories"} { - for i, id := range []any{nil, "42", true, 1.5, 9007199254740992.0, -9007199254740992.0, 0, -1, 42, 9007199254740991.0} { - payload := M{"action": "deleted", "installation": M{"id": id, "app_id": 123}} - w := send(event, payload, false) - if w.Code != 204 { - t.Fatal(event, id, w.Code, w.Body.String()) - } - count, err := db.Collection("githubinstallations").CountDocuments(ctx, M{}) - if err != nil { - t.Fatal(err) - } - expected := int64(0) - if i >= 6 { - expected = 1 - } - if count != expected { - t.Fatal("unsafe installation ID accepted or safe ID skipped", id, count) - } - if expected == 1 { - row, err := s.Store.one(ctx, "githubinstallations", M{}) - if err != nil || !boolean(row["blocked"]) || boolean(row["reconciliationPending"]) || str(row["revision"]) == "" { - t.Fatal("deletion did not durably block installation", row, err) - } - } - if _, err := db.Collection("githubinstallations").DeleteMany(ctx, M{}); err != nil { - t.Fatal(err) - } - } - } - // A forged payload and an installation belonging to another App cannot mutate state. - for _, tampered := range []bool{false, true} { - w := send("installation", M{"action": "deleted", "installation": M{"id": 42, "app_id": 456}}, tampered) - expected := 204 - if tampered { - expected = 401 - } - if w.Code != expected { - t.Fatal("signature/App isolation", w.Code) - } - count, err := db.Collection("githubinstallations").CountDocuments(ctx, M{}) - if err != nil || count != 0 { - t.Fatal("foreign installation persisted", count, err) - } - } - // GitHub permits payloads above the former Go-only 1 MiB boundary. - if w := send("ping", M{"padding": strings.Repeat("x", 1536*1024)}, false); w.Code != 204 { - t.Fatal("valid large payload rejected", w.Code) - } - if w := send("ping", M{"padding": strings.Repeat("x", 2*1024*1024)}, false); w.Code < 400 { - t.Fatal("oversized payload accepted") - } - // Missing/falsy sender IDs must not reconcile users with empty provider IDs. - owner := bson.NewObjectID() - if _, err := db.Collection("users").InsertOne(ctx, M{"_id": owner, "status": "active", "externalIDs": M{"github": ""}}); err != nil { - t.Fatal(err) - } - if _, err := db.Collection("credentials").InsertOne(ctx, M{"ownerId": owner, "provider": "github-app-user", "revision": "invalid-envelope"}); err != nil { - t.Fatal(err) - } - for _, id := range []any{nil, false, 0, ""} { - if w := send("github_app_authorization", M{"action": "revoked", "sender": M{"id": id}}, false); w.Code != 204 { - t.Fatal("falsy sender processed", id, w.Code) - } - } - for i := 0; i < 101; i++ { - owner := bson.NewObjectID() - if _, err := db.Collection("users").InsertOne(ctx, M{"_id": owner, "username": owner.Hex(), "status": "active", "externalIDs": M{"github": "789"}}); err != nil { - t.Fatal(err) - } - q := &request{Server: s, R: httptest.NewRequest("GET", "/", nil)} - if err := s.saveGrant(q, owner, "github-app-user", M{"access_token": "synthetic-token", "refresh_token": "synthetic-refresh", "expires_in": float64(3600), "refresh_token_expires_in": float64(7200)}); err != nil { - t.Fatal(err) - } - } - for replay := 0; replay < 2; replay++ { - if w := send("github_app_authorization", M{"action": "revoked", "sender": M{"id": 789}}, false); w.Code != 204 { - t.Fatal("grant reconciliation failed", w.Code, w.Body.String()) - } - if calls != 101*(replay+1) { - t.Fatal("grant reconciliation truncated", calls) - } - count, err := db.Collection("credentials").CountDocuments(ctx, M{"revoked": false, "reconciliationPending": false}) - if err != nil || count != 101 { - t.Fatal("working grants invalidated by replay", count, err) - } - } - }) -} diff --git a/backend/internal/server/website_lookup_integration_test.go b/backend/internal/server/website_lookup_integration_test.go deleted file mode 100644 index 99b078f..0000000 --- a/backend/internal/server/website_lookup_integration_test.go +++ /dev/null @@ -1,100 +0,0 @@ -package server - -import ( - "go.mongodb.org/mongo-driver/v2/bson" - "testing" -) - -func runWebsiteLookupIntegration(t *testing.T, s *Server) { - t.Run("website indexed lookup and grouped folder counts", func(t *testing.T) { - ctx := t.Context() - id := "website-index-" + bson.NewObjectID().Hex() - repo := M{"_id": bson.NewObjectID(), "repoId": id, "status": "ready", "treeGeneration": "fixture", "options": M{"terms": []string{"alice => shared", "bob => shared"}}} - if _, err := s.Store.DB.Collection(collection("repo")).InsertOne(ctx, repo); err != nil { - t.Fatal(err) - } - defer s.Store.DB.Collection(collection("repo")).DeleteOne(ctx, M{"repoId": id}) - defer s.Store.DB.Collection("files").DeleteMany(ctx, M{"repoId": id}) - rows := []any{} - for _, row := range []M{ - {"path": "", "name": "unique.txt", "size": 1, "sha": "unique"}, - {"path": "alice", "name": "index.html", "size": 1, "sha": "first"}, - {"path": "bob", "name": "index.html", "size": 1, "sha": "second"}, - {"path": "alice/sub", "name": "empty.txt", "size": 0}, - {"path": "alice", "name": "sub"}, - {"path": "bob", "name": "folder", "size": nil}, - } { - row["repoId"] = id - row["treeGeneration"] = "fixture" - rows = append(rows, row) - } - if _, err := s.Store.DB.Collection("files").InsertMany(ctx, rows); err != nil { - t.Fatal(err) - } - for range 2 { - row, err := s.indexedWebFile(ctx, repo, "unique.txt") - if err != nil || row["sha"] != "unique" { - t.Fatal(row, err) - } - for _, p := range []string{"shared/index.html", "shared"} { - if _, err := s.indexedWebFile(ctx, repo, p); err == nil || err.Error() != "ambiguous_anonymized_path" { - t.Fatal("collision accepted", p, err) - } - } - if row, err := s.indexedWebFile(ctx, repo, "missing"); err != nil || row != nil { - t.Fatal(row, err) - } - } - counts, err := s.folderCounts(ctx, repo) - if err != nil || number(counts[""]) != 4 || number(counts["shared"]) != 3 || number(counts["shared/sub"]) != 1 || len(counts) != 3 { - t.Fatal(counts, err) - } - // Changing settings must not reuse a collision or resolved row from old terms. - old := s.pathIndexKey(repo) - repo["options"] = M{"terms": []string{}} - if _, err := s.Store.DB.Collection(collection("repo")).UpdateOne(ctx, M{"repoId": id}, M{"$set": M{"options": repo["options"]}}); err != nil { - t.Fatal(err) - } - if row, err := s.indexedWebFile(ctx, repo, "shared/index.html"); err != nil || row != nil { - t.Fatal("old settings reused", row, err) - } - if row, err := s.indexedWebFile(ctx, repo, "alice/index.html"); err != nil || row["sha"] != "first" { - t.Fatal(row, err) - } - // Ordinary unchanged paths must not build a full index, even on a cold read. - plainKey := s.pathIndexKey(repo) - s.Store.Redis.Del(ctx, plainKey) - if row, err := s.indexedWebFile(ctx, repo, "unique.txt"); err != nil || row == nil { - t.Fatal(row, err) - } - if s.Store.Redis.Exists(ctx, plainKey).Val() != 0 { - t.Fatal("ordinary file built full index") - } - duplicate := M{"repoId": id, "treeGeneration": "fixture", "path": "", "name": "unique.txt", "size": 1, "sha": "duplicate"} - result, err := s.Store.DB.Collection("files").InsertOne(ctx, duplicate) - if err != nil { - t.Fatal(err) - } - repo["fileMetadataRevision"] = "duplicate-added" - if _, err := s.Store.DB.Collection(collection("repo")).UpdateOne(ctx, M{"repoId": id}, M{"$set": M{"fileMetadataRevision": repo["fileMetadataRevision"]}}); err != nil { - t.Fatal(err) - } - if _, err := s.indexedWebFile(ctx, repo, "unique.txt"); err == nil || err.Error() != "ambiguous_anonymized_path" { - t.Fatal("duplicate original accepted", err) - } - s.Store.DB.Collection("files").DeleteOne(ctx, M{"_id": result.InsertedID}) - // Eviction rebuilds safely; deletion invalidates even a ready cached index. - key := s.pathIndexKey(repo) - if err := s.Store.Redis.Del(ctx, key).Err(); err != nil { - t.Fatal(err) - } - if row, err := s.indexedWebFile(ctx, repo, "unique.txt"); err != nil || row == nil { - t.Fatal(row, err) - } - s.Store.DB.Collection(collection("repo")).DeleteOne(ctx, M{"repoId": id}) - if _, err := s.indexedWebFile(ctx, repo, "unique.txt"); err == nil || err.Error() != "repository_changed" { - t.Fatal("removed repository accepted", err) - } - s.Store.Redis.Del(ctx, old, key) - }) -} diff --git a/backend/internal/server/webview.go b/backend/internal/server/webview.go deleted file mode 100644 index 78384f6..0000000 --- a/backend/internal/server/webview.go +++ /dev/null @@ -1,225 +0,0 @@ -package server - -import ( - "encoding/json" - "github.com/tdurieux/anonymous_github/backend/internal/anonymize" - "github.com/tdurieux/anonymous_github/backend/internal/blobcache" - "github.com/tdurieux/anonymous_github/backend/internal/filetype" - "github.com/tdurieux/anonymous_github/backend/internal/security" - "html" - "io" - "net/http" - "net/url" - "path" - "strconv" - "strings" -) - -var pageIndexPriority = []string{"index.html", "index.htm", "index.md", "index.txt", "index.org", "index.1st", "index", "readme.md", "readme.txt", "readme.org", "readme.1st", "readme"} - -func (s *Server) webview(q *request) (any, error) { - q.W.Header().Set("Content-Security-Policy", "sandbox allow-scripts allow-popups allow-forms allow-modals") - q.W.Header().Set("Cache-Control", "private, no-cache, must-revalidate") - r, e := q.resource("repo", false) - if e != nil { - return nil, e - } - if e = s.checkResource(q.ctx(), "repo", r); e != nil { - return nil, e - } - if _, e = s.authorizeContent(q.ctx(), r); e != nil { - return nil, e - } - opt := obj(r["options"]) - page := obj(opt["pageSource"]) - if !boolean(opt["page"]) || len(page) == 0 { - return nil, fail("page_not_activated", 400) - } - if str(page["branch"]) != str(obj(r["source"])["branch"]) { - return nil, fail("page_not_supported_on_different_branch", 400) - } - root := strings.TrimPrefix(str(page["path"]), "/") - if root == "." { - root = "" - } - if root != "" { - if _, e = security.RelativePath(root); e != nil { - return nil, fail("invalid_path", 400) - } - } - requested := strings.TrimSuffix(q.Params["path"], "/") - if requested != "" { - if _, e = security.RelativePath(requested); e != nil { - return nil, fail("invalid_path", 400) - } - } - requested = path.Join(root, requested) - if requested == "." { - requested = "" - } - selected, e := s.indexedWebFile(q.ctx(), r, requested) - if e != nil { - return nil, e - } - children := map[string]M{} - // File requests need only one indexed entry. Directory/index rendering keeps - // the existing listing behavior, including collisions among child paths. - if selected == nil || selected["size"] == nil { - selected = nil - engine, e := s.engine(r, "repo") - if e != nil { - return nil, e - } - rows, e := s.Store.list(q.ctx(), "files", M{"repoId": r["repoId"], "treeGeneration": activeGeneration(r)}, 100000, nil) - if e != nil { - return nil, e - } - for _, row := range rows { - anonymous, e := engine.Path(q.ctx(), path.Join(str(row["path"]), str(row["name"]))) - if e != nil { - return nil, e - } - if anonymous == requested { - if selected != nil { - return nil, fail("ambiguous_anonymized_path", 409) - } - selected = row - } - parent := path.Dir(anonymous) - if parent == "." { - parent = "" - } - if parent == requested { - if children[path.Base(anonymous)] != nil { - return nil, fail("ambiguous_anonymized_path", 409) - } - children[path.Base(anonymous)] = row - } - } - } - if selected == nil || selected["size"] == nil { - if !strings.Contains(q.R.Header.Get("Accept"), "text/html") { - return nil, fail("file_not_found", 404) - } - for _, wanted := range pageIndexPriority { - for name, row := range children { - if strings.EqualFold(name, wanted) && row["size"] != nil { - selected = row - break - } - } - if selected != nil && selected["size"] != nil { - break - } - } - if selected == nil || selected["size"] == nil { - var b strings.Builder - b.WriteString("Content") - q.W.Header().Set("Content-Type", "text/html; charset=utf-8") - q.W.Header().Set("Content-Length", strconv.Itoa(b.Len())) - if q.R.Method != "HEAD" { - io.WriteString(q.W, b.String()) - } - return written{}, nil - } - } - if !fileAllowed(str(selected["name"]), opt) { - return nil, fail("file_not_supported", 400) - } - if number(selected["size"]) > anonymize.MaxInput { - return nil, fail("file_too_big", 413) - } - ext := strings.ToLower(path.Ext(str(selected["name"]))) - ct := filetype.MIME(ext) - if ext == ".md" { - ct = "text/html; charset=utf-8" - } - if ct == "" || ext == ".ts" { - ct = "text/plain; charset=utf-8" - } - q.W.Header().Set("Content-Type", ct) - if q.R.Method == "HEAD" { - return written{}, nil - } - response := &sharedResponse{accept: strings.Join(q.R.Header.Values("Accept-Encoding"), ", ")} - // Markdown is wrapped in HTML; its cached source encoding cannot be sent. - var delivery *sharedResponse - if ext != ".md" { - delivery = response - } - reader, cleanup, _, e := s.transformedResponse(q.ctx(), r, selected, delivery) - if response.eligible { - sharedVary(q.W.Header()) - } - if e == errSharedEncoding { - q.W.Header().Set("Content-Length", "0") - q.W.WriteHeader(http.StatusNotAcceptable) - return written{}, nil - } - if e != nil { - return nil, e - } - defer cleanup() - if current, e := s.Store.one(q.ctx(), collection("repo"), contentRevisionFilter(r)); e != nil { - return nil, e - } else if current == nil { - return nil, fail("repository_changed", 409) - } - if ext == ".md" { - - const pageLimit = 8 * 1024 * 1024 - data, e := io.ReadAll(io.LimitReader(reader, pageLimit+1)) - if e != nil || len(data) > pageLimit { - return nil, fail("page_too_large", 413) - } - payload, e := json.Marshal(M{"source": string(data)}) - if e != nil { - return nil, e - } - io.WriteString(q.W, `Content
    `) - - } else { - handled := false - if blob, ok := reader.(*blobcache.Reader); ok && response.eligible { - handled, e = sendSharedBlob(q.ctx(), q.W, blob, response) - if e != nil { - if handled { - panic(http.ErrAbortHandler) - } - return nil, e - } - } - if !handled { - if _, e = io.Copy(q.W, reader); e != nil { - panic(http.ErrAbortHandler) - } - } - } - return written{}, nil -} - -// Reuse the application's browser renderer so diagrams, math, syntax highlighting, -// sanitization and heading IDs stay identical after the server runtime changes. -const projectPageScript = `"use strict";(()=>{const source=document.getElementById("go-project-source"),target=document.getElementById("go-project-content");if(!source||!target)return;try{const data=JSON.parse(source.textContent);if(typeof data.source!=="string")return;if(window.MarkdownRenderer){target.innerHTML=window.MarkdownRenderer.render(data.source)}else{target.textContent=data.source}}catch{target.textContent="Unable to render this page."}source.remove()})();` - -func (s *Server) projectPageScript(q *request) (any, error) { - q.W.Header().Set("Content-Type", "application/javascript; charset=utf-8") - q.W.Header().Set("Cache-Control", "public, max-age=300") - q.W.Header().Set("Content-Length", strconv.Itoa(len(projectPageScript))) - if q.R.Method != "HEAD" { - io.WriteString(q.W, projectPageScript) - } - return written{}, nil -} diff --git a/backend/internal/server/worker_queues_integration_test.go b/backend/internal/server/worker_queues_integration_test.go deleted file mode 100644 index 16cc0d9..0000000 --- a/backend/internal/server/worker_queues_integration_test.go +++ /dev/null @@ -1,264 +0,0 @@ -package server - -import ( - "context" - "encoding/xml" - "fmt" - "io" - "net/http" - "net/http/httptest" - "os" - "strings" - "sync" - "testing" - "time" - - "github.com/tdurieux/anonymous_github/backend/internal/provider" - "go.mongodb.org/mongo-driver/v2/bson" -) - -type blockingQueueProvider struct { - fixtureProvider - entered chan<- string - release <-chan struct{} -} - -func (p *blockingQueueProvider) Tree(ctx context.Context, a provider.Access) ([]provider.Entry, error) { - select { - case p.entered <- "download": - case <-ctx.Done(): - return nil, ctx.Err() - } - select { - case <-p.release: - return nil, nil - case <-ctx.Done(): - return nil, ctx.Err() - } -} - -func TestIndependentWorkerQueuesIntegration(t *testing.T) { - t.Run("capacity pause resume and cache revision", func(t *testing.T) { runIndependentWorkerQueues(t, false) }) - t.Run("cancel blocked workers", func(t *testing.T) { runIndependentWorkerQueues(t, true) }) -} - -func runIndependentWorkerQueues(t *testing.T, cancelActive bool) { - uri, address := os.Getenv("GO_TEST_MONGODB_URI"), os.Getenv("GO_TEST_REDIS_ADDR") - if uri == "" || address == "" { - t.Skip("requires disposable MongoDB/Redis") - } - if !strings.HasPrefix(uri, "mongodb://127.0.0.1:") || !strings.HasPrefix(address, "127.0.0.1:") { - t.Fatal("requires local disposable services") - } - ctx, cancel := context.WithTimeout(t.Context(), 30*time.Second) - defer cancel() - entered := make(chan string, 30) - release := make(chan struct{}) - var objectMu sync.Mutex - freshObjects := map[string]string{} - api := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - switch { - case r.Method == "PUT": - data, err := io.ReadAll(r.Body) - if err != nil { - t.Error(err) - w.WriteHeader(400) - return - } - objectMu.Lock() - freshObjects[strings.TrimPrefix(r.URL.Path, "/bucket/")] = string(data) - objectMu.Unlock() - w.Header().Set("ETag", `"fixture"`) - case r.Method == "HEAD": - objectMu.Lock() - value, ok := freshObjects[strings.TrimPrefix(r.URL.Path, "/bucket/")] - objectMu.Unlock() - if !ok { - w.WriteHeader(404) - return - } - w.Header().Set("Content-Length", fmt.Sprint(len(value))) - case r.Method == "GET" && r.URL.Query().Get("list-type") == "2": - key := r.URL.Query().Get("prefix") + "old" - fmt.Fprintf(w, "false%s3", key) - case r.Method == "POST" && r.URL.Query().Has("delete"): - var payload struct { - Objects []struct{ Key string } `xml:"Object"` - } - if err := xml.NewDecoder(r.Body).Decode(&payload); err != nil || len(payload.Objects) != 1 { - t.Error("invalid deletion", err) - w.WriteHeader(400) - return - } - queue := strings.Split(payload.Objects[0].Key, "-")[0] - select { - case entered <- queue: - case <-r.Context().Done(): - return - } - select { - case <-release: - objectMu.Lock() - for _, object := range payload.Objects { - delete(freshObjects, object.Key) - } - objectMu.Unlock() - io.WriteString(w, "") - case <-r.Context().Done(): - return - } - default: - t.Errorf("unexpected S3 request %s %s", r.Method, r.URL) - w.WriteHeader(500) - } - })) - defer api.Close() - config := Config{MongoURI: uri, Database: "worker_queues_" + bson.NewObjectID().Hex(), RedisAddress: address, Root: t.TempDir(), PublicDir: t.TempDir(), Workers: 1, Mask: "XXXX", Storage: "s3", S3Bucket: "bucket", S3Region: "test", S3Endpoint: api.URL, S3ID: "synthetic", S3Secret: "synthetic"} - store, err := Connect(ctx, config) - if err != nil { - t.Fatal(err) - } - defer store.Close(context.Background()) - defer store.DB.Drop(context.Background()) - s, err := New(config, store, &blockingQueueProvider{entered: entered, release: release}) - if err != nil { - t.Fatal(err) - } - defer s.Close() - pause := func(queue string, value bool) { - t.Helper() - var err error - if value { - err = store.Redis.Set(ctx, "go:pause:"+queue, "1", 0).Err() - } else { - err = store.Redis.Del(ctx, "go:pause:"+queue).Err() - } - if err != nil { - t.Fatal(err) - } - } - for _, q := range workerQueues { - pause(q.name, false) - } - defer store.Redis.Del(context.Background(), "go:pause:download", "go:pause:remove", "go:pause:cache") - pause("cache", true) - for _, spec := range []struct { - queue, action, status string - count int - }{{"download", "prepare", "preparing", 6}, {"remove", "remove", "removing", 8}, {"cache", "cache", "ready", 8}} { - for i := 0; i < spec.count; i++ { - id := fmt.Sprintf("%s-%d", spec.queue, i) - resource := M{"_id": bson.NewObjectID(), "repoId": id, "status": spec.status, "source": M{"provider": "fixture", "repositoryName": "team/subgroup/project", "repositoryId": "project:123", "commit": "opaque:1"}, "providerAccess": M{"provider": "fixture", "kind": "fixture-grant", "revision": "grant:1"}} - if _, err := store.DB.Collection(collection("repo")).InsertOne(ctx, resource); err != nil { - t.Fatal(err) - } - if err := s.enqueue(ctx, "repo", id, spec.action); err != nil { - t.Fatal(err) - } - } - } - work, stop := context.WithCancel(ctx) - done := make(chan struct{}) - go func() { defer close(done); s.RunJobs(work) }() - defer func() { - stop() - select { - case <-done: - case <-time.After(5 * time.Second): - t.Error("workers did not stop") - } - }() - counts := map[string]int{} - receive := func(n int) { - t.Helper() - for i := 0; i < n; i++ { - select { - case q := <-entered: - counts[q]++ - case <-ctx.Done(): - t.Fatal("workers stalled", counts) - } - } - } - receive(8) - if counts["download"] != 3 || counts["remove"] != 5 || counts["cache"] != 0 { - t.Fatal("wrong independent capacity", counts) - } - pause("remove", true) - pause("cache", false) - receive(5) - if counts["cache"] != 5 { - t.Fatal("cache starved or exceeded capacity", counts) - } - for _, spec := range []struct { - action string - count int64 - }{{"prepare", 3}, {"remove", 5}, {"cache", 5}} { - n, err := store.DB.Collection("gojobs").CountDocuments(ctx, M{"action": spec.action, "state": "active"}) - if err != nil || n != spec.count { - t.Fatal("active capacity", spec, n, err) - } - } - if cancelActive { - stop() - select { - case <-done: - case <-time.After(5 * time.Second): - t.Fatal("blocked provider and S3 workers did not stop") - } - return - } - // Cache reset has published its new revision but its old deletion is - // blocked. A file fetched under the new revision must survive that deletion. - cacheJob, err := store.one(ctx, "gojobs", M{"action": "cache", "state": "active"}) - if err != nil || cacheJob == nil { - t.Fatal(cacheJob, err) - } - cached, err := store.one(ctx, collection("repo"), M{"repoId": cacheJob["resourceId"]}) - if err != nil || str(cached["contentCacheRevision"]) == "" { - t.Fatal(cached, err) - } - access, err := s.providerAccess(cached) - if err != nil { - t.Fatal(err) - } - newPath := rawCachePath(cached, access, provider.Entry{Path: "fresh.txt", Revision: "blob:fresh"}) - if err := s.content.Put(ctx, str(cached["repoId"]), newPath, strings.NewReader("new"), 3, 3); err != nil { - t.Fatal(err) - } - close(release) - waitCompleted := func(action string, expected int64) { - t.Helper() - for { - n, err := store.DB.Collection("gojobs").CountDocuments(ctx, M{"action": action, "state": "completed"}) - if err != nil { - t.Fatal(err) - } - if n == expected { - return - } - select { - case <-ctx.Done(): - t.Fatal("jobs did not complete", action, n) - case <-time.After(20 * time.Millisecond): - } - } - } - waitCompleted("prepare", 6) - waitCompleted("cache", 8) - if size, err := s.content.Size(ctx, str(cached["repoId"]), newPath); err != nil || size != 3 { - t.Fatal("cache reset deleted new revision content", size, err) - } - waitCompleted("remove", 5) - if n, err := store.DB.Collection("gojobs").CountDocuments(ctx, M{"action": "remove", "state": "waiting"}); err != nil || n != 3 { - t.Fatal("pause claimed pending removal", n, err) - } - pause("remove", false) - waitCompleted("remove", 8) - stop() - select { - case <-done: - case <-ctx.Done(): - t.Fatal("RunJobs did not join its workers") - } -} diff --git a/backend/internal/server/worker_queues_test.go b/backend/internal/server/worker_queues_test.go deleted file mode 100644 index 308535b..0000000 --- a/backend/internal/server/worker_queues_test.go +++ /dev/null @@ -1,36 +0,0 @@ -package server - -import ( - "encoding/json" - "os" - "testing" -) - -func TestTypeScriptWorkerQueueCapacities(t *testing.T) { - data, err := os.ReadFile("testdata/worker-queues.json") - if err != nil { - t.Fatal(err) - } - var expected []struct { - Name string - Concurrency int - } - if err := json.Unmarshal(data, &expected); err != nil { - t.Fatal(err) - } - actual := map[string]int{} - for _, q := range workerQueues { - if actual[q.name] != 0 || len(queueActions(q.name)) == 0 { - t.Fatal("duplicate or unknown worker queue", q) - } - actual[q.name] = q.concurrency - } - if len(expected) != len(actual) { - t.Fatal("queue count changed", actual) - } - for _, q := range expected { - if actual[q.Name] != q.Concurrency { - t.Fatal("TypeScript capacity mismatch", q, actual) - } - } -} diff --git a/backend/internal/server/zip_archive.go b/backend/internal/server/zip_archive.go deleted file mode 100644 index 83c92b5..0000000 --- a/backend/internal/server/zip_archive.go +++ /dev/null @@ -1,302 +0,0 @@ -package server - -import ( - "context" - "crypto/sha1" - "crypto/sha256" - "encoding/hex" - "errors" - "fmt" - "io" - "net/http" - "os" - "path" - "strings" - - "github.com/tdurieux/anonymous_github/backend/internal/anonymize" - "github.com/tdurieux/anonymous_github/backend/internal/provider" - "github.com/tdurieux/anonymous_github/backend/internal/security" - "go.mongodb.org/mongo-driver/v2/mongo/options" -) - -type archiveInput struct { - row M - file *os.File // nil means the provider requires the normal file path - err error -} - -func (i archiveInput) close() { - if i.file != nil { - i.file.Close() - os.Remove(i.file.Name()) - } -} - -type archiveOutput struct { - name string - reader io.Reader - cleanup func() - err error -} - -// The two unbuffered handoffs bound the work to one downloading input, one -// transforming entry and one output being compressed. Slow clients backpressure -// both stages. No repository-sized spool or unbounded worker queue is created. -func (s *Server) zipFromArchive(q *request, r M, p provider.Repositories, access provider.Access, capability provider.Archives) (any, error) { - engine, err := s.engine(r, "repo") - if err != nil { - return nil, err - } - if _, err = s.authorizeContent(q.ctx(), r); err != nil { - return nil, err - } - ctx, cancel := context.WithCancel(q.ctx()) - defer cancel() - source, err := capability.OpenArchive(ctx, access) - if err != nil { - return nil, err - } - inputs := make(chan archiveInput) - outputs := make(chan archiveOutput) - producerDone, transformDone := make(chan struct{}), make(chan struct{}) - go func() { - defer close(producerDone) - defer close(inputs) - defer source.Close() - err := s.readArchiveInputs(ctx, r, p, access, source, inputs) - if err != nil { - select { - case inputs <- archiveInput{err: err}: - case <-ctx.Done(): - } - } - }() - go func() { - defer close(transformDone) - defer close(outputs) - // Drain and remove any input already prepared when output/transform fails. - defer func() { - cancel() - for input := range inputs { - input.close() - } - }() - seen := map[string]bool{} - for input := range inputs { - output := archiveOutput{err: input.err} - if output.err == nil { - original := path.Join(str(input.row["path"]), str(input.row["name"])) - output.name, output.err = engine.Path(ctx, original) - if output.err == nil { - safe, e := security.RelativePath(output.name) - if e != nil || safe != output.name || seen[output.name] { - output.err = errors.New("invalid_or_duplicate_archive_path") - } - seen[output.name] = true - } - if output.err == nil { - if input.file == nil { - output.reader, output.cleanup, _, output.err = s.transformed(ctx, r, input.row) - } else { - output.reader, output.cleanup, _, output.err = s.transformBody(ctx, r, input.row, io.NopCloser(input.file)) - } - } - } - input.close() - select { - case outputs <- output: - case <-ctx.Done(): - if output.cleanup != nil { - output.cleanup() - } - return - } - if output.err != nil { - return - } - } - }() - // Wait for both stages on every exit, including http.ErrAbortHandler panic. - defer func() { cancel(); <-transformDone; <-producerDone }() - q.W.Header().Set("Content-Disposition", downloadDisposition(str(r["repoId"])+".zip")) - q.W.Header().Set("Content-Type", "application/zip") - q.W.Header().Set("Cache-Control", "private, no-cache") - q.W.Header().Set("X-Accel-Buffering", "no") - archive := newStreamZIP(q.W) - for output := range outputs { - if output.err != nil { - s.recordZIPFailure(q.ctx(), "prepare", output.err) - panic(http.ErrAbortHandler) - } - // Preparation can overlap an earlier entry's download. Recheck the live - // grant and revision at release, after every wait, before emitting bytes. - stage := "authorization" - err := s.activeContentCache(q.ctx(), r) - if err == nil { - _, err = s.authorizeContent(q.ctx(), r) - } - if err == nil { - stage = "output" - err = archive.add(q.ctx(), output.name, output.reader) - } - output.cleanup() - if err != nil { - s.recordZIPFailure(q.ctx(), stage, err) - panic(http.ErrAbortHandler) - } - } - if err := q.ctx().Err(); err != nil { - s.recordZIPFailure(q.ctx(), "finalize", err) - panic(http.ErrAbortHandler) - } - if err := archive.archive.Close(); err != nil { - s.recordZIPFailure(q.ctx(), "finalize", err) - panic(http.ErrAbortHandler) - } - return written{}, nil -} - -func (s *Server) readArchiveInputs(ctx context.Context, r M, p provider.Repositories, access provider.Access, source provider.Archive, out chan<- archiveInput) error { - seen := map[string]bool{} - copyBuffer := make([]byte, 32<<10) - send := func(input archiveInput) error { - select { - case out <- input: - return nil - case <-ctx.Done(): - input.close() - return ctx.Err() - } - } - for { - entry, body, err := source.Next() - if err == io.EOF { - break - } - if err != nil { - return err - } - relative, err := security.RelativePath(entry.Path) - if err != nil || relative != entry.Path || seen[relative] || entry.Directory { - return errors.New("invalid_or_duplicate_archive_path") - } - seen[relative] = true - dir, name := path.Split(relative) - dir = strings.TrimSuffix(dir, "/") - if !fileAllowed(name, obj(r["options"])) { - continue - } - if err := s.activeContentCache(ctx, r); err != nil { - return err - } - rows, err := s.Store.list(ctx, "files", M{"repoId": r["repoId"], "treeGeneration": activeGeneration(r), "path": dir, "name": name}, 2, nil) - if err != nil { - return err - } - if len(rows) > 1 { - return errors.New("duplicate_archive_metadata") - } - var row M - if len(rows) == 1 { - row = rows[0] - } - if row == nil || row["size"] == nil { - // Truncated trees can omit metadata. Resolve through the provider at the - // same immutable commit; never trust an unbound archive-only path. - metadata, ok := p.(provider.FileMetadata) - if !ok { - return errors.New("archive_metadata_missing") - } - resolved, err := metadata.FileMetadata(ctx, access, relative) - if err != nil { - return err - } - if resolved == nil || resolved.Directory || resolved.Path != relative { - return errors.New("archive_metadata_missing") - } - row = M{"path": dir, "name": name, "size": resolved.Size, "sha": resolved.Revision} - } - input, err := spoolArchiveInput(ctx, body, entry.Size, row, p, access, copyBuffer) - if err != nil { - return err - } - if err = send(input); err != nil { - return err - } - } - // Git export-ignore can omit tracked blobs. Retrieve only those exceptional - // entries via the regular provider path, preserving the existing ZIP output. - rows, err := s.Store.DB.Collection("files").Find(ctx, M{"repoId": r["repoId"], "treeGeneration": activeGeneration(r), "size": M{"$ne": nil}}, options.Find().SetBatchSize(128).SetProjection(M{"path": 1, "name": 1, "sha": 1, "size": 1})) - if err != nil { - return err - } - defer rows.Close(ctx) - for rows.Next(ctx) { - var row M - if err := rows.Decode(&row); err != nil { - return err - } - if seen[path.Join(str(row["path"]), str(row["name"]))] || !fileAllowed(str(row["name"]), obj(r["options"])) { - continue - } - if err = send(archiveInput{row: row}); err != nil { - return err - } - } - return rows.Err() -} - -func spoolArchiveInput(ctx context.Context, body io.Reader, size int64, row M, p provider.Repositories, access provider.Access, copyBuffer []byte) (archiveInput, error) { - if size < 0 || size > anonymize.MaxInput { - return archiveInput{}, fail("file_too_big", 413) - } - file, err := os.CreateTemp("", "anonymous-go-archive-") - if err != nil { - return archiveInput{}, err - } - input := archiveInput{row: row, file: file} - ok := false - defer func() { - if !ok { - input.close() - } - }() - gitHash, digest := sha1.New(), sha256.New() - fmt.Fprintf(gitHash, "blob %d\x00", size) - n, err := io.CopyBuffer(io.MultiWriter(file, gitHash, digest), &zipContextReader{ctx: ctx, reader: io.LimitReader(body, size+1)}, copyBuffer) - if err != nil { - return archiveInput{}, err - } - if n != size { - return archiveInput{}, errors.New("archive_entry_size_mismatch") - } - if _, err = file.Seek(0, 0); err != nil { - return archiveInput{}, err - } - prefix := make([]byte, 256) - count, err := file.Read(prefix) - if err != nil && err != io.EOF { - return archiveInput{}, err - } - err = nil // An empty file has a valid empty prefix. - entry := provider.Entry{Path: path.Join(str(row["path"]), str(row["name"])), Revision: str(row["sha"]), Size: number(row["size"])} - proof := provider.ContentProof{GitSHA: hex.EncodeToString(gitHash.Sum(nil)), SHA256: hex.EncodeToString(digest.Sum(nil)), Size: n} - if verifier, exists := p.(provider.ArchiveContentVerifier); exists { - err = verifier.VerifyArchiveContent(ctx, access, entry, proof, prefix[:count]) - } else if verifier, exists := p.(provider.ContentVerifier); exists { - _, err = verifier.VerifyContent(ctx, access, entry, proof) - } else if size != entry.Size { - err = errors.New("archive_entry_size_mismatch") - } - if errors.Is(err, provider.ErrArchiveEntryFallback) { - return archiveInput{row: row}, nil - } - if err != nil { - return archiveInput{}, err - } - if _, err = file.Seek(0, 0); err != nil { - return archiveInput{}, err - } - ok = true - return input, nil -} diff --git a/backend/internal/server/zip_archive_integration_test.go b/backend/internal/server/zip_archive_integration_test.go deleted file mode 100644 index 1d69962..0000000 --- a/backend/internal/server/zip_archive_integration_test.go +++ /dev/null @@ -1,228 +0,0 @@ -package server - -import ( - "archive/tar" - "archive/zip" - "bytes" - "compress/gzip" - "context" - "crypto/sha1" - "encoding/hex" - "fmt" - "io" - "net/http" - "net/http/httptest" - "os" - "path/filepath" - "strings" - "sync" - "sync/atomic" - "testing" - "time" - - "go.mongodb.org/mongo-driver/v2/bson" -) - -func archiveTestGitSHA(body string) string { - digest := sha1.New() - fmt.Fprintf(digest, "blob %d\x00%s", len(body), body) - return hex.EncodeToString(digest.Sum(nil)) -} - -func runArchiveZIPIntegration(t *testing.T, s *Server) { - if os.Getenv("GO_TEST_SERVER_BINARY") == "" { - t.Skip("worker binary required") - } - ctx := t.Context() - original, err := s.Store.one(ctx, "anonymizedrepositories", M{"repoId": "fixture"}) - if err != nil || original == nil { - t.Fatal("fixture required", err) - } - originalHTTP := s.HTTP - defer func() { s.HTTP = originalHTTP }() - for _, mode := range []string{"stream", "cancel", "checksum", "revocation", "duplicate", "collision", "export exceptions"} { - t.Run(mode, func(t *testing.T) { - dir := t.TempDir() - t.Setenv("TMPDIR", dir) - repo := M{} - for k, v := range original { - repo[k] = v - } - repo["_id"] = bson.NewObjectID() - repo["repoId"] = "archive-" + bson.NewObjectID().Hex() - if _, err := s.Store.DB.Collection("anonymizedrepositories").InsertOne(ctx, repo); err != nil { - t.Fatal(err) - } - defer s.Store.DB.Collection("anonymizedrepositories").DeleteOne(ctx, M{"_id": repo["_id"]}) - defer s.Store.DB.Collection("files").DeleteMany(ctx, M{"repoId": repo["repoId"]}) - bodies := []string{"first Alice", "second Alice"} - names := []string{"0.txt", "1.txt"} - if mode == "collision" { - names = []string{"Alice.txt", "XXXX-1.txt"} - } - for i, body := range bodies { - if _, err := s.Store.DB.Collection("files").InsertOne(ctx, M{"repoId": repo["repoId"], "treeGeneration": activeGeneration(repo), "path": "", "name": names[i], "size": len(body), "sha": archiveTestGitSHA(body)}); err != nil { - t.Fatal(err) - } - } - release := make(chan struct{}) - var releaseOnce sync.Once - unlock := func() { releaseOnce.Do(func() { close(release) }) } - defer unlock() - var archiveCalls, blobCalls atomic.Int64 - upstreamFinished := make(chan struct{}) - s.HTTP = &http.Client{Transport: roundTrip(func(req *http.Request) (*http.Response, error) { - if strings.Contains(req.URL.Path, "/tarball/") { - archiveCalls.Add(1) - if mode == "checksum" || mode == "duplicate" || mode == "collision" || mode == "export exceptions" { - data := tarTestBytes(t, tarTestEntry{name: "root/" + names[0], body: bodies[0]}, tarTestEntry{name: "root/" + names[1], body: bodies[1]}) - if mode == "checksum" { - data[len(data)-8] ^= 1 - } else if mode == "duplicate" { - data = tarTestBytes(t, tarTestEntry{name: "root/0.txt", body: bodies[0]}, tarTestEntry{name: "root/0.txt", body: bodies[0]}) - } else if mode == "export exceptions" { - data = tarTestBytes(t, tarTestEntry{name: "root/0.txt", body: "export-substituted"}) - } - close(upstreamFinished) - return &http.Response{StatusCode: 200, Header: http.Header{}, Body: io.NopCloser(bytes.NewReader(data))}, nil - } - reader, writer := io.Pipe() - go func() { - defer close(upstreamFinished) - defer writer.Close() - gz := gzip.NewWriter(writer) - tw := tar.NewWriter(gz) - for i, body := range bodies { - if i == 1 { - select { - case <-release: - case <-req.Context().Done(): - return - } - } - if err := tw.WriteHeader(&tar.Header{Name: fmt.Sprintf("root/%d.txt", i), Mode: 0600, Size: int64(len(body))}); err != nil { - return - } - if _, err := io.WriteString(tw, body); err != nil { - return - } - if err := gz.Flush(); err != nil { - return - } - } - tw.Close() - gz.Close() - }() - return &http.Response{StatusCode: 200, Header: http.Header{}, Body: reader}, nil - } - if strings.Contains(req.URL.Path, "/git/blobs/") { - blobCalls.Add(1) - for _, body := range bodies { - if strings.HasSuffix(req.URL.Path, archiveTestGitSHA(body)) { - return &http.Response{StatusCode: 200, Header: http.Header{}, Body: io.NopCloser(strings.NewReader(body)), ContentLength: int64(len(body))}, nil - } - } - } - return originalHTTP.Transport.RoundTrip(req) - })} - done := make(chan struct{}) - httpServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { defer close(done); s.ServeHTTP(w, r) })) - defer httpServer.Close() - requestCtx, cancel := context.WithTimeout(ctx, 20*time.Second) - defer cancel() - req, _ := http.NewRequestWithContext(requestCtx, "GET", httpServer.URL+"/api/repo/"+str(repo["repoId"])+"/zip", nil) - response, err := http.DefaultClient.Do(req) - if (mode == "checksum" || mode == "duplicate" || mode == "collision") && err != nil { // Corruption may be detected before first entry is released. - <-done - } else { - if err != nil { - t.Fatal(err) - } - defer response.Body.Close() - if response.StatusCode != 200 { - body, _ := io.ReadAll(response.Body) - t.Fatal(response.StatusCode, string(body)) - } - prefix := make([]byte, 30+len("0.txt")+1) - _, err = io.ReadFull(response.Body, prefix) - if err != nil && mode != "checksum" && mode != "duplicate" && mode != "collision" { - t.Fatal("no early payload", err) - } - if mode == "stream" || mode == "cancel" || mode == "revocation" { - select { - case <-upstreamFinished: - t.Fatal("upstream completed before client received first entry") - default: - } - } - if mode == "cancel" { - cancel() - response.Body.Close() - } else { - if mode == "revocation" { - if _, err := s.Store.DB.Collection("anonymizedrepositories").UpdateOne(ctx, M{"_id": repo["_id"]}, M{"$set": M{"contentCacheRevision": "revoked"}}); err != nil { - t.Fatal(err) - } - } - unlock() - rest, readErr := io.ReadAll(response.Body) - data := append(prefix, rest...) - if mode == "checksum" || mode == "duplicate" || mode == "collision" || mode == "revocation" { - if readErr == nil { - t.Fatal("invalidated archive completed") - } - if _, err := zip.NewReader(bytes.NewReader(data), int64(len(data))); err == nil { - t.Fatal("invalidated archive finalized") - } - } else { - if readErr != nil { - t.Fatal(readErr) - } - archive, err := zip.NewReader(bytes.NewReader(data), int64(len(data))) - if err != nil { - t.Fatal(err) - } - if len(archive.File) != 2 { - t.Fatal("incomplete ZIP", len(archive.File)) - } - for i, entry := range archive.File { - reader, err := entry.Open() - if err != nil { - t.Fatal(err) - } - body, err := io.ReadAll(reader) - reader.Close() - if err != nil || entry.Name != fmt.Sprintf("%d.txt", i) || string(body) != strings.ReplaceAll(bodies[i], "Alice", "XXXX-1") { - t.Fatal("wrong ZIP output", entry.Name, string(body), err) - } - } - } - } - select { - case <-done: - case <-time.After(5 * time.Second): - t.Fatal("pipeline did not stop") - } - } - select { - case <-upstreamFinished: - case <-time.After(time.Second): - t.Fatal("upstream survived cancellation") - } - if archiveCalls.Load() != 1 { - t.Fatal("archive request count", archiveCalls.Load()) - } - if mode == "export exceptions" { - if blobCalls.Load() != 2 { - t.Fatal("exceptional blobs were not recovered", blobCalls.Load()) - } - } else if blobCalls.Load() != 0 { - t.Fatal("stream fetched individual blobs", blobCalls.Load()) - } - leftovers, _ := filepath.Glob(filepath.Join(dir, "anonymous-go-*")) - if len(leftovers) != 0 { - t.Fatal("temporary files leaked", leftovers) - } - }) - } -} diff --git a/backend/internal/server/zip_archive_test.go b/backend/internal/server/zip_archive_test.go deleted file mode 100644 index a6d106f..0000000 --- a/backend/internal/server/zip_archive_test.go +++ /dev/null @@ -1,32 +0,0 @@ -package server - -import ( - "io" - "strings" - "testing" - - "github.com/tdurieux/anonymous_github/backend/internal/anonymize" - "github.com/tdurieux/anonymous_github/backend/internal/provider" -) - -func TestArchiveSpoolWithoutProviderVerifier(t *testing.T) { - for _, body := range []string{"", "content"} { - row := M{"path": "", "name": "file", "size": len(body)} - input, err := spoolArchiveInput(t.Context(), strings.NewReader(body), int64(len(body)), row, &fixtureProvider{}, provider.Access{}, make([]byte, 32<<10)) - if err != nil { - t.Fatal(err) - } - actual, err := io.ReadAll(input.file) - input.close() - if err != nil || string(actual) != body { - t.Fatal(string(actual), err) - } - } - for _, size := range []int64{-1, anonymize.MaxInput + 1, 3, 5} { - input, err := spoolArchiveInput(t.Context(), strings.NewReader("data"), size, M{"name": "file", "size": 4}, &fixtureProvider{}, provider.Access{}, make([]byte, 32<<10)) - input.close() - if err == nil { - t.Fatal("bad size accepted", size) - } - } -} diff --git a/backend/internal/server/zip_stream.go b/backend/internal/server/zip_stream.go deleted file mode 100644 index ebc0009..0000000 --- a/backend/internal/server/zip_stream.go +++ /dev/null @@ -1,110 +0,0 @@ -package server - -import ( - "archive/zip" - "compress/flate" - "context" - "errors" - "io" - "net/http" - "time" -) - -// streamZIP keeps compression and socket buffering bounded without flushing -// every write. Flush only after authorized entry bytes have been copied. -type streamZIP struct { - archive *zip.Writer - compressor *flate.Writer - response http.ResponseWriter - lastFlush time.Time - copyBuffer []byte -} - -func newStreamZIP(w http.ResponseWriter) *streamZIP { - output := &zipResponseWriter{ResponseWriter: w, idle: time.Minute} - s := &streamZIP{archive: zip.NewWriter(output), response: output, copyBuffer: make([]byte, 32<<10)} - s.archive.RegisterCompressor(zip.Deflate, func(dst io.Writer) (io.WriteCloser, error) { - if s.compressor == nil { - var err error - s.compressor, err = flate.NewWriter(dst, 5) // archive/zip's default level - if err != nil { - return nil, err - } - } else { - s.compressor.Reset(dst) - } - return s.compressor, nil - }) - return s -} - -func (s *streamZIP) add(ctx context.Context, name string, input io.Reader) error { - if err := ctx.Err(); err != nil { - return err - } - entry, err := s.archive.CreateHeader(&zip.FileHeader{Name: name, Method: zip.Deflate}) - if err != nil { - return err - } - if _, err = io.CopyBuffer(entry, &zipContextReader{ctx: ctx, reader: input}, s.copyBuffer); err != nil { - return err - } - if err = ctx.Err(); err != nil { - return err - } - // A sync flush makes compressed payload available without ending the entry. - // The ZIP writer still owns CRCs, entry finalization and the central directory. - if s.lastFlush.IsZero() || time.Since(s.lastFlush) >= 250*time.Millisecond { - if err = s.compressor.Flush(); err != nil { - return err - } - if err = s.archive.Flush(); err != nil { - return err - } - if err = http.NewResponseController(s.response).Flush(); err != nil { - return err - } - s.lastFlush = time.Now() - } - return nil -} - -type zipContextReader struct { - ctx context.Context - reader io.Reader -} - -func (r *zipContextReader) Read(p []byte) (int, error) { - if err := r.ctx.Err(); err != nil { - return 0, err - } - return r.reader.Read(p) -} - -// Set a fresh write deadline for each actual write, rather than limiting the -// whole download to http.Server.WriteTimeout. A stalled socket still expires. -type zipResponseWriter struct { - http.ResponseWriter - idle time.Duration -} - -func (w *zipResponseWriter) Unwrap() http.ResponseWriter { return w.ResponseWriter } -func (w *zipResponseWriter) deadline() error { - err := http.NewResponseController(w.ResponseWriter).SetWriteDeadline(time.Now().Add(w.idle)) - if errors.Is(err, http.ErrNotSupported) { - return nil - } - return err -} -func (w *zipResponseWriter) Write(p []byte) (int, error) { - if err := w.deadline(); err != nil { - return 0, err - } - return w.ResponseWriter.Write(p) -} -func (w *zipResponseWriter) FlushError() error { - if err := w.deadline(); err != nil { - return err - } - return http.NewResponseController(w.ResponseWriter).Flush() -} diff --git a/backend/internal/server/zip_stream_test.go b/backend/internal/server/zip_stream_test.go deleted file mode 100644 index 204566d..0000000 --- a/backend/internal/server/zip_stream_test.go +++ /dev/null @@ -1,102 +0,0 @@ -package server - -import ( - "archive/zip" - "bytes" - "context" - "errors" - "io" - "net/http" - "net/http/httptest" - "strings" - "testing" - "time" -) - -func TestZIPStreamsPayloadBeforeNextEntry(t *testing.T) { - release := make(chan struct{}) - done := make(chan error, 1) - srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - z := newStreamZIP(w) - if err := z.add(r.Context(), "first.txt", strings.NewReader("first payload")); err != nil { - done <- err - return - } - select { - case <-release: - case <-r.Context().Done(): - done <- r.Context().Err() - return - } - if err := z.add(r.Context(), "second.txt", strings.NewReader("second payload")); err != nil { - done <- err - return - } - done <- z.archive.Close() - })) - defer srv.Close() - ctx, cancel := context.WithTimeout(t.Context(), 5*time.Second) - defer cancel() - req, _ := http.NewRequestWithContext(ctx, "GET", srv.URL, nil) - resp, err := http.DefaultClient.Do(req) - if err != nil { - t.Fatal(err) - } - defer resp.Body.Close() - // 30-byte local header + filename + at least one compressed payload byte. - prefix := make([]byte, 30+len("first.txt")+1) - if _, err = io.ReadFull(resp.Body, prefix); err != nil { - t.Fatal("entry payload did not stream before next entry", err) - } - close(release) - rest, err := io.ReadAll(resp.Body) - if err != nil { - t.Fatal(err) - } - if err = <-done; err != nil { - t.Fatal(err) - } - data := append(prefix, rest...) - z, err := zip.NewReader(bytes.NewReader(data), int64(len(data))) - if err != nil { - t.Fatal(err) - } - if len(z.File) != 2 { - t.Fatal("wrong entry count", len(z.File)) - } - for i, expected := range []string{"first payload", "second payload"} { - body, err := z.File[i].Open() - if err != nil { - t.Fatal(err) - } - actual, err := io.ReadAll(body) - body.Close() - if err != nil || string(actual) != expected { - t.Fatal("ZIP content or CRC mismatch", string(actual), err) - } - } -} - -type cancelZIPReader struct { - cancel context.CancelFunc - reads int -} - -func (r *cancelZIPReader) Read(p []byte) (int, error) { - r.reads++ - r.cancel() - copy(p, "payload") - return len("payload"), nil -} -func TestZIPCopyStopsOnCancellation(t *testing.T) { - ctx, cancel := context.WithCancel(t.Context()) - defer cancel() - input := &cancelZIPReader{cancel: cancel} - z := newStreamZIP(httptest.NewRecorder()) - if err := z.add(ctx, "file", input); !errors.Is(err, context.Canceled) { - t.Fatal(err) - } - if input.reads != 1 { - t.Fatal("continued consuming after cancellation", input.reads) - } -} diff --git a/backend/internal/server/zip_transfer.go b/backend/internal/server/zip_transfer.go deleted file mode 100644 index a4a82d8..0000000 --- a/backend/internal/server/zip_transfer.go +++ /dev/null @@ -1,58 +0,0 @@ -package server - -import ( - "context" - "errors" - "io" - "log/slog" - "net" - "net/http" - "strings" - "time" -) - -func requestTimeout(r *http.Request) time.Duration { - parts := strings.Split(strings.TrimSuffix(r.URL.Path, "/"), "/") - if (r.Method == http.MethodGet || r.Method == http.MethodHead) && len(parts) == 5 && parts[1] == "api" && parts[2] == "repo" && parts[3] != "" && parts[4] == "zip" { - return 30 * time.Minute - } - return 2 * time.Minute -} - -func zipFailureReason(ctx context.Context, err error) string { - if errors.Is(ctx.Err(), context.DeadlineExceeded) { - return "request_deadline" - } - if errors.Is(ctx.Err(), context.Canceled) { - return "client_cancelled" - } - if errors.Is(err, io.ErrUnexpectedEOF) { - return "truncated_source" - } - var timeout net.Error - if errors.As(err, &timeout) && timeout.Timeout() { - return "io_timeout" - } - var api *APIError - if errors.As(err, &api) && errorLogCode.MatchString(api.Code) { - return api.Code - } - // Only our fixed internal codes may enter logs, never upstream messages, - // file paths, redirect URLs or credentials. - switch err.Error() { - case "invalid_archive_trailer", "invalid_archive_path", "invalid_archive_root", "unsupported_archive_entry", "invalid_or_duplicate_archive_path", "duplicate_archive_metadata", "archive_metadata_missing", "archive_entry_size_mismatch": - return err.Error() - } - return "archive_stream_failed" -} -func (s *Server) recordZIPFailure(ctx context.Context, stage string, err error) { - reason := zipFailureReason(ctx, err) - id := "" - if trace := traceFrom(ctx); trace != nil { - id = trace.id - } - slog.Warn("ZIP transfer stopped", "requestId", id, "stage", stage, "reason", reason) - if ctx.Err() == nil { - s.recordError(ctx, fail(reason, 502)) - } -} diff --git a/backend/internal/server/zip_transfer_test.go b/backend/internal/server/zip_transfer_test.go deleted file mode 100644 index a513295..0000000 --- a/backend/internal/server/zip_transfer_test.go +++ /dev/null @@ -1,144 +0,0 @@ -package server - -import ( - "archive/zip" - "bytes" - "context" - "errors" - "io" - "net" - "net/http" - "net/http/httptest" - "strings" - "testing" - "time" -) - -func TestZIPRequestDeadline(t *testing.T) { - for _, test := range []struct { - method, path string - want time.Duration - }{ - {"GET", "/api/repo/repository/zip", 30 * time.Minute}, - {"HEAD", "/api/repo/repository/zip/", 30 * time.Minute}, - {"POST", "/api/repo/repository/zip", 2 * time.Minute}, - {"GET", "/api/repo/repository/file/a.zip", 2 * time.Minute}, - {"GET", "/other/zip", 2 * time.Minute}, - } { - req := httptest.NewRequest(test.method, test.path, nil) - if got := requestTimeout(req); got != test.want { - t.Fatal(test, got) - } - } -} - -func TestZIPRenewsExpiredServerWriteDeadline(t *testing.T) { - release := make(chan struct{}) - done := make(chan error, 1) - srv := httptest.NewUnstartedServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - z := newStreamZIP(w) - if err := z.add(r.Context(), "first", strings.NewReader("first entry")); err != nil { - done <- err - return - } - select { - case <-release: - case <-r.Context().Done(): - done <- r.Context().Err() - return - } - if err := z.add(r.Context(), "second", strings.NewReader("second entry")); err != nil { - done <- err - return - } - done <- z.archive.Close() - })) - srv.Config.WriteTimeout = 30 * time.Millisecond - srv.Start() - defer srv.Close() - ctx, cancel := context.WithTimeout(t.Context(), 3*time.Second) - defer cancel() - req, _ := http.NewRequestWithContext(ctx, "GET", srv.URL, nil) - resp, err := srv.Client().Do(req) - if err != nil { - t.Fatal(err) - } - defer resp.Body.Close() - first := make([]byte, 36) - if _, err := io.ReadFull(resp.Body, first); err != nil { - t.Fatal(err) - } - time.Sleep(80 * time.Millisecond) // longer than the ordinary server deadline - close(release) - rest, err := io.ReadAll(resp.Body) - if err != nil { - t.Fatal(err) - } - if err := <-done; err != nil { - t.Fatal(err) - } - data := append(first, rest...) - archive, err := zip.NewReader(bytes.NewReader(data), int64(len(data))) - if err != nil { - t.Fatal(err) - } - if len(archive.File) != 2 { - t.Fatal("incomplete archive") - } - for _, entry := range archive.File { - body, err := entry.Open() - if err != nil { - t.Fatal(err) - } - _, err = io.Copy(io.Discard, body) - body.Close() - if err != nil { - t.Fatal(err) - } - } -} - -type zipZeroReader struct{} - -func (zipZeroReader) Read(p []byte) (int, error) { clear(p); return len(p), nil } - -func TestZIPStalledSocketStillTimesOut(t *testing.T) { - done := make(chan error, 1) - srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - output := &zipResponseWriter{ResponseWriter: w, idle: 30 * time.Millisecond} - _, err := io.CopyN(output, zipZeroReader{}, 64<<20) - done <- err - })) - defer srv.Close() - conn, err := net.Dial("tcp", srv.Listener.Addr().String()) - if err != nil { - t.Fatal(err) - } - defer conn.Close() - if _, err := io.WriteString(conn, "GET / HTTP/1.1\r\nHost: test\r\n\r\n"); err != nil { - t.Fatal(err) - } - select { - case err := <-done: - var timeout net.Error - if !errors.As(err, &timeout) || !timeout.Timeout() { - t.Fatal("stalled socket did not time out", err) - } - case <-time.After(3 * time.Second): - t.Fatal("stalled socket kept transfer alive") - } -} - -func TestZIPFailureClassification(t *testing.T) { - ctx, cancel := context.WithCancel(t.Context()) - cancel() - if got := zipFailureReason(ctx, io.ErrClosedPipe); got != "client_cancelled" { - t.Fatal(got) - } - if got := zipFailureReason(t.Context(), io.ErrUnexpectedEOF); got != "truncated_source" { - t.Fatal(got) - } - if got := zipFailureReason(t.Context(), errors.New("https://upstream.test/?secret=private")); got != "archive_stream_failed" { - t.Fatal("unsafe error detail", got) - } -} diff --git a/backend/internal/storage/list.go b/backend/internal/storage/list.go deleted file mode 100644 index 3c138c8..0000000 --- a/backend/internal/storage/list.go +++ /dev/null @@ -1,84 +0,0 @@ -package storage - -import ( - "context" - "errors" - "io/fs" - "strings" - - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/aws-sdk-go-v2/service/s3" - "github.com/tdurieux/anonymous_github/backend/internal/security" -) - -type Entry struct { - Path string - Size int64 -} - -func (s *Store) List(ctx context.Context, repo string) ([]Entry, error) { - prefix, e := key(repo, "") - if e != nil { - return nil, e - } - entries := []Entry{} - add := func(name string, size int64) error { - if _, e := security.RelativePath(name); e != nil { - return e - } - if len(entries) >= 100000 { - return errors.New("repository_too_large") - } - entries = append(entries, Entry{Path: name, Size: size}) - return nil - } - if s.root != nil { - e = fs.WalkDir(s.root.FS(), strings.TrimSuffix(prefix, "/"), func(p string, d fs.DirEntry, err error) error { - // Concurrent cleanup can remove an entry after ReadDir. Continue - // walking so callers never mistake a partial list for a full snapshot. - if errors.Is(err, fs.ErrNotExist) { - return nil - } - if err != nil { - return err - } - if e := ctx.Err(); e != nil { - return e - } - if d.Type()&fs.ModeSymlink != 0 { - return errors.New("storage_symlink_not_allowed") - } - if d.IsDir() { - return nil - } - info, e := d.Info() - if errors.Is(e, fs.ErrNotExist) { - return nil - } - if e != nil { - return e - } - if !info.Mode().IsRegular() { - return errors.New("storage_file_not_regular") - } - return add(strings.TrimPrefix(p, prefix), info.Size()) - }) - return entries, e - } - pager := s3.NewListObjectsV2Paginator(s.client, &s3.ListObjectsV2Input{Bucket: aws.String(s.bucket), Prefix: aws.String(prefix)}) - for pager.HasMorePages() { - page, e := pager.NextPage(ctx) - if e != nil { - return nil, e - } - for _, o := range page.Contents { - if o.Key == nil || !strings.HasPrefix(*o.Key, prefix) || strings.HasSuffix(*o.Key, "/") { - continue - } - if e = add(strings.TrimPrefix(*o.Key, prefix), aws.ToInt64(o.Size)); e != nil { - return nil, e - } - } - } - return entries, nil -} diff --git a/backend/internal/storage/remove_files.go b/backend/internal/storage/remove_files.go deleted file mode 100644 index 16b3bfa..0000000 --- a/backend/internal/storage/remove_files.go +++ /dev/null @@ -1,54 +0,0 @@ -package storage - -import ( - "context" - "errors" - "os" - - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/aws-sdk-go-v2/service/s3" - "github.com/aws/aws-sdk-go-v2/service/s3/types" -) - -// RemoveFiles deletes only the supplied object names, never their descendants. -// Validate the entire request before deleting anything. Missing files are safe -// to retry; filesystem directories are deliberately not removed recursively. -func (s *Store) RemoveFiles(ctx context.Context, repo string, paths []string) error { - keys := make([]string, len(paths)) - for i, p := range paths { - if p == "" { - return errors.New("invalid_file_path") - } - k, err := key(repo, p) - if err != nil { - return err - } - keys[i] = k - } - for len(keys) > 0 { - if err := ctx.Err(); err != nil { - return err - } - if s.root != nil { - if err := s.root.Remove(keys[0]); err != nil && !errors.Is(err, os.ErrNotExist) { - return err - } - keys = keys[1:] - continue - } - n := min(len(keys), 1000) - objects := make([]types.ObjectIdentifier, n) - for i, k := range keys[:n] { - objects[i].Key = aws.String(k) - } - result, err := s.client.DeleteObjects(ctx, &s3.DeleteObjectsInput{Bucket: aws.String(s.bucket), Delete: &types.Delete{Objects: objects}}) - if err != nil { - return err - } - if len(result.Errors) > 0 { - return errors.New("storage_delete_failed") - } - keys = keys[n:] - } - return nil -} diff --git a/backend/internal/storage/remove_files_test.go b/backend/internal/storage/remove_files_test.go deleted file mode 100644 index 4516be2..0000000 --- a/backend/internal/storage/remove_files_test.go +++ /dev/null @@ -1,46 +0,0 @@ -package storage - -import ( - "context" - "strings" - "testing" -) - -func TestRemoveFilesConfinedAndNonRecursive(t *testing.T) { - s, err := New(Config{Root: t.TempDir()}) - if err != nil { - t.Fatal(err) - } - defer s.Close() - ctx := context.Background() - for _, p := range []string{"old", "new/file"} { - if err := s.Put(ctx, "repo", p, strings.NewReader("data"), 4, 4); err != nil { - t.Fatal(err) - } - } - for _, invalid := range []string{"", "../escape", "/absolute"} { - if err := s.RemoveFiles(ctx, "repo", []string{"old", invalid}); err == nil { - t.Fatal("invalid path accepted", invalid) - } - if _, err := s.Size(ctx, "repo", "old"); err != nil { - t.Fatal("partial deletion before validation", err) - } - } - if err := s.RemoveFiles(ctx, "repo", []string{"new"}); err == nil { - t.Fatal("nonempty directory removed") - } - if err := s.RemoveFiles(ctx, "repo", []string{"old", "missing"}); err != nil { - t.Fatal(err) - } - if _, err := s.Size(ctx, "repo", "new/file"); err != nil { - t.Fatal("descendant deleted", err) - } - cancelled, cancel := context.WithCancel(ctx) - cancel() - if err := s.RemoveFiles(cancelled, "repo", []string{"new/file"}); err != context.Canceled { - t.Fatal(err) - } - if _, err := s.Size(ctx, "repo", "new/file"); err != nil { - t.Fatal("cancelled deletion ran", err) - } -} diff --git a/backend/internal/storage/s3_test.go b/backend/internal/storage/s3_test.go deleted file mode 100644 index cb33503..0000000 --- a/backend/internal/storage/s3_test.go +++ /dev/null @@ -1,162 +0,0 @@ -package storage - -import ( - "context" - "encoding/xml" - "errors" - "io" - "io/fs" - "net/http" - "net/http/httptest" - "strconv" - "strings" - "testing" -) - -func TestS3Protocol(t *testing.T) { - objects := map[string]string{} - api := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - key := strings.TrimPrefix(r.URL.Path, "/bucket/") - switch { - case r.Method == "PUT": - b, e := io.ReadAll(r.Body) - if e != nil { - t.Error(e) - } - objects[key] = string(b) - w.Header().Set("ETag", `"fixture"`) - case r.Method == "GET" && r.URL.Query().Get("list-type") == "2": - type item struct { - Key string - Size int - } - result := struct { - XMLName xml.Name `xml:"ListBucketResult"` - IsTruncated bool - Contents []item - }{Contents: []item{}} - for k, v := range objects { - if strings.HasPrefix(k, r.URL.Query().Get("prefix")) { - result.Contents = append(result.Contents, item{k, len(v)}) - } - } - xml.NewEncoder(w).Encode(result) - case r.Method == "HEAD": - value, ok := objects[key] - if !ok { - w.WriteHeader(404) - return - } - w.Header().Set("Content-Length", strconv.Itoa(len(value))) - case r.Method == "GET": - value, ok := objects[key] - if !ok { - w.WriteHeader(404) - return - } - io.WriteString(w, value) - case r.Method == "DELETE": - delete(objects, key) - w.WriteHeader(204) - case r.Method == "POST" && r.URL.Query().Has("delete"): - var payload struct { - Objects []struct{ Key string } `xml:"Object"` - } - if e := xml.NewDecoder(r.Body).Decode(&payload); e != nil { - t.Error(e) - } - for _, o := range payload.Objects { - delete(objects, o.Key) - } - io.WriteString(w, "") - default: - t.Errorf("unexpected S3 request %s %s", r.Method, r.URL) - w.WriteHeader(500) - } - })) - defer api.Close() - s, e := New(Config{Kind: "s3", Bucket: "bucket", Region: "test", Endpoint: api.URL, ID: "synthetic", Secret: "synthetic"}) - if e != nil { - t.Fatal(e) - } - defer s.Close() - ctx := context.Background() - t.Run("exact deletion preserves descendants and batches requests", func(t *testing.T) { - paths := make([]string, 1001) - for i := range paths { - paths[i] = "old/" + strconv.Itoa(i) - objects["snapshot/original/"+paths[i]] = "old" - } - objects["snapshot/original/old/0/new"] = "new" - if err := s.RemoveFiles(ctx, "snapshot", paths); err != nil { - t.Fatal(err) - } - if len(objects) != 1 || objects["snapshot/original/old/0/new"] != "new" { - t.Fatal("descendant removed or old objects retained", objects) - } - delete(objects, "snapshot/original/old/0/new") - }) - - for _, repo := range []string{"repo", "repository"} { - if e = s.Put(ctx, repo, "file", strings.NewReader("complete"), 8, 20); e != nil { - t.Fatal(e) - } - } - if size, err := s.Size(ctx, "repo", "file"); err != nil || size != 8 { - t.Fatal(size, err) - } - if _, err := s.Size(ctx, "repo", "missing"); !errors.Is(err, fs.ErrNotExist) { - t.Fatal("missing HEAD", err) - } - if e = s.Put(ctx, "repo", "file", strings.NewReader("short"), 8, 20); e == nil { - t.Fatal("short write published") - } - r, e := s.Read(ctx, "repo", "file") - if e != nil { - t.Fatal(e) - } - b, e := io.ReadAll(r) - r.Close() - if e != nil || string(b) != "complete" { - t.Fatalf("%q %v", b, e) - } - entries, e := s.List(ctx, "repo") - if e != nil || len(entries) != 1 || entries[0].Path != "file" { - t.Fatalf("%v %v", entries, e) - } - if e = s.Remove(ctx, "repo", ""); e != nil { - t.Fatal(e) - } - if _, ok := objects["repo/original/file"]; ok { - t.Fatal("object not deleted") - } - if objects["repository/original/file"] != "complete" { - t.Fatal("adjacent prefix removed") - } -} - -func TestS3RemoveFilesRejectsPartialFailure(t *testing.T) { - requests := 0 - api := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - requests++ - if r.Method != "POST" || !r.URL.Query().Has("delete") { - t.Errorf("unexpected request %s %s", r.Method, r.URL) - } - io.WriteString(w, `repo/original/fileAccessDenied`) - })) - defer api.Close() - s, err := New(Config{Kind: "s3", Bucket: "bucket", Region: "test", Endpoint: api.URL, ID: "synthetic", Secret: "synthetic"}) - if err != nil { - t.Fatal(err) - } - defer s.Close() - if err := s.RemoveFiles(context.Background(), "repo", []string{"file", "../escape"}); err == nil || requests != 0 { - t.Fatal("validation allowed partial deletion", err, requests) - } - if err := s.RemoveFiles(context.Background(), "repo", []string{"file"}); err == nil || err.Error() != "storage_delete_failed" { - t.Fatal(err) - } - if requests != 1 { - t.Fatal(requests) - } -} diff --git a/backend/internal/storage/storage.go b/backend/internal/storage/storage.go deleted file mode 100644 index 5babf65..0000000 --- a/backend/internal/storage/storage.go +++ /dev/null @@ -1,201 +0,0 @@ -// Package storage provides atomic cache writes under a confined filesystem root -// or an S3 bucket. Repository content never determines an absolute path. -package storage - -import ( - "context" - "errors" - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/aws-sdk-go-v2/credentials" - "github.com/aws/aws-sdk-go-v2/service/s3" - "github.com/aws/aws-sdk-go-v2/service/s3/types" - "github.com/tdurieux/anonymous_github/backend/internal/security" - "io" - "os" - "path" - "strings" -) - -type Config struct{ Kind, Root, Bucket, Region, Endpoint, ID, Secret string } -type Store struct { - root *os.Root - client *s3.Client - bucket string -} - -func New(c Config) (*Store, error) { - if c.Kind == "s3" { - if c.Bucket == "" || c.Region == "" || c.Endpoint == "" || c.ID == "" || c.Secret == "" { - return nil, errors.New("s3_configuration_required") - } - client := s3.New(s3.Options{Region: c.Region, BaseEndpoint: aws.String(c.Endpoint), UsePathStyle: true, Credentials: credentials.NewStaticCredentialsProvider(c.ID, c.Secret, "")}) - return &Store{client: client, bucket: c.Bucket}, nil - } - if c.Kind != "" && c.Kind != "filesystem" { - return nil, errors.New("invalid_storage") - } - if e := os.MkdirAll(c.Root, 0700); e != nil { - return nil, e - } - root, e := os.OpenRoot(c.Root) - return &Store{root: root}, e -} -func (s *Store) Close() { - if s.root != nil { - s.root.Close() - } -} -func key(repo, p string) (string, error) { - if strings.ContainsAny(repo, "/\\") { - return "", errors.New("invalid_repository_id") - } - if _, e := security.RelativePath(repo); e != nil { - return "", e - } - if p != "" { - if _, e := security.RelativePath(p); e != nil { - return "", e - } - } - return repo + "/original/" + p, nil -} -func (s *Store) Read(ctx context.Context, repo, p string) (io.ReadCloser, error) { - k, e := key(repo, p) - if e != nil { - return nil, e - } - if s.root != nil { - return s.root.Open(k) - } - v, e := s.client.GetObject(ctx, &s3.GetObjectInput{Bucket: aws.String(s.bucket), Key: aws.String(k)}) - if e != nil { - return nil, e - } - return v.Body, nil -} - -// Put checks the complete stream before publishing it. Neither oversized nor -// short upstream reads can replace an existing cache entry. -func (s *Store) Put(ctx context.Context, repo, p string, input io.Reader, expected, max int64) error { - k, e := key(repo, p) - if e != nil { - return e - } - temp, e := os.CreateTemp("", "anonymous-cache-") - if e != nil { - return e - } - defer os.Remove(temp.Name()) - defer temp.Close() - n, e := io.Copy(temp, io.LimitReader(input, max+1)) - if e != nil { - return e - } - if n > max || n < expected { - return errors.New("storage_write_size_mismatch") - } - if e = ctx.Err(); e != nil { - return e - } - if _, e = temp.Seek(0, 0); e != nil { - return e - } - if s.root == nil { - _, e = s.client.PutObject(ctx, &s3.PutObjectInput{Bucket: aws.String(s.bucket), Key: aws.String(k), Body: temp, ContentLength: aws.Int64(n)}) - return e - } - if e = s.root.MkdirAll(path.Dir(k), 0700); e != nil { - return e - } - nonce, e := security.RandomToken() - if e != nil { - return e - } - tmp := k + ".tmp." + nonce - out, e := s.root.OpenFile(tmp, os.O_WRONLY|os.O_CREATE|os.O_EXCL, 0600) - if e != nil { - return e - } - defer s.root.Remove(tmp) - _, e = io.Copy(out, temp) - if e == nil { - e = out.Sync() - } - closeErr := out.Close() - if e != nil { - return e - } - if closeErr != nil { - return closeErr - } - if e = ctx.Err(); e != nil { - return e - } - return s.root.Rename(tmp, k) -} -func (s *Store) Remove(ctx context.Context, repo, p string) error { - k, e := key(repo, p) - if e != nil { - return e - } - k = strings.TrimSuffix(k, "/") - if s.root != nil { - return s.root.RemoveAll(k) - } - // Prefix includes a separator so deleting a cannot delete ab. - exact, e := s.client.DeleteObject(ctx, &s3.DeleteObjectInput{Bucket: aws.String(s.bucket), Key: aws.String(k)}) - _ = exact - if e != nil { - return e - } - pager := s3.NewListObjectsV2Paginator(s.client, &s3.ListObjectsV2Input{Bucket: aws.String(s.bucket), Prefix: aws.String(k + "/")}) - for pager.HasMorePages() { - page, e := pager.NextPage(ctx) - if e != nil { - return e - } - objects := []types.ObjectIdentifier{} - for _, o := range page.Contents { - if o.Key != nil && strings.HasPrefix(*o.Key, k+"/") { - objects = append(objects, types.ObjectIdentifier{Key: o.Key}) - } - } - if len(objects) > 0 { - r, e := s.client.DeleteObjects(ctx, &s3.DeleteObjectsInput{Bucket: aws.String(s.bucket), Delete: &types.Delete{Objects: objects}}) - if e != nil { - return e - } - if len(r.Errors) > 0 { - return errors.New("storage_delete_failed") - } - } - } - return nil -} - -// Size returns the stored byte count without downloading the object. -func (s *Store) Size(ctx context.Context, repo, p string) (int64, error) { - k, err := key(repo, p) - if err != nil { - return 0, err - } - if s.root != nil { - info, err := s.root.Stat(k) - if err != nil { - return 0, err - } - if !info.Mode().IsRegular() { - return 0, errors.New("folder_not_supported") - } - return info.Size(), nil - } - result, err := s.client.HeadObject(ctx, &s3.HeadObjectInput{Bucket: aws.String(s.bucket), Key: aws.String(k)}) - if err != nil { - var missing *types.NotFound - if errors.As(err, &missing) { - return 0, os.ErrNotExist - } - return 0, err - } - return aws.ToInt64(result.ContentLength), nil -} diff --git a/backend/internal/storage/storage_test.go b/backend/internal/storage/storage_test.go deleted file mode 100644 index 81bf1a2..0000000 --- a/backend/internal/storage/storage_test.go +++ /dev/null @@ -1,59 +0,0 @@ -package storage - -import ( - "context" - "io" - "os" - "path/filepath" - "strings" - "testing" -) - -func TestFilesystemAtomicAndConfined(t *testing.T) { - root := t.TempDir() - s, e := New(Config{Root: root}) - if e != nil { - t.Fatal(e) - } - defer s.Close() - ctx := context.Background() - if e = s.Put(ctx, "repo", "cache/file", strings.NewReader("complete"), 8, 10); e != nil { - t.Fatal(e) - } - for _, input := range []string{"short", "longer-than-limit"} { - if e = s.Put(ctx, "repo", "cache/file", strings.NewReader(input), 8, 10); e == nil { - t.Fatal("invalid stream published") - } - } - r, e := s.Read(ctx, "repo", "cache/file") - if e != nil { - t.Fatal(e) - } - b, e := io.ReadAll(r) - r.Close() - if e != nil || string(b) != "complete" { - t.Fatalf("cache corrupted: %q %v", b, e) - } - for _, p := range []string{"../escape", "/absolute", "a/../../outside", "a\\b"} { - if e = s.Put(ctx, "repo", p, strings.NewReader("x"), 1, 1); e == nil { - t.Fatalf("unsafe path accepted %s", p) - } - } - outside := t.TempDir() - if e = os.Symlink(outside, filepath.Join(root, "repo", "original", "link")); e != nil { - t.Fatal(e) - } - if e = s.Put(ctx, "repo", "link/escape", strings.NewReader("x"), 1, 1); e == nil { - t.Fatal("symlink escaped root") - } - if e = s.Put(ctx, "repository", "keep", strings.NewReader("x"), 1, 1); e != nil { - t.Fatal(e) - } - if e = s.Remove(ctx, "repo", ""); e != nil { - t.Fatal(e) - } - if r, e = s.Read(ctx, "repository", "keep"); e != nil { - t.Fatal("removed adjacent repository", e) - } - r.Close() -} diff --git a/backend/licenses/V8-LICENSE b/backend/licenses/V8-LICENSE deleted file mode 100644 index 9898b2d..0000000 --- a/backend/licenses/V8-LICENSE +++ /dev/null @@ -1,61 +0,0 @@ -This license applies to all parts of V8 that are not externally -maintained libraries. The externally maintained libraries used by V8 -are: - - - PCRE test suite, located in - test/mjsunit/third_party/regexp-pcre/regexp-pcre.js. This is based on the - test suite from PCRE-7.3, which is copyrighted by the University - of Cambridge and Google, Inc. The copyright notice and license - are embedded in regexp-pcre.js. - - - Layout tests, located in test/mjsunit/third_party/object-keys. These are - based on layout tests from webkit.org which are copyrighted by - Apple Computer, Inc. and released under a 3-clause BSD license. - - - Strongtalk assembler, the basis of the files assembler-arm-inl.h, - assembler-arm.cc, assembler-arm.h, assembler-ia32-inl.h, - assembler-ia32.cc, assembler-ia32.h, assembler-x64-inl.h, - assembler-x64.cc, assembler-x64.h, assembler.cc and assembler.h. - This code is copyrighted by Sun Microsystems Inc. and released - under a 3-clause BSD license. - - - Valgrind client API header, located at third_party/valgrind/valgrind.h - This is released under the BSD license. - - - The Wasm C/C++ API headers, located at third_party/wasm-api/wasm.{h,hh} - This is released under the Apache license. The API's upstream prototype - implementation also formed the basis of V8's implementation in - src/wasm/c-api.cc. - -These libraries have their own licenses; we recommend you read them, -as their terms may differ from the terms below. - -Further license information can be found in LICENSE files located in -sub-directories. - -Copyright 2014, the V8 project authors. All rights reserved. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of Google Inc. nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/backend/reports/anonymization-parity.json b/backend/reports/anonymization-parity.json deleted file mode 100644 index 91f343c..0000000 --- a/backend/reports/anonymization-parity.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "cases": 499, - "passed": 499, - "failures": [], - "credentialCrossLanguageCases": 3 -} diff --git a/backend/reports/auth-path-optimization.json b/backend/reports/auth-path-optimization.json deleted file mode 100644 index 78b505e..0000000 --- a/backend/reports/auth-path-optimization.json +++ /dev/null @@ -1,1221 +0,0 @@ -{ - "verifiedAt": "2026-11-03T20:08:01.162128+00:00", - "changes": [ - "Cache layers own non-archive blob authorization; archive entry checks retained.", - "Normal file GETs authorize on content access; HEAD and 304 retain explicit authorization.", - "Shared source producers authorize either legacy promotion or upstream download, without checking twice before download." - ], - "securityPreserved": [ - "Checks before source access and after cache fills/waits.", - "Checks after transforms and on cached transformed results.", - "ZIP entry and resource revision checks.", - "No positive authorization TTL or cross-request credential memoization." - ], - "deterministicCallCounts": { - "sharedSourceCold": { - "before": 5, - "after": 3 - }, - "sharedSourceWarm": { - "before": 3, - "after": 2 - } - }, - "liveComparison": [ - { - "route": "/api/repo/:id/file/*path", - "beforeMs": 2496, - "afterMs": 1562, - "latencyReductionPercent": 37.4, - "beforeAuthorizationMs": 2325.4652199999996, - "afterAuthorizationMs": 1439.622578, - "bytes": 672 - }, - { - "route": "/api/repo/:id/zip", - "beforeMs": 10080, - "afterMs": 8186, - "latencyReductionPercent": 18.8, - "beforeAuthorizationMs": 9768.826008999999, - "afterAuthorizationMs": 7880.354889999999, - "bytes": 7166 - } - ], - "measurementLimits": "One before/after GitHub App lifecycle, including network variability and existing caches. Not a load-test speedup guarantee.", - "validation": { - "targetedRaceCacheSuite": "passed, server 5.544s", - "targetedRaceHTTPSuite": "passed, server 2.729s", - "goVetServer": "passed", - "liveChecks": 126, - "liveResult": "passed", - "temporaryKeyRevoked": true, - "testRepositoryRemoved": true, - "requestLogsCorrelated": 126 - }, - "image": "sha256:a089424b419df68472bd846bca25b8b8e9ffb1000458b2323c7269de316f48d3", - "productionChanged": false, - "traces": [ - { - "requestID": "f84fe5d5-86b8-4512-aad8-81b7dc08656e", - "route": "/api/user", - "status": 401, - "serverMs": 3, - "firstByteMs": 3.076262, - "bytes": 25, - "stagesMs": {} - }, - { - "requestID": "e91fa880-d360-4a4d-90e8-915e1290b7be", - "route": "/api/user", - "status": 200, - "serverMs": 7, - "firstByteMs": 7.029761, - "bytes": 100, - "stagesMs": {} - }, - { - "requestID": "b9ed7524-d406-4e08-85ec-a29baf53608e", - "route": "/github/connections", - "status": 200, - "serverMs": 796, - "firstByteMs": 796.127335, - "bytes": 288, - "stagesMs": {} - }, - { - "requestID": "5a4a3514-c537-422a-920e-8512cc7d8f2f", - "route": "/api/providers", - "status": 200, - "serverMs": 6, - "firstByteMs": 6.43592, - "bytes": 144, - "stagesMs": {} - }, - { - "requestID": "48f631c4-ff55-4c3c-af30-09d3484cebc8", - "route": "/api/user/dashboard", - "status": 200, - "serverMs": 22, - "firstByteMs": 22.063656, - "bytes": 64, - "stagesMs": {} - }, - { - "requestID": "48dd98b8-00ca-4ce7-bbaf-b57b3c8cea50", - "route": "/api/user/default", - "status": 200, - "serverMs": 6, - "firstByteMs": 5.497198, - "bytes": 25, - "stagesMs": {} - }, - { - "requestID": "5bc79318-d6fa-49d9-80c0-51669fcbc41a", - "route": "/api/user/quota", - "status": 200, - "serverMs": 7, - "firstByteMs": 7.270277, - "bytes": 105, - "stagesMs": {} - }, - { - "requestID": "93ceead5-a351-4d37-8e88-240014c5ff19", - "route": "/api/admin/overview", - "status": 200, - "serverMs": 105, - "firstByteMs": 103.612432, - "bytes": 577, - "stagesMs": {} - }, - { - "requestID": "3fe385e1-1d3c-4a5a-b36c-2fafbf7e2b9b", - "route": "/api/admin/users", - "status": 200, - "serverMs": 12, - "firstByteMs": 12.049008, - "bytes": 526, - "stagesMs": {} - }, - { - "requestID": "b9575832-8fe6-46b3-8f89-4f41c1ac0c96", - "route": "/api/admin/repos", - "status": 200, - "serverMs": 15, - "firstByteMs": 13.380781, - "bytes": 2104, - "stagesMs": {} - }, - { - "requestID": "fef284ee-4322-4c1d-b4dc-0cfe07f30119", - "route": "/api/admin/queues", - "status": 200, - "serverMs": 25, - "firstByteMs": 23.917713, - "bytes": 676, - "stagesMs": {} - }, - { - "requestID": "cd80143a-c089-4647-bcfd-1a26ba0b4154", - "route": "/api/admin/performance", - "status": 200, - "serverMs": 39, - "firstByteMs": 35.924226, - "bytes": 3599, - "stagesMs": {} - }, - { - "requestID": "8ce8fa48-2db8-43a1-8f6d-10085a6d02f1", - "route": "/api/admin/errors", - "status": 200, - "serverMs": 18, - "firstByteMs": 13.228415, - "bytes": 8006, - "stagesMs": {} - }, - { - "requestID": "a21bf157-d7a6-47f8-8f63-8526b19fbbe6", - "route": "/api/admin/errors/stats", - "status": 200, - "serverMs": 7, - "firstByteMs": 6.391828, - "bytes": 261, - "stagesMs": {} - }, - { - "requestID": "80a22e88-2d4b-45e2-b49e-ea928424e144", - "route": "/api/admin/tokens", - "status": 200, - "serverMs": 7, - "firstByteMs": 6.955889, - "bytes": 160, - "stagesMs": {} - }, - { - "requestID": "b539208d-d5d0-4fbc-9fff-7fb471847499", - "route": "/api/admin/errors", - "status": 200, - "serverMs": 31, - "firstByteMs": 21.609656, - "bytes": 17555, - "stagesMs": {} - }, - { - "requestID": "59f0115d-1f31-4429-a741-b0aa6671b74a", - "route": "/api/admin/errors/stats", - "status": 200, - "serverMs": 8, - "firstByteMs": 6.796567, - "bytes": 261, - "stagesMs": {} - }, - { - "requestID": "34bcb67b-f94e-4976-b139-fc7368f7fa06", - "route": "/api/repo/:id", - "status": 404, - "serverMs": 6, - "firstByteMs": 5.693788, - "bytes": 26, - "stagesMs": { - "repository": 1.285097 - } - }, - { - "requestID": "d4fe400c-ad1b-4841-8a22-30951deb6c26", - "route": "/api/admin/errors/stats", - "status": 200, - "serverMs": 9, - "firstByteMs": 8.056016, - "bytes": 261, - "stagesMs": {} - }, - { - "requestID": "79cd7537-9005-456c-a4db-f3610f1d9ef3", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 8, - "firstByteMs": 6.972274, - "bytes": 201, - "stagesMs": {} - }, - { - "requestID": "66e85a98-0586-4ba7-b85f-fdddb6001202", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 10, - "firstByteMs": 8.196344, - "bytes": 600, - "stagesMs": {} - }, - { - "requestID": "2422fe62-41cf-4dd5-8324-5c26ce7209d0", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 13, - "firstByteMs": 8.87194, - "bytes": 1932, - "stagesMs": {} - }, - { - "requestID": "5f8d3bd4-67cc-4911-aef3-3b3948761679", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 109, - "firstByteMs": 91.605513, - "bytes": 9796, - "stagesMs": {} - }, - { - "requestID": "bd6580cc-9f14-4069-a673-e173955ef5b1", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 8, - "firstByteMs": 6.508061, - "bytes": 198, - "stagesMs": {} - }, - { - "requestID": "90f0fcbc-f570-42d0-b948-ffeb6e5d9ac5", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 7, - "firstByteMs": 6.154252, - "bytes": 186, - "stagesMs": {} - }, - { - "requestID": "5964f97a-d9e4-4b9c-be72-4f60d5b7fa52", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 6, - "firstByteMs": 5.074653, - "bytes": 210, - "stagesMs": {} - }, - { - "requestID": "ed92a2c9-aa2e-44b6-b633-0bd8313289b4", - "route": "/api/admin/queues/metrics", - "status": 404, - "serverMs": 8, - "firstByteMs": 8.239594, - "bytes": 27, - "stagesMs": {} - }, - { - "requestID": "2a15a0dc-3303-45c3-9112-4d7aece64820", - "route": "/api/stat", - "status": 200, - "serverMs": 4, - "firstByteMs": 4.44569, - "bytes": 69, - "stagesMs": {} - }, - { - "requestID": "459e99d6-2753-4dbd-a150-317d3580d861", - "route": "/api/stat/history", - "status": 200, - "serverMs": 3, - "firstByteMs": 3.222096, - "bytes": 105, - "stagesMs": {} - }, - { - "requestID": "370655c1-6e0a-4287-82c7-f8c1111f1661", - "route": "/api/stat/history", - "status": 200, - "serverMs": 3, - "firstByteMs": 3.146325, - "bytes": 105, - "stagesMs": {} - }, - { - "requestID": "9dabf124-0fb4-4e99-bee1-162243140ecc", - "route": "/api/stat/history", - "status": 200, - "serverMs": 3, - "firstByteMs": 3.291535, - "bytes": 105, - "stagesMs": {} - }, - { - "requestID": "08b1379a-4b3c-4c24-a484-912150523dc0", - "route": "/api/stat/history", - "status": 200, - "serverMs": 3, - "firstByteMs": 3.484245, - "bytes": 105, - "stagesMs": {} - }, - { - "requestID": "b50c91b4-9afd-47ec-9593-a052778f0a2b", - "route": "/api/stat/history", - "status": 200, - "serverMs": 4, - "firstByteMs": 3.767178, - "bytes": 105, - "stagesMs": {} - }, - { - "requestID": "54940f6e-bba8-4c8c-942c-8bf1f1ed27c9", - "route": "/api/stat/history", - "status": 200, - "serverMs": 1, - "firstByteMs": 0.961886, - "bytes": 105, - "stagesMs": {} - }, - { - "requestID": "07881d22-a55a-450e-bd0d-3d3cc1281e70", - "route": "/api/stat/history", - "status": 200, - "serverMs": 1, - "firstByteMs": 0.804532, - "bytes": 105, - "stagesMs": {} - }, - { - "requestID": "524bac1a-8a9c-45e0-96cf-28af895b6de5", - "route": "/api/stat/history", - "status": 200, - "serverMs": 1, - "firstByteMs": 0.984421, - "bytes": 105, - "stagesMs": {} - }, - { - "requestID": "dffed058-df62-4f44-b845-012112c073e5", - "route": "/api/user/dashboard", - "status": 200, - "serverMs": 20, - "firstByteMs": 19.790853, - "bytes": 64, - "stagesMs": {} - }, - { - "requestID": "728ce7d7-b307-4f7a-8f5a-6467bf2050a5", - "route": "/api/user/dashboard", - "status": 200, - "serverMs": 18, - "firstByteMs": 17.868677, - "bytes": 64, - "stagesMs": {} - }, - { - "requestID": "14939a17-c9aa-45ff-924c-839c12eac69a", - "route": "/api/user/dashboard", - "status": 400, - "serverMs": 5, - "firstByteMs": 4.958313, - "bytes": 24, - "stagesMs": {} - }, - { - "requestID": "7a25c4c1-5901-4797-a898-73ce7ae8950c", - "route": "/api/user/dashboard", - "status": 400, - "serverMs": 7, - "firstByteMs": 6.756271, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "3aa51f66-ca6e-4f96-aacc-2b37edbe9c28", - "route": "/api/user/dashboard", - "status": 200, - "serverMs": 18, - "firstByteMs": 17.923181, - "bytes": 64, - "stagesMs": {} - }, - { - "requestID": "56b9101a-5a18-41d2-9771-dde64ed3d944", - "route": "/api/user/dashboard", - "status": 200, - "serverMs": 21, - "firstByteMs": 20.580572, - "bytes": 64, - "stagesMs": {} - }, - { - "requestID": "27f93d8f-50a0-48e5-b419-ea00832a1b05", - "route": "/api/user/dashboard", - "status": 200, - "serverMs": 19, - "firstByteMs": 18.690532, - "bytes": 64, - "stagesMs": {} - }, - { - "requestID": "d562bf4a-5e19-4de6-931e-aabec5a52438", - "route": "/api/user/dashboard", - "status": 200, - "serverMs": 17, - "firstByteMs": 16.794072, - "bytes": 64, - "stagesMs": {} - }, - { - "requestID": "fcf6e0a7-8df4-4412-aa3b-a97c0cbc8c10", - "route": "/api/user/dashboard", - "status": 200, - "serverMs": 18, - "firstByteMs": 17.582594, - "bytes": 64, - "stagesMs": {} - }, - { - "requestID": "19601e06-8bb7-403a-b9ac-e0ff1a1f4185", - "route": "/api/user/dashboard", - "status": 400, - "serverMs": 5, - "firstByteMs": 5.385593, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "d5a58715-ae65-41a8-9d3f-8830ef4eff71", - "route": "/api/admin/performance", - "status": 200, - "serverMs": 47, - "firstByteMs": 42.115448, - "bytes": 6245, - "stagesMs": {} - }, - { - "requestID": "1006ab56-e5f4-478e-ab1d-1048bdcea24b", - "route": "/api/admin/performance", - "status": 200, - "serverMs": 55, - "firstByteMs": 51.786233, - "bytes": 6230, - "stagesMs": {} - }, - { - "requestID": "fe756c8b-6fbd-4d62-b9bc-a6c0c4bbff23", - "route": "/api/admin/performance", - "status": 200, - "serverMs": 54, - "firstByteMs": 49.215897, - "bytes": 3672, - "stagesMs": {} - }, - { - "requestID": "b1d62325-47d3-4271-ac0c-fbffe9562e13", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 10, - "firstByteMs": 7.559293, - "bytes": 583, - "stagesMs": {} - }, - { - "requestID": "787e213b-21c3-4ef0-87b7-3ec5bfeada0a", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 5, - "firstByteMs": 4.512608, - "bytes": 203, - "stagesMs": {} - }, - { - "requestID": "f494448e-020a-4691-9833-b75f6becb06b", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 4, - "firstByteMs": 3.887386, - "bytes": 51, - "stagesMs": {} - }, - { - "requestID": "0ca22bee-797c-4ba1-a916-89315ed39cd9", - "route": "/api/admin/queues/metrics", - "status": 404, - "serverMs": 4, - "firstByteMs": 4.219167, - "bytes": 27, - "stagesMs": {} - }, - { - "requestID": "bec04554-45fb-40d7-aa97-51400c7d4773", - "route": "/api/admin/queues", - "status": 200, - "serverMs": 26, - "firstByteMs": 24.187282, - "bytes": 678, - "stagesMs": {} - }, - { - "requestID": "1cf731f6-48bf-4c4d-b84b-62180afd7653", - "route": "/api/admin/errors", - "status": 200, - "serverMs": 8, - "firstByteMs": 7.03105, - "bytes": 786, - "stagesMs": {} - }, - { - "requestID": "153eba16-4b3d-4109-96a3-fd698ac45483", - "route": "/api/repo/:owner/:repo", - "status": 400, - "serverMs": 4, - "firstByteMs": 4.217943, - "bytes": 30, - "stagesMs": {} - }, - { - "requestID": "00e8b148-2f8b-49dc-a843-c451b6c74190", - "route": "/api/repo/:owner/:repo", - "status": 400, - "serverMs": 5, - "firstByteMs": 4.713719, - "bytes": 30, - "stagesMs": {} - }, - { - "requestID": "7949b162-57b2-4ca2-9201-7f880e4c1bf1", - "route": "/api/repo/:owner/:repo", - "status": 400, - "serverMs": 4, - "firstByteMs": 4.417715, - "bytes": 30, - "stagesMs": {} - }, - { - "requestID": "faa417b5-31fa-4c29-af10-43c50d3da97b", - "route": "/api/repo/:owner/:repo", - "status": 500, - "serverMs": 5, - "firstByteMs": 5.43509, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "faebd19e-3ad3-475e-9a78-9d12ae425cbe", - "route": "/api/repo/:owner/:repo", - "status": 500, - "serverMs": 5, - "firstByteMs": 4.796987, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "e53abda9-ad4c-4250-b36b-f8a3b9d3d764", - "route": "/api/repo/:owner/:repo", - "status": 500, - "serverMs": 5, - "firstByteMs": 5.08807, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "42856f02-2ebd-4676-9b84-08b9cae950c3", - "route": "/api/user/search/github-users", - "status": 200, - "serverMs": 4, - "firstByteMs": 4.186786, - "bytes": 2, - "stagesMs": {} - }, - { - "requestID": "e14aae2b-35fd-4fc5-8fa1-cdeb5b08442b", - "route": "/api/user/search/github-users", - "status": 200, - "serverMs": 4, - "firstByteMs": 3.945048, - "bytes": 2, - "stagesMs": {} - }, - { - "requestID": "ed761f57-0aff-44f6-a47a-4ed1a05230d3", - "route": "/api/user/search/github-users", - "status": 500, - "serverMs": 8, - "firstByteMs": 8.263722, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "73064603-5705-4e41-bc21-4e6c8fb4e645", - "route": "/api/user/search/github-users", - "status": 500, - "serverMs": 8, - "firstByteMs": 8.221302, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "f6cf0157-5388-4ce6-9c6c-ef24a746012b", - "route": "/api/user/search/github-users", - "status": 500, - "serverMs": 5, - "firstByteMs": 4.914024, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "f5fe97fa-54b4-4ea6-97c0-9084b33ebaf6", - "route": "/api/admin/repos", - "status": 200, - "serverMs": 11, - "firstByteMs": 9.524544, - "bytes": 897, - "stagesMs": {} - }, - { - "requestID": "b7f107ee-efcb-4842-b606-7c8f53a90ac7", - "route": "/api/admin/repos", - "status": 200, - "serverMs": 8, - "firstByteMs": 8.349472, - "bytes": 179, - "stagesMs": {} - }, - { - "requestID": "48a9b26a-cb7e-4a10-be5b-8af28a6655a2", - "route": "/api/admin/repos", - "status": 500, - "serverMs": 5, - "firstByteMs": 5.210327, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "3c4c4395-cb14-4c7d-a53c-fb58fc742db6", - "route": "/api/admin/repos", - "status": 500, - "serverMs": 6, - "firstByteMs": 6.028721, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "9e18cc25-3c9b-4018-960e-0b51bbe8dd14", - "route": "/api/admin/users", - "status": 200, - "serverMs": 10, - "firstByteMs": 10.211212, - "bytes": 106, - "stagesMs": {} - }, - { - "requestID": "00485f39-9ad9-4255-bc3e-46b1983b2dab", - "route": "/api/admin/users", - "status": 200, - "serverMs": 10, - "firstByteMs": 10.450217, - "bytes": 112, - "stagesMs": {} - }, - { - "requestID": "bda1c9a7-9998-473b-87f6-b0020ec76a78", - "route": "/api/admin/users", - "status": 500, - "serverMs": 9, - "firstByteMs": 8.827165, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "44b0d793-91f7-468f-9d4b-65d26a6f9ab4", - "route": "/api/admin/users", - "status": 500, - "serverMs": 5, - "firstByteMs": 4.596539, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "fe4f21e9-bf2c-4466-8055-19857e7167df", - "route": "/api/admin/users", - "status": 500, - "serverMs": 9, - "firstByteMs": 9.304437, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "a2987276-1cfb-49d8-af7d-84a5d4845150", - "route": "/api/admin/conferences", - "status": 200, - "serverMs": 10, - "firstByteMs": 10.061287, - "bytes": 80, - "stagesMs": {} - }, - { - "requestID": "b1a955aa-4ee3-49cc-bac1-37070d07f5b2", - "route": "/api/admin/conferences", - "status": 200, - "serverMs": 10, - "firstByteMs": 10.391121, - "bytes": 86, - "stagesMs": {} - }, - { - "requestID": "1a384e0e-c906-4ea7-8223-9068681804e1", - "route": "/api/admin/conferences", - "status": 500, - "serverMs": 7, - "firstByteMs": 6.565386, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "2aa7eb1b-910a-45b4-82d5-9dbcc3840df5", - "route": "/api/admin/conferences", - "status": 500, - "serverMs": 5, - "firstByteMs": 4.6753, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "c89947df-6628-4583-9416-5d86b2ce74fc", - "route": "/api/admin/repos", - "status": 200, - "serverMs": 11, - "firstByteMs": 9.776466, - "bytes": 740, - "stagesMs": {} - }, - { - "requestID": "a5d5a1a5-df77-4d30-b88c-9f5356396cbc", - "route": "/api/admin/repos", - "status": 200, - "serverMs": 9, - "firstByteMs": 9.149315, - "bytes": 697, - "stagesMs": {} - }, - { - "requestID": "0431f362-97d2-4662-9634-bfa3a310edae", - "route": "/api/admin/conferences", - "status": 200, - "serverMs": 8, - "firstByteMs": 7.548777, - "bytes": 80, - "stagesMs": {} - }, - { - "requestID": "525f9bb8-4031-4843-b78d-19db65be999f", - "route": "/api/admin/conferences", - "status": 200, - "serverMs": 8, - "firstByteMs": 8.304671, - "bytes": 117, - "stagesMs": {} - }, - { - "requestID": "a4991a9d-a825-47a4-88e7-b623fe81b2b9", - "route": "/api/admin/repos", - "status": 500, - "serverMs": 5, - "firstByteMs": 4.781724, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "dd653790-619a-4d0a-a977-038b50258e97", - "route": "/api/admin/users", - "status": 500, - "serverMs": 4, - "firstByteMs": 4.049054, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "cd112c91-a249-45aa-a66b-56e067b28288", - "route": "/api/admin/conferences", - "status": 500, - "serverMs": 5, - "firstByteMs": 4.884019, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "b7be7a1c-8bec-4cb2-a26c-2625b36efcea", - "route": "/api/admin/users", - "status": 200, - "serverMs": 9, - "firstByteMs": 9.034767, - "bytes": 99, - "stagesMs": {} - }, - { - "requestID": "9096ee22-8833-4ec1-a257-aa164ff411cb", - "route": "/api/admin/users", - "status": 200, - "serverMs": 10, - "firstByteMs": 9.535071, - "bytes": 553, - "stagesMs": {} - }, - { - "requestID": "228ea0c5-52ec-4abd-a829-1ba488eda9ac", - "route": "/api/admin/users", - "status": 500, - "serverMs": 6, - "firstByteMs": 5.777838, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "54cf3b33-1205-4df8-8abd-8de2f44e1d87", - "route": "/api/admin/users", - "status": 500, - "serverMs": 7, - "firstByteMs": 7.300865, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "43033243-a509-45bb-908c-0acb22c5b55a", - "route": "/api/admin/repos", - "status": 500, - "serverMs": 5, - "firstByteMs": 4.870342, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "d7bb0b54-2a55-483a-94e1-7138339f1d01", - "route": "/api/admin/repos", - "status": 500, - "serverMs": 7, - "firstByteMs": 6.733075, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "8e4e2ebe-eb59-4460-b837-b5d68d29c7ee", - "route": "/api/admin/repos", - "status": 200, - "serverMs": 15, - "firstByteMs": 13.380441, - "bytes": 2154, - "stagesMs": {} - }, - { - "requestID": "9879a1c6-6aa1-49b0-be94-57178529a29e", - "route": "/api/admin/repos", - "status": 200, - "serverMs": 10, - "firstByteMs": 10.344582, - "bytes": 156, - "stagesMs": {} - }, - { - "requestID": "f6dd2a64-8de9-4279-973b-6a64daa7cfb9", - "route": "/api/admin/repos", - "status": 500, - "serverMs": 7, - "firstByteMs": 6.635481, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "b1acaa83-d349-4132-8a09-7a61af92f797", - "route": "/api/admin/users", - "status": 200, - "serverMs": 11, - "firstByteMs": 10.905822, - "bytes": 458, - "stagesMs": {} - }, - { - "requestID": "82fd69a1-dcc2-4702-8ae8-8370ec28814a", - "route": "/api/admin/users", - "status": 200, - "serverMs": 11, - "firstByteMs": 10.912808, - "bytes": 129, - "stagesMs": {} - }, - { - "requestID": "cdfd7c6a-5177-434f-ab25-211df7045688", - "route": "/api/admin/users", - "status": 500, - "serverMs": 5, - "firstByteMs": 5.186134, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "bf118fff-4b9c-4982-b3c3-6ace9a0cf0f8", - "route": "/api/admin/conferences", - "status": 200, - "serverMs": 10, - "firstByteMs": 9.608793, - "bytes": 138, - "stagesMs": {} - }, - { - "requestID": "5ec8c0b3-efdd-4070-b640-bf0d59c5a9c9", - "route": "/api/admin/conferences", - "status": 200, - "serverMs": 9, - "firstByteMs": 9.457277, - "bytes": 138, - "stagesMs": {} - }, - { - "requestID": "a9cd8c41-4576-49cf-8d70-abb78e1db07e", - "route": "/api/admin/conferences", - "status": 500, - "serverMs": 4, - "firstByteMs": 4.489666, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "64fa4608-1362-4317-af13-357dd460c72d", - "route": "/github/connections", - "status": 200, - "serverMs": 462, - "firstByteMs": 461.818605, - "bytes": 288, - "stagesMs": {} - }, - { - "requestID": "90b71eaa-01e3-4cba-8de5-764068968969", - "route": "/api/admin/tokens", - "status": 200, - "serverMs": 6, - "firstByteMs": 6.237158, - "bytes": 186, - "stagesMs": {} - }, - { - "requestID": "d270faad-220c-4f4b-b8dd-cf80b08958f7", - "route": "/api/user", - "status": 200, - "serverMs": 5, - "firstByteMs": 5.115043, - "bytes": 100, - "stagesMs": {} - }, - { - "requestID": "8d295230-fbb3-440e-b6ac-98a24067fdd7", - "route": "/api/admin/tokens/:id", - "status": 200, - "serverMs": 6, - "firstByteMs": 6.171119, - "bytes": 13, - "stagesMs": {} - }, - { - "requestID": "1d546d79-8f3a-4854-9fb6-ea3559b4bda2", - "route": "/api/user", - "status": 401, - "serverMs": 2, - "firstByteMs": 2.305164, - "bytes": 25, - "stagesMs": {} - }, - { - "requestID": "a72a5cde-838d-47db-96f4-910eb3a0df60", - "route": "/github/login-token", - "status": 200, - "serverMs": 6, - "firstByteMs": 6.364801, - "bytes": 33, - "stagesMs": {} - }, - { - "requestID": "d7201137-315b-4e9e-8665-eb8d4d4e43cf", - "route": "/api/user", - "status": 200, - "serverMs": 3, - "firstByteMs": 2.590703, - "bytes": 100, - "stagesMs": {} - }, - { - "requestID": "7484cbcf-cb66-4955-b5dd-70ad2a30d678", - "route": "/api/user/logout", - "status": 302, - "serverMs": 3, - "firstByteMs": 3.299012, - "bytes": 24, - "stagesMs": {} - }, - { - "requestID": "da0a9fc5-967b-4579-9b9e-2c12aaaa774f", - "route": "/api/user", - "status": 401, - "serverMs": 1, - "firstByteMs": 1.103048, - "bytes": 25, - "stagesMs": {} - }, - { - "requestID": "1a2a297b-9827-41ae-8f65-fb66c2770632", - "route": "/api/anonymize-preview", - "status": 200, - "serverMs": 5, - "firstByteMs": 4.910642, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "b4c74d8f-c9f0-40e3-95a5-14a10c310d3c", - "route": "/api/providers/:provider/repository/metadata", - "status": 200, - "serverMs": 3796, - "firstByteMs": 3796.391604, - "bytes": 230, - "stagesMs": {} - }, - { - "requestID": "ea5f70d2-fd6e-40df-aca2-37d6b051a09c", - "route": "/api/providers/:provider/repository/branches", - "status": 200, - "serverMs": 3564, - "firstByteMs": 3562.974792, - "bytes": 998, - "stagesMs": {} - }, - { - "requestID": "51990c92-b571-414f-990a-f75e982e63a6", - "route": "/api/providers/:provider/repository/readme", - "status": 200, - "serverMs": 3165, - "firstByteMs": 3163.738862, - "bytes": 878, - "stagesMs": {} - }, - { - "requestID": "1ed2075d-b51b-442a-be27-0d6e078b57de", - "route": "/api/repo", - "status": 200, - "serverMs": 4079, - "firstByteMs": 4078.594559, - "bytes": 22, - "stagesMs": {} - }, - { - "requestID": "a4750e1e-c10e-4835-93c9-32ff02e6c1ac", - "route": "/api/repo/:id", - "status": 200, - "serverMs": 10, - "firstByteMs": 9.555593, - "bytes": 510, - "stagesMs": { - "repository": 1.641593 - } - }, - { - "requestID": "49790caa-d555-48a5-a4c5-d997c6d4bdeb", - "route": "/api/repo/:id/file/*path", - "status": 200, - "serverMs": 1562, - "firstByteMs": 1558.435385, - "bytes": 672, - "stagesMs": { - "anonymize": 20.92808, - "authorization": 1439.622578, - "cache_fill": 64.136903, - "cache_lookup": 12.223965999999999, - "repository": 3.006612, - "worker_wait": 0.07783100000000001 - } - }, - { - "requestID": "fc0bfb1f-fad7-456a-91c5-ac2c68f451c0", - "route": "/api/repo/:id/files", - "status": 200, - "serverMs": 7, - "firstByteMs": 6.970101, - "bytes": 170, - "stagesMs": { - "repository": 2.31507 - } - }, - { - "requestID": "f23af5b7-7acc-4948-8542-23718c1f93bc", - "route": "/api/repo/:id/zip", - "status": 200, - "serverMs": 8186, - "firstByteMs": 6314.193333, - "bytes": 7166, - "stagesMs": { - "anonymize": 108.473942, - "authorization": 7880.354889999999, - "cache_fill": 166.166914, - "cache_lookup": 10.755223, - "repository": 2.065727, - "worker_wait": 0.131073 - } - }, - { - "requestID": "e2b46e1b-0dc2-4270-85fd-5e69eb559fb4", - "route": "/api/admin/performance", - "status": 200, - "serverMs": 60, - "firstByteMs": 57.00364, - "bytes": 3748, - "stagesMs": {} - }, - { - "requestID": "9712e84b-7648-4701-ae0a-65e266f94d42", - "route": "/api/user", - "status": 401, - "serverMs": 4, - "firstByteMs": 4.228291, - "bytes": 25, - "stagesMs": {} - }, - { - "requestID": "3bb0a403-cb8c-45ee-96d0-fd499ad74f32", - "route": "/api/repo/:id", - "status": 200, - "serverMs": 14, - "firstByteMs": 13.543043, - "bytes": 21, - "stagesMs": { - "repository": 3.415241 - } - }, - { - "requestID": "143d1f0e-abd9-4786-bff5-51e1946dad06", - "route": "/api/repo/:id", - "status": 200, - "serverMs": 6, - "firstByteMs": 6.44153, - "bytes": 560, - "stagesMs": { - "repository": 1.711148 - } - }, - { - "requestID": "3b222fdf-49fa-4aaf-bc30-7d7b38770752", - "route": "/api/repo/:id", - "status": 200, - "serverMs": 7, - "firstByteMs": 7.472137, - "bytes": 559, - "stagesMs": { - "repository": 1.736674 - } - }, - { - "requestID": "5304f9a6-de82-499d-a3c6-25c96c60d81d", - "route": "/api/repo/:id/file/*path", - "status": 410, - "serverMs": 3, - "firstByteMs": 3.397325, - "bytes": 30, - "stagesMs": { - "repository": 2.340767 - } - }, - { - "requestID": "6c51d0d4-7960-4fdf-8f3a-93e06915f736", - "route": "/api/user", - "status": 401, - "serverMs": 4, - "firstByteMs": 4.328007, - "bytes": 25, - "stagesMs": {} - } - ] -} \ No newline at end of file diff --git a/backend/reports/auth-release-after.json b/backend/reports/auth-release-after.json deleted file mode 100644 index c86ba27..0000000 --- a/backend/reports/auth-release-after.json +++ /dev/null @@ -1,2548 +0,0 @@ -{ - "deploymentChecks": { - "verifiedAt": "2026-11-03T20:13:22.535Z", - "hostname": "beta.durieux.me", - "configurationMode": "GitHub App enabled alongside legacy OAuth", - "checks": [ - { - "method": "GET", - "route": "/api/user", - "requestID": "92af5526-cf15-4074-9508-ff35677e0d54", - "status": 401, - "expected": 401, - "bytes": 25, - "elapsedMs": 274 - }, - { - "method": "GET", - "route": "/api/user", - "requestID": "8c904bdd-147a-47db-ac56-baf425d8bd5e", - "status": 200, - "expected": 200, - "bytes": 100, - "elapsedMs": 89 - }, - { - "method": "GET", - "route": "/github/connections", - "requestID": "d517f0dc-ece9-4102-95e3-be9ab95b6689", - "status": 200, - "expected": 200, - "bytes": 456, - "elapsedMs": 650 - }, - { - "method": "GET", - "route": "/api/providers", - "requestID": "67926504-67df-46f8-8559-f74a57079c67", - "status": 200, - "expected": 200, - "bytes": 144, - "elapsedMs": 58 - }, - { - "method": "GET", - "route": "/api/user/dashboard", - "requestID": "d1fc1097-69de-4dd3-b45c-be9444c0ed5c", - "status": 200, - "expected": 200, - "bytes": 796, - "elapsedMs": 82 - }, - { - "method": "GET", - "route": "/api/user/default", - "requestID": "4fba91f8-07c9-4105-bc7d-52c832c3aeef", - "status": 200, - "expected": 200, - "bytes": 25, - "elapsedMs": 57 - }, - { - "method": "GET", - "route": "/api/user/quota", - "requestID": "db442065-c2d0-4289-b893-d3fec59b5ef8", - "status": 200, - "expected": 200, - "bytes": 115, - "elapsedMs": 40 - }, - { - "method": "GET", - "route": "/api/admin/overview", - "requestID": "d04272af-d78c-458a-a453-5fc491f32832", - "status": 200, - "expected": 200, - "bytes": 1134, - "elapsedMs": 123 - }, - { - "method": "GET", - "route": "/api/admin/users", - "requestID": "f20342d5-50e6-4e48-a4c4-e3321acbbca4", - "status": 200, - "expected": 200, - "bytes": 526, - "elapsedMs": 52 - }, - { - "method": "GET", - "route": "/api/admin/repos", - "requestID": "04964e19-19aa-4fd6-a12f-529502546db9", - "status": 200, - "expected": 200, - "bytes": 11980, - "elapsedMs": 65 - }, - { - "method": "GET", - "route": "/api/admin/queues", - "requestID": "4857ad9a-ede3-4134-9908-d7d3c2c9f5a4", - "status": 200, - "expected": 200, - "bytes": 4965, - "elapsedMs": 82 - }, - { - "method": "GET", - "route": "/api/admin/performance", - "requestID": "71b166f0-022a-4a54-b862-f416ae1f59dd", - "status": 200, - "expected": 200, - "bytes": 37422, - "elapsedMs": 116 - }, - { - "method": "GET", - "route": "/api/admin/errors", - "requestID": "4eedd466-330d-46d4-865f-16669ea96edc", - "status": 200, - "expected": 200, - "bytes": 57215, - "elapsedMs": 75 - }, - { - "method": "GET", - "route": "/api/admin/errors/stats", - "requestID": "1cee3ef2-113a-46d9-a07b-9b09963d25ea", - "status": 200, - "expected": 200, - "bytes": 1394, - "elapsedMs": 215 - }, - { - "method": "GET", - "route": "/api/admin/tokens", - "requestID": "3561eeb8-4162-4d0b-885c-40b465d3fefb", - "status": 200, - "expected": 200, - "bytes": 160, - "elapsedMs": 162 - }, - { - "method": "GET", - "route": "/api/admin/errors?limit=5001", - "requestID": "9bf24a5b-cd2d-4ea5-b936-fb63d0515a2f", - "status": 200, - "expected": 200, - "bytes": 141277, - "elapsedMs": 113 - }, - { - "method": "GET", - "route": "/api/admin/errors/stats", - "requestID": "be5375e7-d9ca-4125-9adf-6ccff7457f93", - "status": 200, - "expected": 200, - "bytes": 1394, - "elapsedMs": 46 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793736802538-missing", - "requestID": "43d0fe8c-d682-43fc-98a9-44f791267da2", - "status": 404, - "expected": 404, - "bytes": 26, - "elapsedMs": 35 - }, - { - "method": "GET", - "route": "/api/admin/errors/stats", - "requestID": "9ea45513-5f90-4f58-8491-3714431f03a9", - "status": 200, - "expected": 200, - "bytes": 1394, - "elapsedMs": 52 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=download&range=1h", - "requestID": "3e8e8857-d6c9-4a14-a06b-2ab3a3500162", - "status": 200, - "expected": 200, - "bytes": 3413, - "elapsedMs": 52 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=download&range=6h", - "requestID": "ac98ba9e-c7e2-4f4f-a824-6ba4015115cd", - "status": 200, - "expected": 200, - "bytes": 20213, - "elapsedMs": 51 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=download&range=24h", - "requestID": "fc6b9615-1148-4b89-a62a-89935f0dda66", - "status": 200, - "expected": 200, - "bytes": 80723, - "elapsedMs": 64 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=download&range=7d", - "requestID": "1952bf87-de20-467e-bb4d-dc184400ff33", - "status": 200, - "expected": 200, - "bytes": 564562, - "elapsedMs": 166 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=remove&range=1h", - "requestID": "3c82e090-c60a-41c4-9f8e-0e312f1b7cb6", - "status": 200, - "expected": 200, - "bytes": 3405, - "elapsedMs": 47 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=cache&range=1h", - "requestID": "33fde05e-fc96-4434-ba3a-2e50f024d72a", - "status": 200, - "expected": 200, - "bytes": 3401, - "elapsedMs": 44 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=download&range=unrecognized", - "requestID": "52ea2817-ebb7-463a-9141-6737e8661099", - "status": 200, - "expected": 200, - "bytes": 3423, - "elapsedMs": 42 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=unknown", - "requestID": "51f25fc2-aa35-4330-97c0-3af4102439a8", - "status": 404, - "expected": 404, - "bytes": 27, - "elapsedMs": 36 - }, - { - "method": "GET", - "route": "/api/stat", - "requestID": "632f1ced-de81-42db-9f11-f3bb69cae746", - "status": 200, - "expected": 200, - "bytes": 69, - "elapsedMs": 53 - }, - { - "method": "GET", - "route": "/api/stat/history?days=-2", - "requestID": "82c3d0ee-0041-42bb-870b-567b9e9135d1", - "status": 200, - "expected": 200, - "bytes": 105, - "elapsedMs": 38 - }, - { - "method": "GET", - "route": "/api/stat/history?days=0", - "requestID": "5622ad98-0772-47db-a878-86957fe69df0", - "status": 200, - "expected": 200, - "bytes": 105, - "elapsedMs": 56 - }, - { - "method": "GET", - "route": "/api/stat/history?days=0x10", - "requestID": "e079f15c-7d7a-4f4e-81ed-1fc7d6d32a31", - "status": 200, - "expected": 200, - "bytes": 105, - "elapsedMs": 44 - }, - { - "method": "GET", - "route": "/api/stat/history?days=7suffix", - "requestID": "c3970271-3388-4bd5-a4a9-0c4f584399ed", - "status": 200, - "expected": 200, - "bytes": 105, - "elapsedMs": 44 - }, - { - "method": "GET", - "route": "/api/stat/history?days=999", - "requestID": "c783f7de-4a3b-42ef-b451-756a1c0753b9", - "status": 200, - "expected": 200, - "bytes": 105, - "elapsedMs": 41 - }, - { - "method": "GET", - "route": "/api/stat/history?days[]=7&days[]=30", - "requestID": "b6734273-9b72-48de-a52b-8b28d04e5aeb", - "status": 200, - "expected": 200, - "bytes": 105, - "elapsedMs": 35 - }, - { - "method": "GET", - "route": "/api/stat/history?days[1]=7&days[0]=1", - "requestID": "0339fd5c-a412-4e43-a2a4-7b99994a460a", - "status": 200, - "expected": 200, - "bytes": 105, - "elapsedMs": 37 - }, - { - "method": "GET", - "route": "/api/stat/history?days[x]=7", - "requestID": "d86733cb-01c6-441c-b9db-7d7cad9c44f1", - "status": 200, - "expected": 200, - "bytes": 105, - "elapsedMs": 36 - }, - { - "method": "GET", - "route": "/api/user/dashboard?statuses[]=", - "requestID": "e91e4689-a5d0-4ff7-9e63-97c62f9fc624", - "status": 200, - "expected": 200, - "bytes": 64, - "elapsedMs": 55 - }, - { - "method": "GET", - "route": "/api/user/dashboard?type[]=repo", - "requestID": "e9fe011a-2a25-4b70-9a62-1a43829e7fb0", - "status": 200, - "expected": 200, - "bytes": 64, - "elapsedMs": 62 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort[]=", - "requestID": "0d856e46-18e6-4818-9c4b-128e4de603f3", - "status": 400, - "expected": 400, - "bytes": 24, - "elapsedMs": 34 - }, - { - "method": "GET", - "route": "/api/user/dashboard?cursor[]=", - "requestID": "d8fb3699-4b32-492f-b343-5f30e8b3969e", - "status": 400, - "expected": 400, - "bytes": 26, - "elapsedMs": 43 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort=anonymizeDate&limit=5&cursor=eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDEiLCJ2YWx1ZSI6IjIwMjQtMDMtMDFUMDA6MDA6MDAuMDAwWiJ9", - "requestID": "4473dd70-9b3b-404f-817b-4af680847d75", - "status": 200, - "expected": 200, - "bytes": 796, - "elapsedMs": 72 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort=anonymizeDate&limit=5&cursor=eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDEiLCJ2YWx1ZSI6Ik1hcmNoIDEgMjAyNCJ9", - "requestID": "8dddd7df-bbc8-4796-8256-08dccd9644b9", - "status": 200, - "expected": 200, - "bytes": 796, - "elapsedMs": 55 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort=anonymizeDate&limit=5&cursor=eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDEiLCJ2YWx1ZSI6IjIwMjQtMDItMzAifQ", - "requestID": "b08d7dc9-ffec-4b20-83a9-41d5b067b1f9", - "status": 200, - "expected": 200, - "bytes": 796, - "elapsedMs": 53 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort=anonymizeDate&limit=5&cursor=eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMjQ6MDA6MDBaIn0", - "requestID": "c1f26210-f710-4c9a-b316-f8ae2a2eb35d", - "status": 200, - "expected": 200, - "bytes": 796, - "elapsedMs": 51 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort=anonymizeDate&limit=5&cursor=eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDEiLCJ2YWx1ZSI6WyIyMDI0IiwiMyIsIjEiXX0", - "requestID": "89be1c6a-974a-46fc-aeef-25402cfcd961", - "status": 200, - "expected": 200, - "bytes": 796, - "elapsedMs": 52 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort=anonymizeDate&limit=5&cursor=eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDEiLCJ2YWx1ZSI6Im5vdCBhIGRhdGUifQ", - "requestID": "01704acd-f52d-4889-9f2c-34aceb6a034a", - "status": 400, - "expected": 400, - "bytes": 26, - "elapsedMs": 34 - }, - { - "method": "GET", - "route": "/api/admin/performance?minutes=6e1", - "requestID": "e63804a0-f7db-4295-8170-c6c6fc98d408", - "status": 200, - "expected": 200, - "bytes": 68636, - "elapsedMs": 115 - }, - { - "method": "GET", - "route": "/api/admin/performance?minutes[]=60", - "requestID": "a57ab9d0-c911-4fa0-bea2-e1b6b69cd4e3", - "status": 200, - "expected": 200, - "bytes": 68638, - "elapsedMs": 91 - }, - { - "method": "GET", - "route": "/api/admin/performance?minutes[0]=15", - "requestID": "a5fada31-47f8-4bf8-8da4-dd425a6ab829", - "status": 200, - "expected": 200, - "bytes": 37436, - "elapsedMs": 84 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue[]=cache&range[]=6h", - "requestID": "d78e823e-0aad-403e-858b-570e80e81b93", - "status": 200, - "expected": 200, - "bytes": 20201, - "elapsedMs": 52 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?range[]=", - "requestID": "8280a0bb-252a-4d39-a3dd-024e0b90b0eb", - "status": 200, - "expected": 200, - "bytes": 3411, - "elapsedMs": 33 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?range=toString", - "requestID": "c2cbdda9-6387-4004-a944-862dda7a2e71", - "status": 200, - "expected": 200, - "bytes": 51, - "elapsedMs": 36 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue[]=", - "requestID": "7a0cd777-a5bb-4436-8b7f-fdf22885297a", - "status": 404, - "expected": 404, - "bytes": 27, - "elapsedMs": 29 - }, - { - "method": "GET", - "route": "/api/admin/queues?queue[]=remove", - "requestID": "d4f7653b-786e-459a-a746-a7e522dced53", - "status": 200, - "expected": 200, - "bytes": 4692, - "elapsedMs": 72 - }, - { - "method": "GET", - "route": "/api/admin/errors?offset[]=2&limit[]=7", - "requestID": "8c94d6ae-0612-4ccf-8b6a-d2f2d449f2f4", - "status": 200, - "expected": 200, - "bytes": 2636, - "elapsedMs": 41 - }, - { - "method": "GET", - "route": "/api/repo/octocat/Hello-World?connection=", - "requestID": "c2f31300-a3fc-4003-afcb-764e151f4890", - "status": 400, - "expected": 400, - "bytes": 30, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/api/repo/octocat/Hello-World?connection[]=oauth", - "requestID": "7a393f11-e5e4-4333-a6fd-2341e2f1b6a3", - "status": 400, - "expected": 400, - "bytes": 30, - "elapsedMs": 47 - }, - { - "method": "GET", - "route": "/api/repo/octocat/Hello-World?connection=oauth&connection[]=github-app", - "requestID": "449fbcb3-958c-4178-8bb4-fd33378357f2", - "status": 400, - "expected": 400, - "bytes": 30, - "elapsedMs": 32 - }, - { - "method": "GET", - "route": "/api/repo/octocat/Hello-World?repositoryID[]=invalid", - "requestID": "be76221a-a07a-45a9-b884-f0fe3e4f9427", - "status": 500, - "expected": 500, - "bytes": 26, - "elapsedMs": 31 - }, - { - "method": "GET", - "route": "/api/repo/octocat/Hello-World?repositoryID=invalid", - "requestID": "24e68826-d8fd-43c5-8386-1acf9c0df10f", - "status": 500, - "expected": 500, - "bytes": 26, - "elapsedMs": 28 - }, - { - "method": "GET", - "route": "/api/repo/octocat/Hello-World?repositoryID[$exists]=true", - "requestID": "335b7709-6d08-4cc0-9be4-7959e0722ce0", - "status": 500, - "expected": 500, - "bytes": 26, - "elapsedMs": 40 - }, - { - "method": "GET", - "route": "/api/user/search/github-users?q[]=ab", - "requestID": "199489ea-8235-41a9-a101-8ee231c0f3e2", - "status": 200, - "expected": 200, - "bytes": 2, - "elapsedMs": 27 - }, - { - "method": "GET", - "route": "/api/user/search/github-users?q[length]=1", - "requestID": "fd3d2bcd-764a-413a-b8a2-341e2bf41e4a", - "status": 200, - "expected": 200, - "bytes": 2, - "elapsedMs": 40 - }, - { - "method": "GET", - "route": "/api/user/search/github-users?q=ab&q=cd", - "requestID": "a4aff669-0e96-4254-a98a-e4a34f59d824", - "status": 500, - "expected": 500, - "bytes": 26, - "elapsedMs": 29 - }, - { - "method": "GET", - "route": "/api/user/search/github-users?q[x]=ab", - "requestID": "5eed9cdb-ab3c-4f98-b4f4-3cdac206c791", - "status": 500, - "expected": 500, - "bytes": 26, - "elapsedMs": 31 - }, - { - "method": "GET", - "route": "/api/user/search/github-users?q[length][toString]=1", - "requestID": "927e23ad-0052-4e76-b149-9b0368a13e11", - "status": 500, - "expected": 500, - "bytes": 26, - "elapsedMs": 25 - }, - { - "method": "GET", - "route": "/api/admin/repos?page[]=2&limit[]=2&sort[]=status&direction[]=asc&format[]=csv", - "requestID": "39bab574-b902-47b4-b445-72982db42b9a", - "status": 200, - "expected": 200, - "bytes": 2568, - "elapsedMs": 52 - }, - { - "method": "GET", - "route": "/api/admin/repos?page=1000001&limit=1", - "requestID": "c2ba7c3b-9548-46f5-a7f1-c31bdc9bd519", - "status": 200, - "expected": 200, - "bytes": 193, - "elapsedMs": 35 - }, - { - "method": "GET", - "route": "/api/admin/repos?page=-1", - "requestID": "b1008917-3f20-444c-acc2-c308f093b03f", - "status": 500, - "expected": 500, - "bytes": 26, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/api/admin/repos?page[toString]=x", - "requestID": "24059a54-90a2-4ee0-abb7-c882cb2ed295", - "status": 500, - "expected": 500, - "bytes": 26, - "elapsedMs": 44 - }, - { - "method": "GET", - "route": "/api/admin/users?page[]=2&limit[]=2&sort[]=status&direction[]=asc&format[]=csv", - "requestID": "e42d1801-5264-4f89-baa6-b219246f0451", - "status": 200, - "expected": 200, - "bytes": 106, - "elapsedMs": 38 - }, - { - "method": "GET", - "route": "/api/admin/users?page=1000001&limit=1", - "requestID": "fa407388-1f04-4dff-95cc-e16f241ae7c8", - "status": 200, - "expected": 200, - "bytes": 112, - "elapsedMs": 38 - }, - { - "method": "GET", - "route": "/api/admin/users?page=-1", - "requestID": "9cf56577-ee3c-4520-aa19-cad9c70535e0", - "status": 500, - "expected": 500, - "bytes": 26, - "elapsedMs": 36 - }, - { - "method": "GET", - "route": "/api/admin/users?page[toString]=x", - "requestID": "3b08bf96-dd3d-444f-bfad-a5618426d4bf", - "status": 500, - "expected": 500, - "bytes": 26, - "elapsedMs": 33 - }, - { - "method": "GET", - "route": "/api/admin/users?limit=-1", - "requestID": "21d38d5b-7f8e-419f-bca3-e99a7fae061a", - "status": 500, - "expected": 500, - "bytes": 26, - "elapsedMs": 47 - }, - { - "method": "GET", - "route": "/api/admin/conferences?page[]=2&limit[]=2&sort[]=status&direction[]=asc&format[]=csv", - "requestID": "bbd2c865-ce96-48ad-a726-ce56cf69c738", - "status": 200, - "expected": 200, - "bytes": 80, - "elapsedMs": 36 - }, - { - "method": "GET", - "route": "/api/admin/conferences?page=1000001&limit=1", - "requestID": "875e348a-442b-40ba-94dd-c8e05f173c04", - "status": 200, - "expected": 200, - "bytes": 86, - "elapsedMs": 35 - }, - { - "method": "GET", - "route": "/api/admin/conferences?page=-1", - "requestID": "84c63f73-a8ca-43cf-8221-fe604b5598f9", - "status": 500, - "expected": 500, - "bytes": 26, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/api/admin/conferences?page[toString]=x", - "requestID": "2bd04775-7093-4088-92dc-01407269b604", - "status": 500, - "expected": 500, - "bytes": 26, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/api/admin/repos?limit=-1", - "requestID": "0b1aec43-c47a-4fe5-b6de-1a2732541e3f", - "status": 200, - "expected": 200, - "bytes": 1410, - "elapsedMs": 38 - }, - { - "method": "GET", - "route": "/api/admin/repos?ready[]=true", - "requestID": "2a75bf8a-1611-44c5-b7ff-acf241db8ae6", - "status": 200, - "expected": 200, - "bytes": 1935, - "elapsedMs": 37 - }, - { - "method": "GET", - "route": "/api/admin/conferences?limit=-1", - "requestID": "4cb08c73-3596-403e-a04e-439dc1d8ce67", - "status": 200, - "expected": 200, - "bytes": 80, - "elapsedMs": 33 - }, - { - "method": "GET", - "route": "/api/admin/conferences?ready[]=true", - "requestID": "eb578bca-7b46-467d-91ef-0c199c7d72b4", - "status": 200, - "expected": 200, - "bytes": 117, - "elapsedMs": 36 - }, - { - "method": "GET", - "route": "/api/admin/repos?search[]=x", - "requestID": "08478eb2-6570-4f71-9a98-12379ebb3514", - "status": 500, - "expected": 500, - "bytes": 26, - "elapsedMs": 28 - }, - { - "method": "GET", - "route": "/api/admin/users?search[]=x", - "requestID": "0d599bc8-5c9a-4b27-8663-16053843682d", - "status": 500, - "expected": 500, - "bytes": 26, - "elapsedMs": 28 - }, - { - "method": "GET", - "route": "/api/admin/conferences?search[]=x", - "requestID": "bcbbd23b-70f4-4d73-b3fe-b1a4ff0f64a6", - "status": 500, - "expected": 500, - "bytes": 26, - "elapsedMs": 29 - }, - { - "method": "GET", - "route": "/api/admin/users?status[]=active", - "requestID": "0fecb76b-44e5-4f9b-a733-d51262bd8d39", - "status": 200, - "expected": 200, - "bytes": 99, - "elapsedMs": 50 - }, - { - "method": "GET", - "route": "/api/admin/users?status[$in][]=active", - "requestID": "c5a6a08a-f2b8-4979-8ce4-41d4bd0a9f44", - "status": 200, - "expected": 200, - "bytes": 553, - "elapsedMs": 39 - }, - { - "method": "GET", - "route": "/api/admin/users?status[a]=active", - "requestID": "fe4f3020-4e24-4d30-bd78-476fbc6042da", - "status": 500, - "expected": 500, - "bytes": 26, - "elapsedMs": 28 - }, - { - "method": "GET", - "route": "/api/admin/users?status[$in]=active", - "requestID": "8c642cc3-2d24-4225-b485-87e353df54aa", - "status": 500, - "expected": 500, - "bytes": 26, - "elapsedMs": 31 - }, - { - "method": "GET", - "route": "/api/admin/repos?owner[a]=x", - "requestID": "d3b8893f-955d-4e78-a3fc-7b8be6186f84", - "status": 500, - "expected": 500, - "bytes": 26, - "elapsedMs": 28 - }, - { - "method": "GET", - "route": "/api/admin/repos?conference[$unknown]=x", - "requestID": "5d9aef10-9941-4ae4-b39a-bd53b8f42ffe", - "status": 500, - "expected": 500, - "bytes": 26, - "elapsedMs": 28 - }, - { - "method": "GET", - "route": "/api/admin/repos?dateFrom[]=2024-02-30", - "requestID": "0e2e75fb-eb82-44fa-a6d8-c80c0024bc08", - "status": 200, - "expected": 200, - "bytes": 12042, - "elapsedMs": 42 - }, - { - "method": "GET", - "route": "/api/admin/repos?dateTo=March%201%202024", - "requestID": "8f3b5d5e-e340-43cf-a210-f18b7b1f3ccd", - "status": 200, - "expected": 200, - "bytes": 156, - "elapsedMs": 34 - }, - { - "method": "GET", - "route": "/api/admin/repos?dateFrom[toString]=x", - "requestID": "0fa29056-5ec2-4adb-9575-686df9b1ec37", - "status": 500, - "expected": 500, - "bytes": 26, - "elapsedMs": 27 - }, - { - "method": "GET", - "route": "/api/admin/users?dateFrom[]=2024-02-30", - "requestID": "180dd2d4-b58e-4174-b636-d61f919f031c", - "status": 200, - "expected": 200, - "bytes": 458, - "elapsedMs": 53 - }, - { - "method": "GET", - "route": "/api/admin/users?dateTo=March%201%202024", - "requestID": "5d4d9689-ea73-4c2b-a4aa-dd06a52c7860", - "status": 200, - "expected": 200, - "bytes": 129, - "elapsedMs": 35 - }, - { - "method": "GET", - "route": "/api/admin/users?dateFrom[toString]=x", - "requestID": "dc625355-4d27-4b7e-912d-0f36b207e53d", - "status": 500, - "expected": 500, - "bytes": 26, - "elapsedMs": 27 - }, - { - "method": "GET", - "route": "/api/admin/conferences?dateFrom[]=2024-02-30", - "requestID": "28abbffe-a089-4ce0-8ae9-c66b89ff3451", - "status": 200, - "expected": 200, - "bytes": 138, - "elapsedMs": 36 - }, - { - "method": "GET", - "route": "/api/admin/conferences?dateTo=March%201%202024", - "requestID": "db506a0e-e51e-44db-9a4f-6f825f5a1aa7", - "status": 200, - "expected": 200, - "bytes": 138, - "elapsedMs": 33 - }, - { - "method": "GET", - "route": "/api/admin/conferences?dateFrom[toString]=x", - "requestID": "116bffd3-e79f-403f-8f2a-53c1006e7ca4", - "status": 500, - "expected": 500, - "bytes": 26, - "elapsedMs": 28 - }, - { - "method": "GET", - "route": "/github/connections", - "requestID": "bd362f07-3c14-4001-a940-9bd67a92bd16", - "status": 200, - "expected": 200, - "bytes": 456, - "elapsedMs": 783 - }, - { - "method": "POST", - "route": "/api/admin/tokens", - "requestID": "e79c9b2a-8e46-4e5c-8504-550cde50616e", - "status": 200, - "expected": 200, - "bytes": 186, - "elapsedMs": 43 - }, - { - "method": "GET", - "route": "/api/user", - "requestID": "8b472f79-805e-41dc-ba3a-e26afb5e2094", - "status": 200, - "expected": 200, - "bytes": 100, - "elapsedMs": 31 - }, - { - "method": "DELETE", - "route": "/api/admin/tokens/6aea406baf3a2cca466ec438", - "requestID": "b63c8973-72cf-4a87-b161-d40121528cdb", - "status": 200, - "expected": 200, - "bytes": 13, - "elapsedMs": 37 - }, - { - "method": "GET", - "route": "/api/user", - "requestID": "d16c878f-682a-4ddf-b039-7c565cc93e08", - "status": 401, - "expected": 401, - "bytes": 25, - "elapsedMs": 29 - }, - { - "method": "POST", - "route": "/github/login-token", - "requestID": "bc883a15-3737-42c8-9584-29496edde5f2", - "status": 200, - "expected": 200, - "bytes": 33, - "elapsedMs": 31 - }, - { - "method": "GET", - "route": "/api/user", - "requestID": "09bcdad1-c4d1-4183-a6a7-5e0a9270d845", - "status": 200, - "expected": 200, - "bytes": 100, - "elapsedMs": 29 - }, - { - "method": "GET", - "route": "/api/user/logout", - "requestID": "7fb579f2-2cc4-4052-8d66-b3db71a63d42", - "status": 302, - "expected": 302, - "bytes": 24, - "elapsedMs": 28 - }, - { - "method": "GET", - "route": "/api/user", - "requestID": "59114ddc-6949-4acc-9bcb-2a12c81fe01e", - "status": 401, - "expected": 401, - "bytes": 25, - "elapsedMs": 27 - }, - { - "method": "POST", - "route": "/api/anonymize-preview", - "requestID": "efcfd370-9f22-4c93-be51-4b56fa1dd946", - "status": 200, - "expected": 200, - "bytes": 26, - "elapsedMs": 35 - }, - { - "method": "GET", - "route": "/api/providers/github/repository/metadata?name=tdurieux%2Fsynctex-js&connection=github-app", - "requestID": "eea75634-d68f-4847-b599-9991cd208258", - "status": 200, - "expected": 200, - "bytes": 230, - "elapsedMs": 3383 - }, - { - "method": "GET", - "route": "/api/providers/github/repository/branches?name=tdurieux%2Fsynctex-js&connection=github-app", - "requestID": "0a237b63-4c21-4202-8a6b-36d283467ce7", - "status": 200, - "expected": 200, - "bytes": 2623, - "elapsedMs": 3342 - }, - { - "method": "GET", - "route": "/api/providers/github/repository/readme?name=tdurieux%2Fsynctex-js&connection=github-app", - "requestID": "d6abe967-72d9-49cc-8d4a-51209dcd2e35", - "status": 200, - "expected": 200, - "bytes": 2303, - "elapsedMs": 3394 - }, - { - "method": "POST", - "route": "/api/repo", - "requestID": "524e1d62-3336-492b-909f-d4e0f83c0c10", - "status": 200, - "expected": 200, - "bytes": 22, - "elapsedMs": 3928 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793736802538", - "requestID": "9dff0d7e-f09e-41e1-b45a-36ec71317182", - "status": 200, - "expected": 200, - "bytes": 510, - "elapsedMs": 84 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793736802538/file/LICENSE", - "requestID": "7f3d1bdd-e4d8-4053-b5f4-e847bd9dc5f7", - "status": 200, - "expected": 200, - "bytes": 1074, - "elapsedMs": 812 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793736802538/files", - "requestID": "39933933-4557-4c01-b528-d757f9f3f008", - "status": 200, - "expected": 200, - "bytes": 170, - "elapsedMs": 33 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793736802538/zip", - "requestID": "106b2184-7259-494c-9b1f-f938c1293fe3", - "status": 200, - "expected": 200, - "bytes": 7166, - "elapsedMs": 4178 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793736802538/file/LICENSE", - "requestID": "d146aa38-d691-4abf-8d33-3ddab59926f0", - "status": 200, - "expected": 200, - "bytes": 1074, - "elapsedMs": 875 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793736802538/zip", - "requestID": "c20a0025-ec47-40fe-83c6-2de77bc7f1da", - "status": 200, - "expected": 200, - "bytes": 7166, - "elapsedMs": 4043 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793736802538/file/LICENSE", - "requestID": "81be7809-d70b-4bb3-94b0-98f186436c43", - "status": 200, - "expected": 200, - "bytes": 1074, - "elapsedMs": 800 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793736802538/zip", - "requestID": "7924deb9-7a06-4581-91ac-b8ae0e2c5baf", - "status": 200, - "expected": 200, - "bytes": 7166, - "elapsedMs": 4070 - }, - { - "method": "GET", - "route": "/api/admin/performance", - "requestID": "366775ed-6359-49a4-bd0e-a637c0b5a606", - "status": 200, - "expected": 200, - "bytes": 37225, - "elapsedMs": 137 - }, - { - "method": "GET", - "route": "/api/user", - "requestID": "96239993-1648-4dfe-810b-a32677006379", - "status": 401, - "expected": 401, - "bytes": 25, - "elapsedMs": 34 - }, - { - "method": "DELETE", - "route": "/api/repo/go-beta-check-1793736802538", - "requestID": "e4897fe6-59ef-420f-b299-03a6f10a51c4", - "status": 200, - "expected": 200, - "bytes": 21, - "elapsedMs": 47 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793736802538", - "requestID": "a517b837-1f0e-4d83-bdfa-ab43e181db97", - "status": 200, - "expected": 200, - "bytes": 560, - "elapsedMs": 36 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793736802538", - "requestID": "9a47ef34-3c20-4c7a-bd97-6485eb05bcb0", - "status": 200, - "expected": 200, - "bytes": 559, - "elapsedMs": 35 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793736802538/file/LICENSE", - "requestID": "c14adddc-0e86-49a9-96a3-3d11fd49d3ed", - "status": 410, - "expected": 410, - "bytes": 30, - "elapsedMs": 28 - }, - { - "method": "GET", - "route": "/api/user", - "requestID": "e1baa91f-853e-47ce-923c-ac6c90ad2f17", - "status": 401, - "expected": 401, - "bytes": 25, - "elapsedMs": 40 - } - ], - "productionChanged": false, - "overviewHistoryFresh": "passed", - "overviewBrowserFields": "passed", - "queueOverviewFields": "passed", - "errorMonitoring": { - "maxEntries": 5000, - "hourlyBuckets": 24, - "routine404Counted": true - }, - "queueMetricWindows": [ - { - "queue": "download", - "range": "1h", - "points": 60 - }, - { - "queue": "download", - "range": "6h", - "points": 360 - }, - { - "queue": "download", - "range": "24h", - "points": 1440 - }, - { - "queue": "download", - "range": "7d", - "points": 10080 - }, - { - "queue": "remove", - "range": "1h", - "points": 60 - }, - { - "queue": "cache", - "range": "1h", - "points": 60 - }, - { - "queue": "download", - "range": "unrecognized", - "points": 60 - } - ], - "publicStatistics": { - "anonymousAccess": true, - "windows": [ - { - "query": "days=-2", - "days": 1, - "rows": 1 - }, - { - "query": "days=0", - "days": 30, - "rows": 1 - }, - { - "query": "days=0x10", - "days": 16, - "rows": 1 - }, - { - "query": "days=7suffix", - "days": 7, - "rows": 1 - }, - { - "query": "days=999", - "days": 365, - "rows": 1 - }, - { - "query": "days[]=7&days[]=30", - "days": 7, - "rows": 1 - }, - { - "query": "days[1]=7&days[0]=1", - "days": 1, - "rows": 1 - }, - { - "query": "days[x]=7", - "days": 30, - "rows": 1 - } - ] - }, - "dashboardExtendedQueries": "passed", - "dashboardDateCursors": "passed", - "monitoringExtendedQueries": "passed", - "adminExtendedQueries": "passed", - "previewConnectionQueries": "passed", - "previewCacheHintRejections": "passed", - "userSearchQueries": "passed", - "adminListPaginationQueries": "passed", - "adminListFilterQueries": "passed", - "adminListCastingQueries": "passed", - "adminListDateQueries": "passed", - "apiKeyLifecycle": "passed", - "sessionLoginLogout": "passed", - "exactZipContents": "passed", - "repeatedContentChecks": 3, - "performanceMonitoring": { - "requests": true, - "processSamples": true, - "runtimeHistory": true, - "stages": [ - "repository", - "authorization", - "worker_wait", - "anonymize" - ], - "upstreamObserved": true, - "upstreamNote": "Shared-cache hits need no upstream read; provider timing is checked by the integration suite." - }, - "result": "passed", - "testRepositoryRemoved": true, - "temporaryKeyRevoked": true, - "betaAccountAdmin": true, - "uniqueRequestIDsVerified": 130 - }, - "image": "sha256:e4c0f3bdc8311851f11a584616771d22a1eb5dcda2d44d115be0101c57674df2", - "traces": [ - { - "requestID": "92af5526-cf15-4074-9508-ff35677e0d54", - "route": "/api/user", - "status": 401, - "serverMs": 2, - "firstByteMs": 2.440078, - "bytes": 25, - "stagesMs": {} - }, - { - "requestID": "8c904bdd-147a-47db-ac56-baf425d8bd5e", - "route": "/api/user", - "status": 200, - "serverMs": 7, - "firstByteMs": 7.350763, - "bytes": 100, - "stagesMs": {} - }, - { - "requestID": "d517f0dc-ece9-4102-95e3-be9ab95b6689", - "route": "/github/connections", - "status": 200, - "serverMs": 594, - "firstByteMs": 594.455175, - "bytes": 456, - "stagesMs": {} - }, - { - "requestID": "67926504-67df-46f8-8559-f74a57079c67", - "route": "/api/providers", - "status": 200, - "serverMs": 5, - "firstByteMs": 5.397495, - "bytes": 144, - "stagesMs": {} - }, - { - "requestID": "d1fc1097-69de-4dd3-b45c-be9444c0ed5c", - "route": "/api/user/dashboard", - "status": 200, - "serverMs": 21, - "firstByteMs": 21.228708, - "bytes": 796, - "stagesMs": {} - }, - { - "requestID": "4fba91f8-07c9-4105-bc7d-52c832c3aeef", - "route": "/api/user/default", - "status": 200, - "serverMs": 5, - "firstByteMs": 4.610757, - "bytes": 25, - "stagesMs": {} - }, - { - "requestID": "db442065-c2d0-4289-b893-d3fec59b5ef8", - "route": "/api/user/quota", - "status": 200, - "serverMs": 6, - "firstByteMs": 6.401882, - "bytes": 115, - "stagesMs": {} - }, - { - "requestID": "d04272af-d78c-458a-a453-5fc491f32832", - "route": "/api/admin/overview", - "status": 200, - "serverMs": 67, - "firstByteMs": 65.547509, - "bytes": 583, - "stagesMs": {} - }, - { - "requestID": "f20342d5-50e6-4e48-a4c4-e3321acbbca4", - "route": "/api/admin/users", - "status": 200, - "serverMs": 12, - "firstByteMs": 11.643001, - "bytes": 526, - "stagesMs": {} - }, - { - "requestID": "04964e19-19aa-4fd6-a12f-529502546db9", - "route": "/api/admin/repos", - "status": 200, - "serverMs": 15, - "firstByteMs": 12.244846, - "bytes": 2252, - "stagesMs": {} - }, - { - "requestID": "4857ad9a-ede3-4134-9908-d7d3c2c9f5a4", - "route": "/api/admin/queues", - "status": 200, - "serverMs": 27, - "firstByteMs": 25.067812, - "bytes": 772, - "stagesMs": {} - }, - { - "requestID": "71b166f0-022a-4a54-b862-f416ae1f59dd", - "route": "/api/admin/performance", - "status": 200, - "serverMs": 51, - "firstByteMs": 47.388249, - "bytes": 4464, - "stagesMs": {} - }, - { - "requestID": "4eedd466-330d-46d4-865f-16669ea96edc", - "route": "/api/admin/errors", - "status": 200, - "serverMs": 22, - "firstByteMs": 16.637856, - "bytes": 8541, - "stagesMs": {} - }, - { - "requestID": "1cee3ef2-113a-46d9-a07b-9b09963d25ea", - "route": "/api/admin/errors/stats", - "status": 200, - "serverMs": 7, - "firstByteMs": 5.689557, - "bytes": 266, - "stagesMs": {} - }, - { - "requestID": "3561eeb8-4162-4d0b-885c-40b465d3fefb", - "route": "/api/admin/tokens", - "status": 200, - "serverMs": 7, - "firstByteMs": 6.667622, - "bytes": 160, - "stagesMs": {} - }, - { - "requestID": "9bf24a5b-cd2d-4ea5-b936-fb63d0515a2f", - "route": "/api/admin/errors", - "status": 200, - "serverMs": 38, - "firstByteMs": 27.216298, - "bytes": 20323, - "stagesMs": {} - }, - { - "requestID": "be5375e7-d9ca-4125-9adf-6ccff7457f93", - "route": "/api/admin/errors/stats", - "status": 200, - "serverMs": 8, - "firstByteMs": 6.514999, - "bytes": 266, - "stagesMs": {} - }, - { - "requestID": "43d0fe8c-d682-43fc-98a9-44f791267da2", - "route": "/api/repo/:id", - "status": 404, - "serverMs": 6, - "firstByteMs": 6.070003, - "bytes": 26, - "stagesMs": { - "repository": 1.279095 - } - }, - { - "requestID": "9ea45513-5f90-4f58-8491-3714431f03a9", - "route": "/api/admin/errors/stats", - "status": 200, - "serverMs": 8, - "firstByteMs": 6.392329, - "bytes": 266, - "stagesMs": {} - }, - { - "requestID": "3e8e8857-d6c9-4a14-a06b-2ab3a3500162", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 10, - "firstByteMs": 8.428846, - "bytes": 211, - "stagesMs": {} - }, - { - "requestID": "ac98ba9e-c7e2-4f4f-a824-6ba4015115cd", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 11, - "firstByteMs": 9.010161, - "bytes": 600, - "stagesMs": {} - }, - { - "requestID": "fc6b9615-1148-4b89-a62a-89935f0dda66", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 12, - "firstByteMs": 8.10019, - "bytes": 1966, - "stagesMs": {} - }, - { - "requestID": "1952bf87-de20-467e-bb4d-dc184400ff33", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 101, - "firstByteMs": 83.764568, - "bytes": 9716, - "stagesMs": {} - }, - { - "requestID": "3c82e090-c60a-41c4-9f8e-0e312f1b7cb6", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 8, - "firstByteMs": 6.621152, - "bytes": 205, - "stagesMs": {} - }, - { - "requestID": "33fde05e-fc96-4434-ba3a-2e50f024d72a", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 8, - "firstByteMs": 6.597779, - "bytes": 188, - "stagesMs": {} - }, - { - "requestID": "52ea2817-ebb7-463a-9141-6737e8661099", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 7, - "firstByteMs": 5.391655, - "bytes": 222, - "stagesMs": {} - }, - { - "requestID": "51f25fc2-aa35-4330-97c0-3af4102439a8", - "route": "/api/admin/queues/metrics", - "status": 404, - "serverMs": 5, - "firstByteMs": 4.598956, - "bytes": 27, - "stagesMs": {} - }, - { - "requestID": "632f1ced-de81-42db-9f11-f3bb69cae746", - "route": "/api/stat", - "status": 200, - "serverMs": 4, - "firstByteMs": 4.260357, - "bytes": 69, - "stagesMs": {} - }, - { - "requestID": "82c3d0ee-0041-42bb-870b-567b9e9135d1", - "route": "/api/stat/history", - "status": 200, - "serverMs": 3, - "firstByteMs": 2.775265, - "bytes": 105, - "stagesMs": {} - }, - { - "requestID": "5622ad98-0772-47db-a878-86957fe69df0", - "route": "/api/stat/history", - "status": 200, - "serverMs": 4, - "firstByteMs": 3.749927, - "bytes": 105, - "stagesMs": {} - }, - { - "requestID": "e079f15c-7d7a-4f4e-81ed-1fc7d6d32a31", - "route": "/api/stat/history", - "status": 200, - "serverMs": 4, - "firstByteMs": 3.68609, - "bytes": 105, - "stagesMs": {} - }, - { - "requestID": "c3970271-3388-4bd5-a4a9-0c4f584399ed", - "route": "/api/stat/history", - "status": 200, - "serverMs": 4, - "firstByteMs": 3.797063, - "bytes": 105, - "stagesMs": {} - }, - { - "requestID": "c783f7de-4a3b-42ef-b451-756a1c0753b9", - "route": "/api/stat/history", - "status": 200, - "serverMs": 3, - "firstByteMs": 3.218785, - "bytes": 105, - "stagesMs": {} - }, - { - "requestID": "b6734273-9b72-48de-a52b-8b28d04e5aeb", - "route": "/api/stat/history", - "status": 200, - "serverMs": 1, - "firstByteMs": 0.950782, - "bytes": 105, - "stagesMs": {} - }, - { - "requestID": "0339fd5c-a412-4e43-a2a4-7b99994a460a", - "route": "/api/stat/history", - "status": 200, - "serverMs": 2, - "firstByteMs": 1.605862, - "bytes": 105, - "stagesMs": {} - }, - { - "requestID": "d86733cb-01c6-441c-b9db-7d7cad9c44f1", - "route": "/api/stat/history", - "status": 200, - "serverMs": 1, - "firstByteMs": 1.045825, - "bytes": 105, - "stagesMs": {} - }, - { - "requestID": "e91e4689-a5d0-4ff7-9e63-97c62f9fc624", - "route": "/api/user/dashboard", - "status": 200, - "serverMs": 20, - "firstByteMs": 19.894045, - "bytes": 64, - "stagesMs": {} - }, - { - "requestID": "e9fe011a-2a25-4b70-9a62-1a43829e7fb0", - "route": "/api/user/dashboard", - "status": 200, - "serverMs": 21, - "firstByteMs": 20.55172, - "bytes": 64, - "stagesMs": {} - }, - { - "requestID": "0d856e46-18e6-4818-9c4b-128e4de603f3", - "route": "/api/user/dashboard", - "status": 400, - "serverMs": 5, - "firstByteMs": 4.789879, - "bytes": 24, - "stagesMs": {} - }, - { - "requestID": "d8fb3699-4b32-492f-b343-5f30e8b3969e", - "route": "/api/user/dashboard", - "status": 400, - "serverMs": 5, - "firstByteMs": 5.266365, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "4473dd70-9b3b-404f-817b-4af680847d75", - "route": "/api/user/dashboard", - "status": 200, - "serverMs": 19, - "firstByteMs": 18.946164, - "bytes": 796, - "stagesMs": {} - }, - { - "requestID": "8dddd7df-bbc8-4796-8256-08dccd9644b9", - "route": "/api/user/dashboard", - "status": 200, - "serverMs": 19, - "firstByteMs": 19.486192, - "bytes": 796, - "stagesMs": {} - }, - { - "requestID": "b08d7dc9-ffec-4b20-83a9-41d5b067b1f9", - "route": "/api/user/dashboard", - "status": 200, - "serverMs": 19, - "firstByteMs": 19.146876, - "bytes": 796, - "stagesMs": {} - }, - { - "requestID": "c1f26210-f710-4c9a-b316-f8ae2a2eb35d", - "route": "/api/user/dashboard", - "status": 200, - "serverMs": 19, - "firstByteMs": 19.081205, - "bytes": 796, - "stagesMs": {} - }, - { - "requestID": "89be1c6a-974a-46fc-aeef-25402cfcd961", - "route": "/api/user/dashboard", - "status": 200, - "serverMs": 20, - "firstByteMs": 19.571728, - "bytes": 796, - "stagesMs": {} - }, - { - "requestID": "01704acd-f52d-4889-9f2c-34aceb6a034a", - "route": "/api/user/dashboard", - "status": 400, - "serverMs": 6, - "firstByteMs": 5.532614, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "e63804a0-f7db-4295-8170-c6c6fc98d408", - "route": "/api/admin/performance", - "status": 200, - "serverMs": 84, - "firstByteMs": 79.029918, - "bytes": 7170, - "stagesMs": {} - }, - { - "requestID": "a57ab9d0-c911-4fa0-bea2-e1b6b69cd4e3", - "route": "/api/admin/performance", - "status": 200, - "serverMs": 62, - "firstByteMs": 56.675417, - "bytes": 7210, - "stagesMs": {} - }, - { - "requestID": "a5fada31-47f8-4bf8-8da4-dd425a6ab829", - "route": "/api/admin/performance", - "status": 200, - "serverMs": 52, - "firstByteMs": 48.132301, - "bytes": 4507, - "stagesMs": {} - }, - { - "requestID": "d78e823e-0aad-403e-858b-570e80e81b93", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 11, - "firstByteMs": 9.236138, - "bytes": 568, - "stagesMs": {} - }, - { - "requestID": "8280a0bb-252a-4d39-a3dd-024e0b90b0eb", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 6, - "firstByteMs": 4.950646, - "bytes": 215, - "stagesMs": {} - }, - { - "requestID": "c2cbdda9-6387-4004-a944-862dda7a2e71", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 5, - "firstByteMs": 5.169341, - "bytes": 51, - "stagesMs": {} - }, - { - "requestID": "7a0cd777-a5bb-4436-8b7f-fdf22885297a", - "route": "/api/admin/queues/metrics", - "status": 404, - "serverMs": 5, - "firstByteMs": 4.963222, - "bytes": 27, - "stagesMs": {} - }, - { - "requestID": "d4f7653b-786e-459a-a746-a7e522dced53", - "route": "/api/admin/queues", - "status": 200, - "serverMs": 27, - "firstByteMs": 25.354781, - "bytes": 730, - "stagesMs": {} - }, - { - "requestID": "8c94d6ae-0612-4ccf-8b6a-d2f2d449f2f4", - "route": "/api/admin/errors", - "status": 200, - "serverMs": 8, - "firstByteMs": 6.239222, - "bytes": 837, - "stagesMs": {} - }, - { - "requestID": "c2f31300-a3fc-4003-afcb-764e151f4890", - "route": "/api/repo/:owner/:repo", - "status": 400, - "serverMs": 6, - "firstByteMs": 6.324666, - "bytes": 30, - "stagesMs": {} - }, - { - "requestID": "7a393f11-e5e4-4333-a6fd-2341e2f1b6a3", - "route": "/api/repo/:owner/:repo", - "status": 400, - "serverMs": 5, - "firstByteMs": 4.683355, - "bytes": 30, - "stagesMs": {} - }, - { - "requestID": "449fbcb3-958c-4178-8bb4-fd33378357f2", - "route": "/api/repo/:owner/:repo", - "status": 400, - "serverMs": 5, - "firstByteMs": 4.546653, - "bytes": 30, - "stagesMs": {} - }, - { - "requestID": "be76221a-a07a-45a9-b884-f0fe3e4f9427", - "route": "/api/repo/:owner/:repo", - "status": 500, - "serverMs": 5, - "firstByteMs": 5.390881, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "24e68826-d8fd-43c5-8386-1acf9c0df10f", - "route": "/api/repo/:owner/:repo", - "status": 500, - "serverMs": 4, - "firstByteMs": 3.670366, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "335b7709-6d08-4cc0-9be4-7959e0722ce0", - "route": "/api/repo/:owner/:repo", - "status": 500, - "serverMs": 4, - "firstByteMs": 3.689258, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "199489ea-8235-41a9-a101-8ee231c0f3e2", - "route": "/api/user/search/github-users", - "status": 200, - "serverMs": 3, - "firstByteMs": 3.266913, - "bytes": 2, - "stagesMs": {} - }, - { - "requestID": "fd3d2bcd-764a-413a-b8a2-341e2bf41e4a", - "route": "/api/user/search/github-users", - "status": 200, - "serverMs": 3, - "firstByteMs": 2.994012, - "bytes": 2, - "stagesMs": {} - }, - { - "requestID": "a4aff669-0e96-4254-a98a-e4a34f59d824", - "route": "/api/user/search/github-users", - "status": 500, - "serverMs": 6, - "firstByteMs": 6.313171, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "5eed9cdb-ab3c-4f98-b4f4-3cdac206c791", - "route": "/api/user/search/github-users", - "status": 500, - "serverMs": 7, - "firstByteMs": 6.747163, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "927e23ad-0052-4e76-b149-9b0368a13e11", - "route": "/api/user/search/github-users", - "status": 500, - "serverMs": 3, - "firstByteMs": 3.020981, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "39bab574-b902-47b4-b445-72982db42b9a", - "route": "/api/admin/repos", - "status": 200, - "serverMs": 11, - "firstByteMs": 9.491644, - "bytes": 903, - "stagesMs": {} - }, - { - "requestID": "c2ba7c3b-9548-46f5-a7f1-c31bdc9bd519", - "route": "/api/admin/repos", - "status": 200, - "serverMs": 7, - "firstByteMs": 7.287441, - "bytes": 193, - "stagesMs": {} - }, - { - "requestID": "b1008917-3f20-444c-acc2-c308f093b03f", - "route": "/api/admin/repos", - "status": 500, - "serverMs": 5, - "firstByteMs": 4.848909, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "24059a54-90a2-4ee0-abb7-c882cb2ed295", - "route": "/api/admin/repos", - "status": 500, - "serverMs": 4, - "firstByteMs": 4.269029, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "e42d1801-5264-4f89-baa6-b219246f0451", - "route": "/api/admin/users", - "status": 200, - "serverMs": 10, - "firstByteMs": 10.345097, - "bytes": 106, - "stagesMs": {} - }, - { - "requestID": "fa407388-1f04-4dff-95cc-e16f241ae7c8", - "route": "/api/admin/users", - "status": 200, - "serverMs": 9, - "firstByteMs": 9.469732, - "bytes": 112, - "stagesMs": {} - }, - { - "requestID": "9cf56577-ee3c-4520-aa19-cad9c70535e0", - "route": "/api/admin/users", - "status": 500, - "serverMs": 8, - "firstByteMs": 7.740581, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "3b08bf96-dd3d-444f-bfad-a5618426d4bf", - "route": "/api/admin/users", - "status": 500, - "serverMs": 4, - "firstByteMs": 4.319753, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "21d38d5b-7f8e-419f-bca3-e99a7fae061a", - "route": "/api/admin/users", - "status": 500, - "serverMs": 7, - "firstByteMs": 7.257968, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "bbd2c865-ce96-48ad-a726-ce56cf69c738", - "route": "/api/admin/conferences", - "status": 200, - "serverMs": 9, - "firstByteMs": 8.787399, - "bytes": 80, - "stagesMs": {} - }, - { - "requestID": "875e348a-442b-40ba-94dd-c8e05f173c04", - "route": "/api/admin/conferences", - "status": 200, - "serverMs": 9, - "firstByteMs": 8.653576, - "bytes": 86, - "stagesMs": {} - }, - { - "requestID": "84c63f73-a8ca-43cf-8221-fe604b5598f9", - "route": "/api/admin/conferences", - "status": 500, - "serverMs": 6, - "firstByteMs": 5.988224, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "2bd04775-7093-4088-92dc-01407269b604", - "route": "/api/admin/conferences", - "status": 500, - "serverMs": 5, - "firstByteMs": 5.401861, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "0b1aec43-c47a-4fe5-b6de-1a2732541e3f", - "route": "/api/admin/repos", - "status": 200, - "serverMs": 12, - "firstByteMs": 10.7675, - "bytes": 722, - "stagesMs": {} - }, - { - "requestID": "2a75bf8a-1611-44c5-b7ff-acf241db8ae6", - "route": "/api/admin/repos", - "status": 200, - "serverMs": 12, - "firstByteMs": 10.280041, - "bytes": 859, - "stagesMs": {} - }, - { - "requestID": "4cb08c73-3596-403e-a04e-439dc1d8ce67", - "route": "/api/admin/conferences", - "status": 200, - "serverMs": 8, - "firstByteMs": 8.147064, - "bytes": 80, - "stagesMs": {} - }, - { - "requestID": "eb578bca-7b46-467d-91ef-0c199c7d72b4", - "route": "/api/admin/conferences", - "status": 200, - "serverMs": 9, - "firstByteMs": 8.836492, - "bytes": 117, - "stagesMs": {} - }, - { - "requestID": "08478eb2-6570-4f71-9a98-12379ebb3514", - "route": "/api/admin/repos", - "status": 500, - "serverMs": 4, - "firstByteMs": 4.041616, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "0d599bc8-5c9a-4b27-8663-16053843682d", - "route": "/api/admin/users", - "status": 500, - "serverMs": 5, - "firstByteMs": 5.039458, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "bcbbd23b-70f4-4d73-b3fe-b1a4ff0f64a6", - "route": "/api/admin/conferences", - "status": 500, - "serverMs": 4, - "firstByteMs": 4.198773, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "0fecb76b-44e5-4f9b-a733-d51262bd8d39", - "route": "/api/admin/users", - "status": 200, - "serverMs": 10, - "firstByteMs": 9.835938, - "bytes": 99, - "stagesMs": {} - }, - { - "requestID": "c5a6a08a-f2b8-4979-8ce4-41d4bd0a9f44", - "route": "/api/admin/users", - "status": 200, - "serverMs": 11, - "firstByteMs": 10.986556, - "bytes": 553, - "stagesMs": {} - }, - { - "requestID": "fe4f3020-4e24-4d30-bd78-476fbc6042da", - "route": "/api/admin/users", - "status": 500, - "serverMs": 5, - "firstByteMs": 4.560012, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "8c642cc3-2d24-4225-b485-87e353df54aa", - "route": "/api/admin/users", - "status": 500, - "serverMs": 6, - "firstByteMs": 5.97107, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "d3b8893f-955d-4e78-a3fc-7b8be6186f84", - "route": "/api/admin/repos", - "status": 500, - "serverMs": 4, - "firstByteMs": 4.241369, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "5d9aef10-9941-4ae4-b39a-bd53b8f42ffe", - "route": "/api/admin/repos", - "status": 500, - "serverMs": 5, - "firstByteMs": 4.940782, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "0e2e75fb-eb82-44fa-a6d8-c80c0024bc08", - "route": "/api/admin/repos", - "status": 200, - "serverMs": 16, - "firstByteMs": 13.824754, - "bytes": 2292, - "stagesMs": {} - }, - { - "requestID": "8f3b5d5e-e340-43cf-a210-f18b7b1f3ccd", - "route": "/api/admin/repos", - "status": 200, - "serverMs": 9, - "firstByteMs": 9.000251, - "bytes": 156, - "stagesMs": {} - }, - { - "requestID": "0fa29056-5ec2-4adb-9575-686df9b1ec37", - "route": "/api/admin/repos", - "status": 500, - "serverMs": 4, - "firstByteMs": 4.486879, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "180dd2d4-b58e-4174-b636-d61f919f031c", - "route": "/api/admin/users", - "status": 200, - "serverMs": 10, - "firstByteMs": 9.677692, - "bytes": 458, - "stagesMs": {} - }, - { - "requestID": "5d4d9689-ea73-4c2b-a4aa-dd06a52c7860", - "route": "/api/admin/users", - "status": 200, - "serverMs": 10, - "firstByteMs": 10.185532, - "bytes": 129, - "stagesMs": {} - }, - { - "requestID": "dc625355-4d27-4b7e-912d-0f36b207e53d", - "route": "/api/admin/users", - "status": 500, - "serverMs": 4, - "firstByteMs": 4.387646, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "28abbffe-a089-4ce0-8ae9-c66b89ff3451", - "route": "/api/admin/conferences", - "status": 200, - "serverMs": 9, - "firstByteMs": 8.919728, - "bytes": 138, - "stagesMs": {} - }, - { - "requestID": "db506a0e-e51e-44db-9a4f-6f825f5a1aa7", - "route": "/api/admin/conferences", - "status": 200, - "serverMs": 8, - "firstByteMs": 8.485272, - "bytes": 138, - "stagesMs": {} - }, - { - "requestID": "116bffd3-e79f-403f-8f2a-53c1006e7ca4", - "route": "/api/admin/conferences", - "status": 500, - "serverMs": 4, - "firstByteMs": 3.734143, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "bd362f07-3c14-4001-a940-9bd67a92bd16", - "route": "/github/connections", - "status": 200, - "serverMs": 753, - "firstByteMs": 752.730567, - "bytes": 456, - "stagesMs": {} - }, - { - "requestID": "e79c9b2a-8e46-4e5c-8504-550cde50616e", - "route": "/api/admin/tokens", - "status": 200, - "serverMs": 9, - "firstByteMs": 9.284489, - "bytes": 186, - "stagesMs": {} - }, - { - "requestID": "8b472f79-805e-41dc-ba3a-e26afb5e2094", - "route": "/api/user", - "status": 200, - "serverMs": 6, - "firstByteMs": 5.838684, - "bytes": 100, - "stagesMs": {} - }, - { - "requestID": "b63c8973-72cf-4a87-b161-d40121528cdb", - "route": "/api/admin/tokens/:id", - "status": 200, - "serverMs": 7, - "firstByteMs": 6.935645, - "bytes": 13, - "stagesMs": {} - }, - { - "requestID": "d16c878f-682a-4ddf-b039-7c565cc93e08", - "route": "/api/user", - "status": 401, - "serverMs": 3, - "firstByteMs": 2.877162, - "bytes": 25, - "stagesMs": {} - }, - { - "requestID": "bc883a15-3737-42c8-9584-29496edde5f2", - "route": "/github/login-token", - "status": 200, - "serverMs": 7, - "firstByteMs": 6.736172, - "bytes": 33, - "stagesMs": {} - }, - { - "requestID": "09bcdad1-c4d1-4183-a6a7-5e0a9270d845", - "route": "/api/user", - "status": 200, - "serverMs": 3, - "firstByteMs": 2.881258, - "bytes": 100, - "stagesMs": {} - }, - { - "requestID": "7fb579f2-2cc4-4052-8d66-b3db71a63d42", - "route": "/api/user/logout", - "status": 302, - "serverMs": 3, - "firstByteMs": 3.229201, - "bytes": 24, - "stagesMs": {} - }, - { - "requestID": "59114ddc-6949-4acc-9bcb-2a12c81fe01e", - "route": "/api/user", - "status": 401, - "serverMs": 1, - "firstByteMs": 1.218853, - "bytes": 25, - "stagesMs": {} - }, - { - "requestID": "efcfd370-9f22-4c93-be51-4b56fa1dd946", - "route": "/api/anonymize-preview", - "status": 200, - "serverMs": 5, - "firstByteMs": 4.820359, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "eea75634-d68f-4847-b599-9991cd208258", - "route": "/api/providers/:provider/repository/metadata", - "status": 200, - "serverMs": 3355, - "firstByteMs": 3354.956965, - "bytes": 230, - "stagesMs": {} - }, - { - "requestID": "0a237b63-4c21-4202-8a6b-36d283467ce7", - "route": "/api/providers/:provider/repository/branches", - "status": 200, - "serverMs": 3317, - "firstByteMs": 3315.696237, - "bytes": 998, - "stagesMs": {} - }, - { - "requestID": "d6abe967-72d9-49cc-8d4a-51209dcd2e35", - "route": "/api/providers/:provider/repository/readme", - "status": 200, - "serverMs": 3361, - "firstByteMs": 3358.9631, - "bytes": 878, - "stagesMs": {} - }, - { - "requestID": "524e1d62-3336-492b-909f-d4e0f83c0c10", - "route": "/api/repo", - "status": 200, - "serverMs": 3900, - "firstByteMs": 3899.645368, - "bytes": 22, - "stagesMs": {} - }, - { - "requestID": "9dff0d7e-f09e-41e1-b45a-36ec71317182", - "route": "/api/repo/:id", - "status": 200, - "serverMs": 8, - "firstByteMs": 8.127001, - "bytes": 510, - "stagesMs": { - "repository": 1.595351 - } - }, - { - "requestID": "7f3d1bdd-e4d8-4053-b5f4-e847bd9dc5f7", - "route": "/api/repo/:id/file/*path", - "status": 200, - "serverMs": 784, - "firstByteMs": 781.57289, - "bytes": 672, - "stagesMs": { - "anonymize": 13.157028, - "authorization": 691.0036620000001, - "cache_fill": 57.465902, - "cache_lookup": 2.282394, - "repository": 2.029032, - "worker_wait": 0.02187 - } - }, - { - "requestID": "39933933-4557-4c01-b528-d757f9f3f008", - "route": "/api/repo/:id/files", - "status": 200, - "serverMs": 7, - "firstByteMs": 7.389028, - "bytes": 170, - "stagesMs": { - "repository": 2.463586 - } - }, - { - "requestID": "106b2184-7259-494c-9b1f-f938c1293fe3", - "route": "/api/repo/:id/zip", - "status": 200, - "serverMs": 4152, - "firstByteMs": 3351.867978, - "bytes": 7166, - "stagesMs": { - "anonymize": 96.061766, - "authorization": 3870.61723, - "cache_fill": 147.571655, - "cache_lookup": 11.005676000000003, - "repository": 2.16016, - "worker_wait": 0.099976 - } - }, - { - "requestID": "d146aa38-d691-4abf-8d33-3ddab59926f0", - "route": "/api/repo/:id/file/*path", - "status": 200, - "serverMs": 813, - "firstByteMs": 810.549835, - "bytes": 672, - "stagesMs": { - "authorization": 785.951564, - "cache_lookup": 1.7022009999999999, - "repository": 2.210586 - } - }, - { - "requestID": "c20a0025-ec47-40fe-83c6-2de77bc7f1da", - "route": "/api/repo/:id/zip", - "status": 200, - "serverMs": 4018, - "firstByteMs": 3239.719705, - "bytes": 7166, - "stagesMs": { - "authorization": 3928.9969919999994, - "cache_lookup": 9.505242, - "repository": 2.458816 - } - }, - { - "requestID": "81be7809-d70b-4bb3-94b0-98f186436c43", - "route": "/api/repo/:id/file/*path", - "status": 200, - "serverMs": 733, - "firstByteMs": 729.780856, - "bytes": 672, - "stagesMs": { - "authorization": 706.085898, - "cache_lookup": 1.618744, - "repository": 2.3111 - } - }, - { - "requestID": "7924deb9-7a06-4581-91ac-b8ae0e2c5baf", - "route": "/api/repo/:id/zip", - "status": 200, - "serverMs": 4044, - "firstByteMs": 3294.913027, - "bytes": 7166, - "stagesMs": { - "authorization": 3955.438313, - "cache_lookup": 9.775472, - "repository": 2.685298 - } - }, - { - "requestID": "366775ed-6359-49a4-bd0e-a637c0b5a606", - "route": "/api/admin/performance", - "status": 200, - "serverMs": 66, - "firstByteMs": 61.686888, - "bytes": 4499, - "stagesMs": {} - }, - { - "requestID": "96239993-1648-4dfe-810b-a32677006379", - "route": "/api/user", - "status": 401, - "serverMs": 3, - "firstByteMs": 3.377833, - "bytes": 25, - "stagesMs": {} - }, - { - "requestID": "e4897fe6-59ef-420f-b299-03a6f10a51c4", - "route": "/api/repo/:id", - "status": 200, - "serverMs": 11, - "firstByteMs": 11.440041, - "bytes": 21, - "stagesMs": { - "repository": 1.703247 - } - }, - { - "requestID": "a517b837-1f0e-4d83-bdfa-ab43e181db97", - "route": "/api/repo/:id", - "status": 200, - "serverMs": 7, - "firstByteMs": 7.068029, - "bytes": 560, - "stagesMs": { - "repository": 1.676334 - } - }, - { - "requestID": "9a47ef34-3c20-4c7a-bd97-6485eb05bcb0", - "route": "/api/repo/:id", - "status": 200, - "serverMs": 8, - "firstByteMs": 8.388416, - "bytes": 559, - "stagesMs": { - "repository": 1.859563 - } - }, - { - "requestID": "c14adddc-0e86-49a9-96a3-3d11fd49d3ed", - "route": "/api/repo/:id/file/*path", - "status": 410, - "serverMs": 3, - "firstByteMs": 3.319531, - "bytes": 30, - "stagesMs": { - "repository": 2.136851 - } - }, - { - "requestID": "e1baa91f-853e-47ce-923c-ac6c90ad2f17", - "route": "/api/user", - "status": 401, - "serverMs": 2, - "firstByteMs": 2.378812, - "bytes": 25, - "stagesMs": {} - } - ], - "summary": { - "/api/repo/:id/file/*path": { - "serverMs": [ - 784, - 813, - 733 - ], - "medianServerMs": 784, - "authorizationMs": [ - 691.0036620000001, - 785.951564, - 706.085898 - ] - }, - "/api/repo/:id/zip": { - "serverMs": [ - 4152, - 4018, - 4044 - ], - "medianServerMs": 4044, - "authorizationMs": [ - 3870.61723, - 3928.9969919999994, - 3955.438313 - ] - } - } -} \ No newline at end of file diff --git a/backend/reports/auth-release-before.json b/backend/reports/auth-release-before.json deleted file mode 100644 index 0c5eb989..0000000 --- a/backend/reports/auth-release-before.json +++ /dev/null @@ -1,2548 +0,0 @@ -{ - "deploymentChecks": { - "verifiedAt": "2026-11-03T20:11:36.803Z", - "hostname": "beta.durieux.me", - "configurationMode": "GitHub App enabled alongside legacy OAuth", - "checks": [ - { - "method": "GET", - "route": "/api/user", - "requestID": "32eed3c9-4357-4616-b647-bcd3b2ff0ce1", - "status": 401, - "expected": 401, - "bytes": 25, - "elapsedMs": 312 - }, - { - "method": "GET", - "route": "/api/user", - "requestID": "3421b571-315f-40c3-9076-e459c9274414", - "status": 200, - "expected": 200, - "bytes": 100, - "elapsedMs": 87 - }, - { - "method": "GET", - "route": "/github/connections", - "requestID": "ce83688a-2ae3-473a-a095-73db7a6eb392", - "status": 200, - "expected": 200, - "bytes": 288, - "elapsedMs": 622 - }, - { - "method": "GET", - "route": "/api/providers", - "requestID": "38300dc0-1a48-4d02-a686-87a33a0511c7", - "status": 200, - "expected": 200, - "bytes": 144, - "elapsedMs": 55 - }, - { - "method": "GET", - "route": "/api/user/dashboard", - "requestID": "d68f5cb2-e626-4fda-8b0a-8515685add39", - "status": 200, - "expected": 200, - "bytes": 64, - "elapsedMs": 48 - }, - { - "method": "GET", - "route": "/api/user/default", - "requestID": "7d9a7f19-1b90-4e02-b853-a9eb86a7e6c1", - "status": 200, - "expected": 200, - "bytes": 25, - "elapsedMs": 36 - }, - { - "method": "GET", - "route": "/api/user/quota", - "requestID": "e7143541-0af4-4c23-9c42-bf8cc760e3c8", - "status": 200, - "expected": 200, - "bytes": 105, - "elapsedMs": 46 - }, - { - "method": "GET", - "route": "/api/admin/overview", - "requestID": "c3fe4a4c-1047-4460-92a7-7ec277f0536d", - "status": 200, - "expected": 200, - "bytes": 1129, - "elapsedMs": 118 - }, - { - "method": "GET", - "route": "/api/admin/users", - "requestID": "878f1c0c-864b-4fc1-9979-0083160adf52", - "status": 200, - "expected": 200, - "bytes": 526, - "elapsedMs": 38 - }, - { - "method": "GET", - "route": "/api/admin/repos", - "requestID": "151a1750-5a14-4aa3-ac6b-81c9c2c54dac", - "status": 200, - "expected": 200, - "bytes": 11933, - "elapsedMs": 63 - }, - { - "method": "GET", - "route": "/api/admin/queues", - "requestID": "375134e8-a2b8-4a11-a2a6-7d3f77461710", - "status": 200, - "expected": 200, - "bytes": 4435, - "elapsedMs": 66 - }, - { - "method": "GET", - "route": "/api/admin/performance", - "requestID": "8b337e37-18d7-43e0-9a5e-3f80a03ee54f", - "status": 200, - "expected": 200, - "bytes": 34818, - "elapsedMs": 76 - }, - { - "method": "GET", - "route": "/api/admin/errors", - "requestID": "09244535-b6b5-4fd6-9578-282c6dc4828f", - "status": 200, - "expected": 200, - "bytes": 55416, - "elapsedMs": 60 - }, - { - "method": "GET", - "route": "/api/admin/errors/stats", - "requestID": "0101e631-0de3-416a-87e0-5f2ce4d4d294", - "status": 200, - "expected": 200, - "bytes": 1394, - "elapsedMs": 38 - }, - { - "method": "GET", - "route": "/api/admin/tokens", - "requestID": "a06bacbf-707b-417d-8476-9fce8b8dcb2c", - "status": 200, - "expected": 200, - "bytes": 160, - "elapsedMs": 53 - }, - { - "method": "GET", - "route": "/api/admin/errors?limit=5001", - "requestID": "8ed212a9-4329-42f2-a4da-d0829f94e6a2", - "status": 200, - "expected": 200, - "bytes": 130626, - "elapsedMs": 88 - }, - { - "method": "GET", - "route": "/api/admin/errors/stats", - "requestID": "36b50fb8-ff56-4291-a92a-eb29a32c05ff", - "status": 200, - "expected": 200, - "bytes": 1394, - "elapsedMs": 57 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793736696806-missing", - "requestID": "e9c3e3f8-195f-47cd-ad31-0647119c3346", - "status": 404, - "expected": 404, - "bytes": 26, - "elapsedMs": 46 - }, - { - "method": "GET", - "route": "/api/admin/errors/stats", - "requestID": "42e374c0-8531-4a98-81bf-fac718be9d2f", - "status": 200, - "expected": 200, - "bytes": 1394, - "elapsedMs": 50 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=download&range=1h", - "requestID": "6e6ae52c-22ff-475b-8367-a46610e4261f", - "status": 200, - "expected": 200, - "bytes": 3410, - "elapsedMs": 34 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=download&range=6h", - "requestID": "d2ede14a-512d-4044-9933-86dc7569e626", - "status": 200, - "expected": 200, - "bytes": 20210, - "elapsedMs": 36 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=download&range=24h", - "requestID": "86321094-d7a6-4efa-850f-991f59965912", - "status": 200, - "expected": 200, - "bytes": 80720, - "elapsedMs": 76 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=download&range=7d", - "requestID": "851d5d9b-e5ac-4b71-92b1-a8363b3e1e27", - "status": 200, - "expected": 200, - "bytes": 564559, - "elapsedMs": 164 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=remove&range=1h", - "requestID": "46305bc4-f808-4988-8093-5c8b436e6ffe", - "status": 200, - "expected": 200, - "bytes": 3404, - "elapsedMs": 35 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=cache&range=1h", - "requestID": "d421a79c-21f7-4a86-a568-514cf0a67a6f", - "status": 200, - "expected": 200, - "bytes": 3401, - "elapsedMs": 48 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=download&range=unrecognized", - "requestID": "fb23116e-4ca7-499c-a41e-2cdffa4aeb1f", - "status": 200, - "expected": 200, - "bytes": 3420, - "elapsedMs": 32 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=unknown", - "requestID": "5d9fb877-6dba-4c9a-acc9-2f63afa93953", - "status": 404, - "expected": 404, - "bytes": 27, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/api/stat", - "requestID": "9e4f1864-d896-49cb-8a8f-34a3dd62a590", - "status": 200, - "expected": 200, - "bytes": 69, - "elapsedMs": 31 - }, - { - "method": "GET", - "route": "/api/stat/history?days=-2", - "requestID": "d755a333-50e1-458c-b521-8c04a3eaa649", - "status": 200, - "expected": 200, - "bytes": 105, - "elapsedMs": 26 - }, - { - "method": "GET", - "route": "/api/stat/history?days=0", - "requestID": "128fa3f5-e319-4c36-8395-f43c4df74d94", - "status": 200, - "expected": 200, - "bytes": 105, - "elapsedMs": 48 - }, - { - "method": "GET", - "route": "/api/stat/history?days=0x10", - "requestID": "1a0ac13e-11ba-496d-93ac-1c5efbf78978", - "status": 200, - "expected": 200, - "bytes": 105, - "elapsedMs": 26 - }, - { - "method": "GET", - "route": "/api/stat/history?days=7suffix", - "requestID": "39fe4ef5-8c37-4053-a106-82630f04e38d", - "status": 200, - "expected": 200, - "bytes": 105, - "elapsedMs": 27 - }, - { - "method": "GET", - "route": "/api/stat/history?days=999", - "requestID": "8bff408e-fb4e-4a70-81b8-bce1ff13b859", - "status": 200, - "expected": 200, - "bytes": 105, - "elapsedMs": 49 - }, - { - "method": "GET", - "route": "/api/stat/history?days[]=7&days[]=30", - "requestID": "fc481fab-6a4e-45fa-8b4d-973f2104b60c", - "status": 200, - "expected": 200, - "bytes": 105, - "elapsedMs": 26 - }, - { - "method": "GET", - "route": "/api/stat/history?days[1]=7&days[0]=1", - "requestID": "24e05b78-6cf2-4a85-b674-8349f462723f", - "status": 200, - "expected": 200, - "bytes": 105, - "elapsedMs": 26 - }, - { - "method": "GET", - "route": "/api/stat/history?days[x]=7", - "requestID": "7eec75ab-2c94-469e-8812-5cfd1a59f599", - "status": 200, - "expected": 200, - "bytes": 105, - "elapsedMs": 29 - }, - { - "method": "GET", - "route": "/api/user/dashboard?statuses[]=", - "requestID": "e819608f-1b44-41cc-928d-3356a5de2340", - "status": 200, - "expected": 200, - "bytes": 64, - "elapsedMs": 43 - }, - { - "method": "GET", - "route": "/api/user/dashboard?type[]=repo", - "requestID": "6075f797-ed28-49c2-b2c2-cc1fa4f308c1", - "status": 200, - "expected": 200, - "bytes": 64, - "elapsedMs": 44 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort[]=", - "requestID": "5e7510c7-0d7e-4589-9bc6-13e8c1859758", - "status": 400, - "expected": 400, - "bytes": 24, - "elapsedMs": 29 - }, - { - "method": "GET", - "route": "/api/user/dashboard?cursor[]=", - "requestID": "9173aa12-1dd5-4649-b4f8-cdbf22dc11f5", - "status": 400, - "expected": 400, - "bytes": 26, - "elapsedMs": 26 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort=anonymizeDate&limit=5&cursor=eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDEiLCJ2YWx1ZSI6IjIwMjQtMDMtMDFUMDA6MDA6MDAuMDAwWiJ9", - "requestID": "ade00320-9d2e-4d3a-b7bd-e24334763fd5", - "status": 200, - "expected": 200, - "bytes": 64, - "elapsedMs": 44 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort=anonymizeDate&limit=5&cursor=eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDEiLCJ2YWx1ZSI6Ik1hcmNoIDEgMjAyNCJ9", - "requestID": "04918df5-4845-45b5-a7c1-a51854776a81", - "status": 200, - "expected": 200, - "bytes": 64, - "elapsedMs": 43 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort=anonymizeDate&limit=5&cursor=eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDEiLCJ2YWx1ZSI6IjIwMjQtMDItMzAifQ", - "requestID": "7336d9e5-a8cd-408d-96c1-8474251ff4bb", - "status": 200, - "expected": 200, - "bytes": 64, - "elapsedMs": 42 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort=anonymizeDate&limit=5&cursor=eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMjQ6MDA6MDBaIn0", - "requestID": "1b83269d-3257-482a-954e-76f9f05078b0", - "status": 200, - "expected": 200, - "bytes": 64, - "elapsedMs": 54 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort=anonymizeDate&limit=5&cursor=eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDEiLCJ2YWx1ZSI6WyIyMDI0IiwiMyIsIjEiXX0", - "requestID": "21b5872b-173f-4224-bcbf-74d98a6c83fa", - "status": 200, - "expected": 200, - "bytes": 64, - "elapsedMs": 44 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort=anonymizeDate&limit=5&cursor=eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDEiLCJ2YWx1ZSI6Im5vdCBhIGRhdGUifQ", - "requestID": "21662908-a088-4cad-82f2-ef7838ebf441", - "status": 400, - "expected": 400, - "bytes": 26, - "elapsedMs": 32 - }, - { - "method": "GET", - "route": "/api/admin/performance?minutes=6e1", - "requestID": "7804f6c6-c8a7-4464-8c16-940c7e4780f7", - "status": 200, - "expected": 200, - "bytes": 66027, - "elapsedMs": 89 - }, - { - "method": "GET", - "route": "/api/admin/performance?minutes[]=60", - "requestID": "03fe4d50-19bf-4831-a491-d60d3777425c", - "status": 200, - "expected": 200, - "bytes": 66027, - "elapsedMs": 81 - }, - { - "method": "GET", - "route": "/api/admin/performance?minutes[0]=15", - "requestID": "f301e064-312d-44a5-8e37-229121d719b2", - "status": 200, - "expected": 200, - "bytes": 34833, - "elapsedMs": 74 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue[]=cache&range[]=6h", - "requestID": "d75ae6c7-9d36-437e-aa23-b9ffcd9e73f7", - "status": 200, - "expected": 200, - "bytes": 20201, - "elapsedMs": 41 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?range[]=", - "requestID": "f9100587-9e06-4ac3-8f4a-2e8e5589c1f9", - "status": 200, - "expected": 200, - "bytes": 3408, - "elapsedMs": 46 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?range=toString", - "requestID": "34303508-99e0-419a-8a8c-5f0862e66303", - "status": 200, - "expected": 200, - "bytes": 51, - "elapsedMs": 36 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue[]=", - "requestID": "6f07dad3-ba4b-4e4b-b00f-d58d3e7242f7", - "status": 404, - "expected": 404, - "bytes": 27, - "elapsedMs": 34 - }, - { - "method": "GET", - "route": "/api/admin/queues?queue[]=remove", - "requestID": "c3823bd2-cae4-477d-8b8c-04f71ff53a0e", - "status": 200, - "expected": 200, - "bytes": 4419, - "elapsedMs": 68 - }, - { - "method": "GET", - "route": "/api/admin/errors?offset[]=2&limit[]=7", - "requestID": "cd68e704-ecba-4595-ab51-1b2b83ea893e", - "status": 200, - "expected": 200, - "bytes": 2252, - "elapsedMs": 33 - }, - { - "method": "GET", - "route": "/api/repo/octocat/Hello-World?connection=", - "requestID": "f78ddd4f-3752-48e3-a085-f366ca773ea6", - "status": 400, - "expected": 400, - "bytes": 30, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/api/repo/octocat/Hello-World?connection[]=oauth", - "requestID": "15ab46d2-7ffd-46cc-be82-1efb35f550e7", - "status": 400, - "expected": 400, - "bytes": 30, - "elapsedMs": 39 - }, - { - "method": "GET", - "route": "/api/repo/octocat/Hello-World?connection=oauth&connection[]=github-app", - "requestID": "a74d2638-8e4d-490f-9ad9-91df7b58da98", - "status": 400, - "expected": 400, - "bytes": 30, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/api/repo/octocat/Hello-World?repositoryID[]=invalid", - "requestID": "1fc5ca75-ffde-44f4-9bd8-c8d376c91175", - "status": 500, - "expected": 500, - "bytes": 26, - "elapsedMs": 48 - }, - { - "method": "GET", - "route": "/api/repo/octocat/Hello-World?repositoryID=invalid", - "requestID": "a2bcb177-a38c-42f2-b47f-73a6e348dc1d", - "status": 500, - "expected": 500, - "bytes": 26, - "elapsedMs": 27 - }, - { - "method": "GET", - "route": "/api/repo/octocat/Hello-World?repositoryID[$exists]=true", - "requestID": "ec5ebe4f-3bf6-4ad7-9485-e37ae37688d3", - "status": 500, - "expected": 500, - "bytes": 26, - "elapsedMs": 26 - }, - { - "method": "GET", - "route": "/api/user/search/github-users?q[]=ab", - "requestID": "071bdecb-09cc-483e-958d-e5e1abd01bad", - "status": 200, - "expected": 200, - "bytes": 2, - "elapsedMs": 28 - }, - { - "method": "GET", - "route": "/api/user/search/github-users?q[length]=1", - "requestID": "62c99704-9499-44c4-84a8-5f01043e8f8d", - "status": 200, - "expected": 200, - "bytes": 2, - "elapsedMs": 26 - }, - { - "method": "GET", - "route": "/api/user/search/github-users?q=ab&q=cd", - "requestID": "9fdc6ce0-0178-492e-a805-f11d0b193409", - "status": 500, - "expected": 500, - "bytes": 26, - "elapsedMs": 31 - }, - { - "method": "GET", - "route": "/api/user/search/github-users?q[x]=ab", - "requestID": "fefc8240-7a4e-4908-ab92-a875972dbaa5", - "status": 500, - "expected": 500, - "bytes": 26, - "elapsedMs": 33 - }, - { - "method": "GET", - "route": "/api/user/search/github-users?q[length][toString]=1", - "requestID": "ee0b7714-cda6-4372-9307-b5a0f392c19b", - "status": 500, - "expected": 500, - "bytes": 26, - "elapsedMs": 28 - }, - { - "method": "GET", - "route": "/api/admin/repos?page[]=2&limit[]=2&sort[]=status&direction[]=asc&format[]=csv", - "requestID": "f823e58c-091b-4a30-b567-6375db105437", - "status": 200, - "expected": 200, - "bytes": 2519, - "elapsedMs": 50 - }, - { - "method": "GET", - "route": "/api/admin/repos?page=1000001&limit=1", - "requestID": "f775869f-c884-4725-92da-7444bec5546d", - "status": 200, - "expected": 200, - "bytes": 179, - "elapsedMs": 38 - }, - { - "method": "GET", - "route": "/api/admin/repos?page=-1", - "requestID": "6a3f1519-b59d-4ee0-8a13-8f67af51f18d", - "status": 500, - "expected": 500, - "bytes": 26, - "elapsedMs": 28 - }, - { - "method": "GET", - "route": "/api/admin/repos?page[toString]=x", - "requestID": "f1ab7ce2-e5ff-472f-891e-e23573fa016e", - "status": 500, - "expected": 500, - "bytes": 26, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/api/admin/users?page[]=2&limit[]=2&sort[]=status&direction[]=asc&format[]=csv", - "requestID": "615808b3-db89-456f-969f-8697a54dfacd", - "status": 200, - "expected": 200, - "bytes": 106, - "elapsedMs": 43 - }, - { - "method": "GET", - "route": "/api/admin/users?page=1000001&limit=1", - "requestID": "5b318e30-bc71-4f4b-876a-b9fc4768b61d", - "status": 200, - "expected": 200, - "bytes": 112, - "elapsedMs": 36 - }, - { - "method": "GET", - "route": "/api/admin/users?page=-1", - "requestID": "046e8ead-2393-4110-8a05-e5f7e3595690", - "status": 500, - "expected": 500, - "bytes": 26, - "elapsedMs": 32 - }, - { - "method": "GET", - "route": "/api/admin/users?page[toString]=x", - "requestID": "02dab8b5-adea-43da-837a-0a34c89d9da2", - "status": 500, - "expected": 500, - "bytes": 26, - "elapsedMs": 45 - }, - { - "method": "GET", - "route": "/api/admin/users?limit=-1", - "requestID": "b75be324-c0b5-4764-851a-8bdb304609a7", - "status": 500, - "expected": 500, - "bytes": 26, - "elapsedMs": 35 - }, - { - "method": "GET", - "route": "/api/admin/conferences?page[]=2&limit[]=2&sort[]=status&direction[]=asc&format[]=csv", - "requestID": "c4da0b8f-3d2d-488e-a69f-fc227990e8e4", - "status": 200, - "expected": 200, - "bytes": 80, - "elapsedMs": 38 - }, - { - "method": "GET", - "route": "/api/admin/conferences?page=1000001&limit=1", - "requestID": "c12dbdc1-3d55-4119-a62a-d8c81d263af6", - "status": 200, - "expected": 200, - "bytes": 86, - "elapsedMs": 36 - }, - { - "method": "GET", - "route": "/api/admin/conferences?page=-1", - "requestID": "83356198-276e-44c7-8557-f0cd5e3d453b", - "status": 500, - "expected": 500, - "bytes": 26, - "elapsedMs": 35 - }, - { - "method": "GET", - "route": "/api/admin/conferences?page[toString]=x", - "requestID": "e7d2f66d-a575-48fc-840c-1c4bfa962c0c", - "status": 500, - "expected": 500, - "bytes": 26, - "elapsedMs": 31 - }, - { - "method": "GET", - "route": "/api/admin/repos?limit=-1", - "requestID": "fa12e84e-90f9-4892-abce-9c57acdf9fea", - "status": 200, - "expected": 200, - "bytes": 1363, - "elapsedMs": 40 - }, - { - "method": "GET", - "route": "/api/admin/repos?ready[]=true", - "requestID": "f3aaf8a6-2a7b-4a8a-bbdb-8f887528cdf3", - "status": 200, - "expected": 200, - "bytes": 697, - "elapsedMs": 40 - }, - { - "method": "GET", - "route": "/api/admin/conferences?limit=-1", - "requestID": "499f16e8-688c-4a88-a8fc-d86e656b8ccd", - "status": 200, - "expected": 200, - "bytes": 80, - "elapsedMs": 37 - }, - { - "method": "GET", - "route": "/api/admin/conferences?ready[]=true", - "requestID": "987f863a-fb49-45d8-9717-bc4ae8ea95bc", - "status": 200, - "expected": 200, - "bytes": 117, - "elapsedMs": 38 - }, - { - "method": "GET", - "route": "/api/admin/repos?search[]=x", - "requestID": "7361a71b-b1c2-4276-a014-7eb2c1db2a71", - "status": 500, - "expected": 500, - "bytes": 26, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/api/admin/users?search[]=x", - "requestID": "87e9e9dc-0d6c-4adb-a006-8b4903bfbac4", - "status": 500, - "expected": 500, - "bytes": 26, - "elapsedMs": 31 - }, - { - "method": "GET", - "route": "/api/admin/conferences?search[]=x", - "requestID": "8045d972-4efc-47a0-b601-055cfdd0e242", - "status": 500, - "expected": 500, - "bytes": 26, - "elapsedMs": 31 - }, - { - "method": "GET", - "route": "/api/admin/users?status[]=active", - "requestID": "fe9d7bc2-c7c4-49fe-8a06-d4dd6a3193d3", - "status": 200, - "expected": 200, - "bytes": 99, - "elapsedMs": 50 - }, - { - "method": "GET", - "route": "/api/admin/users?status[$in][]=active", - "requestID": "e00731ca-0936-4405-b990-b27205619778", - "status": 200, - "expected": 200, - "bytes": 553, - "elapsedMs": 39 - }, - { - "method": "GET", - "route": "/api/admin/users?status[a]=active", - "requestID": "400657b2-020f-4166-b9c0-3b436a29b100", - "status": 500, - "expected": 500, - "bytes": 26, - "elapsedMs": 33 - }, - { - "method": "GET", - "route": "/api/admin/users?status[$in]=active", - "requestID": "0970ef90-289d-4a5a-b7de-5b4b23039efe", - "status": 500, - "expected": 500, - "bytes": 26, - "elapsedMs": 32 - }, - { - "method": "GET", - "route": "/api/admin/repos?owner[a]=x", - "requestID": "bf450832-2f61-4823-9108-07df613d48b6", - "status": 500, - "expected": 500, - "bytes": 26, - "elapsedMs": 29 - }, - { - "method": "GET", - "route": "/api/admin/repos?conference[$unknown]=x", - "requestID": "5fc5105f-0b57-416d-bf62-1dd4713bc206", - "status": 500, - "expected": 500, - "bytes": 26, - "elapsedMs": 41 - }, - { - "method": "GET", - "route": "/api/admin/repos?dateFrom[]=2024-02-30", - "requestID": "b843ef21-04ef-4f45-97a6-f4610e890efc", - "status": 200, - "expected": 200, - "bytes": 11995, - "elapsedMs": 42 - }, - { - "method": "GET", - "route": "/api/admin/repos?dateTo=March%201%202024", - "requestID": "5850b6b6-d75f-4ab3-b589-0a2635fae3c8", - "status": 200, - "expected": 200, - "bytes": 156, - "elapsedMs": 37 - }, - { - "method": "GET", - "route": "/api/admin/repos?dateFrom[toString]=x", - "requestID": "ab0551dc-fa1b-474a-90ce-3718abb48f36", - "status": 500, - "expected": 500, - "bytes": 26, - "elapsedMs": 31 - }, - { - "method": "GET", - "route": "/api/admin/users?dateFrom[]=2024-02-30", - "requestID": "f121ee71-73a4-4cbf-8f34-1a8af6753b2d", - "status": 200, - "expected": 200, - "bytes": 458, - "elapsedMs": 33 - }, - { - "method": "GET", - "route": "/api/admin/users?dateTo=March%201%202024", - "requestID": "5ad74e47-00b9-47d1-b11a-a628994e2e3e", - "status": 200, - "expected": 200, - "bytes": 129, - "elapsedMs": 35 - }, - { - "method": "GET", - "route": "/api/admin/users?dateFrom[toString]=x", - "requestID": "5c59b7a0-fa8e-4216-b324-c6fbbb9bb7d3", - "status": 500, - "expected": 500, - "bytes": 26, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/api/admin/conferences?dateFrom[]=2024-02-30", - "requestID": "734777fe-49d9-43de-b97c-6b2e59454494", - "status": 200, - "expected": 200, - "bytes": 138, - "elapsedMs": 33 - }, - { - "method": "GET", - "route": "/api/admin/conferences?dateTo=March%201%202024", - "requestID": "55478bac-5e88-479e-b2be-d74e05f1ef49", - "status": 200, - "expected": 200, - "bytes": 138, - "elapsedMs": 42 - }, - { - "method": "GET", - "route": "/api/admin/conferences?dateFrom[toString]=x", - "requestID": "1fbb1d4e-e72a-4f01-8fe0-d4534d9ff6a0", - "status": 500, - "expected": 500, - "bytes": 26, - "elapsedMs": 32 - }, - { - "method": "GET", - "route": "/github/connections", - "requestID": "f1285f21-ded5-448f-a49e-52b4664a229e", - "status": 200, - "expected": 200, - "bytes": 288, - "elapsedMs": 813 - }, - { - "method": "POST", - "route": "/api/admin/tokens", - "requestID": "217ef017-1ef2-4df8-9242-61d27ad404cf", - "status": 200, - "expected": 200, - "bytes": 186, - "elapsedMs": 42 - }, - { - "method": "GET", - "route": "/api/user", - "requestID": "2b79061f-51a0-42fd-aab1-a531eceb1bfc", - "status": 200, - "expected": 200, - "bytes": 100, - "elapsedMs": 30 - }, - { - "method": "DELETE", - "route": "/api/admin/tokens/6aea4001421540ec41de53eb", - "requestID": "faa08ac1-e3d7-4aa0-ae62-866ed14f99ce", - "status": 200, - "expected": 200, - "bytes": 13, - "elapsedMs": 32 - }, - { - "method": "GET", - "route": "/api/user", - "requestID": "091bb5ab-900e-4b49-9233-ca70a95df799", - "status": 401, - "expected": 401, - "bytes": 25, - "elapsedMs": 30 - }, - { - "method": "POST", - "route": "/github/login-token", - "requestID": "bd9f5203-4d82-4837-a349-86549a0c1fef", - "status": 200, - "expected": 200, - "bytes": 33, - "elapsedMs": 32 - }, - { - "method": "GET", - "route": "/api/user", - "requestID": "395db7e1-b705-4320-ae5a-ccd50f50399f", - "status": 200, - "expected": 200, - "bytes": 100, - "elapsedMs": 29 - }, - { - "method": "GET", - "route": "/api/user/logout", - "requestID": "51505d83-bc0e-444b-8447-1d0713efa90b", - "status": 302, - "expected": 302, - "bytes": 24, - "elapsedMs": 29 - }, - { - "method": "GET", - "route": "/api/user", - "requestID": "86e5dcf6-4f1f-4fae-9af2-a7d34efd4732", - "status": 401, - "expected": 401, - "bytes": 25, - "elapsedMs": 28 - }, - { - "method": "POST", - "route": "/api/anonymize-preview", - "requestID": "f190c31c-8764-4e0e-9c1e-74b69da66cf4", - "status": 200, - "expected": 200, - "bytes": 26, - "elapsedMs": 33 - }, - { - "method": "GET", - "route": "/api/providers/github/repository/metadata?name=tdurieux%2Fsynctex-js&connection=github-app", - "requestID": "519ad960-c2dd-449c-9ce4-28e9ced5118f", - "status": 200, - "expected": 200, - "bytes": 230, - "elapsedMs": 3101 - }, - { - "method": "GET", - "route": "/api/providers/github/repository/branches?name=tdurieux%2Fsynctex-js&connection=github-app", - "requestID": "3dab34f9-5dbc-417e-b0d3-15157b67332b", - "status": 200, - "expected": 200, - "bytes": 2623, - "elapsedMs": 3072 - }, - { - "method": "GET", - "route": "/api/providers/github/repository/readme?name=tdurieux%2Fsynctex-js&connection=github-app", - "requestID": "07be36f8-5ae6-4caa-8562-5b6cc3273e4d", - "status": 200, - "expected": 200, - "bytes": 2303, - "elapsedMs": 3988 - }, - { - "method": "POST", - "route": "/api/repo", - "requestID": "4906a662-30b2-4b9d-803d-c41dc16cdda7", - "status": 200, - "expected": 200, - "bytes": 22, - "elapsedMs": 3890 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793736696806", - "requestID": "ffcf96f8-c2a9-4782-8dd1-fdd40e8eea7c", - "status": 200, - "expected": 200, - "bytes": 510, - "elapsedMs": 132 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793736696806/file/LICENSE", - "requestID": "6a3e7ef6-55bf-41e9-a4da-6fa7116bbf0e", - "status": 200, - "expected": 200, - "bytes": 1074, - "elapsedMs": 1638 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793736696806/files", - "requestID": "9bc9a110-fb03-4d98-8999-bb5d6765c6b5", - "status": 200, - "expected": 200, - "bytes": 170, - "elapsedMs": 37 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793736696806/zip", - "requestID": "dfd8699f-e1ee-4911-b9f8-d365d358c3a3", - "status": 200, - "expected": 200, - "bytes": 7166, - "elapsedMs": 8339 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793736696806/file/LICENSE", - "requestID": "9686b5e1-13cc-41bf-9524-6a3c5eeb7125", - "status": 200, - "expected": 200, - "bytes": 1074, - "elapsedMs": 1577 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793736696806/zip", - "requestID": "a4477cd0-6e6f-4b8d-b0da-3a667de5c42b", - "status": 200, - "expected": 200, - "bytes": 7166, - "elapsedMs": 7622 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793736696806/file/LICENSE", - "requestID": "df33fab0-326d-4c64-8bf0-e05a73bd2e6a", - "status": 200, - "expected": 200, - "bytes": 1074, - "elapsedMs": 1551 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793736696806/zip", - "requestID": "c4fdeec2-9248-43ad-ad1b-22b9bdfc2150", - "status": 200, - "expected": 200, - "bytes": 7166, - "elapsedMs": 7563 - }, - { - "method": "GET", - "route": "/api/admin/performance", - "requestID": "fed87d27-b255-4e06-9b84-37e1da29ffb3", - "status": 200, - "expected": 200, - "bytes": 36194, - "elapsedMs": 165 - }, - { - "method": "GET", - "route": "/api/user", - "requestID": "d19adf7a-3ebd-403c-9090-6f747ed8dd82", - "status": 401, - "expected": 401, - "bytes": 25, - "elapsedMs": 30 - }, - { - "method": "DELETE", - "route": "/api/repo/go-beta-check-1793736696806", - "requestID": "5e944622-1e9b-4e60-98e4-ab90e346db73", - "status": 200, - "expected": 200, - "bytes": 21, - "elapsedMs": 58 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793736696806", - "requestID": "11ddb1d4-a7c8-4b10-ae5a-eb7a15a8702e", - "status": 200, - "expected": 200, - "bytes": 560, - "elapsedMs": 32 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793736696806", - "requestID": "d5920efc-5aa3-48e5-aadd-c620ee4cadcb", - "status": 200, - "expected": 200, - "bytes": 559, - "elapsedMs": 38 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793736696806/file/LICENSE", - "requestID": "ae57b469-dd75-452c-9bd2-3eb3e277bcc1", - "status": 410, - "expected": 410, - "bytes": 30, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/api/user", - "requestID": "fc47df2c-3153-4594-9c8e-ba0aa9a6cf15", - "status": 401, - "expected": 401, - "bytes": 25, - "elapsedMs": 34 - } - ], - "productionChanged": false, - "overviewHistoryFresh": "passed", - "overviewBrowserFields": "passed", - "queueOverviewFields": "passed", - "errorMonitoring": { - "maxEntries": 5000, - "hourlyBuckets": 24, - "routine404Counted": true - }, - "queueMetricWindows": [ - { - "queue": "download", - "range": "1h", - "points": 60 - }, - { - "queue": "download", - "range": "6h", - "points": 360 - }, - { - "queue": "download", - "range": "24h", - "points": 1440 - }, - { - "queue": "download", - "range": "7d", - "points": 10080 - }, - { - "queue": "remove", - "range": "1h", - "points": 60 - }, - { - "queue": "cache", - "range": "1h", - "points": 60 - }, - { - "queue": "download", - "range": "unrecognized", - "points": 60 - } - ], - "publicStatistics": { - "anonymousAccess": true, - "windows": [ - { - "query": "days=-2", - "days": 1, - "rows": 1 - }, - { - "query": "days=0", - "days": 30, - "rows": 1 - }, - { - "query": "days=0x10", - "days": 16, - "rows": 1 - }, - { - "query": "days=7suffix", - "days": 7, - "rows": 1 - }, - { - "query": "days=999", - "days": 365, - "rows": 1 - }, - { - "query": "days[]=7&days[]=30", - "days": 7, - "rows": 1 - }, - { - "query": "days[1]=7&days[0]=1", - "days": 1, - "rows": 1 - }, - { - "query": "days[x]=7", - "days": 30, - "rows": 1 - } - ] - }, - "dashboardExtendedQueries": "passed", - "dashboardDateCursors": "passed", - "monitoringExtendedQueries": "passed", - "adminExtendedQueries": "passed", - "previewConnectionQueries": "passed", - "previewCacheHintRejections": "passed", - "userSearchQueries": "passed", - "adminListPaginationQueries": "passed", - "adminListFilterQueries": "passed", - "adminListCastingQueries": "passed", - "adminListDateQueries": "passed", - "apiKeyLifecycle": "passed", - "sessionLoginLogout": "passed", - "exactZipContents": "passed", - "repeatedContentChecks": 3, - "performanceMonitoring": { - "requests": true, - "processSamples": true, - "runtimeHistory": true, - "stages": [ - "repository", - "authorization", - "worker_wait", - "anonymize" - ], - "upstreamObserved": false, - "upstreamNote": "Shared-cache hits need no upstream read; provider timing is checked by the integration suite." - }, - "result": "passed", - "testRepositoryRemoved": true, - "temporaryKeyRevoked": true, - "betaAccountAdmin": true, - "uniqueRequestIDsVerified": 130 - }, - "image": "sha256:a089424b419df68472bd846bca25b8b8e9ffb1000458b2323c7269de316f48d3", - "traces": [ - { - "requestID": "32eed3c9-4357-4616-b647-bcd3b2ff0ce1", - "route": "/api/user", - "status": 401, - "serverMs": 3, - "firstByteMs": 2.533686, - "bytes": 25, - "stagesMs": {} - }, - { - "requestID": "3421b571-315f-40c3-9076-e459c9274414", - "route": "/api/user", - "status": 200, - "serverMs": 7, - "firstByteMs": 6.666277, - "bytes": 100, - "stagesMs": {} - }, - { - "requestID": "ce83688a-2ae3-473a-a095-73db7a6eb392", - "route": "/github/connections", - "status": 200, - "serverMs": 568, - "firstByteMs": 567.796318, - "bytes": 288, - "stagesMs": {} - }, - { - "requestID": "38300dc0-1a48-4d02-a686-87a33a0511c7", - "route": "/api/providers", - "status": 200, - "serverMs": 5, - "firstByteMs": 5.235063, - "bytes": 144, - "stagesMs": {} - }, - { - "requestID": "d68f5cb2-e626-4fda-8b0a-8515685add39", - "route": "/api/user/dashboard", - "status": 200, - "serverMs": 18, - "firstByteMs": 17.968671, - "bytes": 64, - "stagesMs": {} - }, - { - "requestID": "7d9a7f19-1b90-4e02-b853-a9eb86a7e6c1", - "route": "/api/user/default", - "status": 200, - "serverMs": 5, - "firstByteMs": 4.830102, - "bytes": 25, - "stagesMs": {} - }, - { - "requestID": "e7143541-0af4-4c23-9c42-bf8cc760e3c8", - "route": "/api/user/quota", - "status": 200, - "serverMs": 6, - "firstByteMs": 5.86286, - "bytes": 105, - "stagesMs": {} - }, - { - "requestID": "c3fe4a4c-1047-4460-92a7-7ec277f0536d", - "route": "/api/admin/overview", - "status": 200, - "serverMs": 76, - "firstByteMs": 75.471802, - "bytes": 576, - "stagesMs": {} - }, - { - "requestID": "878f1c0c-864b-4fc1-9979-0083160adf52", - "route": "/api/admin/users", - "status": 200, - "serverMs": 9, - "firstByteMs": 8.996368, - "bytes": 526, - "stagesMs": {} - }, - { - "requestID": "151a1750-5a14-4aa3-ac6b-81c9c2c54dac", - "route": "/api/admin/repos", - "status": 200, - "serverMs": 15, - "firstByteMs": 13.017429, - "bytes": 2105, - "stagesMs": {} - }, - { - "requestID": "375134e8-a2b8-4a11-a2a6-7d3f77461710", - "route": "/api/admin/queues", - "status": 200, - "serverMs": 22, - "firstByteMs": 21.066424, - "bytes": 714, - "stagesMs": {} - }, - { - "requestID": "8b337e37-18d7-43e0-9a5e-3f80a03ee54f", - "route": "/api/admin/performance", - "status": 200, - "serverMs": 42, - "firstByteMs": 39.610494, - "bytes": 4092, - "stagesMs": {} - }, - { - "requestID": "09244535-b6b5-4fd6-9578-282c6dc4828f", - "route": "/api/admin/errors", - "status": 200, - "serverMs": 26, - "firstByteMs": 18.495767, - "bytes": 8158, - "stagesMs": {} - }, - { - "requestID": "0101e631-0de3-416a-87e0-5f2ce4d4d294", - "route": "/api/admin/errors/stats", - "status": 200, - "serverMs": 8, - "firstByteMs": 7.103342, - "bytes": 266, - "stagesMs": {} - }, - { - "requestID": "a06bacbf-707b-417d-8476-9fce8b8dcb2c", - "route": "/api/admin/tokens", - "status": 200, - "serverMs": 7, - "firstByteMs": 6.569524, - "bytes": 160, - "stagesMs": {} - }, - { - "requestID": "8ed212a9-4329-42f2-a4da-d0829f94e6a2", - "route": "/api/admin/errors", - "status": 200, - "serverMs": 36, - "firstByteMs": 20.425795, - "bytes": 18727, - "stagesMs": {} - }, - { - "requestID": "36b50fb8-ff56-4291-a92a-eb29a32c05ff", - "route": "/api/admin/errors/stats", - "status": 200, - "serverMs": 7, - "firstByteMs": 6.113967, - "bytes": 266, - "stagesMs": {} - }, - { - "requestID": "e9c3e3f8-195f-47cd-ad31-0647119c3346", - "route": "/api/repo/:id", - "status": 404, - "serverMs": 5, - "firstByteMs": 5.097446, - "bytes": 26, - "stagesMs": { - "repository": 1.023451 - } - }, - { - "requestID": "42e374c0-8531-4a98-81bf-fac718be9d2f", - "route": "/api/admin/errors/stats", - "status": 200, - "serverMs": 7, - "firstByteMs": 6.789966, - "bytes": 266, - "stagesMs": {} - }, - { - "requestID": "6e6ae52c-22ff-475b-8367-a46610e4261f", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 5, - "firstByteMs": 4.878682, - "bytes": 205, - "stagesMs": {} - }, - { - "requestID": "d2ede14a-512d-4044-9933-86dc7569e626", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 8, - "firstByteMs": 6.790342, - "bytes": 606, - "stagesMs": {} - }, - { - "requestID": "86321094-d7a6-4efa-850f-991f59965912", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 12, - "firstByteMs": 6.641853, - "bytes": 1956, - "stagesMs": {} - }, - { - "requestID": "851d5d9b-e5ac-4b71-92b1-a8363b3e1e27", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 90, - "firstByteMs": 69.773974, - "bytes": 9717, - "stagesMs": {} - }, - { - "requestID": "46305bc4-f808-4988-8093-5c8b436e6ffe", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 7, - "firstByteMs": 5.24183, - "bytes": 203, - "stagesMs": {} - }, - { - "requestID": "d421a79c-21f7-4a86-a568-514cf0a67a6f", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 6, - "firstByteMs": 5.194923, - "bytes": 186, - "stagesMs": {} - }, - { - "requestID": "fb23116e-4ca7-499c-a41e-2cdffa4aeb1f", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 5, - "firstByteMs": 4.428656, - "bytes": 216, - "stagesMs": {} - }, - { - "requestID": "5d9fb877-6dba-4c9a-acc9-2f63afa93953", - "route": "/api/admin/queues/metrics", - "status": 404, - "serverMs": 6, - "firstByteMs": 5.841417, - "bytes": 27, - "stagesMs": {} - }, - { - "requestID": "9e4f1864-d896-49cb-8a8f-34a3dd62a590", - "route": "/api/stat", - "status": 200, - "serverMs": 1, - "firstByteMs": 0.993874, - "bytes": 69, - "stagesMs": {} - }, - { - "requestID": "d755a333-50e1-458c-b521-8c04a3eaa649", - "route": "/api/stat/history", - "status": 200, - "serverMs": 1, - "firstByteMs": 1.017758, - "bytes": 105, - "stagesMs": {} - }, - { - "requestID": "128fa3f5-e319-4c36-8395-f43c4df74d94", - "route": "/api/stat/history", - "status": 200, - "serverMs": 1, - "firstByteMs": 0.932272, - "bytes": 105, - "stagesMs": {} - }, - { - "requestID": "1a0ac13e-11ba-496d-93ac-1c5efbf78978", - "route": "/api/stat/history", - "status": 200, - "serverMs": 1, - "firstByteMs": 0.857086, - "bytes": 105, - "stagesMs": {} - }, - { - "requestID": "39fe4ef5-8c37-4053-a106-82630f04e38d", - "route": "/api/stat/history", - "status": 200, - "serverMs": 1, - "firstByteMs": 0.845753, - "bytes": 105, - "stagesMs": {} - }, - { - "requestID": "8bff408e-fb4e-4a70-81b8-bce1ff13b859", - "route": "/api/stat/history", - "status": 200, - "serverMs": 1, - "firstByteMs": 0.823926, - "bytes": 105, - "stagesMs": {} - }, - { - "requestID": "fc481fab-6a4e-45fa-8b4d-973f2104b60c", - "route": "/api/stat/history", - "status": 200, - "serverMs": 1, - "firstByteMs": 0.864936, - "bytes": 105, - "stagesMs": {} - }, - { - "requestID": "24e05b78-6cf2-4a85-b674-8349f462723f", - "route": "/api/stat/history", - "status": 200, - "serverMs": 1, - "firstByteMs": 0.891756, - "bytes": 105, - "stagesMs": {} - }, - { - "requestID": "7eec75ab-2c94-469e-8812-5cfd1a59f599", - "route": "/api/stat/history", - "status": 200, - "serverMs": 1, - "firstByteMs": 0.785661, - "bytes": 105, - "stagesMs": {} - }, - { - "requestID": "e819608f-1b44-41cc-928d-3356a5de2340", - "route": "/api/user/dashboard", - "status": 200, - "serverMs": 17, - "firstByteMs": 17.403176, - "bytes": 64, - "stagesMs": {} - }, - { - "requestID": "6075f797-ed28-49c2-b2c2-cc1fa4f308c1", - "route": "/api/user/dashboard", - "status": 200, - "serverMs": 17, - "firstByteMs": 17.172323, - "bytes": 64, - "stagesMs": {} - }, - { - "requestID": "5e7510c7-0d7e-4589-9bc6-13e8c1859758", - "route": "/api/user/dashboard", - "status": 400, - "serverMs": 5, - "firstByteMs": 4.839839, - "bytes": 24, - "stagesMs": {} - }, - { - "requestID": "9173aa12-1dd5-4649-b4f8-cdbf22dc11f5", - "route": "/api/user/dashboard", - "status": 400, - "serverMs": 4, - "firstByteMs": 4.112711, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "ade00320-9d2e-4d3a-b7bd-e24334763fd5", - "route": "/api/user/dashboard", - "status": 200, - "serverMs": 17, - "firstByteMs": 17.137799, - "bytes": 64, - "stagesMs": {} - }, - { - "requestID": "04918df5-4845-45b5-a7c1-a51854776a81", - "route": "/api/user/dashboard", - "status": 200, - "serverMs": 17, - "firstByteMs": 17.061083, - "bytes": 64, - "stagesMs": {} - }, - { - "requestID": "7336d9e5-a8cd-408d-96c1-8474251ff4bb", - "route": "/api/user/dashboard", - "status": 200, - "serverMs": 17, - "firstByteMs": 16.972474, - "bytes": 64, - "stagesMs": {} - }, - { - "requestID": "1b83269d-3257-482a-954e-76f9f05078b0", - "route": "/api/user/dashboard", - "status": 200, - "serverMs": 25, - "firstByteMs": 25.151674, - "bytes": 64, - "stagesMs": {} - }, - { - "requestID": "21b5872b-173f-4224-bcbf-74d98a6c83fa", - "route": "/api/user/dashboard", - "status": 200, - "serverMs": 17, - "firstByteMs": 17.166417, - "bytes": 64, - "stagesMs": {} - }, - { - "requestID": "21662908-a088-4cad-82f2-ef7838ebf441", - "route": "/api/user/dashboard", - "status": 400, - "serverMs": 5, - "firstByteMs": 5.051092, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "7804f6c6-c8a7-4464-8c16-940c7e4780f7", - "route": "/api/admin/performance", - "status": 200, - "serverMs": 60, - "firstByteMs": 52.563037, - "bytes": 6668, - "stagesMs": {} - }, - { - "requestID": "03fe4d50-19bf-4831-a491-d60d3777425c", - "route": "/api/admin/performance", - "status": 200, - "serverMs": 53, - "firstByteMs": 49.040322, - "bytes": 6708, - "stagesMs": {} - }, - { - "requestID": "f301e064-312d-44a5-8e37-229121d719b2", - "route": "/api/admin/performance", - "status": 200, - "serverMs": 44, - "firstByteMs": 41.317778, - "bytes": 4157, - "stagesMs": {} - }, - { - "requestID": "d75ae6c7-9d36-437e-aa23-b9ffcd9e73f7", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 11, - "firstByteMs": 9.355733, - "bytes": 581, - "stagesMs": {} - }, - { - "requestID": "f9100587-9e06-4ac3-8f4a-2e8e5589c1f9", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 8, - "firstByteMs": 7.440396, - "bytes": 209, - "stagesMs": {} - }, - { - "requestID": "34303508-99e0-419a-8a8c-5f0862e66303", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 6, - "firstByteMs": 5.750858, - "bytes": 51, - "stagesMs": {} - }, - { - "requestID": "6f07dad3-ba4b-4e4b-b00f-d58d3e7242f7", - "route": "/api/admin/queues/metrics", - "status": 404, - "serverMs": 6, - "firstByteMs": 5.602338, - "bytes": 27, - "stagesMs": {} - }, - { - "requestID": "c3823bd2-cae4-477d-8b8c-04f71ff53a0e", - "route": "/api/admin/queues", - "status": 200, - "serverMs": 26, - "firstByteMs": 24.833407, - "bytes": 707, - "stagesMs": {} - }, - { - "requestID": "cd68e704-ecba-4595-ab51-1b2b83ea893e", - "route": "/api/admin/errors", - "status": 200, - "serverMs": 8, - "firstByteMs": 6.645526, - "bytes": 694, - "stagesMs": {} - }, - { - "requestID": "f78ddd4f-3752-48e3-a085-f366ca773ea6", - "route": "/api/repo/:owner/:repo", - "status": 400, - "serverMs": 5, - "firstByteMs": 4.908892, - "bytes": 30, - "stagesMs": {} - }, - { - "requestID": "15ab46d2-7ffd-46cc-be82-1efb35f550e7", - "route": "/api/repo/:owner/:repo", - "status": 400, - "serverMs": 5, - "firstByteMs": 4.737196, - "bytes": 30, - "stagesMs": {} - }, - { - "requestID": "a74d2638-8e4d-490f-9ad9-91df7b58da98", - "route": "/api/repo/:owner/:repo", - "status": 400, - "serverMs": 5, - "firstByteMs": 4.974655, - "bytes": 30, - "stagesMs": {} - }, - { - "requestID": "1fc5ca75-ffde-44f4-9bd8-c8d376c91175", - "route": "/api/repo/:owner/:repo", - "status": 500, - "serverMs": 5, - "firstByteMs": 5.243074, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "a2bcb177-a38c-42f2-b47f-73a6e348dc1d", - "route": "/api/repo/:owner/:repo", - "status": 500, - "serverMs": 4, - "firstByteMs": 3.648705, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "ec5ebe4f-3bf6-4ad7-9485-e37ae37688d3", - "route": "/api/repo/:owner/:repo", - "status": 500, - "serverMs": 4, - "firstByteMs": 3.802022, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "071bdecb-09cc-483e-958d-e5e1abd01bad", - "route": "/api/user/search/github-users", - "status": 200, - "serverMs": 4, - "firstByteMs": 3.86974, - "bytes": 2, - "stagesMs": {} - }, - { - "requestID": "62c99704-9499-44c4-84a8-5f01043e8f8d", - "route": "/api/user/search/github-users", - "status": 200, - "serverMs": 3, - "firstByteMs": 3.424374, - "bytes": 2, - "stagesMs": {} - }, - { - "requestID": "9fdc6ce0-0178-492e-a805-f11d0b193409", - "route": "/api/user/search/github-users", - "status": 500, - "serverMs": 7, - "firstByteMs": 6.835264, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "fefc8240-7a4e-4908-ab92-a875972dbaa5", - "route": "/api/user/search/github-users", - "status": 500, - "serverMs": 8, - "firstByteMs": 8.040687, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "ee0b7714-cda6-4372-9307-b5a0f392c19b", - "route": "/api/user/search/github-users", - "status": 500, - "serverMs": 4, - "firstByteMs": 4.310953, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "f823e58c-091b-4a30-b567-6375db105437", - "route": "/api/admin/repos", - "status": 200, - "serverMs": 10, - "firstByteMs": 8.708089, - "bytes": 892, - "stagesMs": {} - }, - { - "requestID": "f775869f-c884-4725-92da-7444bec5546d", - "route": "/api/admin/repos", - "status": 200, - "serverMs": 10, - "firstByteMs": 9.97477, - "bytes": 179, - "stagesMs": {} - }, - { - "requestID": "6a3f1519-b59d-4ee0-8a13-8f67af51f18d", - "route": "/api/admin/repos", - "status": 500, - "serverMs": 4, - "firstByteMs": 4.263779, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "f1ab7ce2-e5ff-472f-891e-e23573fa016e", - "route": "/api/admin/repos", - "status": 500, - "serverMs": 5, - "firstByteMs": 4.520146, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "615808b3-db89-456f-969f-8697a54dfacd", - "route": "/api/admin/users", - "status": 200, - "serverMs": 10, - "firstByteMs": 10.25063, - "bytes": 106, - "stagesMs": {} - }, - { - "requestID": "5b318e30-bc71-4f4b-876a-b9fc4768b61d", - "route": "/api/admin/users", - "status": 200, - "serverMs": 10, - "firstByteMs": 10.021444, - "bytes": 112, - "stagesMs": {} - }, - { - "requestID": "046e8ead-2393-4110-8a05-e5f7e3595690", - "route": "/api/admin/users", - "status": 500, - "serverMs": 7, - "firstByteMs": 6.88568, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "02dab8b5-adea-43da-837a-0a34c89d9da2", - "route": "/api/admin/users", - "status": 500, - "serverMs": 5, - "firstByteMs": 5.073135, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "b75be324-c0b5-4764-851a-8bdb304609a7", - "route": "/api/admin/users", - "status": 500, - "serverMs": 8, - "firstByteMs": 8.470731, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "c4da0b8f-3d2d-488e-a69f-fc227990e8e4", - "route": "/api/admin/conferences", - "status": 200, - "serverMs": 11, - "firstByteMs": 10.819851, - "bytes": 80, - "stagesMs": {} - }, - { - "requestID": "c12dbdc1-3d55-4119-a62a-d8c81d263af6", - "route": "/api/admin/conferences", - "status": 200, - "serverMs": 10, - "firstByteMs": 10.05679, - "bytes": 86, - "stagesMs": {} - }, - { - "requestID": "83356198-276e-44c7-8557-f0cd5e3d453b", - "route": "/api/admin/conferences", - "status": 500, - "serverMs": 5, - "firstByteMs": 4.796051, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "e7d2f66d-a575-48fc-840c-1c4bfa962c0c", - "route": "/api/admin/conferences", - "status": 500, - "serverMs": 7, - "firstByteMs": 6.979866, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "fa12e84e-90f9-4892-abce-9c57acdf9fea", - "route": "/api/admin/repos", - "status": 200, - "serverMs": 12, - "firstByteMs": 10.639464, - "bytes": 744, - "stagesMs": {} - }, - { - "requestID": "f3aaf8a6-2a7b-4a8a-bbdb-8f887528cdf3", - "route": "/api/admin/repos", - "status": 200, - "serverMs": 12, - "firstByteMs": 12.233221, - "bytes": 697, - "stagesMs": {} - }, - { - "requestID": "499f16e8-688c-4a88-a8fc-d86e656b8ccd", - "route": "/api/admin/conferences", - "status": 200, - "serverMs": 10, - "firstByteMs": 9.9201, - "bytes": 80, - "stagesMs": {} - }, - { - "requestID": "987f863a-fb49-45d8-9717-bc4ae8ea95bc", - "route": "/api/admin/conferences", - "status": 200, - "serverMs": 10, - "firstByteMs": 9.868511, - "bytes": 117, - "stagesMs": {} - }, - { - "requestID": "7361a71b-b1c2-4276-a014-7eb2c1db2a71", - "route": "/api/admin/repos", - "status": 500, - "serverMs": 5, - "firstByteMs": 4.935977, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "87e9e9dc-0d6c-4adb-a006-8b4903bfbac4", - "route": "/api/admin/users", - "status": 500, - "serverMs": 6, - "firstByteMs": 5.740634, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "8045d972-4efc-47a0-b601-055cfdd0e242", - "route": "/api/admin/conferences", - "status": 500, - "serverMs": 5, - "firstByteMs": 5.046039, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "fe9d7bc2-c7c4-49fe-8a06-d4dd6a3193d3", - "route": "/api/admin/users", - "status": 200, - "serverMs": 11, - "firstByteMs": 10.543926, - "bytes": 99, - "stagesMs": {} - }, - { - "requestID": "e00731ca-0936-4405-b990-b27205619778", - "route": "/api/admin/users", - "status": 200, - "serverMs": 11, - "firstByteMs": 11.101563, - "bytes": 553, - "stagesMs": {} - }, - { - "requestID": "400657b2-020f-4166-b9c0-3b436a29b100", - "route": "/api/admin/users", - "status": 500, - "serverMs": 5, - "firstByteMs": 5.318905, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "0970ef90-289d-4a5a-b7de-5b4b23039efe", - "route": "/api/admin/users", - "status": 500, - "serverMs": 7, - "firstByteMs": 6.859666, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "bf450832-2f61-4823-9108-07df613d48b6", - "route": "/api/admin/repos", - "status": 500, - "serverMs": 5, - "firstByteMs": 4.680755, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "5fc5105f-0b57-416d-bf62-1dd4713bc206", - "route": "/api/admin/repos", - "status": 500, - "serverMs": 5, - "firstByteMs": 4.708229, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "b843ef21-04ef-4f45-97a6-f4610e890efc", - "route": "/api/admin/repos", - "status": 200, - "serverMs": 14, - "firstByteMs": 12.246985, - "bytes": 2140, - "stagesMs": {} - }, - { - "requestID": "5850b6b6-d75f-4ab3-b589-0a2635fae3c8", - "route": "/api/admin/repos", - "status": 200, - "serverMs": 9, - "firstByteMs": 9.483901, - "bytes": 156, - "stagesMs": {} - }, - { - "requestID": "ab0551dc-fa1b-474a-90ce-3718abb48f36", - "route": "/api/admin/repos", - "status": 500, - "serverMs": 5, - "firstByteMs": 4.771798, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "f121ee71-73a4-4cbf-8f34-1a8af6753b2d", - "route": "/api/admin/users", - "status": 200, - "serverMs": 9, - "firstByteMs": 9.153759, - "bytes": 458, - "stagesMs": {} - }, - { - "requestID": "5ad74e47-00b9-47d1-b11a-a628994e2e3e", - "route": "/api/admin/users", - "status": 200, - "serverMs": 9, - "firstByteMs": 8.544423, - "bytes": 129, - "stagesMs": {} - }, - { - "requestID": "5c59b7a0-fa8e-4216-b324-c6fbbb9bb7d3", - "route": "/api/admin/users", - "status": 500, - "serverMs": 4, - "firstByteMs": 4.17529, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "734777fe-49d9-43de-b97c-6b2e59454494", - "route": "/api/admin/conferences", - "status": 200, - "serverMs": 8, - "firstByteMs": 8.369953, - "bytes": 138, - "stagesMs": {} - }, - { - "requestID": "55478bac-5e88-479e-b2be-d74e05f1ef49", - "route": "/api/admin/conferences", - "status": 200, - "serverMs": 11, - "firstByteMs": 10.599803, - "bytes": 138, - "stagesMs": {} - }, - { - "requestID": "1fbb1d4e-e72a-4f01-8fe0-d4534d9ff6a0", - "route": "/api/admin/conferences", - "status": 500, - "serverMs": 5, - "firstByteMs": 5.466961, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "f1285f21-ded5-448f-a49e-52b4664a229e", - "route": "/github/connections", - "status": 200, - "serverMs": 788, - "firstByteMs": 787.806138, - "bytes": 288, - "stagesMs": {} - }, - { - "requestID": "217ef017-1ef2-4df8-9242-61d27ad404cf", - "route": "/api/admin/tokens", - "status": 200, - "serverMs": 8, - "firstByteMs": 8.10482, - "bytes": 186, - "stagesMs": {} - }, - { - "requestID": "2b79061f-51a0-42fd-aab1-a531eceb1bfc", - "route": "/api/user", - "status": 200, - "serverMs": 5, - "firstByteMs": 4.603626, - "bytes": 100, - "stagesMs": {} - }, - { - "requestID": "faa08ac1-e3d7-4aa0-ae62-866ed14f99ce", - "route": "/api/admin/tokens/:id", - "status": 200, - "serverMs": 6, - "firstByteMs": 6.260906, - "bytes": 13, - "stagesMs": {} - }, - { - "requestID": "091bb5ab-900e-4b49-9233-ca70a95df799", - "route": "/api/user", - "status": 401, - "serverMs": 3, - "firstByteMs": 2.932542, - "bytes": 25, - "stagesMs": {} - }, - { - "requestID": "bd9f5203-4d82-4837-a349-86549a0c1fef", - "route": "/github/login-token", - "status": 200, - "serverMs": 7, - "firstByteMs": 6.749284, - "bytes": 33, - "stagesMs": {} - }, - { - "requestID": "395db7e1-b705-4320-ae5a-ccd50f50399f", - "route": "/api/user", - "status": 200, - "serverMs": 3, - "firstByteMs": 2.835769, - "bytes": 100, - "stagesMs": {} - }, - { - "requestID": "51505d83-bc0e-444b-8447-1d0713efa90b", - "route": "/api/user/logout", - "status": 302, - "serverMs": 3, - "firstByteMs": 3.199165, - "bytes": 24, - "stagesMs": {} - }, - { - "requestID": "86e5dcf6-4f1f-4fae-9af2-a7d34efd4732", - "route": "/api/user", - "status": 401, - "serverMs": 1, - "firstByteMs": 1.344371, - "bytes": 25, - "stagesMs": {} - }, - { - "requestID": "f190c31c-8764-4e0e-9c1e-74b69da66cf4", - "route": "/api/anonymize-preview", - "status": 200, - "serverMs": 5, - "firstByteMs": 5.334852, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "519ad960-c2dd-449c-9ce4-28e9ced5118f", - "route": "/api/providers/:provider/repository/metadata", - "status": 200, - "serverMs": 3073, - "firstByteMs": 3072.753076, - "bytes": 230, - "stagesMs": {} - }, - { - "requestID": "3dab34f9-5dbc-417e-b0d3-15157b67332b", - "route": "/api/providers/:provider/repository/branches", - "status": 200, - "serverMs": 3046, - "firstByteMs": 3044.170639, - "bytes": 998, - "stagesMs": {} - }, - { - "requestID": "07be36f8-5ae6-4caa-8562-5b6cc3273e4d", - "route": "/api/providers/:provider/repository/readme", - "status": 200, - "serverMs": 3958, - "firstByteMs": 3956.65285, - "bytes": 878, - "stagesMs": {} - }, - { - "requestID": "4906a662-30b2-4b9d-803d-c41dc16cdda7", - "route": "/api/repo", - "status": 200, - "serverMs": 3861, - "firstByteMs": 3861.297783, - "bytes": 22, - "stagesMs": {} - }, - { - "requestID": "ffcf96f8-c2a9-4782-8dd1-fdd40e8eea7c", - "route": "/api/repo/:id", - "status": 200, - "serverMs": 8, - "firstByteMs": 8.209617, - "bytes": 510, - "stagesMs": { - "repository": 1.60427 - } - }, - { - "requestID": "6a3e7ef6-55bf-41e9-a4da-6fa7116bbf0e", - "route": "/api/repo/:id/file/*path", - "status": 200, - "serverMs": 1609, - "firstByteMs": 1607.063785, - "bytes": 672, - "stagesMs": { - "anonymize": 20.244836, - "authorization": 1502.2027520000001, - "cache_fill": 68.590494, - "cache_lookup": 2.8596380000000003, - "repository": 2.275402, - "worker_wait": 0.017994 - } - }, - { - "requestID": "9bc9a110-fb03-4d98-8999-bb5d6765c6b5", - "route": "/api/repo/:id/files", - "status": 200, - "serverMs": 10, - "firstByteMs": 9.613947, - "bytes": 170, - "stagesMs": { - "repository": 2.876309 - } - }, - { - "requestID": "dfd8699f-e1ee-4911-b9f8-d365d358c3a3", - "route": "/api/repo/:id/zip", - "status": 200, - "serverMs": 8306, - "firstByteMs": 6770.274365, - "bytes": 7166, - "stagesMs": { - "anonymize": 128.59462200000002, - "authorization": 7947.5725219999995, - "cache_fill": 197.258633, - "cache_lookup": 13.699658, - "repository": 2.95774, - "worker_wait": 0.084784 - } - }, - { - "requestID": "9686b5e1-13cc-41bf-9524-6a3c5eeb7125", - "route": "/api/repo/:id/file/*path", - "status": 200, - "serverMs": 1499, - "firstByteMs": 1495.990156, - "bytes": 672, - "stagesMs": { - "authorization": 1469.515018, - "cache_lookup": 2.0428990000000002, - "repository": 1.791503 - } - }, - { - "requestID": "a4477cd0-6e6f-4b8d-b0da-3a667de5c42b", - "route": "/api/repo/:id/zip", - "status": 200, - "serverMs": 7593, - "firstByteMs": 5994.641059, - "bytes": 7166, - "stagesMs": { - "authorization": 7503.062327, - "cache_lookup": 9.506916, - "repository": 2.214799 - } - }, - { - "requestID": "df33fab0-326d-4c64-8bf0-e05a73bd2e6a", - "route": "/api/repo/:id/file/*path", - "status": 200, - "serverMs": 1437, - "firstByteMs": 1434.46741, - "bytes": 672, - "stagesMs": { - "authorization": 1393.3808279999998, - "cache_lookup": 4.072098, - "repository": 2.754868 - } - }, - { - "requestID": "c4fdeec2-9248-43ad-ad1b-22b9bdfc2150", - "route": "/api/repo/:id/zip", - "status": 200, - "serverMs": 7536, - "firstByteMs": 6091.363461, - "bytes": 7166, - "stagesMs": { - "authorization": 7435.104037000001, - "cache_lookup": 11.396517, - "repository": 2.600843 - } - }, - { - "requestID": "fed87d27-b255-4e06-9b84-37e1da29ffb3", - "route": "/api/admin/performance", - "status": 200, - "serverMs": 72, - "firstByteMs": 68.7767, - "bytes": 4315, - "stagesMs": {} - }, - { - "requestID": "d19adf7a-3ebd-403c-9090-6f747ed8dd82", - "route": "/api/user", - "status": 401, - "serverMs": 3, - "firstByteMs": 3.050089, - "bytes": 25, - "stagesMs": {} - }, - { - "requestID": "5e944622-1e9b-4e60-98e4-ab90e346db73", - "route": "/api/repo/:id", - "status": 200, - "serverMs": 11, - "firstByteMs": 10.988706, - "bytes": 21, - "stagesMs": { - "repository": 1.673442 - } - }, - { - "requestID": "11ddb1d4-a7c8-4b10-ae5a-eb7a15a8702e", - "route": "/api/repo/:id", - "status": 200, - "serverMs": 6, - "firstByteMs": 6.126606, - "bytes": 560, - "stagesMs": { - "repository": 1.617492 - } - }, - { - "requestID": "d5920efc-5aa3-48e5-aadd-c620ee4cadcb", - "route": "/api/repo/:id", - "status": 200, - "serverMs": 8, - "firstByteMs": 8.147474, - "bytes": 559, - "stagesMs": { - "repository": 1.724457 - } - }, - { - "requestID": "ae57b469-dd75-452c-9bd2-3eb3e277bcc1", - "route": "/api/repo/:id/file/*path", - "status": 410, - "serverMs": 3, - "firstByteMs": 3.073182, - "bytes": 30, - "stagesMs": { - "repository": 2.160372 - } - }, - { - "requestID": "fc47df2c-3153-4594-9c8e-ba0aa9a6cf15", - "route": "/api/user", - "status": 401, - "serverMs": 4, - "firstByteMs": 4.391846, - "bytes": 25, - "stagesMs": {} - } - ], - "summary": { - "/api/repo/:id/file/*path": { - "serverMs": [ - 1609, - 1499, - 1437 - ], - "medianServerMs": 1499, - "authorizationMs": [ - 1502.2027520000001, - 1469.515018, - 1393.3808279999998 - ] - }, - "/api/repo/:id/zip": { - "serverMs": [ - 8306, - 7593, - 7536 - ], - "medianServerMs": 7593, - "authorizationMs": [ - 7947.5725219999995, - 7503.062327, - 7435.104037000001 - ] - } - } -} \ No newline at end of file diff --git a/backend/reports/auth-release-optimization.json b/backend/reports/auth-release-optimization.json deleted file mode 100644 index b6f188a..0000000 --- a/backend/reports/auth-release-optimization.json +++ /dev/null @@ -1,106 +0,0 @@ -{ - "verifiedAt": "2026-11-03T20:14:27.415992+00:00", - "deployment": "beta.durieux.me", - "image": "sha256:e4c0f3bdc8311851f11a584616771d22a1eb5dcda2d44d115be0101c57674df2", - "changes": [ - "Shared source lookup retains the local lifecycle fence; authorization runs in producers before reading upstream/legacy bytes and on reader release after lookup/waits.", - "Shared result lookup retains the local lifecycle fence; authorization runs before releasing transformed/cached results. Source readers were already authorized.", - "Live validation optionally repeats file and ZIP reads three times and asserts identical output." - ], - "security": [ - "No positive authorization TTL or cross-request permission cache.", - "HEAD/304 checks retained.", - "Revocation during fills rejects source release.", - "New test revokes immediately after source authorization and rejects result release in changed, unchanged, binary and admission modes.", - "Resource lifecycle and cache-revision fences remain." - ], - "authorizationCalls": { - "warmSharedSource": { - "before": 2, - "after": 1 - }, - "coldSharedSource": { - "before": 3, - "after": 2 - }, - "warmSharedTransformedFile": { - "before": 4, - "after": 2 - } - }, - "comparison": [ - { - "route": "/api/repo/:id/file/*path", - "before": { - "serverMs": [ - 1609, - 1499, - 1437 - ], - "medianServerMs": 1499, - "authorizationMs": [ - 1502.2027520000001, - 1469.515018, - 1393.3808279999998 - ] - }, - "after": { - "serverMs": [ - 784, - 813, - 733 - ], - "medianServerMs": 784, - "authorizationMs": [ - 691.0036620000001, - 785.951564, - 706.085898 - ] - }, - "medianLatencyReductionPercent": 47.7 - }, - { - "route": "/api/repo/:id/zip", - "before": { - "serverMs": [ - 8306, - 7593, - 7536 - ], - "medianServerMs": 7593, - "authorizationMs": [ - 7947.5725219999995, - 7503.062327, - 7435.104037000001 - ] - }, - "after": { - "serverMs": [ - 4152, - 4018, - 4044 - ], - "medianServerMs": 4044, - "authorizationMs": [ - 3870.61723, - 3928.9969919999994, - 3955.438313 - ] - }, - "medianLatencyReductionPercent": 46.7 - } - ], - "validation": { - "targetedRaceIntegration": "passed, server 16.421s; cache, shared results, HTTP representations, admission fallback, metadata contracts", - "goVetServer": "passed", - "liveBeforeChecks": 130, - "liveAfterChecks": 130, - "allLiveChecksPassed": true, - "exactRepeatedOutput": "passed for all three file and ZIP responses in each run", - "temporaryKeysRevoked": true, - "temporaryRepositoriesRemoved": true - }, - "limitations": "Three serial samples per endpoint before and after, on beta with existing upstream/source caches. External GitHub latency can vary; these are not load-test percentiles. First response includes new result-cache work.", - "remainingBottleneck": "ZIP processes entries serially, retaining source/result release authorization per entry. Further concurrency requires bounded buffers and explicit pre-emission revision/revocation semantics. Preview discovery remains separately expensive.", - "productionChanged": false -} \ No newline at end of file diff --git a/backend/reports/beta-request-retrace.json b/backend/reports/beta-request-retrace.json deleted file mode 100644 index 18a2888..0000000 --- a/backend/reports/beta-request-retrace.json +++ /dev/null @@ -1,1635 +0,0 @@ -{ - "capturedAt": "2026-11-03T20:03:23.709395+00:00", - "deployment": "beta.durieux.me", - "checksPassed": true, - "requests": 127, - "checks": 127, - "temporaryKeyRevoked": true, - "testRepositoryRemoved": true, - "methodology": "One serial live GitHub App lifecycle with authenticated monitoring/query regression checks, correlated by generated request ID. Not a load test, browser trace, cold-cache benchmark, or statistical latency estimate. Existing caches may be warm. Expected validation failures are included. Stage timers may nest; do not sum them as exclusive CPU time.", - "localSuccessfulRoutes": { - "samples": 79, - "medianServerMs": 9, - "maxServerMs": 94 - }, - "slowest": [ - { - "requestID": "94e2d47c-6cb1-4756-b8ae-5319314abf18", - "method": "GET", - "status": 200, - "clientMs": 10128, - "bytes": 7166, - "route": "/api/repo/:id/zip", - "serverMs": 10080, - "firstByteMs": 8174.262565, - "stagesMs": { - "anonymize": 103.71942999999999, - "authorization": 9768.826008999999, - "cache_fill": 162.721428, - "cache_lookup": 11.706307999999998, - "repository": 2.720955, - "worker_wait": 0.101898 - } - }, - { - "requestID": "e5977dc2-c381-41a3-b742-d816e86d9525", - "method": "GET", - "status": 200, - "clientMs": 4279, - "bytes": 230, - "route": "/api/providers/:provider/repository/metadata", - "serverMs": 4247, - "firstByteMs": 4246.978387, - "stagesMs": {} - }, - { - "requestID": "8a0face9-6a42-4c66-9572-8e8a20ce3706", - "method": "POST", - "status": 200, - "clientMs": 4230, - "bytes": 22, - "route": "/api/repo", - "serverMs": 4166, - "firstByteMs": 4166.255153, - "stagesMs": {} - }, - { - "requestID": "e3a6acb7-a766-4dd6-8a8d-4fb4d2832eac", - "method": "GET", - "status": 200, - "clientMs": 3781, - "bytes": 2623, - "route": "/api/providers/:provider/repository/branches", - "serverMs": 3687, - "firstByteMs": 3685.454239, - "stagesMs": {} - }, - { - "requestID": "7e349c40-0052-4b5c-9dbe-d602d87d7c5f", - "method": "GET", - "status": 200, - "clientMs": 3350, - "bytes": 2303, - "route": "/api/providers/:provider/repository/readme", - "serverMs": 3284, - "firstByteMs": 3281.912559, - "stagesMs": {} - }, - { - "requestID": "b985ca63-67ea-455a-a956-c557a5764be1", - "method": "GET", - "status": 200, - "clientMs": 2544, - "bytes": 1074, - "route": "/api/repo/:id/file/*path", - "serverMs": 2496, - "firstByteMs": 2493.035905, - "stagesMs": { - "anonymize": 23.396752, - "authorization": 2325.4652199999996, - "cache_fill": 109.392715, - "cache_lookup": 12.924527, - "repository": 2.66209, - "worker_wait": 0.031129999999999998 - } - }, - { - "requestID": "0239c51c-8de3-4bab-a659-285114e1beef", - "method": "GET", - "status": 200, - "clientMs": 1268, - "bytes": 288, - "route": "/github/connections", - "serverMs": 1219, - "firstByteMs": 1219.042594, - "stagesMs": {} - }, - { - "requestID": "e6f081ab-acc3-4c47-b32d-7940f5aae728", - "method": "GET", - "status": 200, - "clientMs": 627, - "bytes": 288, - "route": "/github/connections", - "serverMs": 589, - "firstByteMs": 588.976658, - "stagesMs": {} - }, - { - "requestID": "708c7dc0-9ec6-45b0-adfd-0273665dc5a0", - "method": "GET", - "status": 200, - "clientMs": 159, - "bytes": 564553, - "route": "/api/admin/queues/metrics", - "serverMs": 94, - "firstByteMs": 74.664478, - "stagesMs": {} - }, - { - "requestID": "4075ccff-1de7-4493-8092-d160a8020131", - "method": "GET", - "status": 200, - "clientMs": 127, - "bytes": 1130, - "route": "/api/admin/overview", - "serverMs": 81, - "firstByteMs": 78.748728, - "stagesMs": {} - }, - { - "requestID": "e14ba84b-68aa-4fed-b486-f1dde0ec8420", - "method": "GET", - "status": 200, - "clientMs": 214, - "bytes": 30370, - "route": "/api/admin/performance", - "serverMs": 58, - "firstByteMs": 54.596057, - "stagesMs": {} - }, - { - "requestID": "e73884c6-4ab6-4466-a660-58040f5c9e2d", - "method": "GET", - "status": 200, - "clientMs": 82, - "bytes": 54963, - "route": "/api/admin/performance", - "serverMs": 48, - "firstByteMs": 44.205164, - "stagesMs": {} - } - ], - "traces": [ - { - "requestID": "636a03b7-c962-4b76-81ae-fbd751d02d14", - "method": "GET", - "status": 401, - "clientMs": 299, - "bytes": 25, - "route": "/api/user", - "serverMs": 3, - "firstByteMs": 2.685101, - "stagesMs": {} - }, - { - "requestID": "be09dc15-a3b1-4f43-9179-f99b352b4753", - "method": "GET", - "status": 200, - "clientMs": 140, - "bytes": 100, - "route": "/api/user", - "serverMs": 6, - "firstByteMs": 5.737574, - "stagesMs": {} - }, - { - "requestID": "0239c51c-8de3-4bab-a659-285114e1beef", - "method": "GET", - "status": 200, - "clientMs": 1268, - "bytes": 288, - "route": "/github/connections", - "serverMs": 1219, - "firstByteMs": 1219.042594, - "stagesMs": {} - }, - { - "requestID": "547bb5b6-4dff-46f2-aeed-921eef71ee92", - "method": "GET", - "status": 200, - "clientMs": 54, - "bytes": 144, - "route": "/api/providers", - "serverMs": 8, - "firstByteMs": 7.756563, - "stagesMs": {} - }, - { - "requestID": "124e0679-07bb-4eaa-9d98-7cf93ed33cd4", - "method": "GET", - "status": 200, - "clientMs": 83, - "bytes": 64, - "route": "/api/user/dashboard", - "serverMs": 22, - "firstByteMs": 22.276009, - "stagesMs": {} - }, - { - "requestID": "26a1e1b4-d68a-40a8-b911-b2dd6d9ef032", - "method": "GET", - "status": 200, - "clientMs": 38, - "bytes": 25, - "route": "/api/user/default", - "serverMs": 5, - "firstByteMs": 4.939712, - "stagesMs": {} - }, - { - "requestID": "4a68529c-e25a-4e7f-90d4-05353a490a25", - "method": "GET", - "status": 200, - "clientMs": 54, - "bytes": 105, - "route": "/api/user/quota", - "serverMs": 6, - "firstByteMs": 6.207468, - "stagesMs": {} - }, - { - "requestID": "4075ccff-1de7-4493-8092-d160a8020131", - "method": "GET", - "status": 200, - "clientMs": 127, - "bytes": 1130, - "route": "/api/admin/overview", - "serverMs": 81, - "firstByteMs": 78.748728, - "stagesMs": {} - }, - { - "requestID": "0fec98d6-bde8-4ff4-9428-0eea061388c8", - "method": "GET", - "status": 200, - "clientMs": 52, - "bytes": 526, - "route": "/api/admin/users", - "serverMs": 10, - "firstByteMs": 10.25449, - "stagesMs": {} - }, - { - "requestID": "f86010c4-df8b-46e8-b646-cb5a4717076a", - "method": "GET", - "status": 200, - "clientMs": 65, - "bytes": 11865, - "route": "/api/admin/repos", - "serverMs": 19, - "firstByteMs": 15.171176, - "stagesMs": {} - }, - { - "requestID": "f6c6b7fa-fafa-4940-8e0e-a2f2c5981bd6", - "method": "GET", - "status": 200, - "clientMs": 63, - "bytes": 3887, - "route": "/api/admin/queues", - "serverMs": 28, - "firstByteMs": 26.606375, - "stagesMs": {} - }, - { - "requestID": "071cc728-fb2b-425d-a1f3-81a1ebb51a13", - "method": "GET", - "status": 200, - "clientMs": 92, - "bytes": 22332, - "route": "/api/admin/performance", - "serverMs": 43, - "firstByteMs": 39.969291, - "stagesMs": {} - }, - { - "requestID": "77622b9c-fb44-4f75-bd64-7b48394b0563", - "method": "GET", - "status": 200, - "clientMs": 53, - "bytes": 53900, - "route": "/api/admin/errors", - "serverMs": 21, - "firstByteMs": 14.293191, - "stagesMs": {} - }, - { - "requestID": "c2dba7ef-35d4-4b15-ab8e-773ee5ba3595", - "method": "GET", - "status": 200, - "clientMs": 36, - "bytes": 1391, - "route": "/api/admin/errors/stats", - "serverMs": 8, - "firstByteMs": 6.710504, - "stagesMs": {} - }, - { - "requestID": "b9239508-5c43-4ef4-87e0-b7fde59d88d0", - "method": "GET", - "status": 200, - "clientMs": 36, - "bytes": 160, - "route": "/api/admin/tokens", - "serverMs": 7, - "firstByteMs": 6.698207, - "stagesMs": {} - }, - { - "requestID": "d6875086-5050-4568-9b27-fb5c76e9212e", - "method": "GET", - "status": 200, - "clientMs": 83, - "bytes": 114302, - "route": "/api/admin/errors", - "serverMs": 47, - "firstByteMs": 24.450804, - "stagesMs": {} - }, - { - "requestID": "efa14aa1-3c04-4ddf-9d64-db2d1da8a6a2", - "method": "GET", - "status": 200, - "clientMs": 35, - "bytes": 1391, - "route": "/api/admin/errors/stats", - "serverMs": 7, - "firstByteMs": 6.427739, - "stagesMs": {} - }, - { - "requestID": "4b938543-732f-49a9-b324-d5a680d1a185", - "method": "GET", - "status": 404, - "clientMs": 47, - "bytes": 26, - "route": "/api/repo/:id", - "serverMs": 6, - "firstByteMs": 6.259774, - "stagesMs": { - "repository": 1.324455 - } - }, - { - "requestID": "1a7abbd7-5377-492a-86a8-bf78694798c9", - "method": "GET", - "status": 200, - "clientMs": 57, - "bytes": 1391, - "route": "/api/admin/errors/stats", - "serverMs": 8, - "firstByteMs": 7.186292, - "stagesMs": {} - }, - { - "requestID": "d709d2bb-9e77-4060-9249-763e6154f76c", - "method": "GET", - "status": 200, - "clientMs": 35, - "bytes": 3404, - "route": "/api/admin/queues/metrics", - "serverMs": 6, - "firstByteMs": 5.761517, - "stagesMs": {} - }, - { - "requestID": "a026019d-4725-4351-96ed-1e418dee677a", - "method": "GET", - "status": 200, - "clientMs": 42, - "bytes": 20204, - "route": "/api/admin/queues/metrics", - "serverMs": 10, - "firstByteMs": 9.057635, - "stagesMs": {} - }, - { - "requestID": "e349f6d4-52ed-40c9-889b-1bf6b53f4c6a", - "method": "GET", - "status": 200, - "clientMs": 54, - "bytes": 80714, - "route": "/api/admin/queues/metrics", - "serverMs": 22, - "firstByteMs": 7.06873, - "stagesMs": {} - }, - { - "requestID": "708c7dc0-9ec6-45b0-adfd-0273665dc5a0", - "method": "GET", - "status": 200, - "clientMs": 159, - "bytes": 564553, - "route": "/api/admin/queues/metrics", - "serverMs": 94, - "firstByteMs": 74.664478, - "stagesMs": {} - }, - { - "requestID": "a40df9d2-6717-41d5-9288-8ac5ef2da3e2", - "method": "GET", - "status": 200, - "clientMs": 34, - "bytes": 3402, - "route": "/api/admin/queues/metrics", - "serverMs": 6, - "firstByteMs": 5.648524, - "stagesMs": {} - }, - { - "requestID": "e29ab96d-fdf0-4055-8441-da0b5f5f5ac2", - "method": "GET", - "status": 200, - "clientMs": 35, - "bytes": 3401, - "route": "/api/admin/queues/metrics", - "serverMs": 7, - "firstByteMs": 6.53434, - "stagesMs": {} - }, - { - "requestID": "1a85ec8f-cd64-4c72-bbbf-d0dfe487e0bc", - "method": "GET", - "status": 200, - "clientMs": 34, - "bytes": 3414, - "route": "/api/admin/queues/metrics", - "serverMs": 5, - "firstByteMs": 4.834188, - "stagesMs": {} - }, - { - "requestID": "a03610a7-ab41-4994-9dfc-e31d90ca72c6", - "method": "GET", - "status": 404, - "clientMs": 33, - "bytes": 27, - "route": "/api/admin/queues/metrics", - "serverMs": 4, - "firstByteMs": 4.413397, - "stagesMs": {} - }, - { - "requestID": "c74d6854-f463-4ef2-8d5d-9e50257cfc91", - "method": "GET", - "status": 200, - "clientMs": 58, - "bytes": 69, - "route": "/api/stat", - "serverMs": 2, - "firstByteMs": 1.955618, - "stagesMs": {} - }, - { - "requestID": "ac06db3a-915e-4b5c-bae4-c0d328ee1cc1", - "method": "GET", - "status": 200, - "clientMs": 76, - "bytes": 105, - "route": "/api/stat/history", - "serverMs": 1, - "firstByteMs": 0.955988, - "stagesMs": {} - }, - { - "requestID": "a4b1ee44-37ae-40d1-913c-3c07ed9ddf64", - "method": "GET", - "status": 200, - "clientMs": 33, - "bytes": 105, - "route": "/api/stat/history", - "serverMs": 1, - "firstByteMs": 1.032565, - "stagesMs": {} - }, - { - "requestID": "586c6773-e45d-4a06-bd84-c3fd38bb53b1", - "method": "GET", - "status": 200, - "clientMs": 30, - "bytes": 105, - "route": "/api/stat/history", - "serverMs": 1, - "firstByteMs": 1.042426, - "stagesMs": {} - }, - { - "requestID": "0d0c6974-6112-431f-9a16-e594bb9a83e4", - "method": "GET", - "status": 200, - "clientMs": 29, - "bytes": 105, - "route": "/api/stat/history", - "serverMs": 1, - "firstByteMs": 0.991845, - "stagesMs": {} - }, - { - "requestID": "840de381-f7ce-40d5-a79f-5280a3979ccc", - "method": "GET", - "status": 200, - "clientMs": 105, - "bytes": 105, - "route": "/api/stat/history", - "serverMs": 1, - "firstByteMs": 0.977535, - "stagesMs": {} - }, - { - "requestID": "79604d23-fd79-4470-b4d2-b17f6ab4cbc0", - "method": "GET", - "status": 200, - "clientMs": 32, - "bytes": 105, - "route": "/api/stat/history", - "serverMs": 3, - "firstByteMs": 2.556531, - "stagesMs": {} - }, - { - "requestID": "7364d5db-70d9-4c3e-b96b-0b8cc54be6a6", - "method": "GET", - "status": 200, - "clientMs": 28, - "bytes": 105, - "route": "/api/stat/history", - "serverMs": 1, - "firstByteMs": 1.025622, - "stagesMs": {} - }, - { - "requestID": "8c068b69-5973-488a-b73b-0b435a078c66", - "method": "GET", - "status": 200, - "clientMs": 31, - "bytes": 105, - "route": "/api/stat/history", - "serverMs": 1, - "firstByteMs": 1.097273, - "stagesMs": {} - }, - { - "requestID": "c34b9b9b-36ca-402c-b16b-d74d76f73ea5", - "method": "GET", - "status": 200, - "clientMs": 45, - "bytes": 64, - "route": "/api/user/dashboard", - "serverMs": 17, - "firstByteMs": 16.949223, - "stagesMs": {} - }, - { - "requestID": "ecb0389e-b14a-49db-820a-ab5c11f4ed39", - "method": "GET", - "status": 200, - "clientMs": 71, - "bytes": 64, - "route": "/api/user/dashboard", - "serverMs": 17, - "firstByteMs": 16.606304, - "stagesMs": {} - }, - { - "requestID": "a148214f-524f-42b5-86e9-d60ee813225d", - "method": "GET", - "status": 400, - "clientMs": 34, - "bytes": 24, - "route": "/api/user/dashboard", - "serverMs": 6, - "firstByteMs": 5.714538, - "stagesMs": {} - }, - { - "requestID": "f1fab235-0eed-4247-b42c-1f49a06662e1", - "method": "GET", - "status": 400, - "clientMs": 60, - "bytes": 26, - "route": "/api/user/dashboard", - "serverMs": 6, - "firstByteMs": 5.641365, - "stagesMs": {} - }, - { - "requestID": "bec4b5dd-e55d-429d-8c5c-8cf04f472ad9", - "method": "GET", - "status": 200, - "clientMs": 46, - "bytes": 64, - "route": "/api/user/dashboard", - "serverMs": 19, - "firstByteMs": 18.708899, - "stagesMs": {} - }, - { - "requestID": "6ba59046-79d8-405d-869e-a2a3160ee28d", - "method": "GET", - "status": 200, - "clientMs": 49, - "bytes": 64, - "route": "/api/user/dashboard", - "serverMs": 19, - "firstByteMs": 19.126315, - "stagesMs": {} - }, - { - "requestID": "2c78af9d-9d39-4ee8-a2cc-7180282d1511", - "method": "GET", - "status": 200, - "clientMs": 80, - "bytes": 64, - "route": "/api/user/dashboard", - "serverMs": 19, - "firstByteMs": 19.313955, - "stagesMs": {} - }, - { - "requestID": "daf5b50b-9d36-4551-8e80-883b932abe10", - "method": "GET", - "status": 200, - "clientMs": 46, - "bytes": 64, - "route": "/api/user/dashboard", - "serverMs": 16, - "firstByteMs": 16.167047, - "stagesMs": {} - }, - { - "requestID": "2dc55d83-c021-4474-8622-6cbc412fadde", - "method": "GET", - "status": 200, - "clientMs": 47, - "bytes": 64, - "route": "/api/user/dashboard", - "serverMs": 16, - "firstByteMs": 16.315587, - "stagesMs": {} - }, - { - "requestID": "d379ac0f-016f-4173-8684-7d1d889e71dd", - "method": "GET", - "status": 400, - "clientMs": 32, - "bytes": 26, - "route": "/api/user/dashboard", - "serverMs": 5, - "firstByteMs": 5.059032, - "stagesMs": {} - }, - { - "requestID": "1741d411-bec8-41c4-9e46-600daa61d307", - "method": "GET", - "status": 200, - "clientMs": 105, - "bytes": 54963, - "route": "/api/admin/performance", - "serverMs": 39, - "firstByteMs": 35.081265, - "stagesMs": {} - }, - { - "requestID": "e73884c6-4ab6-4466-a660-58040f5c9e2d", - "method": "GET", - "status": 200, - "clientMs": 82, - "bytes": 54963, - "route": "/api/admin/performance", - "serverMs": 48, - "firstByteMs": 44.205164, - "stagesMs": {} - }, - { - "requestID": "cf76463c-0b77-45c4-848d-2375cd6bd50b", - "method": "GET", - "status": 200, - "clientMs": 64, - "bytes": 22834, - "route": "/api/admin/performance", - "serverMs": 36, - "firstByteMs": 33.641317, - "stagesMs": {} - }, - { - "requestID": "208376ba-8607-4067-9663-ee0f05ecfb2e", - "method": "GET", - "status": 200, - "clientMs": 40, - "bytes": 20201, - "route": "/api/admin/queues/metrics", - "serverMs": 11, - "firstByteMs": 8.654308, - "stagesMs": {} - }, - { - "requestID": "f5ff5b6f-a45a-4bd0-9b85-9482591ba0e3", - "method": "GET", - "status": 200, - "clientMs": 34, - "bytes": 3402, - "route": "/api/admin/queues/metrics", - "serverMs": 6, - "firstByteMs": 4.504954, - "stagesMs": {} - }, - { - "requestID": "08abe1d6-1d5d-4b1e-91b7-43119821c6f9", - "method": "GET", - "status": 200, - "clientMs": 34, - "bytes": 51, - "route": "/api/admin/queues/metrics", - "serverMs": 6, - "firstByteMs": 6.481784, - "stagesMs": {} - }, - { - "requestID": "410e6cba-8b4a-4d8c-9f6e-a82dbe4c1e75", - "method": "GET", - "status": 404, - "clientMs": 32, - "bytes": 27, - "route": "/api/admin/queues/metrics", - "serverMs": 8, - "firstByteMs": 7.671518, - "stagesMs": {} - }, - { - "requestID": "1550df4a-61ed-4fef-b312-62b6b4718102", - "method": "GET", - "status": 200, - "clientMs": 77, - "bytes": 3873, - "route": "/api/admin/queues", - "serverMs": 28, - "firstByteMs": 26.351484, - "stagesMs": {} - }, - { - "requestID": "5cb513c6-4a6b-4d42-9ae1-95788c1fa176", - "method": "GET", - "status": 200, - "clientMs": 40, - "bytes": 1683, - "route": "/api/admin/errors", - "serverMs": 7, - "firstByteMs": 5.848191, - "stagesMs": {} - }, - { - "requestID": "8f2a5847-bd2f-4bdd-a666-13c298bc3478", - "method": "GET", - "status": 400, - "clientMs": 35, - "bytes": 30, - "route": "/api/repo/:owner/:repo", - "serverMs": 5, - "firstByteMs": 4.878717, - "stagesMs": {} - }, - { - "requestID": "cccb96df-834d-4914-a200-26e7cd595d3c", - "method": "GET", - "status": 400, - "clientMs": 68, - "bytes": 30, - "route": "/api/repo/:owner/:repo", - "serverMs": 5, - "firstByteMs": 5.374669, - "stagesMs": {} - }, - { - "requestID": "8206cd12-d1d9-4d12-9597-15d09267ada5", - "method": "GET", - "status": 400, - "clientMs": 34, - "bytes": 30, - "route": "/api/repo/:owner/:repo", - "serverMs": 5, - "firstByteMs": 4.507038, - "stagesMs": {} - }, - { - "requestID": "ecbbbf0e-8018-4ea6-bfb2-3ebc3b489e12", - "method": "GET", - "status": 500, - "clientMs": 37, - "bytes": 26, - "route": "/api/repo/:owner/:repo", - "serverMs": 5, - "firstByteMs": 4.715323, - "stagesMs": {} - }, - { - "requestID": "74b9fd71-24b4-44c1-b821-f6ade99ba775", - "method": "GET", - "status": 500, - "clientMs": 33, - "bytes": 26, - "route": "/api/repo/:owner/:repo", - "serverMs": 5, - "firstByteMs": 5.015675, - "stagesMs": {} - }, - { - "requestID": "9c6dd958-3580-4fb5-a6a1-80fff1c059a6", - "method": "GET", - "status": 500, - "clientMs": 58, - "bytes": 26, - "route": "/api/repo/:owner/:repo", - "serverMs": 5, - "firstByteMs": 5.215232, - "stagesMs": {} - }, - { - "requestID": "1efdb360-212f-45be-9a8f-3bf98eddf57d", - "method": "GET", - "status": 200, - "clientMs": 33, - "bytes": 2, - "route": "/api/user/search/github-users", - "serverMs": 4, - "firstByteMs": 4.268832, - "stagesMs": {} - }, - { - "requestID": "6c5988a5-4f2a-4fec-b7a8-821c7289d8e5", - "method": "GET", - "status": 200, - "clientMs": 45, - "bytes": 2, - "route": "/api/user/search/github-users", - "serverMs": 4, - "firstByteMs": 4.41852, - "stagesMs": {} - }, - { - "requestID": "77264c98-65e5-44b5-bbf4-20e8c7e0e935", - "method": "GET", - "status": 500, - "clientMs": 34, - "bytes": 26, - "route": "/api/user/search/github-users", - "serverMs": 9, - "firstByteMs": 8.918827, - "stagesMs": {} - }, - { - "requestID": "98c14f4c-0a1a-4716-ba65-2a03be0f67cb", - "method": "GET", - "status": 500, - "clientMs": 65, - "bytes": 26, - "route": "/api/user/search/github-users", - "serverMs": 8, - "firstByteMs": 8.210174, - "stagesMs": {} - }, - { - "requestID": "10a0f891-5e0f-474c-8888-a053d52ee738", - "method": "GET", - "status": 500, - "clientMs": 30, - "bytes": 26, - "route": "/api/user/search/github-users", - "serverMs": 4, - "firstByteMs": 4.196213, - "stagesMs": {} - }, - { - "requestID": "44d72f40-c872-4ae1-b7e8-fd704542a336", - "method": "GET", - "status": 200, - "clientMs": 43, - "bytes": 2497, - "route": "/api/admin/repos", - "serverMs": 10, - "firstByteMs": 8.640127, - "stagesMs": {} - }, - { - "requestID": "fbb088a4-72ba-4e87-baba-32579eb69b10", - "method": "GET", - "status": 200, - "clientMs": 45, - "bytes": 179, - "route": "/api/admin/repos", - "serverMs": 8, - "firstByteMs": 8.02724, - "stagesMs": {} - }, - { - "requestID": "eeba2895-af09-40ab-a471-e455800369ea", - "method": "GET", - "status": 500, - "clientMs": 28, - "bytes": 26, - "route": "/api/admin/repos", - "serverMs": 4, - "firstByteMs": 4.471466, - "stagesMs": {} - }, - { - "requestID": "791f4df4-88b2-458b-855f-7847d41ef72f", - "method": "GET", - "status": 500, - "clientMs": 46, - "bytes": 26, - "route": "/api/admin/repos", - "serverMs": 5, - "firstByteMs": 4.849402, - "stagesMs": {} - }, - { - "requestID": "0b65676d-149e-47ba-8f29-567788d56bbb", - "method": "GET", - "status": 200, - "clientMs": 38, - "bytes": 106, - "route": "/api/admin/users", - "serverMs": 10, - "firstByteMs": 10.033626, - "stagesMs": {} - }, - { - "requestID": "5810c8a9-ba01-48f8-a8e1-3e9a82b18f15", - "method": "GET", - "status": 200, - "clientMs": 38, - "bytes": 112, - "route": "/api/admin/users", - "serverMs": 10, - "firstByteMs": 9.621861, - "stagesMs": {} - }, - { - "requestID": "14c11439-ec68-4b52-b8bc-4303553fd88a", - "method": "GET", - "status": 500, - "clientMs": 34, - "bytes": 26, - "route": "/api/admin/users", - "serverMs": 7, - "firstByteMs": 6.840371, - "stagesMs": {} - }, - { - "requestID": "eff398c0-1aee-4a7a-b36b-9f7a3ce17861", - "method": "GET", - "status": 500, - "clientMs": 58, - "bytes": 26, - "route": "/api/admin/users", - "serverMs": 5, - "firstByteMs": 4.668709, - "stagesMs": {} - }, - { - "requestID": "df1f0cf8-ed3d-4e1e-aa8a-f90357b70ebd", - "method": "GET", - "status": 500, - "clientMs": 36, - "bytes": 26, - "route": "/api/admin/users", - "serverMs": 7, - "firstByteMs": 6.922966, - "stagesMs": {} - }, - { - "requestID": "81d0f06e-1644-429a-84ce-583470b5a116", - "method": "GET", - "status": 200, - "clientMs": 64, - "bytes": 80, - "route": "/api/admin/conferences", - "serverMs": 8, - "firstByteMs": 7.636996, - "stagesMs": {} - }, - { - "requestID": "7f22bf0c-53ce-4df0-aebe-b067ec08a37e", - "method": "GET", - "status": 200, - "clientMs": 96, - "bytes": 86, - "route": "/api/admin/conferences", - "serverMs": 9, - "firstByteMs": 8.780509, - "stagesMs": {} - }, - { - "requestID": "37413215-604e-4f5b-b6e8-b0b2a68a80b2", - "method": "GET", - "status": 500, - "clientMs": 35, - "bytes": 26, - "route": "/api/admin/conferences", - "serverMs": 5, - "firstByteMs": 4.908773, - "stagesMs": {} - }, - { - "requestID": "92541a8f-5800-4a6d-ae25-1463f2811e19", - "method": "GET", - "status": 500, - "clientMs": 32, - "bytes": 26, - "route": "/api/admin/conferences", - "serverMs": 5, - "firstByteMs": 4.731617, - "stagesMs": {} - }, - { - "requestID": "3ddd38c9-26f6-46ba-8d16-99853e7fec55", - "method": "GET", - "status": 200, - "clientMs": 40, - "bytes": 1328, - "route": "/api/admin/repos", - "serverMs": 13, - "firstByteMs": 10.683279, - "stagesMs": {} - }, - { - "requestID": "d0b7b729-fc54-41c0-8b68-cb021cdab48f", - "method": "GET", - "status": 200, - "clientMs": 73, - "bytes": 697, - "route": "/api/admin/repos", - "serverMs": 10, - "firstByteMs": 9.84654, - "stagesMs": {} - }, - { - "requestID": "61a70985-6f83-497d-bc2b-5ed596e59e38", - "method": "GET", - "status": 200, - "clientMs": 38, - "bytes": 80, - "route": "/api/admin/conferences", - "serverMs": 9, - "firstByteMs": 8.989478, - "stagesMs": {} - }, - { - "requestID": "9332a3ff-c8ac-4ab2-b0a4-a10704823b4e", - "method": "GET", - "status": 200, - "clientMs": 39, - "bytes": 117, - "route": "/api/admin/conferences", - "serverMs": 9, - "firstByteMs": 9.139043, - "stagesMs": {} - }, - { - "requestID": "51bd7243-dba2-4b94-bdfb-16d427c28dad", - "method": "GET", - "status": 500, - "clientMs": 29, - "bytes": 26, - "route": "/api/admin/repos", - "serverMs": 4, - "firstByteMs": 4.318832, - "stagesMs": {} - }, - { - "requestID": "51970d00-29b2-4b90-a294-e790c89e452e", - "method": "GET", - "status": 500, - "clientMs": 30, - "bytes": 26, - "route": "/api/admin/users", - "serverMs": 4, - "firstByteMs": 4.215156, - "stagesMs": {} - }, - { - "requestID": "0df438bd-93ea-49e1-96b9-78ee7d5238dd", - "method": "GET", - "status": 500, - "clientMs": 29, - "bytes": 26, - "route": "/api/admin/conferences", - "serverMs": 5, - "firstByteMs": 4.557615, - "stagesMs": {} - }, - { - "requestID": "01e47fd5-3386-45f6-9900-8326a2385c97", - "method": "GET", - "status": 200, - "clientMs": 37, - "bytes": 99, - "route": "/api/admin/users", - "serverMs": 10, - "firstByteMs": 9.678075, - "stagesMs": {} - }, - { - "requestID": "e1a6bd33-a794-4907-be01-2d1c2de9bd64", - "method": "GET", - "status": 200, - "clientMs": 54, - "bytes": 553, - "route": "/api/admin/users", - "serverMs": 11, - "firstByteMs": 10.562782, - "stagesMs": {} - }, - { - "requestID": "22bdd83c-ea8a-4313-9351-0351c3dd7894", - "method": "GET", - "status": 500, - "clientMs": 29, - "bytes": 26, - "route": "/api/admin/users", - "serverMs": 5, - "firstByteMs": 5.152448, - "stagesMs": {} - }, - { - "requestID": "2c26dce8-ad60-4f39-bde5-7f85c775705a", - "method": "GET", - "status": 500, - "clientMs": 40, - "bytes": 26, - "route": "/api/admin/users", - "serverMs": 6, - "firstByteMs": 6.312825, - "stagesMs": {} - }, - { - "requestID": "11c0b94d-5565-4a25-984a-9c8c72c36eb3", - "method": "GET", - "status": 500, - "clientMs": 67, - "bytes": 26, - "route": "/api/admin/repos", - "serverMs": 6, - "firstByteMs": 5.589142, - "stagesMs": {} - }, - { - "requestID": "fcf1acd5-4769-4262-bfda-f7e0276f7d72", - "method": "GET", - "status": 500, - "clientMs": 65, - "bytes": 26, - "route": "/api/admin/repos", - "serverMs": 5, - "firstByteMs": 5.133242, - "stagesMs": {} - }, - { - "requestID": "3fca5ba4-45ca-4ffa-ae32-abf99faaed8b", - "method": "GET", - "status": 200, - "clientMs": 49, - "bytes": 11927, - "route": "/api/admin/repos", - "serverMs": 14, - "firstByteMs": 12.011895, - "stagesMs": {} - }, - { - "requestID": "3c9e6b32-bdd3-4ff3-adf0-0cb503d82d87", - "method": "GET", - "status": 200, - "clientMs": 35, - "bytes": 156, - "route": "/api/admin/repos", - "serverMs": 8, - "firstByteMs": 8.393862, - "stagesMs": {} - }, - { - "requestID": "e0c7822f-933f-4014-865c-799ede021f1b", - "method": "GET", - "status": 500, - "clientMs": 32, - "bytes": 26, - "route": "/api/admin/repos", - "serverMs": 5, - "firstByteMs": 4.562313, - "stagesMs": {} - }, - { - "requestID": "c7ff36fd-9a53-42c4-980a-dff82e75a411", - "method": "GET", - "status": 200, - "clientMs": 68, - "bytes": 458, - "route": "/api/admin/users", - "serverMs": 10, - "firstByteMs": 10.429787, - "stagesMs": {} - }, - { - "requestID": "98b524a6-8f2c-49a2-91dd-c0beb8d51f9a", - "method": "GET", - "status": 200, - "clientMs": 37, - "bytes": 129, - "route": "/api/admin/users", - "serverMs": 9, - "firstByteMs": 9.292467, - "stagesMs": {} - }, - { - "requestID": "b0aa2758-d009-44d2-b761-f614fbc8d263", - "method": "GET", - "status": 500, - "clientMs": 32, - "bytes": 26, - "route": "/api/admin/users", - "serverMs": 6, - "firstByteMs": 5.643018, - "stagesMs": {} - }, - { - "requestID": "151f1d2e-148b-4d79-a82e-53cadc2d231f", - "method": "GET", - "status": 200, - "clientMs": 45, - "bytes": 138, - "route": "/api/admin/conferences", - "serverMs": 9, - "firstByteMs": 9.443309, - "stagesMs": {} - }, - { - "requestID": "d6065972-0d1a-40f3-8610-73de2a272ac6", - "method": "GET", - "status": 200, - "clientMs": 36, - "bytes": 138, - "route": "/api/admin/conferences", - "serverMs": 10, - "firstByteMs": 9.63806, - "stagesMs": {} - }, - { - "requestID": "66e56d44-cd86-49ad-a12d-bccea84caa22", - "method": "GET", - "status": 500, - "clientMs": 33, - "bytes": 26, - "route": "/api/admin/conferences", - "serverMs": 6, - "firstByteMs": 6.30152, - "stagesMs": {} - }, - { - "requestID": "e6f081ab-acc3-4c47-b32d-7940f5aae728", - "method": "GET", - "status": 200, - "clientMs": 627, - "bytes": 288, - "route": "/github/connections", - "serverMs": 589, - "firstByteMs": 588.976658, - "stagesMs": {} - }, - { - "requestID": "f235ebc9-6658-4290-921e-c4ef54ab5a78", - "method": "POST", - "status": 200, - "clientMs": 57, - "bytes": 186, - "route": "/api/admin/tokens", - "serverMs": 7, - "firstByteMs": 7.350901, - "stagesMs": {} - }, - { - "requestID": "d4651266-bc4e-4040-99e4-fc0f20a9df19", - "method": "GET", - "status": 200, - "clientMs": 30, - "bytes": 100, - "route": "/api/user", - "serverMs": 5, - "firstByteMs": 5.07563, - "stagesMs": {} - }, - { - "requestID": "c456d9f7-e29c-4ab1-9894-14f66eed1f7e", - "method": "DELETE", - "status": 200, - "clientMs": 31, - "bytes": 13, - "route": "/api/admin/tokens/:id", - "serverMs": 7, - "firstByteMs": 6.592977, - "stagesMs": {} - }, - { - "requestID": "39110bc5-d8f6-4482-9c26-c7157d51bf75", - "method": "GET", - "status": 401, - "clientMs": 38, - "bytes": 25, - "route": "/api/user", - "serverMs": 3, - "firstByteMs": 2.754929, - "stagesMs": {} - }, - { - "requestID": "86f2d9a3-b237-4fea-9e85-03a3213d7e81", - "method": "POST", - "status": 200, - "clientMs": 39, - "bytes": 33, - "route": "/github/login-token", - "serverMs": 6, - "firstByteMs": 6.224725, - "stagesMs": {} - }, - { - "requestID": "e153eb2a-0d60-48dc-901b-11e44f70c1a1", - "method": "GET", - "status": 200, - "clientMs": 30, - "bytes": 100, - "route": "/api/user", - "serverMs": 3, - "firstByteMs": 2.500696, - "stagesMs": {} - }, - { - "requestID": "05ebed36-ebfe-4b66-b1c7-bf29723af1d1", - "method": "GET", - "status": 302, - "clientMs": 31, - "bytes": 24, - "route": "/api/user/logout", - "serverMs": 3, - "firstByteMs": 3.239774, - "stagesMs": {} - }, - { - "requestID": "4b484598-1145-472f-8856-fa1932ad50a7", - "method": "GET", - "status": 401, - "clientMs": 52, - "bytes": 25, - "route": "/api/user", - "serverMs": 1, - "firstByteMs": 1.291175, - "stagesMs": {} - }, - { - "requestID": "0e7fcf71-954f-41ac-b305-f6d9f55bab50", - "method": "POST", - "status": 200, - "clientMs": 33, - "bytes": 26, - "route": "/api/anonymize-preview", - "serverMs": 5, - "firstByteMs": 4.821226, - "stagesMs": {} - }, - { - "requestID": "e5977dc2-c381-41a3-b742-d816e86d9525", - "method": "GET", - "status": 200, - "clientMs": 4279, - "bytes": 230, - "route": "/api/providers/:provider/repository/metadata", - "serverMs": 4247, - "firstByteMs": 4246.978387, - "stagesMs": {} - }, - { - "requestID": "e3a6acb7-a766-4dd6-8a8d-4fb4d2832eac", - "method": "GET", - "status": 200, - "clientMs": 3781, - "bytes": 2623, - "route": "/api/providers/:provider/repository/branches", - "serverMs": 3687, - "firstByteMs": 3685.454239, - "stagesMs": {} - }, - { - "requestID": "7e349c40-0052-4b5c-9dbe-d602d87d7c5f", - "method": "GET", - "status": 200, - "clientMs": 3350, - "bytes": 2303, - "route": "/api/providers/:provider/repository/readme", - "serverMs": 3284, - "firstByteMs": 3281.912559, - "stagesMs": {} - }, - { - "requestID": "8a0face9-6a42-4c66-9572-8e8a20ce3706", - "method": "POST", - "status": 200, - "clientMs": 4230, - "bytes": 22, - "route": "/api/repo", - "serverMs": 4166, - "firstByteMs": 4166.255153, - "stagesMs": {} - }, - { - "requestID": "9c2b00ab-2db0-4531-ba96-f53a7a9aadcd", - "method": "GET", - "status": 200, - "clientMs": 78, - "bytes": 510, - "route": "/api/repo/:id", - "serverMs": 8, - "firstByteMs": 8.238342, - "stagesMs": { - "repository": 1.565559 - } - }, - { - "requestID": "cd14d8fc-0c62-4cb4-9145-fe7d7f4eeb87", - "method": "GET", - "status": 200, - "clientMs": 72, - "bytes": 510, - "route": "/api/repo/:id", - "serverMs": 18, - "firstByteMs": 18.268676, - "stagesMs": { - "repository": 1.814296 - } - }, - { - "requestID": "b985ca63-67ea-455a-a956-c557a5764be1", - "method": "GET", - "status": 200, - "clientMs": 2544, - "bytes": 1074, - "route": "/api/repo/:id/file/*path", - "serverMs": 2496, - "firstByteMs": 2493.035905, - "stagesMs": { - "anonymize": 23.396752, - "authorization": 2325.4652199999996, - "cache_fill": 109.392715, - "cache_lookup": 12.924527, - "repository": 2.66209, - "worker_wait": 0.031129999999999998 - } - }, - { - "requestID": "69741714-d825-4beb-9b94-a8aea256cd8d", - "method": "GET", - "status": 200, - "clientMs": 61, - "bytes": 170, - "route": "/api/repo/:id/files", - "serverMs": 8, - "firstByteMs": 7.569927, - "stagesMs": { - "repository": 2.480198 - } - }, - { - "requestID": "94e2d47c-6cb1-4756-b8ae-5319314abf18", - "method": "GET", - "status": 200, - "clientMs": 10128, - "bytes": 7166, - "route": "/api/repo/:id/zip", - "serverMs": 10080, - "firstByteMs": 8174.262565, - "stagesMs": { - "anonymize": 103.71942999999999, - "authorization": 9768.826008999999, - "cache_fill": 162.721428, - "cache_lookup": 11.706307999999998, - "repository": 2.720955, - "worker_wait": 0.101898 - } - }, - { - "requestID": "e14ba84b-68aa-4fed-b486-f1dde0ec8420", - "method": "GET", - "status": 200, - "clientMs": 214, - "bytes": 30370, - "route": "/api/admin/performance", - "serverMs": 58, - "firstByteMs": 54.596057, - "stagesMs": {} - }, - { - "requestID": "127ca853-db96-4354-8048-5c4c4e0234e3", - "method": "GET", - "status": 401, - "clientMs": 33, - "bytes": 25, - "route": "/api/user", - "serverMs": 3, - "firstByteMs": 3.065324, - "stagesMs": {} - }, - { - "requestID": "0d5dfbba-6983-4940-960e-09e23261b2d7", - "method": "DELETE", - "status": 200, - "clientMs": 61, - "bytes": 21, - "route": "/api/repo/:id", - "serverMs": 11, - "firstByteMs": 10.795229, - "stagesMs": { - "repository": 1.683898 - } - }, - { - "requestID": "8ef7034b-4739-4d43-b693-a9dfc4f9fa91", - "method": "GET", - "status": 200, - "clientMs": 58, - "bytes": 560, - "route": "/api/repo/:id", - "serverMs": 6, - "firstByteMs": 6.348339, - "stagesMs": { - "repository": 1.520779 - } - }, - { - "requestID": "20d2f0ea-8c53-4180-ab36-7b2677683f72", - "method": "GET", - "status": 200, - "clientMs": 57, - "bytes": 559, - "route": "/api/repo/:id", - "serverMs": 6, - "firstByteMs": 6.151317, - "stagesMs": { - "repository": 1.570502 - } - }, - { - "requestID": "688533a3-4c1e-4ecb-8d24-5e75c8919a17", - "method": "GET", - "status": 410, - "clientMs": 46, - "bytes": 30, - "route": "/api/repo/:id/file/*path", - "serverMs": 3, - "firstByteMs": 3.359263, - "stagesMs": { - "repository": 2.326311 - } - }, - { - "requestID": "cc5293ce-7327-40e4-8d47-4f3bb9bf19fe", - "method": "GET", - "status": 401, - "clientMs": 87, - "bytes": 25, - "route": "/api/user", - "serverMs": 6, - "firstByteMs": 5.555324, - "stagesMs": {} - } - ], - "recommendations": [ - { - "priority": 1, - "area": "Repeated content authorization", - "evidence": "File authorization 2325/2496 ms; ZIP authorization 9769/10080 ms. blob, cache-open/fill, and per-file ZIP paths repeat adapter authorization.", - "proposal": "Instrument upstream operation counts, then consolidate duplicate checks within a single content operation. Retain checks after cache waits and before publication, credential/install revision invalidation, and denial on revocation. Do not introduce a broad positive authorization TTL.", - "sources": [ - "backend/internal/server/files.go:53", - "backend/internal/server/files.go:296", - "backend/internal/server/content_cache.go:94", - "backend/internal/server/shared_cache.go:112", - "backend/internal/server/github.go:292" - ] - }, - { - "priority": 2, - "area": "Preview connection discovery", - "evidence": "Metadata 4247 ms, branches 3687 ms, readme 3284 ms. Each preview connects again; App connection lists installations and selected repositories before token/identity checks.", - "proposal": "Reuse verified discovery within a combined preview operation or coalesce identical in-flight discovery with owner/credential/repository scoping. Preserve live access verification and stable repository ID checks. Frontend already overlaps metadata/readme, so do not treat their serial test sum as browser latency.", - "sources": [ - "backend/internal/server/provider_preview.go:88", - "backend/internal/server/github.go:441", - "public/script/app.js:1484" - ] - }, - { - "priority": 3, - "area": "ZIP per-file work", - "evidence": "7 KB ZIP took 10080 ms; first byte at 8174 ms, anonymization 104 ms. ZIP walks files serially.", - "proposal": "After authorization consolidation, evaluate bounded prefetch/transform concurrency while keeping ZIP writes ordered, memory bounded, and per-entry revision/revocation safeguards. Avoid merely flushing headers to improve the first-byte metric.", - "sources": [ - "backend/internal/server/files.go:302" - ] - }, - { - "priority": 4, - "area": "Trace coverage", - "evidence": "Preview and creation requests have no stage timings; authorization aggregates do not split provider HTTP, DB, or credential work.", - "proposal": "Add low-cardinality provider operation counts/durations and connect/authorize/metadata stages, excluding tokens, raw URLs and repository names. Use repeated warm/cold samples and large/private fixtures before claiming a speedup." - } - ], - "productionChanged": false, - "runtimeChanged": false -} \ No newline at end of file diff --git a/backend/reports/compatibility-audit.json b/backend/reports/compatibility-audit.json deleted file mode 100644 index 890a54f..0000000 --- a/backend/reports/compatibility-audit.json +++ /dev/null @@ -1,2280 +0,0 @@ -{ - "verifiedAt": "2026-11-03T15:57:43.150713+00:00", - "source": { - "sha256": "d7650120d6f420d1f9eece666e2dcc309214858ccef4902cd591859813101558", - "fileCount": 1309, - "roots": [ - "backend/cmd", - "backend/internal", - "backend/contracts", - "backend/scripts", - "src", - "public" - ], - "additionalFiles": [ - "backend/go.mod", - "backend/go.sum", - "package.json", - "package-lock.json", - "Dockerfile", - "docker-compose.yml", - ".github/workflows/go-backend.yml" - ], - "algorithm": "SHA-256 over sorted relative UTF-8 path, NUL, file bytes, NUL" - }, - "status": "implementation_verified_production_cutover_unverified", - "checks": { - "typescriptContracts": { - "commands": [ - "node backend/contracts/routes.cjs --check", - "node backend/contracts/cache-metrics.cjs --check", - "node backend/contracts/cache-report-state.cjs --check", - "node backend/contracts/readme-decoding.cjs --check", - "node backend/contracts/compression.cjs --check", - "node backend/contracts/json-http.cjs --check", - "node backend/contracts/differential.cjs", - "node backend/contracts/file-types.cjs", - "node backend/contracts/resources.cjs --check", - "node backend/contracts/validation.cjs --check", - "node backend/contracts/options.cjs --check", - "node backend/contracts/dates.cjs --check", - "node backend/contracts/reactivation.cjs --check", - "node backend/contracts/oauth-tokens.cjs --check", - "node backend/contracts/oauth-profile.cjs --check", - "node backend/contracts/github-responses.cjs --check", - "node backend/contracts/github-quota.cjs --check", - "node backend/contracts/worker-queues.cjs --check", - "node backend/contracts/blob-index.cjs --check", - "node backend/contracts/content-verification.cjs --check", - "node backend/contracts/legacy-source-paths.cjs --check", - "node backend/contracts/shared-result-key.cjs --check", - "node backend/contracts/shared-http.cjs --check", - "node backend/contracts/file-metadata.cjs --check", - "node backend/contracts/download-headers.cjs --check", - "node backend/contracts/github-pagination.cjs --check", - "node backend/contracts/conferences.cjs --check", - "node backend/contracts/conference-output.cjs --check", - "node backend/contracts/conference-options.cjs --check", - "node backend/contracts/admin-filters.cjs --check", - "node backend/contracts/admin-pagination.cjs --check", - "node backend/contracts/admin-csv.cjs --check", - "node backend/contracts/user-membership.cjs --check", - "node backend/contracts/admin-user.cjs --check", - "node backend/contracts/user-defaults.cjs --check", - "node backend/contracts/quota.cjs --check", - "node backend/contracts/token-names.cjs --check", - "node backend/contracts/project-names.cjs --check", - "node backend/contracts/dashboard-cursors.cjs --check", - "node backend/contracts/dashboard-limits.cjs --check", - "node backend/contracts/dashboard-cursor-output.cjs --check", - "node backend/contracts/dashboard-filters.cjs --check", - "node backend/contracts/dashboard-pipeline.cjs --check", - "node backend/contracts/document-cleanup.cjs --check", - "node backend/contracts/webhook-http.cjs --check" - ], - "passed": 45, - "logSHA256": "06f5784b52489785eff604d3e194cf6748e1f68273671cdac1399f7c1113d65e" - }, - "raceIntegration": { - "command": "GO_BINARY=/tmp/anonymous-go-investigation/go/bin/go backend/scripts/test-integration.sh", - "packages": [ - "ok \tgithub.com/tdurieux/anonymous_github/backend/cmd/server\t2.865s", - "ok \tgithub.com/tdurieux/anonymous_github/backend/internal/anonymize\t2.343s", - "ok \tgithub.com/tdurieux/anonymous_github/backend/internal/blobcache\t97.351s", - "ok \tgithub.com/tdurieux/anonymous_github/backend/internal/provider\t1.047s", - "ok \tgithub.com/tdurieux/anonymous_github/backend/internal/quotagate\t1.330s", - "ok \tgithub.com/tdurieux/anonymous_github/backend/internal/security\t1.053s", - "ok \tgithub.com/tdurieux/anonymous_github/backend/internal/server\t238.256s", - "ok \tgithub.com/tdurieux/anonymous_github/backend/internal/storage\t1.301s" - ], - "logSHA256": "55df09ea956bec92b423b9f6ea4fc3c8f8176a1968915f20b8c80285e54a380d", - "disposableInfrastructureCleanedUp": true - }, - "staticChecks": { - "goVet": "passed", - "gofmt": "no unformatted files" - }, - "vulnerabilities": { - "reachable": 0, - "importedPackages": 0, - "requiredModulesOnly": 4, - "tool": "golang.org/x/vuln/cmd/govulncheck@v1.9.0" - }, - "nodeRollback": { - "image": "anonymous-github-node:rollback-test", - "imageID": "sha256:2a2a5e0bd3db936d00c797590c1aef9554e798c23ad59dfdb7ad074ed3bbe0f8", - "result": "passed", - "command": "docker run --rm --network none -i --entrypoint node anonymous-github-node:rollback-test < backend/scripts/test-node-rollback.cjs", - "coverage": [ - "image builds with current TypeScript and asset sources", - "native Zstandard compression/decompression", - "native SQLite insert/query" - ], - "fix": "Use Debian Node 22 runtime to match the native dependencies installed on Debian; Alpine failed to load the musl Zstandard module.", - "filesSHA256": { - "Dockerfile.node": "ca89aa8065e6f97060c9e015465ce0d6f987af2b0faf1aa50a767ae4a08aa01f", - "backend/scripts/test-node-rollback.cjs": "376cdbf9cf6d2f7b71a63a1a22863a346a34f01d30fbfaa6fbc7e0a3b40b8e40", - ".github/workflows/go-backend.yml": "68b198f524cf284e9bbf7b59ccb85f7108beb42969190a0357ab20073394c94b" - }, - "fullApplicationCutoverRehearsed": false - } - }, - "providerEvidence": { - "interface": "internal/provider/provider.go", - "nonGitHubFixture": "internal/server/provider_integration_test.go", - "coverage": [ - "nested namespaces and opaque identities/revisions", - "repository and document lifecycle", - "authorization and revocation", - "cache isolation and publication", - "source previews and reconnect", - "wrapped error categories and rate-limit reset", - "file output and provider self-link anonymization", - "optional per-file metadata recovery with revision-safe retry", - "optional partial-tree metadata, large imports and truncated-folder output" - ], - "liveThirdPartyAdapterTested": false - }, - "limits": [ - "Contracts check the enumerated fixtures, not all possible inputs.", - "GitHub App protocol tests mock upstream HTTP; S3 tests use a protocol fixture.", - "Legacy OAuth and GitHub App beta authorization, live public repository imports, API-key/session lifecycle, exact selected file and ZIP entry content, removal and installation webhook reconciliation are verified. Private repository access, live revocation/suspension transitions and full browser workflows remain unverified.", - "Restore, offline queue handoff and rollback must be rehearsed with the target deployment data. The beta database is isolated and contains no production snapshot.", - "Performance results cover the recorded workloads and hardware, not production traffic." - ], - "sourceSnapshotNote": "The original source fingerprint identifies the complete TypeScript-contract and race run. postAuditFixes records subsequent admin overview fixes; postAuditFullIntegration identifies the complete race/integration rerun after those fixes. Staging evidence references current live-check reports. Production-data cutover remains unverified. requestTraceParity identifies the later full race/integration run and live request-ID/log-correlation checks. errorMonitoringParity identifies the subsequent full race run, extracted TypeScript error contracts and live beta error-report checks. queueMetricParity identifies the queue-only correction, targeted race/integration tests and live chart checks. queueOverviewParity identifies worker/overview field fixes, targeted race tests and live checks. adminHistoryParity identifies fresh admin-history and UTC merge fixes with extracted contracts and live checks. publicStatisticsCacheParity records the subsequent complete 49-command contract and full backend race run, beta image and live public-statistics checks. statisticsQueryParity records subsequent public-history query parsing and row-limit corrections, focused race tests and live beta checks. dashboardQueryParity records the subsequent dashboard type-preserving query correction, 186 complete pipeline fixtures, focused race tests and live beta checks. oauthQueryParity records strict authorization query-shape checks, focused race tests and live rejection/replay validation. oauthPendingFlowParity records atomic session/provider flow replacement and consumption, a complete 50-command contract run, full backend race suite and eight beta lifecycle checks through the local TLS proxy. gatesAndMonitoringQueryParity records disabled callback gating and monitoring numeric query corrections with focused race/integration and public-DNS beta checks. queueAndErrorQueryParity records queue/error-log query corrections, 29 extracted TypeScript fixtures, focused race/integration tests and live beta checks. fileAndRefreshQueryParity records file download and provider refresh flag semantics, 53 query fixtures, 115 actual TypeScript header fixtures, focused race tests and read-only beta HEAD checks. previewBindingQueryParity records typed saved-resource/connection selection, 17 extracted fixtures, provider binding race tests and live malformed-choice rejection.", - "stagingEvidence": { - "reviewedAt": "2026-11-03T12:15:18.010Z", - "reports": [ - { - "file": "backend/reports/shadow-beta-deployment.json", - "sha256": "786f02b10d77fbf64df8b5a1c7bcdc12b95d54aeb05dedc8f1c54ece10cb3a9b" - }, - { - "file": "backend/reports/shadow-authenticated-deployment.json", - "sha256": "34fde1545979e81623387ea86707482d52aee4a3d5931804084ed4e62cf9f282" - }, - { - "file": "backend/reports/shadow-app-authenticated-deployment.json", - "sha256": "cc0b4e1a23dcf7b2abedb2d0239ee412a085947032753645902ebbbcd78c9349" - }, - { - "file": "backend/reports/shadow-app-deployment.json", - "sha256": "b2ecc5c2bac07f00af0a658d10e9f70bb0c416aae9541114f18385f786142112" - }, - { - "file": "backend/reports/shadow-browser-validation.json", - "sha256": "fece078daf7400db9450a6aa1eb097aeca9ba61855aa909b7cc2d03d7aef11b5" - } - ], - "legacyOAuth": { - "userReportedAuthorization": true, - "activeGitHubAccountObserved": true, - "liveGitHubImport": true - }, - "authenticatedRequests": 37, - "apiKeyLifecycle": "passed", - "sessionLoginLogout": "passed", - "exactZipContents": "passed", - "isolatedDatabase": true, - "productionDataImported": false, - "productionChanged": false, - "githubApp": { - "callback": true, - "explicitAppRepositoryLifecycle": true, - "installationWebhookReconciled": true - } - }, - "postAuditFixes": [ - { - "date": "2026-11-03T12:19:49.222Z", - "issue": "Admin browser CPU, memory and disk cards had missing system fields", - "fix": "Linux host measurements and process RSS supplied using existing browser contract", - "validation": "Focused unit and race test, rebuilt beta, authenticated browser rendering", - "evidence": "backend/reports/shadow-browser-validation.json" - }, - { - "date": "2026-11-03T12:26:25.521Z", - "issue": "Admin overview omitted activeRepos24h, newRepos24h and newUsers24h", - "fix": "Rolling 24-hour counts match TypeScript timestamp filters across statuses", - "validation": "Disposable database regression, complete race/integration suite and live beta overview contract" - } - ], - "postAuditFullIntegration": { - "verifiedAt": "2026-11-03T12:26:25.522Z", - "command": "GO_BINARY=/tmp/anonymous-go-investigation/go/bin/go backend/scripts/test-integration.sh", - "packages": [ - "ok \tgithub.com/tdurieux/anonymous_github/backend/cmd/server\t2.828s", - "ok \tgithub.com/tdurieux/anonymous_github/backend/internal/anonymize\t2.337s", - "ok \tgithub.com/tdurieux/anonymous_github/backend/internal/blobcache\t97.724s", - "ok \tgithub.com/tdurieux/anonymous_github/backend/internal/provider\t1.042s", - "ok \tgithub.com/tdurieux/anonymous_github/backend/internal/quotagate\t1.276s", - "ok \tgithub.com/tdurieux/anonymous_github/backend/internal/security\t1.045s", - "ok \tgithub.com/tdurieux/anonymous_github/backend/internal/server\t239.478s", - "ok \tgithub.com/tdurieux/anonymous_github/backend/internal/storage\t1.315s" - ], - "logSHA256": "ae341e61b1fc54959bc80e5fef802b261e853bd6b9334320fb117c5c93a04282", - "goSourceSHA256": "69859db3f805e7b8604e4ab148c37b6d73759e00dd57c69b28c6dbf3d757fe13", - "goSourceFileCount": 335, - "sourceRoots": [ - "backend/cmd", - "backend/internal", - "backend/go.mod", - "backend/go.sum" - ], - "disposableInfrastructureCleanedUp": true - }, - "performanceMonitoringWork": { - "status": "verified_and_deployed_to_beta", - "deployed": true, - "focusedRaceIntegration": { - "command": "GO_BINARY=/tmp/anonymous-go-investigation/go/bin/go backend/scripts/test-integration.sh -run 'TestRequestMetric|TestBackendIntegration/request_performance_history'", - "result": "passed", - "logSHA256": "47977fb1c128e90c7ca19a60f35ce09f2ad2b9b997bd969aa278d7769feac29c" - }, - "limits": [ - "Stages measure elapsed time and can overlap; they are not additive CPU measurements.", - "Worker slot and memory admission waits are separate samples.", - "Go has no event-loop or separate streamer-header measurement.", - "Live workload was a smoke test, not a production load benchmark." - ], - "processSamples": { - "verifiedAt": "2026-11-03T12:38:33.902Z", - "focusedRaceIntegration": { - "file": "/tmp/go-process-metrics-tests.log", - "sha256": "74e70eb5b5c23d90c998bc7cddb6352e4c0675b081f6ac322ecacc322a1c368c" - }, - "existingUI": { - "passed": 159, - "log": { - "file": "/tmp/go-process-metrics-ui-tests.log", - "sha256": "b95bf254c267b41deea2fa38b662dfa30c6e678f9eb7b74012839b1560defe45" - } - }, - "focusedUI": { - "passed": 3, - "includesNewGoNullMetricsCase": true, - "log": { - "file": "/tmp/go-process-metrics-ui-focused.log", - "sha256": "be828ab189603a0704d15c3a432b4ac13f08dec4f470fbf5860ada876c2cafc9" - } - } - }, - "verifiedAt": "2026-11-03T12:52:06.493343+00:00", - "fullRaceIntegration": { - "result": "passed", - "command": "GO_BINARY=/tmp/anonymous-go-investigation/go/bin/go backend/scripts/test-integration.sh", - "log": { - "file": "/tmp/go-performance-parity-integration.log", - "sha256": "dc51770e32920f855065cfa224e8df323638695008363edd1b03bb1035a6ed87" - } - }, - "cacheStageTest": { - "result": "passed", - "log": { - "file": "/tmp/go-stage-cache-tests.log", - "sha256": "f78538b319072f158958556fc096e43c99b6601f5e7cc87d5c2a89618e1b47de" - } - }, - "ui": { - "passed": 160, - "log": { - "file": "/tmp/go-performance-parity-ui.log", - "sha256": "f3e1fc34deedeceb65964ea8b4cfc9ae32082dec8d23d7da7cf4e3faac14a495" - } - }, - "liveReports": [ - { - "file": "backend/reports/shadow-app-authenticated-deployment.json", - "sha256": "e5737ffa01f1e6be553f1bf485b0fb8ac62e3027be5b3f22caa8b53258a4ec37" - }, - { - "file": "backend/reports/shadow-authenticated-deployment.json", - "sha256": "3b4fdbbb995b0b4d5d8152bf0e72243f529d6391ca12d554d2bd66d122912693" - }, - { - "file": "backend/reports/shadow-performance-browser-validation.json", - "sha256": "540f8208e16b71fda947d2a8c53e8b911ae7b36a0aa8c23a570cf96d1d36b5df" - } - ], - "goSourceSHA256": "69163d8df201ca688f2a88b54e480aa13285041172fc3e5ac4b8aa14c66f38ed" - }, - "remainingCodeParityFindings": [ - { - "area": "admin error monitoring", - "observedAt": "2026-11-03T12:56:23.308614+00:00", - "status": "resolved", - "evidence": [ - "src/core/logger.ts: ERROR_LOG_MAX=5000; Go adminErrors advertises 2000 and recordError retains 2000", - "TypeScript persists warning entries and hourly level/module counters; Go recordError only persists server errors", - "Go completion warnings currently go to the process logger, not the admin Redis error ring" - ], - "resolutionEvidence": "errorMonitoringParity" - }, - { - "area": "queue metric history", - "status": "resolved", - "evidence": [ - "TypeScript selects named ranges and echoes a string; Go previously parsed the range as an integer." - ], - "resolutionEvidence": "queueMetricParity" - }, - { - "area": "queue overview", - "status": "resolved", - "evidence": [ - "Go omitted workers, concurrency, completed24h, failed24h and delayed job availability." - ], - "resolutionEvidence": "queueOverviewParity" - }, - { - "area": "admin activity history", - "status": "resolved", - "resolutionEvidence": "adminHistoryParity" - }, - { - "area": "public statistics cache and history window", - "status": "resolved", - "evidence": [ - "backend/internal/server/stats.go returns Redis SET failures to callers; TypeScript getCurrentStats catches cache-write failures.", - "TypeScript has a one-entry current-statistics cache and a bounded 16-entry history cache; Go currently relies on Redis for current totals and rebuilds history on each request.", - "Go public history uses pageInt; TypeScript parses integer prefixes and clamps negative day counts to one." - ], - "resolutionEvidence": [ - "publicStatisticsCacheParity", - "statisticsQueryParity" - ] - }, - { - "area": "Express extended query parameters", - "status": "resolved", - "resolutionEvidence": [ - "statisticsQueryParity", - "dashboardQueryParity", - "oauthQueryParity", - "gatesAndMonitoringQueryParity", - "queueAndErrorQueryParity", - "fileAndRefreshQueryParity", - "previewBindingQueryParity", - "fileSearchQueryParity", - "folderListingParity", - "previewCacheIDQueryParity", - "previewBranchQueryParity", - "legacyUserSearchQueryParity", - "adminListPaginationQueryParity", - "adminFilterQueryParity", - "previewBranchDiscoveryOrderParity", - "adminMongooseCastingParity", - "adminDateRangeParity", - "dashboardDateCursorParity", - "documentPreviewConnectionQuery" - ], - "historicalEvidence": [ - "TypeScript configures Express extended query parsing; Go uses net/url.Values. Bracket arrays, indexed arrays and mixed scalar/object parameters differ.", - "backend/reports/statistics-query-parser-gaps.json records eleven actual Express examples.", - "src/server/routes/github-app.ts validates typeof state/code === string; backend/internal/server/auth.go and installation_target.go currently inspect only plain query keys." - ], - "currentEvidence": [ - "The recorded admin and dashboard date-query gaps are covered by adminDateRangeParity and dashboardDateCursorParity. The cache-ID operator-object rejection remains an intentional stricter boundary.", - "Final direct URL.Query audit found document connection choice bypass; now fixed. Remaining incoming plain reads are provider-specific name extensions. Outgoing reads construct redirects or validate upstream pagination." - ], - "clarifications": [ - "TypeScript preview names are path parameters. Go generic provider name queries are extensions, not missing TypeScript query behavior." - ] - }, - { - "area": "Statistics history row truncation", - "status": "resolved", - "evidence": [ - "Go statsHistory caps MongoDB results at 366 rows; TypeScript getStatsHistory returns every matching row. Duplicate or future-dated snapshots can exceed the Go cap." - ], - "resolutionEvidence": "statisticsQueryParity" - }, - { - "area": "OAuth pending-flow lifecycle", - "status": "resolved", - "evidence": [ - "TypeScript stores one githubAppFlow per session and deletes it before validating callback state.", - "Go stores each OAuth flow in Redis under its state and consumes the plain state query key." - ], - "resolutionEvidence": [ - "oauthPendingFlowParity", - "gatesAndMonitoringQueryParity" - ] - }, - { - "area": "large file tree row truncation", - "status": "resolved", - "evidence": [ - "Go files handler previously read at most 100000 rows; TypeScript file queries have no equivalent cap." - ], - "resolutionEvidence": "largeFileTreeScanParity" - }, - { - "area": "file-content path index", - "status": "resolved", - "resolutionEvidence": [ - "contentPathLookupParity", - "pathSnapshotParity", - "truncatedFileRecoveryParity", - "pendingMetadataMaintenanceParity", - "partialTreeImportParity", - "folderPathEdgeParity", - "streamingPathIndex", - "pathIndexEvictionRecovery", - "pendingMetadataPathIndex" - ], - "historicalEvidence": [ - "backend/internal/server/pathindex.go buildPathIndex still limits file rows to 100000 and excludes directory rows.", - "Go indexedFile rejects transformed path collisions with 409; TypeScript AnonymizedFile first tries original paths, then selects a transformed match ordered by original path/name.", - "Go path index key and retirement behavior must be checked against TypeScript fileMetadataRevision and pathIndexKey lifecycle." - ], - "currentEvidence": [ - "Go now streams the path index to Redis in ownership-checked HSETNX batches; the total 32 MiB map guard and fixed 45-second deadline are removed.", - "Staging sequence checks reject a missing temporary hash, request cancellation cleans up staging, and publication still validates repository revisions and lock ownership.", - "Redis storage and 10-minute cache expiry remain architectural differences, not requirements to copy TypeScript internals.", - "Published index eviction is now distinguished atomically from an absent file; one rebuild is allowed, with 503 on repeated eviction and revision checks before genuine misses.", - "Writer review: jobs.go publishes a new treeGeneration under treePublicationFilter; refresh.go changes generation/commit; completeRecoveredMetadata updates fileMetadataRevision under pathSnapshotFilter; removal deletes captured row IDs while inactive status prevents index reads.", - "Pending recovery rows now validate provenance before indexing; valid recovery rebuilds under a new revision, while stale snapshots return 409. Regression cases failed before the fix and pass afterward." - ] - }, - { - "area": "Date coercion and presence in remaining consumers", - "status": "resolved", - "currentEvidence": [ - "Conference form and option casting are covered by 121 validation, 54 persistence and 58 option contracts.", - "Conference billing now passes 288 actual TypeScript output cases, including year 0001 end/removal dates; targeted race HTTP/database tests pass for expiry/removal with year 0001 and epoch closed memberships.", - "API token validity now distinguishes an absent expiry from a stored zero-time date; the full race suite and beta deployment checks passed.", - "Repository/gist/PR valid expiration inputs now use shared JavaScript Date construction, covered by 126 actual TypeScript/Mongoose option contracts and second-provider HTTP/database tests.", - "Shared resource access and list expiration enforce stored year-0001 and epoch dates for all three kinds.", - "TypeScript invalid-option create/edit divergence was confirmed with actual route helpers, Mongoose writes and handleError. Per user clarification, Go intentionally rejects invalid options atomically rather than reproducing partial writes or 500 responses.", - "storedDatePresence addresses the recorded persisted IsZero consumers and latest timestamp selection; targeted race tests and beta checks pass. Remaining zero checks are classified in query-consumer-audit.json.", - "Final full backend race suite and all 64 CI contract commands passed. Remaining sentinel uses are classified in query-consumer-audit.json." - ], - "resolutionEvidence": [ - "conferenceBoundaryDateParity", - "resourceOptionAtomicity", - "storedDatePresence", - "completionAudit" - ] - } - ], - "requestTraceParity": { - "verifiedAt": "2026-11-03T13:00:55.723448+00:00", - "status": "verified_and_deployed_to_beta", - "sourceSHA256": "8f531fe1499460bef2ddc0ab0fc3dea3c0105ba78fb2fbd2fad63021f8416836", - "checks": { - "focusedRace": { - "file": "/tmp/go-request-trace-tests.log", - "sha256": "6a39631f8768f754a36bcfea612dff4a1da5cd39095ab9d3ce8915b1c2f9512a" - }, - "fullRaceIntegration": { - "file": "/tmp/go-request-trace-integration.log", - "sha256": "e604ac68610b6d3360d0a4e0550a946e54eac4ada9cd37366b9cba744fbd10be" - }, - "goVet": "passed", - "liveCorrelation": { - "file": "backend/reports/shadow-request-trace-validation.json", - "sha256": "fa579fff18d879bb2a229cb64f2909dc0b19d2e07f61f7f9b6cee8671ca07566" - }, - "liveAppFlow": { - "file": "backend/reports/shadow-app-authenticated-deployment.json", - "sha256": "dd34ce4ff719d267be4dc10568c403d584b1d55db8548bb7aea7f9d01824f46b" - }, - "uniqueRequestIDsVerified": 38 - }, - "coverage": [ - "Generated v4 UUID response IDs even without Redis; incoming IDs ignored", - "Structured logs with fixed route labels, no raw paths, query strings or credentials", - "Concurrent request-stage accumulation and interrupted-request warnings", - "Legacy source/transformed hit/miss counters independent of detailed cache monitoring" - ], - "limits": [ - "Completion warnings now persist to the admin error ring; see errorMonitoringParity.", - "Third-party provider HTTP credential flows remain provider-specific." - ] - }, - "errorMonitoringParity": { - "verifiedAt": "2026-11-03T13:17:44.265870+00:00", - "status": "verified_and_deployed_to_beta", - "sourceSHA256": "921cd51aa6447064e4e13a68cf76606066a7f3f1421208f93794b273ee5a732f", - "contracts": { - "command": "node backend/contracts/error-log.cjs --check", - "fixtures": 40, - "result": "passed", - "ciEnabled": true - }, - "checks": { - "targetedRace": { - "file": "/tmp/go-error-monitoring-tests.log", - "sha256": "2a3eb36bc7d13ac28006c0bc4f62a4badf0bf15f8e7c90d50713fc734b6611ef" - }, - "fullRaceIntegration": { - "file": "/tmp/go-error-monitoring-full.log", - "sha256": "dc27010741bcf5a2ad1ff797d61f80d61c3771cf439adffc0ebf7e69c19ce155" - }, - "goVet": "passed", - "liveAppFlow": { - "file": "backend/reports/shadow-app-authenticated-deployment.json", - "sha256": "acabbf8beb7c6e572363b181ef28255f09429f82d7734dda86442f6be81fe06d" - } - }, - "coverage": [ - "5000-entry ring and TypeScript decimal pagination", - "Severity classification, noisy-code exclusions, hourly level/module/code counters and TTL", - "Bounded asynchronous error buffer and failed-batch accounting", - "Interrupted and slow request warning persistence", - "Clear ring/hourly hashes/Redis dropped counter while preserving unrelated data", - "LOG_LEVEL thresholds and production/development defaults" - ], - "liveValidationNotes": [ - { - "result": "initial check failed", - "reason": "The smoke test incorrectly required an upstream timing sample on a shared-cache hit; corrected the assertion.", - "log": { - "file": "/tmp/go-error-monitoring-app.log", - "sha256": "4fa278c00b7bfa959145e0a9af3d431c62112953b0e0dd45b81ed9a4f9dffadd" - } - }, - { - "result": "retry failed", - "reason": "GitHub README request returned 502; public response lacked request-ID header. Temporary key was revoked.", - "log": { - "file": "/tmp/go-error-monitoring-app-rerun.log", - "sha256": "6c420a15ce8bb6d7cacd8fdbb29bd8d4bcef6532f3e350c11ede2a0004afc2de" - } - }, - { - "result": "final retry passed", - "log": { - "file": "/tmp/go-error-monitoring-app-final.log", - "sha256": "acabbf8beb7c6e572363b181ef28255f09429f82d7734dda86442f6be81fe06d" - } - } - ], - "intentionalBounds": [ - "128 buffered entries; overflow/failed transactions count as dropped and are not replayed", - "No raw upstream errors, URLs or credentials in stored error records", - "Clear refuses more than 10000 hourly keys; offsets saturate at Number.MAX_SAFE_INTEGER" - ], - "productionChanged": false - }, - "queueMetricParity": { - "verifiedAt": "2026-11-03T13:25:09.246371+00:00", - "status": "verified_and_deployed_to_beta", - "sourceSHA256": "a4dc61278b40e02969e1c227753e22f98ad676760169fd6eabc6ae98b0847b4b", - "imageID": "sha256:44ac2d10a899f361f700f30816b0f47281b3a157a3e3ffb76ca35ed47a26cc1b", - "fixes": [ - "Named ranges and string range response match TypeScript", - "One point per minute across up to seven days", - "30-second successful-read cache bounded to 12 queue/window pairs", - "Redis failures return an uncached empty chart", - "Worker duration rounding and nonnegative clamp" - ], - "checks": { - "contracts": { - "command": "node backend/contracts/queue-metrics.cjs --check", - "fixtures": 17, - "result": "passed", - "ciEnabled": true - }, - "targetedRaceIntegration": { - "command": "GO_BINARY=/tmp/anonymous-go-investigation/go/bin/go backend/scripts/test-integration.sh -run 'TestQueueMetric|TestBackendIntegration/queue_metric_history'", - "log": { - "file": "/tmp/go-queue-metric-tests.log", - "sha256": "2a8854d37dd48b4eedb3e63ac834da42d86ee3ad9b2a29cae25b63f04f918f99" - }, - "result": "passed" - }, - "goVet": "passed", - "liveMonitoring": { - "file": "backend/reports/shadow-monitoring-authenticated-deployment.json", - "sha256": "5e12b38543f991d455a4a73f58f3f689cacb3876388bf2787c94c4fcc4c4bf96" - } - }, - "limits": [ - "The prior full backend race suite predates this queue-only correction; the changed queue path has targeted race/integration and live validation.", - "This deployment check did not rerun GitHub imports or mutate queue jobs." - ], - "productionChanged": false - }, - "queueOverviewParity": { - "verifiedAt": "2026-11-03T13:31:37.053654+00:00", - "status": "verified_and_deployed_to_beta", - "sourceSHA256": "73667d2630e4e2b1e9b12954305dd7649f3774fb375a4ac8f82017624601aba7", - "imageID": "sha256:1a700e5aa2e4467cc82b591ee3d6e2ae418dea0165ea5fadd328bc52c4a8cfd5", - "fixes": [ - "24-hour completion/failure totals in queue overview cards", - "Live Go worker instance count and actual per-instance concurrency", - "Stale/stopped worker exclusion and graceful process sample removal", - "delayUntil, processedOn and finishedOn job timestamps" - ], - "checks": { - "targetedRaceIntegration": { - "command": "GO_BINARY=/tmp/anonymous-go-investigation/go/bin/go backend/scripts/test-integration.sh -run 'TestProcessSample|TestTypeScriptWorkerQueue|TestIndependentWorkerQueuesIntegration|TestBackendIntegration/(queue_overview|process_performance_history|queue_metric_history)'", - "result": "passed", - "log": { - "file": "/tmp/go-queue-overview-tests.log", - "sha256": "97d796a1b619a1bd038a6765082094109eee29eb999eb30b44d15dc340d53f57" - } - }, - "goVet": "passed", - "liveMonitoring": { - "file": "backend/reports/shadow-monitoring-authenticated-deployment.json", - "sha256": "6db1ad8811ec4d50a804b0c470d6212717d1d57d29f665df90c83bcb10291dab" - } - }, - "limits": [ - "The earlier full backend race run predates the queue monitoring changes; targeted worker, queue and process-history suites verify this correction.", - "Unclean shutdowns and unavailable Redis during shutdown can leave a worker sample visible until its 90-second expiry.", - "Worker presence uses the existing bounded process sample registry." - ], - "productionChanged": false - }, - "adminHistoryParity": { - "verifiedAt": "2026-11-03T13:38:55.397071+00:00", - "status": "verified_and_deployed_to_beta", - "sourceSHA256": "aa7d7681f7e05a938429bf9baf8ca209027ea97474374f78fcd3d53c3b14886f", - "imageID": "sha256:7f7ddd48efdbb9b69f81ab67d5979c6dca8343f6f657d335a7fcd7f3bcc7db1e", - "fixes": [ - "Fresh admin activity totals independent of public statistics cache", - "Fixed 30-day admin history independent of days query parameter", - "TypeScript UTC-day replacement, stable ordering and non-mutating history merge", - "Optional error telemetry fallback and matching overview error-summary fields" - ], - "checks": { - "contracts": { - "command": "node backend/contracts/stats-history.cjs --check", - "fixtures": 20, - "result": "passed", - "ciEnabled": true - }, - "targetedRaceIntegration": { - "command": "GO_BINARY=/tmp/anonymous-go-investigation/go/bin/go backend/scripts/test-integration.sh -run 'TestStatsHistory|TestBackendIntegration/overview_rolling_activity_counts'", - "result": "passed", - "log": { - "file": "/tmp/go-stats-history-final-tests.log", - "sha256": "8f482a04d62b2b7e4cbeddbdc3a0808d1d85084f24af61036c58ec2b50088ba2" - } - }, - "goVet": "passed", - "liveMonitoring": { - "file": "backend/reports/shadow-monitoring-authenticated-deployment.json", - "sha256": "ec1965d483e296077bba54f679c56e8ec9059be2462c476f784b9fab84addbdc" - } - }, - "limits": [ - "The previous full backend race run predates these focused statistics changes.", - "Public statistics caching and day-window parsing have separate unresolved parity findings." - ], - "productionChanged": false - }, - "publicStatisticsCacheParity": { - "verifiedAt": "2026-11-03T13:56:55.913113+00:00", - "status": "verified_and_deployed_to_beta", - "sourceSHA256": "d33c71c99afb21aa708cd50e649d4be15bf2a3da81dbbdb83015165147fa3a91", - "imageID": "sha256:ecf493af414758c3be4a141664b6237f30556bb026962366460f64f4ab8dfe01", - "fixes": [ - "One-entry current totals and 16-entry UTC-day/window history caches with one-hour success TTL and concurrent fill coalescing", - "Shared TypeScript Redis key and renewable ownership-checked fill lease", - "Optional Redis read/write fallback with bounded timeouts", - "Plain/repeated days integer-prefix parsing and bounds", - "Returned totals/history cannot mutate local caches" - ], - "checks": { - "contracts": { - "commands": 49, - "result": "passed", - "log": { - "file": "/tmp/go-public-stats-contracts-final.log", - "sha256": "4389a4769278306b3bb6a3640c6edceaf472f9cc020c45a10c3a641fe07e3889" - }, - "statisticsWindowFixtures": 28 - }, - "fullRaceIntegration": { - "result": "passed", - "log": { - "file": "/tmp/go-public-stats-full.log", - "sha256": "f76b5aa5ee74dbb04be62b6e574ec99f86d087a1c970f70c56ebca511d280239" - }, - "serverSeconds": 236.214 - }, - "goVet": "passed", - "formatting": "passed", - "liveMonitoring": { - "file": "backend/reports/shadow-monitoring-authenticated-deployment.json", - "sha256": "c19fd086b50697f94837f0cded5ac4310f0d76a75c225cdb471587ab2e5cb029" - }, - "livePublicStatistics": { - "anonymousAccess": true, - "windows": [ - { - "query": "-2", - "days": 1, - "rows": 1 - }, - { - "query": "0", - "days": 30, - "rows": 1 - }, - { - "query": "0x10", - "days": 16, - "rows": 1 - }, - { - "query": "7suffix", - "days": 7, - "rows": 1 - }, - { - "query": "999", - "days": 365, - "rows": 1 - } - ] - } - }, - "limits": [ - "Express bracketed arrays and objects remain a separate query-parser implementation gap.", - "History queries still cap results at 366 rows; duplicate/future snapshots exceeding that count remain a separate output gap.", - "Live checks use beta data; optional-cache faults are tested with isolated MongoDB/Redis infrastructure.", - "Production-data cutover and rollback remain unverified." - ], - "productionChanged": false - }, - "statisticsQueryParity": { - "verifiedAt": "2026-11-03T14:03:33.627979+00:00", - "status": "verified_and_deployed_to_beta", - "sourceSHA256": "6818063db39812369f67c5bddcc6a12df93c98d31f11d1e1cf5d8fed611b1667", - "imageID": "sha256:9a3be3c45ada85e60099cf927578b048c08f9e9c17832febf28f4e4a88cec16e", - "fixes": [ - "History returns all matching snapshots, including multiple timestamps per day and future imports, without the unintended 366-row cap.", - "Public history uses a reusable bounded extended-query parser matching Express scalar string conversion.", - "Parser handles mixed arrays/objects, depth and array limits, malformed escaping and prototype-like names without object prototype state." - ], - "checks": { - "expressContracts": { - "fixtures": 1274, - "command": "node backend/contracts/query-values.cjs --check", - "result": "passed", - "ciEnabled": true - }, - "historyContracts": 20, - "windowContracts": 28, - "focusedRaceIntegration": { - "result": "passed", - "log": { - "file": "/tmp/go-stats-query-parity-tests.log", - "sha256": "6b7f7838f1fb38fd6e6f8a07c15860e8c79270a72c43e30f925835baa705322f" - }, - "coverage": [ - "402-row history output", - "route-level bracketed date-window queries", - "existing cache failure, coordination and admin overview tests" - ] - }, - "expandedQueryRace": { - "result": "passed", - "log": { - "file": "/tmp/go-query-expanded-race.log", - "sha256": "aa98752488744a50969bcdb0bd0896069324006a637079a2e0a3fa5e73a47385" - } - }, - "goVet": "passed", - "liveMonitoring": { - "file": "backend/reports/shadow-monitoring-authenticated-deployment.json", - "sha256": "60ca63873e93061af9d17339419584eacda958a1bb8ee092d5e42ca14f823b3e" - }, - "livePublicStatistics": { - "anonymousAccess": true, - "windows": [ - { - "query": "days=-2", - "days": 1, - "rows": 1 - }, - { - "query": "days=0", - "days": 30, - "rows": 1 - }, - { - "query": "days=0x10", - "days": 16, - "rows": 1 - }, - { - "query": "days=7suffix", - "days": 7, - "rows": 1 - }, - { - "query": "days=999", - "days": 365, - "rows": 1 - }, - { - "query": "days[]=7&days[]=30", - "days": 7, - "rows": 1 - }, - { - "query": "days[1]=7&days[0]=1", - "days": 1, - "rows": 1 - }, - { - "query": "days[x]=7", - "days": 30, - "rows": 1 - } - ] - } - }, - "limits": [ - "Other query consumers still use net/url.Values and need per-route coercion/validation audits.", - "The preceding full race suite predates these changes; focused race/integration tests cover these corrections.", - "Production-data cutover and rollback remain unverified." - ], - "productionChanged": false - }, - "dashboardQueryParity": { - "verifiedAt": "2026-11-03T14:08:44.069156+00:00", - "status": "verified_and_deployed_to_beta", - "sourceSHA256": "4bfb222c04ab4bb968e6a4c40a3c6fc75a1175bbb0453e64dd44fc985b13ee19", - "imageID": "sha256:9620895e7a38dfadf41074217582fe83b749f2ebd360ac3609480aa83d94c261", - "fixes": [ - "Parse the raw dashboard query once with the bounded Express-compatible parser.", - "Preserve JavaScript array/object truthiness for defaults and cursor presence.", - "Preserve native array type filters and strict scalar attention comparisons.", - "Handle indexed search/status arrays, numeric limit coercion and cursor conversion errors." - ], - "checks": { - "pipelineContracts": 186, - "sharedParserContracts": 1274, - "filterContracts": 28, - "contractsAndRace": { - "file": "/tmp/go-dashboard-query-contracts.log", - "sha256": "3bcc41031b6b307cb7382c443aadc9ef585afdc1d848d078c019b28427a602e1" - }, - "databaseHTTPRace": { - "file": "/tmp/go-dashboard-query-integration.log", - "sha256": "eac1562952733f67da29369cb5a4454eb4aa0ccf940ce9f89e672f80f307c666" - }, - "goVet": "passed", - "liveMonitoring": { - "file": "backend/reports/shadow-monitoring-authenticated-deployment.json", - "sha256": "4fe5d9340cbb270fe2c41334a446646c48bf7d7bca19e60524dbf3bd9213d620" - }, - "liveDashboardExtendedQueries": "passed" - }, - "limits": [ - "Full backend race evidence predates this focused dashboard change.", - "Other query consumers still require auditing.", - "Production-data cutover and rollback remain unverified." - ], - "productionChanged": false - }, - "oauthQueryParity": { - "verifiedAt": "2026-11-03T14:14:06.157476+00:00", - "status": "verified_and_deployed_to_beta", - "sourceSHA256": "580e6116202c12392afbc674ae5da961c9d00771fb0c95c640ee1d74d9d03503", - "imageID": "sha256:3101a8b8afda2e590d79fa4fcaf21d85d9521918948c600bd00fd1e544193ffe", - "fixes": [ - "App login and installation suggestions retain only scalar intent and return destinations.", - "OAuth callbacks reject mixed scalar/bracketed state and code values; truthy array/object error values cancel authorization.", - "Installation setup distinguishes absent/empty scalar state from truthy arrays and applies strict scalar action/id checks." - ], - "checks": { - "raceIntegration": { - "file": "/tmp/go-oauth-query-final-tests.log", - "sha256": "e9207ef3f08287178ff4c7a7d0477b442937c0fc14a8bd2a38f26c3738b47a4b" - }, - "queryShapeRace": { - "file": "/tmp/go-query-shape-race.log", - "sha256": "795aa3240b1c91491f7f01b06d6e5a9c4e145473ef44ac60f26a29963d8c3f55" - }, - "expressQueryFixtures": 1274, - "goVet": "passed", - "liveBeta": { - "file": "backend/reports/shadow-oauth-query-deployment.json", - "sha256": "d4fd8c1401a02674ef8e72a9bd42d484fd2f78184b82abd047561680ddfc0bf7" - }, - "liveCases": [ - "mixed state rejected and cannot replay", - "mixed code rejected and cannot replay", - "empty array error rejected and cannot replay", - "anonymous sessions remain unauthenticated" - ] - }, - "limits": [ - "Mocked integration tests assert zero upstream requests on invalid callbacks; live checks assert HTTP errors and rejection of consumed-state replay.", - "An initial live-script cleanup assertion incorrectly expected anonymous logout to succeed; corrected to verify /api/user returns 401.", - "Full backend race evidence predates this focused callback correction.", - "Pending OAuth flow lifecycle still needs comparison for multiple starts and callbacks without a scalar state.", - "Other query consumers and production cutover remain unverified." - ], - "productionChanged": false - }, - "oauthPendingFlowParity": { - "verifiedAt": "2026-11-03T14:24:11.830749+00:00", - "status": "verified_and_deployed_to_beta", - "sourceSHA256": "62351871c63bf099543b89138472766910892e615a5b3605dc72668705fa30b1", - "imageID": "sha256:91bd139c5d4c21b0fb99dfe95c25c92ded64e812b06eb085d0110c7d7665f7a8", - "fixes": [ - "One pending OAuth attempt per session and authorization provider.", - "Redis scripts atomically replace prior attempts and consume the pending attempt before state validation.", - "Missing, malformed and superseded callback state consume the pending attempt.", - "A foreign session cannot consume another session's pending flow.", - "App and legacy flows remain independent; concurrent callbacks consume at most once." - ], - "checks": { - "fullRaceIntegration": { - "result": "passed", - "serverSeconds": 240.992, - "log": { - "file": "/tmp/go-oauth-lifecycle-full.log", - "sha256": "07e1a38ec6fd7c8d8042de3ed721741eb9223ce85c7961eccb3cda2882a6e37b" - } - }, - "contracts": { - "result": "passed", - "commands": 50, - "log": { - "file": "/tmp/go-oauth-lifecycle-contracts.log", - "sha256": "081a2f2688f7a597342a13f17e3ea96b792a953cc07e0f9484b1af9260fcecbd" - } - }, - "goVet": "passed", - "liveBeta": { - "file": "backend/reports/shadow-oauth-query-deployment.json", - "sha256": "67f70ec24c207f3eb50c5489fe3f2cb55df59345731bcb14f2d21c79930b12e1" - }, - "liveAccessMode": "local TLS proxy with hostname verification", - "liveCases": 8 - }, - "limits": [ - "Public DNS lookup timed out before receiving an HTTP response; local TLS checks retained certificate hostname verification and the beta proxy route.", - "In-flight logins created before this deployment have no pending index and must restart. Existing authenticated sessions use separate storage.", - "Disabled App route middleware ordering remains different: Go currently consumes pending state before its configuration gate; TypeScript gates first.", - "Other query consumers and production cutover remain unverified." - ], - "productionChanged": false - }, - "gatesAndMonitoringQueryParity": { - "verifiedAt": "2026-11-03T14:31:21.284235+00:00", - "status": "verified_and_deployed_to_beta", - "sourceSHA256": "dffa4ee4f1ac913553f37ab648b33530e90c17a3bf5bb75fdc64cb9bdfc56317", - "imageID": "sha256:c38d315da3a9c300f689b161241ae3d2f1463bc860407e9708004c566a3f9ac3", - "fixes": [ - "Disabled App, new-connection and legacy OAuth callbacks return 503 before consuming pending state.", - "Pending login remains valid after provider re-enabling; subsequent consumption remains one-time.", - "Performance and cache monitoring windows use Express-compatible query conversion and JavaScript numeric window forms.", - "Malformed object conversion errors precede telemetry availability checks." - ], - "checks": { - "monitoringWindowContracts": 35, - "queryFixtures": 1274, - "windowRace": { - "file": "/tmp/go-monitoring-query-tests.log", - "sha256": "045d009ec39f5b2daa3b6e6db13fb60529475873d9513d307e445630802aa2d3" - }, - "focusedHTTPDatabaseRace": { - "file": "/tmp/go-gates-monitoring-focused.log", - "sha256": "ef5bba694d0491eb44052c8017550c56fc201ed73869d23585618e345a2f7a39" - }, - "goVet": "passed", - "liveMonitoring": { - "file": "backend/reports/shadow-monitoring-authenticated-deployment.json", - "sha256": "33f41cbb54172a78a21e1b1322f38e6444ccf1f27c75f8e41e0eb652966c0e33" - }, - "liveOAuth": { - "file": "backend/reports/shadow-oauth-query-deployment.json", - "sha256": "7e513a18730f00c7f47f22852c3f62782a0f0cd2f35203181306b1d77a2e18a8" - }, - "publicDNS": "reachable; both live scripts passed without local override" - }, - "limits": [ - "Provider disable/re-enable behavior is tested in isolated integration fixtures; beta configuration was not toggled.", - "The earlier complete 50-command and full backend race run predates these focused fixes; current CI has 51 contract commands.", - "Queue/admin list, source preview and file query consumers remain to audit.", - "Production-data cutover and rollback remain unverified." - ], - "productionChanged": false - }, - "queueAndErrorQueryParity": { - "verifiedAt": "2026-11-03T14:36:09.267225+00:00", - "status": "verified_and_deployed_to_beta", - "sourceSHA256": "4f130473f20f54540d6a48e2905e70c7dacc95b34212e399d8b74c440295b61b", - "imageID": "sha256:991f4d341450e7f82bddee81dfee0d7e555d9df785efb4705f1b7df2763b88b4", - "fixes": [ - "Queue metric selection preserves empty-array truthiness and bracketed/repeated values.", - "Invalid queue selection takes precedence over range conversion, matching TypeScript.", - "Inherited range-object names preserve empty-series output without introducing prototype state.", - "Queue overview selection/search converts parsed values rather than taking the first plain value.", - "Error-log pagination parses extended values and retains numeric bounds." - ], - "checks": { - "extractedContracts": 29, - "ciEnabled": true, - "raceIntegration": { - "file": "/tmp/go-admin-query-tests.log", - "sha256": "feaf80d5d4cd6209b6dcda822c0d51c142144c7daf7990fe896d27e098038980" - }, - "goVet": "passed", - "liveMonitoring": { - "file": "backend/reports/shadow-monitoring-authenticated-deployment.json", - "sha256": "b3f0a2bbf63783ab5f3e570e531b175983186ead868b9d5295a787406cc0ce53" - }, - "liveAdminExtendedQueries": "passed", - "temporaryKeyRevoked": true - }, - "limits": [ - "The last full backend race run predates these focused query changes.", - "Admin resource/user lists, source previews, file and legacy user-list query consumers still require auditing.", - "Production-data cutover and rollback remain unverified." - ], - "productionChanged": false - }, - "fileAndRefreshQueryParity": { - "verifiedAt": "2026-11-03T14:41:47.277937+00:00", - "status": "verified_and_deployed_to_beta", - "sourceSHA256": "cfdb43a6724fbad86c7fa754bda835af0e34db11b07b8c0f1f3f5059a5aa9e3f", - "imageID": "sha256:4e2a24652d56033d064221b7a899528842756216f5cc5b05f43a76be464773f0", - "fixes": [ - "Download attachment selection uses parsed-value truthiness, including empty arrays and objects.", - "Preview and repository-list refresh flags follow TypeScript loose equality for force.", - "Reconnect flags remain strict scalar comparisons and short-circuit force conversion.", - "Actual file-route contract harness uses the same extended query parser as the application." - ], - "checks": { - "queryContracts": 53, - "actualFileRouteContracts": 115, - "fileMetadataAndPreviewRace": { - "file": "/tmp/go-file-query-tests.log", - "sha256": "e925c5d1d40bb9ed62abf1c3dfe65531bf5d3716f67eacd01ebc74baac0cd4de" - }, - "discoveryAuthorizationRace": { - "file": "/tmp/go-preview-query-tests.log", - "sha256": "328106e8dcc7f14e15fb63387fa422e1bddace1de06154d03d5fe3a38c715398" - }, - "goVet": "passed", - "liveReadOnlyHeaders": { - "file": "backend/reports/shadow-file-query-deployment.json", - "sha256": "de4f0c1aac8b308cf7c0e26185921c0bb682fa9c2e2130fec4bd62565fee0c8e" - } - }, - "limits": [ - "Live HEAD checks use the existing synthetic shadow-demo archive; preview refresh and authorization checks use isolated upstream fixtures.", - "The preceding full backend race run predates this focused correction.", - "Source-preview binding/hint/branch queries, file search and admin/user search/list queries still need auditing.", - "Production-data cutover and rollback remain unverified." - ], - "productionChanged": false - }, - "previewBindingQueryParity": { - "verifiedAt": "2026-11-03T14:47:56.564832+00:00", - "status": "verified_and_deployed_to_beta", - "sourceSHA256": "40d0ace337421a307366ac3b79380a9ab061772cd2bb2420ac9e2d7beb0e25da", - "imageID": "sha256:d6ef3842bde8880b6b903cc815dc15e1cc336cf27305aa45a2e6bbeef50b7666", - "fixes": [ - "Only scalar anonymizedRepoId selects a saved resource; mixed arrays use the caller's connection flow.", - "Non-scalar connection choices are rejected before provider Connect.", - "GitHub explicit connection choices match its TypeScript allowlist, including rejection of an empty scalar.", - "Saved previews ignore untrusted connection queries and retain the authorized owner binding.", - "Other providers retain opaque connection names; GitHub name validation precedence is preserved." - ], - "checks": { - "typescriptQueryContracts": 17, - "raceIntegration": { - "file": "/tmp/go-preview-binding-final.log", - "sha256": "8588318e14bb4a5ffa6ed5222557ac101097893ade9cb1d85752630d0dbccd31" - }, - "goVet": "passed", - "liveMonitoring": { - "file": "backend/reports/shadow-monitoring-authenticated-deployment.json", - "sha256": "3997da98a88aab32786f01122c75902844f2fc82a38c00b85528b8137e95382a" - }, - "livePreviewConnectionQueries": "passed", - "temporaryKeyRevoked": true - }, - "limits": [ - "Live checks exercise malformed GitHub choices; owner/caller isolation and other-provider names use isolated provider fixtures.", - "Full backend race evidence predates this focused correction.", - "Preview repositoryID/branch/name inputs, file search and admin/user list/search inputs remain to audit.", - "Production-data cutover and rollback remain unverified." - ], - "productionChanged": false - }, - "fileSearchQueryParity": { - "verifiedAt": "2026-11-03T14:56:38.315079+00:00", - "status": "verified_and_deployed_to_beta", - "sourceSHA256": "3799c57ee1928fe692744a5552b84c42b40f624e8be56327bbdfe6a893b0760e", - "imageID": "sha256:eb851c71d7ea99f9d4e19044f952a34f68ba9606c59225cb0207ee505c885a18", - "fixes": [ - "Extended query shapes match TypeScript scalar .trim() behavior.", - "Trimmed UTF-16 query length and Unicode lowercasing match covered JavaScript cases.", - "Short queries return before scanning files, after repository status checks." - ], - "checks": { - "typescriptContracts": 22, - "raceIntegration": { - "file": "/tmp/go-file-search-tests.log", - "sha256": "3b9493fedd8bf387ca2f1df8904eed51eff206ce48650f0a37be2aa445d7f5c4" - }, - "goVet": "passed", - "liveQueries": { - "file": "backend/reports/shadow-file-query-deployment.json", - "sha256": "be182e349596fb49fa15d9a0a6d04e1465d4c8fb82ef00937206b7922ca78e58" - }, - "containerHealth": "healthy" - }, - "limits": [ - "Errors retain Go no-store instead of TypeScript no-cache.", - "Search metadata checks repository status, without per-request provider grant revalidation, as in TypeScript.", - "Go 100000-row scan cap and connected TypeScript index ordering require large-tree parity validation.", - "The full backend race suite predates this focused change.", - "Preview repositoryID/branch/name, file listing path and admin/user list queries remain in the query audit.", - "Production-data cutover and rollback remain unverified." - ], - "productionChanged": false - }, - "largeFileTreeScanParity": { - "verifiedAt": "2026-11-03T15:02:02.543905+00:00", - "status": "verified_and_deployed_to_beta", - "sourceSHA256": "d1ef96a2ab2e5b9c1c1a6f895bc5e706fbd5b84e88ab7c68f5bbe23580a9784b", - "imageID": "sha256:e7112c17508e42a6b8ae9e0d9641ced09eefbba1420e2dcbb3d04dcf86210986", - "fixes": [ - "Removed the 100000-row scan cap from file listings, search and counts.", - "Read projected fields through a 256-row MongoDB cursor batch instead of materializing all input rows.", - "Stop search at 500 matches and close cursors on all return paths.", - "Counts avoid unnecessary filename anonymization." - ], - "checks": { - "raceIntegration": { - "file": "/tmp/go-large-tree-final.log", - "sha256": "77f3757e049a108e13d4b377e00b09fd5d321d650d9c8194071d2d0ba21ddd05" - }, - "fixtureRows": 100001, - "verified": [ - "last-row listing", - "last-row search", - "complete folder counts", - "500-match limit", - "Unicode and query contracts" - ], - "goVet": "passed", - "typescriptSearchContracts": 22, - "liveBeta": { - "file": "backend/reports/shadow-file-query-deployment.json", - "sha256": "0de0ce3a0ed9280ecd055cf4041fa539abaf8a672e649845e9cb538725ac4a45" - }, - "containerHealth": "healthy" - }, - "limits": [ - "Sparse searches still scan/anonymize paths; no throughput improvement claimed.", - "TypeScript persisted index and query ordering still require parity review.", - "File listing path types and original/anonymized path resolution remain in the audit.", - "Focused race coverage does not replace a full final cutover suite.", - "Production-data cutover and rollback remain unverified." - ], - "productionChanged": false - }, - "folderListingParity": { - "verifiedAt": "2026-11-03T15:10:38.660035+00:00", - "status": "verified_and_deployed_to_beta", - "sourceSHA256": "2b0bdc985b29d0f0199f8d3246804851b4668594002a5bd1f34ea2a88fe37b7f", - "imageID": "sha256:82ba40c21e8699f98c0ab0894c3f31999319cf17a30146eb047e4be815cc85f5", - "fixes": [ - "Scalar path query enforcement; arrays/objects fail with internal_error like TypeScript.", - "Original path priority and single-folder transformed collision resolution.", - "Default masks and custom replacements resolve to original directories before MongoDB filtering.", - "Eight-character hash of stored SHA in non-empty-file listings, omitted for empty files and directories." - ], - "checks": { - "typescriptListingContracts": 4, - "secondProviderRaceSuite": { - "file": "/tmp/go-folder-path-final.log", - "sha256": "e0d174e8ab38935e0766f3d86338bb60c31fd476e6d600cf9fc96d0cac96c8b4" - }, - "goVet": "passed", - "liveBeta": { - "file": "backend/reports/shadow-file-query-deployment.json", - "sha256": "e089dae87ef61d18d15ba2a95fff311c279286a4f46850015eeb14f1e2ed7992" - }, - "containerHealth": "healthy" - }, - "limits": [ - "Trailing-separator and truncated-tree recovery parity remains unverified.", - "File-content Redis index differences remain separately recorded.", - "Remaining preview/admin/user query inputs still need audit.", - "Production-data cutover and rollback remain unverified." - ], - "productionChanged": false - }, - "contentPathLookupParity": { - "verifiedAt": "2026-11-03T15:15:16.888691+00:00", - "status": "verified_and_deployed_to_beta", - "sourceSHA256": "c60c3020614dd6013bfbf55a1fdc853d42f41992a4119200617092c279f9993e", - "imageID": "sha256:dfdea6c0352b5d9d5e64ca7b590b0df8912fc45dcea70d3a44ad26d78dc0a46d", - "fixes": [ - "Original path lookup precedes transformed index lookup.", - "Transformed collisions select the first row in original path/name order.", - "Index cursor removes silent 100000-row truncation and includes directory entries.", - "Cache key adds fileMetadataRevision, source commit, anonymizeDate and a new version.", - "Atomic publication rejects a builder that no longer owns its lock." - ], - "checks": { - "raceLookupAndLargeTree": { - "file": "/tmp/go-content-index-tests.log", - "sha256": "35c6342e2770d428ee62d6d7a2a08bb204ca0ee095e0208419b770a0f4edd8cb" - }, - "raceMetadataAndRevocation": { - "file": "/tmp/go-content-index-metadata.log", - "sha256": "7bf3071d5f05f8f6c8f9ec9f1b6988fc87ec326ecbe318c3db07891c945bc2fb" - }, - "goVet": "passed", - "liveBeta": { - "file": "backend/reports/shadow-file-query-deployment.json", - "sha256": "f98349c7962e516c0879ddbe0a815c84d23bf1a7e83e6e45ba2c2e7167013794" - }, - "containerHealth": "healthy" - }, - "limits": [ - "32 MiB encoded-size guard and 45-second index build deadline remain.", - "Truncated-tree recovery and full lifecycle publication fencing remain to verify.", - "Redis cache expiry and storage differ from TypeScript MongoDB index mechanics.", - "Focused race evidence does not replace the final full migration suite.", - "Production-data cutover and rollback remain unverified." - ], - "productionChanged": false - }, - "pathSnapshotParity": { - "verifiedAt": "2026-11-03T15:19:18.454359+00:00", - "status": "verified_and_deployed_to_beta", - "sourceSHA256": "8e5c8c129af0f6004a573759aeddd5db7c8a66869414129743ff78e9494540f0", - "imageID": "sha256:48e42ed04dfe4d546e5d64e90a5cff676b6198247c4f1ae5517ea847fff5349d", - "fixes": [ - "Check the database snapshot before returning original or cached transformed file metadata.", - "Check metadata, generation, terms, commit, settings, anonymize date, content-cache and provider-grant revisions, and terminal status.", - "Check the snapshot before and after publishing a built Redis index.", - "Include contentCacheRevision in the versioned path cache key." - ], - "checks": { - "raceSnapshotLargeTreeAndMetadata": { - "file": "/tmp/go-path-snapshot-tests.log", - "sha256": "931dd9aa93cda2e8ac222dd1dc885ddf3c7dec52d1ab6af61481c6fd01098132" - }, - "goVet": "passed", - "liveBeta": { - "file": "backend/reports/shadow-file-query-deployment.json", - "sha256": "5835f2e6928f7b58b5f8b6003cca851f78eb40618f2f0384360f7f53c57ed342" - }, - "containerHealth": "healthy" - }, - "limits": [ - "MongoDB and Redis are not atomically committed; stale versioned keys can remain briefly, but successful lookups revalidate the database snapshot.", - "StatusDate-only cache bookkeeping intentionally does not invalidate file metadata.", - "32 MiB encoded-size guard, 45-second build deadline and truncated-tree recovery remain to audit.", - "Focused checks do not replace a final full migration suite or production-data cutover rehearsal." - ], - "productionChanged": false - }, - "truncatedFileRecoveryParity": { - "verifiedAt": "2026-11-03T15:26:51.382184+00:00", - "status": "implemented_tested_and_deployed_to_beta", - "sourceSHA256": "606f325355752bb20f27f5edb80dab54a69acd4f9a53e9f2dc3e9477ea26d3b7", - "imageID": "sha256:9eb0d712ea5abf6dc71d867a448e6f8b972956cf826d73d87f451211b87c96a9", - "fixes": [ - "Optional provider.FileMetadata capability with GitHub commit-pinned Contents implementation.", - "Recover only unchanged paths within recorded truncated folders.", - "Authorize before/after upstream lookup and verify current repository snapshot before persistence.", - "Persist metadataPending rows and invalidate path/size metadata with revision-checked updates.", - "Retry interrupted invalidation on exact lookup; reject and discard new pending rows from retired source snapshots." - ], - "checks": { - "raceRecoveryGitHubAdapterSnapshotAndFileMetadata": { - "file": "/tmp/go-file-recovery-verified.log", - "sha256": "4781ecb26c74f009091acf269a8224e3ecfbe658b14f014853b62f9af93955f5" - }, - "goVet": "passed", - "liveBetaSmoke": { - "file": "backend/reports/shadow-file-query-deployment.json", - "sha256": "a3eae21c156285538075664e97e2bbc54afd399de99bf8c9ad6d9dc4feba7078" - }, - "containerHealth": "healthy" - }, - "limits": [ - "Live beta smoke covers existing files; recovery tests use isolated upstream fixtures.", - "Scheduled pending-row repair, folder recovery and still-truncated directory imports remain to audit.", - "Imported pending rows without provenance use legacy retry behavior.", - "Go preserves upstream permission errors rather than converting all recovery failures to missing-file responses.", - "Index resource limits and final migration/cutover validation remain open." - ], - "productionChanged": false - }, - "pendingMetadataMaintenanceParity": { - "verifiedAt": "2026-11-03T15:31:48.918135+00:00", - "status": "verified_and_deployed_to_beta", - "sourceSHA256": "cdc59049e9adb3b8c2c4bb03a78806369829d2385c2222ccccb4a4c02e32a7f2", - "imageID": "sha256:62a42569634ee35475cfe9f34c41e4b500b892e127ac90d613f0cb32fa47f08e", - "fixes": [ - "Minute maintenance streams pending metadata with a partial MongoDB index.", - "Repair current and legacy-generation rows; remove pending orphaned, retired-generation and terminal-state rows.", - "Continue after per-row failures and retain retryable work.", - "Maintenance invalidates archived metadata without allowing public file lookup.", - "Deletion requires metadataPending=true, protecting rows completed after the scan." - ], - "checks": { - "raceRepairRecoveryAndFileMetadata": { - "file": "/tmp/go-pending-metadata-final.log", - "sha256": "bbbaa2d4e95d93f8b0ab19f42c4854437122b159e5902714206915902b522963" - }, - "goVet": "passed", - "liveBetaSmoke": { - "file": "backend/reports/shadow-file-query-deployment.json", - "sha256": "cf59a2e26bb8d2843e99f85d7fce503a2113e8d4774556b6838137ce33308564" - }, - "livePartialIndex": { - "file": "/tmp/go-pending-metadata-index.log", - "sha256": "e5fdd001467e333ebe060b185dc661885a62660339adf7d1308b81c56f60d035" - }, - "containerHealth": "healthy" - }, - "limits": [ - "Live beta check verifies deployment and index; repair state transitions use isolated database fixtures.", - "Folder recovery, still-truncated directory imports and index resource limits remain open.", - "Final full migration suite and production-data cutover rehearsal remain outstanding." - ], - "productionChanged": false - }, - "partialTreeImportParity": { - "verifiedAt": "2026-11-03T15:38:57.117210+00:00", - "status": "verified_and_deployed_to_beta", - "sourceSHA256": "97d48d7227d48a23a29bd9adf0de17ac3aaea33785b1362fb8571c2f7d9f0ec5", - "imageID": "sha256:b035d3c4e5cf741d4cd70d915f3053500e00816d46d72f11e3ddb612587da417", - "fixes": [ - "Optional provider.PartialTrees reports entries and incomplete folders without changing existing adapter requirements.", - "Shared preparation validates and publishes truncatedFolders with its tree generation.", - "GitHub retains available entries from truncated shallow trees and records incomplete root/child folders.", - "Remove 100000-entry rejection from shared preparation and GitHub traversal.", - "Preserve submodule commit entries without file sizes, matching TypeScript listing metadata." - ], - "checks": { - "raceImportGitHubAndRecovery": { - "file": "/tmp/go-partial-tree-verified.log", - "sha256": "a91ef0fe9eaf4da2dadf769b1555ba0ef7c929b6667302d4edd2d482aef9babc" - }, - "importedFiles": 100001, - "publicTruncationMarkers": "anonymized", - "goVet": "passed", - "liveBetaSmoke": { - "file": "backend/reports/shadow-file-query-deployment.json", - "sha256": "76df321f6f3bbd5e904abc5ed23adbb52a3dd0d9ac4329c012a7107df135d8ec" - }, - "containerHealth": "healthy" - }, - "limits": [ - "Imports still materialize snapshots in memory; no bounded-memory or throughput claim.", - "Live beta smoke checks existing content; partial upstream responses use isolated fixtures.", - "Folder-path recovery edge cases, Redis index limits and remaining query inputs remain in the audit.", - "Final full migration suite and production-data cutover rehearsal remain outstanding." - ], - "productionChanged": false - }, - "folderPathEdgeParity": { - "verifiedAt": "2026-11-03T15:42:22.757995+00:00", - "status": "verified_and_deployed_to_beta", - "sourceSHA256": "1ffcccb4fe7d987438bd7d3abc01f4f142847697a0b294c70620e05021df0805", - "imageID": "sha256:cf5280aaa514e9b63a7fbbb7d7a9497c0bc7a3cfc714620c99197ee125f7f8b7", - "fixes": [ - "Node-compatible dirname/basename for exact folder resolution, including trailing and repeated separators.", - "Keep unresolved scalar directory queries literal.", - "Complete pending invalidation for resolved original/transformed folder-lookup rows.", - "Use guarded per-file recovery after folder-resolution misses, matching TypeScript AnonymizedFile behavior.", - "Validate relative recovery paths before provider calls." - ], - "checks": { - "nodePathContracts": 18, - "raceFolderRecoveryAndMaintenance": { - "file": "/tmp/go-folder-edge-tests.log", - "sha256": "631acca39b922f166be0d4ec190f6f57e6536baeb763b661f6cad891612ffba8" - }, - "goVet": "passed", - "liveBetaSmoke": { - "file": "backend/reports/shadow-file-query-deployment.json", - "sha256": "a10f69765b89081d5134d71c73d09739551c077d4c41a652fca6fce1d51f5774" - }, - "containerHealth": "healthy" - }, - "limits": [ - "Recovery is regular-file metadata lookup, not upstream directory discovery, matching the inspected TypeScript capability.", - "Live beta smoke uses existing files; edge and recovery checks use isolated fixtures.", - "Redis path-index resource limits, remaining query inputs, full-suite verification and cutover rehearsal remain outstanding." - ], - "productionChanged": false - }, - "fullValidationAfterPathAndTreeParity": { - "verifiedAt": "2026-11-03T15:57:43.150713+00:00", - "status": "passed_with_known_remaining_parity_gaps", - "sourceSHA256": "adea79844ac525347a75eb05f373ebda52f517d3defb44190f3882fd8bb55d63", - "runningBetaImageID": "sha256:cf5280aaa514e9b63a7fbbb7d7a9497c0bc7a3cfc714620c99197ee125f7f8b7", - "runtimeChangedThisBatch": false, - "testFix": "Moved optional PartialTrees from the common fixture to a dedicated adapter, preventing promoted methods from bypassing wrapper Tree overrides.", - "checks": { - "fullBackendRace": { - "file": "/tmp/go-parity-full-race-final.log", - "sha256": "f049e34dac8dcbc5c60618e16e8395283ab466d7aa5377320a232685877643ba" - }, - "serverRaceSeconds": 321.751, - "initialFailure": { - "file": "/tmp/go-parity-full-race.log", - "sha256": "44f91bd0283248ea6b82239321de3146906a27d2ed7e803594b641b7f1217430" - }, - "focusedWorkerRegressions": { - "file": "/tmp/go-parity-worker-regressions.log", - "sha256": "1c0762c7045cad2e547dfdb38e9e5903bec2be18516cc756864c106d33ab3727" - }, - "fixtureContractCommands": 55, - "fixtureContracts": { - "file": "/tmp/go-parity-full-contracts.log", - "sha256": "3e56ae084cd671273bfa0f39fde945d7f25d56685b550cdd6c4dcc6ef117cf1f" - }, - "additionalDifferentialCommands": 2, - "anonymizationCases": 499, - "credentialCrossLanguageCases": 3, - "differential": { - "file": "/tmp/go-parity-differential.log", - "sha256": "3d12d5e9b2a0281db7774ea53317d4fbc0d5a002b05b1f97c5f157221194e948" - }, - "fileTypeCases": 7876, - "fileTypes": { - "file": "/tmp/go-parity-file-types.log", - "sha256": "bd0dd2fe8d2ffe277615fa257a2e2c3a228f47b15d55f551c7479e2b71514666" - }, - "formatting": "passed", - "goVet": "passed", - "vulnerabilityScan": { - "file": "/tmp/go-parity-vulnerabilities-verbose.log", - "sha256": "1c2c1877e6b7f1202818521ba7830d486a3ca892aa316aa3f40d085fa812ddb0" - } - }, - "security": { - "reachableVulnerabilities": 0, - "affectedImportedPackages": 0, - "moduleOnlyAdvisories": [ - "GO-2026-6355", - "GO-2026-6354", - "GO-2026-6303", - "GO-2026-5932" - ], - "module": "golang.org/x/crypto@v0.53.0", - "affectedUnusedPackages": [ - "golang.org/x/crypto/ssh", - "golang.org/x/crypto/openpgp" - ] - }, - "remaining": [ - "Admin list query shapes, preview cache IDs/branch/name and legacy user search inputs.", - "Redis path-index size/deadline behavior versus TypeScript MongoDB indexing.", - "Full browser/private-App scenarios and target-data cutover/rollback rehearsal remain unverified deployment-readiness work." - ], - "productionChanged": false - }, - "previewCacheIDQueryParity": { - "verifiedAt": "2026-11-03T16:03:16.335926+00:00", - "status": "verified_and_deployed_to_beta", - "sourceSHA256": "c3c0e69c67cd73ad38c34f34a541508b93c540ccdc29415b9584ec0d259a6a02", - "imageID": "sha256:3c406e5cd6c9d2fff6376b4ea6f2415ee9586f232efc12b965bfb45841ee6345", - "fixes": [ - "Parse extended cache-ID query shapes.", - "Support explicit ID lists, wrapped _id values and Mongoose-compatible hexadecimal/legacy ASCII casts.", - "Return generic internal_error for invalid casts and preserve strict scalar reconnect bypass.", - "Retain provider-binding, saved-identity and upstream authorization checks." - ], - "checks": { - "mongooseContracts": 16, - "raceProviderHints": { - "file": "/tmp/go-preview-hint-tests.log", - "sha256": "c2a3a7cc9256e7fd49f771a03fddbbdad0f3c18ff55a454b7c9f4becb57024fa" - }, - "goVet": "passed", - "liveAuthenticated": { - "file": "backend/reports/shadow-monitoring-authenticated-deployment.json", - "sha256": "71622113dc02f8139e092bb9a509237de8dd5cd1d552e02c287ff8caf8a90e4c" - }, - "temporaryKeyRevoked": true, - "uniqueRequestIDsVerified": 48, - "containerHealth": "healthy" - }, - "limits": [ - "Operator-shaped query objects are rejected rather than forwarding arbitrary Mongo selectors; this is intentionally stricter than Mongoose casting.", - "Valid cache-ID lists and provider identity/revocation checks use isolated fixtures; beta checks malformed-input rejection.", - "Full-suite evidence predates this focused change.", - "Admin/user search queries, preview name/branch inputs and Redis index limits remain open." - ], - "productionChanged": false - }, - "previewBranchQueryParity": { - "verifiedAt": "2026-11-03T16:09:34.089550+00:00", - "status": "superseded_by_preview_branch_discovery_order_parity", - "sourceSHA256": "4114547f63e7ce4a8fb6331ff85595eacc1b568ef624657db6a642af5314abc2", - "imageID": "sha256:b6d85c2c7f68ba1faadf6df3505c7bb065c5260a296d7a9df44345c422f34dc5", - "fixes": [ - "Normalize README branch query arrays and objects through the extended parser and JavaScript string coercion.", - "Preserve missing/empty scalar defaults without defaulting truthy empty arrays.", - "Keep upstream access checks before branch normalization and provider interfaces unchanged." - ], - "checks": { - "typescriptContracts": 12, - "racePreviewIntegration": { - "file": "/tmp/go-preview-branch-tests.log", - "sha256": "7ac00624b7ab2b9a5e848b2ce4317e29f75964cdbcc5b5c93928c9064a5386da" - }, - "goVet": "passed", - "gofmt": "passed", - "liveAuthenticated": { - "file": "backend/reports/shadow-monitoring-authenticated-deployment.json", - "sha256": "44f6d717befd8fb491ef3ed78d2c2d722eb616412e3a3f1b6f6e781d2d9c30bb" - }, - "containerHealth": "healthy" - }, - "limits": [ - "Malformed coercions and truthy empty arrays fail before branch discovery; TypeScript discovers branches before comparison. Upstream call/error ordering is not identical.", - "Branch selection and revoked access checks use isolated provider fixtures; the beta smoke covers authenticated deployment behavior.", - "The full race suite predates the focused preview cache-ID and branch changes.", - "Admin/user search queries, preview name inputs and Redis index limits remain open." - ], - "productionChanged": false - }, - "legacyUserSearchQueryParity": { - "verifiedAt": "2026-11-03T16:13:29.610666+00:00", - "status": "verified_and_deployed_to_beta", - "sourceSHA256": "41c9feed75362c3141517630106a70a2b4436c5beea28d360804e0f33f46d32d", - "imageID": "sha256:be9970d1584654eae005995a8da228fdd3423f87336148cf6d1a89c3153f1ded", - "fixes": [ - "Preserve scalar UTF-16 length, compacted array length and object length-property numeric gating.", - "Reject non-string searches after credential lookup, matching the installed Octokit endpoint.", - "Preserve Octokit literal-plus search separator behavior.", - "Correct the earlier preview-name finding: TypeScript uses path parameters, while Go generic name queries are provider extensions." - ], - "checks": { - "actualTypeScriptAndOctokitContracts": 24, - "raceIntegration": { - "file": "/tmp/go-user-search-tests.log", - "sha256": "cc4e5cbfc6c4a07de9fc36054e88ed64719a86cd2a6a3f373fb0c6a90bbc2e79" - }, - "goVet": "passed", - "gofmt": "passed", - "liveAuthenticated": { - "file": "backend/reports/shadow-monitoring-authenticated-deployment.json", - "sha256": "735e3e81db113a4acafe54edbe9c4ce1c123183f5c6226e930df262796297b26" - }, - "temporaryKeyRevoked": true, - "uniqueRequestIDsVerified": 53, - "containerHealth": "healthy" - }, - "limits": [ - "The route remains a GitHub-specific legacy endpoint; provider interfaces are unchanged.", - "Successful searches and upstream parameter/output checks use isolated fixtures; beta checks exercise empty-result and malformed-query responses.", - "Full race-suite evidence predates the focused preview and user-search changes.", - "Admin-list queries, README branch upstream error ordering and Redis path-index resource limits remain open." - ], - "productionChanged": false - }, - "adminListPaginationQueryParity": { - "verifiedAt": "2026-11-03T16:17:37.394386+00:00", - "status": "superseded_by_admin_filter_query_correction", - "sourceSHA256": "bfcb65a437860d832f2053eb778b77156e0137ff406f3201f0616c0c9478ff22", - "imageID": "sha256:4cbb188d001c5f03cc9265d6c94ece0a0b8e08a9ad1108f6715df512f0b8cfa9", - "fixes": [ - "Preserve extended-query parsing and JavaScript integer-prefix/Number semantics for admin page and limit.", - "Remove the artificial one-million-page cap and negative-value defaults; MongoDB rejects invalid pagination as in TypeScript.", - "Require scalar sort/direction/CSV values and retain safe sort-field validation.", - "Replace contract expectations that previously masked the page cap; correct the README claim about JavaScript trailing-newline sort validation." - ], - "checks": { - "actualTypeScriptPaginationContracts": 138, - "raceIntegration": { - "file": "/tmp/go-admin-pagination-tests.log", - "sha256": "f0dfe5220383578a6d97b12125f1b2ed77b4ba3bc973414c3793ec45dc8b3102" - }, - "statisticsWindowRegression": "passed", - "goVet": "passed", - "gofmt": "passed", - "liveAuthenticated": { - "file": "backend/reports/shadow-monitoring-authenticated-deployment.json", - "sha256": "3b299bfc4025a626f3f4873ae87da4679b4f6e96016ece87dfb05c4f21b46ccb" - }, - "temporaryKeyRevoked": true, - "uniqueRequestIDsVerified": 68, - "containerHealth": "healthy" - }, - "limits": [ - "Admin filter values, owner casting and JavaScript date parsing remain to audit.", - "Full backend race-suite evidence predates this focused change.", - "README branch error ordering and Redis path-index resource limits remain open." - ], - "productionChanged": false, - "correction": "The prior checks incorrectly expected negative repository/conference limits to fail. TypeScript uses find for those lists; negative limits request a single batch. adminFilterQueryParity restores find behavior and replaces those expectations." - }, - "adminFilterQueryParity": { - "verifiedAt": "2026-11-03T16:21:50.687838+00:00", - "status": "verified_and_deployed_to_beta", - "sourceSHA256": "b0f207dcda295ea8a057f4bf2153babf9c881ccc81c0872dd322049a7de31c23", - "imageID": "sha256:ffd1c0ef6bfa7e08f27c8308638f8290bfa5aa433e127cedb351d1e80a666127", - "fixes": [ - "Use extended-query loose equality for status flags, reject non-string search values, and require scalar role=admin.", - "Preserve malformed-search failure before repository owner lookup.", - "Correct prior pagination regression: repository/conference results use MongoDB Find, including negative-limit single-batch behavior; users retain aggregation.", - "Retain admin authorization and credential-excluding projections." - ], - "checks": { - "actualTypeScriptFilterContracts": 111, - "actualTypeScriptPaginationContracts": 138, - "installedNodeDriverNegativeLimitContracts": 3, - "raceIntegration": { - "file": "/tmp/go-admin-filter-query-tests.log", - "sha256": "1b03b4d9bb31c7bdd77c6b734c56a18d2145da3982d6d9259880c46070c97fbd" - }, - "goVet": "passed", - "gofmt": "passed", - "liveAuthenticated": { - "file": "backend/reports/shadow-monitoring-authenticated-deployment.json", - "sha256": "73d22f1815460ad1c4adf2fe43ed1178e5e49bc5f1e4a05c286e0d9e963c412a" - }, - "temporaryKeyRevoked": true, - "uniqueRequestIDsVerified": 73, - "containerHealth": "healthy" - }, - "limits": [ - "Owner/conference/status filter casting and JavaScript date parsing remain open. TypeScript find/count casts differ from aggregate matching; this needs explicit coverage.", - "Full backend race-suite evidence predates these focused changes.", - "README branch error ordering and Redis path-index resource limits remain open." - ], - "productionChanged": false - }, - "previewBranchDiscoveryOrderParity": { - "verifiedAt": "2026-11-03T16:26:43.733825+00:00", - "status": "verified_and_deployed_to_beta", - "sourceSHA256": "7d56aa5f82072a8be47239f45a9f5582875bc82251ee2fa46ad22a1b330be1c3", - "imageID": "sha256:6ca7883d30b57c9b6138a9500fd51c3f72fd139dea9dc3f650a50b77f8d9be92", - "fixes": [ - "Defer GitHub branch matching until discovery succeeds, preserving discovery errors before query-coercion errors.", - "Skip coercion for empty discovered branch lists and return readme_not_available.", - "Add optional provider.SelectedReadmePreviews with BranchMatch callback; existing provider interfaces remain supported and query parsing stays in shared routing.", - "Retain access checks before selection, commit-pinned reads and revision-checked cache writes." - ], - "checks": { - "actualTypeScriptDiscoveryOrderContracts": 9, - "actualTypeScriptSelectionContracts": 12, - "racePreviewIntegration": { - "file": "/tmp/go-preview-branch-order-tests.log", - "sha256": "fa99e33a135e226f1b1f6cd68f5f2d4f17515ef4266551c01ffaffe4d67ba718" - }, - "raceSecondProvider": { - "file": "/tmp/go-preview-selected-provider-tests.log", - "sha256": "9bcdd89bdfc01907c7f3526d6d838dc62928538f426eae4737ccce8b617a6771" - }, - "goVet": "passed", - "gofmt": "passed", - "liveAuthenticated": { - "file": "backend/reports/shadow-monitoring-authenticated-deployment.json", - "sha256": "c9f2888bdbedf330e0f59cd4760c08522471e764cb87577509e2add667360532" - }, - "temporaryKeyRevoked": true, - "uniqueRequestIDsVerified": 73, - "containerHealth": "healthy" - }, - "limits": [ - "Discovery/error ordering uses isolated provider fixtures; beta smoke checks authenticated deployment behavior.", - "Adapters opting into deferred selection must discover branches before invoking BranchMatch. Existing direct-read adapters retain their own protocol behavior.", - "Full backend race-suite evidence predates these focused changes.", - "Admin owner/conference/status casting, JavaScript date parsing and Redis path-index resource limits remain open." - ], - "productionChanged": false - }, - "adminMongooseCastingParity": { - "verifiedAt": "2026-11-03T16:35:57.840226+00:00", - "status": "verified_and_deployed_to_beta", - "sourceSHA256": "9e6b1a458559a52775adef69bb595e0bce88cada0bc2926726a3209f81234ffd", - "imageID": "sha256:0558041e9a196d8c58e49cdfbfad2e052666dcc4f77057df0faae8829f9490ce", - "fixes": [ - "Cast owner, status and conference predicates against installed Mongoose string-field semantics, including arrays, wrapped IDs and supported field operators.", - "Separate original aggregation snapshots, cast find/count/CSV predicates and echoed filters with nested operator mutations.", - "Preserve missing-owner short circuit before conference casting and reject unsupported operators/invalid casts.", - "Keep predicates scoped to fixed fields in administrator-only routes and retain credential-excluding projections." - ], - "checks": { - "actualMongooseCastingContracts": 117, - "actualTypeScriptDatabaseDifferentialCases": 27, - "databaseOracle": { - "file": "backend/contracts/admin-casting-database.cjs", - "sha256": "94f17dc3b020b7b06883218de6444690eed578c5102aa2ac79977fc5ad2b6478" - }, - "raceIntegration": { - "file": "/tmp/go-admin-casting-tests-final.log", - "sha256": "af645d3f03ce0009b2877810e0401f031ffbc96cb882ee5591bf9d758078c747" - }, - "goVet": "passed", - "gofmt": "passed", - "liveAuthenticated": { - "file": "backend/reports/shadow-monitoring-authenticated-deployment.json", - "sha256": "864971fc1ade5d95f5c3c9c5685f1fcb923e985de00354d0499aec74d49811d0" - }, - "temporaryKeyRevoked": true, - "uniqueRequestIDsVerified": 79, - "containerHealth": "healthy" - }, - "investigation": { - "initialDatabaseMismatch": "Scalar $in was cast for aggregation too early; the real TypeScript handler preserves the pre-cast snapshot and rejects that JSON request.", - "initialFailureLog": { - "file": "/tmp/go-admin-casting-tests.log", - "sha256": "f5c0ae2956d0577258692ae4d1b2277929ac153ec3dd23eb6638569bfa8e7d1e" - }, - "resolution": "Separate filter snapshots; all 27 database cases pass." - }, - "limits": [ - "JavaScript date parsing and extended date query coercion remain open.", - "Full backend race-suite evidence predates these focused changes.", - "Redis path-index resource-limit/storage parity remains open." - ], - "productionChanged": false - }, - "adminDateRangeParity": { - "verifiedAt": "2026-11-03T16:46:35.384623+00:00", - "status": "verified_and_deployed_to_beta", - "sourceSHA256": "abf849ef549ecfd91e92b37d0de70f61f7f44f0f7937bf3a70ad36953edb9543", - "imageID": "sha256:0e29ca8becc8c9d6fc370e2326278558ec05fd77df3e40627eed7a31850c61da", - "fixes": [ - "Use extended-query truthiness and string coercion for admin date ranges, preserving missing-owner short circuit.", - "Parse ISO dates with day normalization, end-of-day time, extended years, offsets, milliseconds and time clipping.", - "Parse legacy numeric and named dates, comments, AM/PM, timezone names and offsets according to V8 rules, in Go.", - "Retain V8 BSD license in the repository and runtime image." - ], - "checks": { - "actualTypeScriptDateContracts": 632, - "actualTypeScriptDatabaseDifferentialCases": 44, - "raceIntegration": { - "file": "/tmp/go-admin-dates-tests-final.log", - "sha256": "6261d0570d0eef742faf198dbf0a4cca7f849a84b3751a3b00b37bc06ae2c7a5" - }, - "goVet": "passed", - "gofmt": "passed", - "liveAuthenticated": { - "file": "backend/reports/shadow-monitoring-authenticated-deployment.json", - "sha256": "f6836b4c2a7ebae51ff23605e35540f137965707dd5e3d45fa3ac95a565d3515" - }, - "temporaryKeyRevoked": true, - "uniqueRequestIDsVerified": 88, - "containerHealth": "healthy", - "runtimeLicensePresent": true, - "license": { - "file": "backend/licenses/V8-LICENSE", - "sha256": "6ab33af8774a0f396ee3aeeb761e3229057682d6f9fa7f572e390c2cb3a6e509" - } - }, - "sourceReferences": [ - "https://github.com/v8/v8/blob/main/src/date/dateparser-inl.h", - "https://github.com/v8/v8/blob/main/src/date/dateparser.cc", - "https://github.com/v8/v8/blob/main/src/date/dateparser.h" - ], - "limits": [ - "Parsing is verified for the current UTC deployment; alternate local timezones are not covered.", - "The database oracle covers repository/user records; beta checks query output for all three admin list kinds.", - "Dashboard cursors still use their earlier date parser; other Date-constructor consumers require review.", - "Full backend race-suite evidence predates these focused changes.", - "Redis path-index resource-limit/storage parity remains open." - ], - "productionChanged": false - }, - "dashboardDateCursorParity": { - "verifiedAt": "2026-11-03T16:52:07.675007+00:00", - "status": "verified_and_deployed_to_beta", - "sourceSHA256": "149428c09b810782734e3ec63f1d4f15f05afba5f55f0faff4fdcab3ace1ce4b", - "imageID": "sha256:f50b78644067b1b5113a7549949ff2de007acbf2bea59680aaa9cd978b37c92b", - "fixes": [ - "Extract shared javascriptDateString and use it in admin filters and dashboard cursor dates.", - "Preserve existing numeric/null/boolean cursor conversions and invalid-cursor rejection.", - "Expand actual TypeScript pipeline contracts for three date sort fields and verify equivalent date representations select the same next repository." - ], - "checks": { - "actualTypeScriptCursorContracts": 1968, - "cursorHTTPContracts": 75, - "adminDateRegressionContracts": 632, - "raceIntegration": { - "file": "/tmp/go-dashboard-dates-tests-final.log", - "sha256": "27d0b4a0afaa85198828a0978e4142fef7dce174f2bde36c0b37cf653e9b8bdb" - }, - "goVet": "passed", - "gofmt": "passed", - "liveAuthenticated": { - "file": "backend/reports/shadow-monitoring-authenticated-deployment.json", - "sha256": "37733da146baed3c120e4fed13218f68e47903f8581cbb3cf0dc68fb1eb2c9ba" - }, - "temporaryKeyRevoked": true, - "uniqueRequestIDsVerified": 94, - "containerHealth": "healthy" - }, - "investigation": { - "initialFailure": "Expanded cursor cases exhausted the per-IP authentication-attempt budget in the test.", - "resolution": "Use isolated test IP batches; production throttling is unchanged." - }, - "limits": [ - "Parsing is verified for the current UTC deployment; alternate local timezones are not covered.", - "Conference form Date coercion still uses the older date helper and remains open.", - "Full backend race-suite evidence predates these focused changes.", - "Redis path-index resource-limit/storage parity remains open." - ], - "productionChanged": false - }, - "conferenceDateCastingParity": { - "verifiedAtUTC": "2026-11-03T17:02:12.961431+00:00", - "status": "verified_in_worktree_and_subsequently_deployed_see_conferenceBoundaryDateParity", - "sourceSHA256": "fab56a773a187593a74cde7fe1c3bce5f34020fc56b5bd1dc1d31941fc6b5ffc", - "fixes": [ - "Shared Date value conversion preserves invalid-date versus throwing-coercion validation ordering.", - "Conference start/end persistence accepts JavaScript legacy formats, overflow, arrays and numeric milliseconds.", - "Expiration option dates use Mongoose numeric-string and boolean behavior; invalid casts return 500 internal_error without mutation.", - "HTTP/database tests preserve ownership, public output and existing history, including second-provider lifecycle coverage." - ], - "checks": { - "raceIntegration": { - "file": "/tmp/go-conference-dates-options-tests.log", - "sha256": "3517669c8e6c5dba5c1c25eab6b598596176c8050196912bd88b20330d78b078", - "result": "passed", - "serverSeconds": 67.987 - }, - "contracts": { - "conferenceForms": 121, - "conferenceDates": 54, - "conferenceOptions": 58, - "dashboardCursors": 1968 - }, - "goVet": "passed ./internal/server" - }, - "limits": [ - "UTC deployment semantics; alternate local timezones not verified.", - "Downstream zero-time sentinel consumers remain to audit.", - "Full backend suite and beta deployment have not been revalidated for this revision." - ], - "productionChanged": false - }, - "conferenceBoundaryDateParity": { - "verifiedAtUTC": "2026-11-03T17:12:43.540304+00:00", - "status": "verified_and_deployed_to_beta", - "fixes": [ - "Conference billing caps year-0001 end dates and counts year-0001 removal dates as closed.", - "Conference expiry/removal preserve repositories with closed memberships at year 0001 and the Unix epoch.", - "API-token expiry presence is independent of Go zero time; expired scoped and unscoped tokens are rejected.", - "Dashboard pipeline fixture regenerated after cursor-date corpus expansion." - ], - "checks": { - "conferenceOutputContracts": 288, - "conferenceRaceIntegration": { - "file": "/tmp/go-conference-boundary-tests.log", - "sha256": "fb29be1671cb6938b0706663841fc9fa6f919b740ffe22705ba376aa47aeb30b" - }, - "dashboardPipelineContracts": 2103, - "dashboardPipelineRace": { - "file": "/tmp/go-date-parity-dashboard-pipeline.log", - "sha256": "6a83d08fa1f9a82394b706dd0205a0824b81d355f449656677b12dd9fbb6869c" - }, - "allContractCommands": 64, - "contractExecutionNote": "First 22 commands passed. Resumed with compiled GO_CONTRACT_BINARY; regenerated stale dashboard-pipeline fixture and verified it plus the final document-cleanup/webhook commands.", - "goVet": "passed ./...", - "gofmt": "passed", - "fullRaceIntegration": { - "file": "/tmp/go-date-parity-full-race.log", - "sha256": "5c4ee72c03097da6e51bf55741987d9cf46dfee566e3bac78f512eb68b373d6b", - "result": "passed", - "serverSeconds": 328.269 - }, - "betaBuild": { - "file": "/tmp/go-date-parity-build.log", - "sha256": "f8626f0e971c6695e1f6bae06a320c01dbc3bd0a2960e223fcdefdd7653af641" - }, - "betaDeployment": { - "file": "/tmp/go-date-parity-deploy.log", - "sha256": "71f5121263628e93c93dcaf0e7e6e6c197ae253bd1c2af6cbeadac9f28b3aa47" - }, - "betaAuthenticatedChecks": { - "file": "/tmp/go-date-parity-live.log", - "sha256": "68d8ee8ecfad59bc5d646649ed29a3b23d8641172c40a4f4efd224c6e62457dc", - "result": "passed", - "uniqueRequestIDs": 94, - "temporaryKeyRevoked": true - } - }, - "productionChanged": false, - "sourceSHA256": "056880142d52087644019a049937273be09bb0d8dc21389b4a2bb6e603990bf3", - "imageID": "sha256:f53e072c1165dba7951d178cf4488ef414b90987eff1da684af4250def9b1de2", - "limits": [ - "UTC deployment semantics; alternate local timezone parsing remains unverified.", - "Remaining repository/gist/PR date casts and missing-date sentinel checks are listed in remainingCodeParityFindings.", - "Path-index storage/size/lifecycle parity remains open; this validation does not prove production cutover readiness." - ] - }, - "resourceExpirationParity": { - "verifiedAtUTC": "2026-11-03T17:16:21.015670+00:00", - "status": "verified_and_deployed_to_beta", - "sourceSHA256": "008298657bc3de304440e95ef00e3dec604370d737b3e28ffdd62e33815887c4", - "imageID": "sha256:2ec5ffbac77b8130d14ba5b17dd4a560c427eaef9887110c7a56cf25fe23eeb0", - "fixes": [ - "Shared repository/gist/PR option conversion accepts JavaScript Date constructor inputs, including year 0001, legacy formats, arrays and numeric milliseconds; falsy inputs remain omitted.", - "Resource access and user/admin lists enforce stored expiration dates at year 0001 and the Unix epoch.", - "Expanded second-provider HTTP/database persistence coverage; authentication budgets remain unchanged." - ], - "checks": { - "optionContracts": 126, - "reactivationContracts": 60, - "resourceOutputContracts": 1048, - "raceIntegration": { - "file": "/tmp/go-resource-expiration-tests.log", - "sha256": "1d29b433f4043a0e2b466585da0dd006cd0fde3d9d1342afa5affe3a4944bf9b", - "result": "passed", - "serverSeconds": 8.348 - }, - "vet": "passed ./internal/server", - "formatting": "passed", - "build": { - "file": "/tmp/go-resource-expiration-build.log", - "sha256": "96186b3e4015217553ad6f53ac45a35e47a8aead229119cfc81dbcf4db813819" - }, - "deploy": { - "file": "/tmp/go-resource-expiration-deploy.log", - "sha256": "71f5121263628e93c93dcaf0e7e6e6c197ae253bd1c2af6cbeadac9f28b3aa47" - }, - "live": { - "file": "/tmp/go-resource-expiration-live.log", - "sha256": "f426bacdbd16a3c0ec593728faa4866d027736fd5550b32060e9f54c8a6e3b5a", - "result": "passed", - "temporaryKeyRevoked": true, - "uniqueRequestIDs": 94 - } - }, - "limits": [ - "Invalid-option create/edit coercion and error responses remain open.", - "Full backend race suite passed on the preceding revision; this revision has targeted race validation.", - "UTC deployment semantics and remaining date/path-index parity findings still apply." - ], - "productionChanged": false - }, - "compatibilityPolicy": { - "scope": "Preserve useful TypeScript behavior and provider-independent capabilities; do not reproduce TypeScript bugs.", - "source": "User clarification: we dont need to reproduce ts bugs in go.", - "intentionalDifferences": [ - "Invalid resource option casts return 400 for both creates and edits, without partial writes; TypeScript/Mongoose may return 500 or silently omit invalid fields.", - "Empty pageSource objects are omitted consistently instead of retaining different representations on create and edit." - ], - "verification": "150 actual Mongoose write cases plus Go second-provider HTTP assertions for valid persistence, 400 rejection, non-owner denial and no mutation; targeted race tests and beta deployment checks passed." - }, - "resourceOptionAtomicity": { - "verifiedAtUTC": "2026-11-03T17:24:58.764861+00:00", - "status": "verified_and_deployed_to_beta", - "sourceSHA256": "f1d65d162d0153b79efd387cdad1d42ec10526ea58021df81d50fae2f43c7b6f", - "imageID": "sha256:21aea381aafb7c9856d0df7cbbf3c0d6596af207f39c8b99a08ed66781b241c6", - "policy": "Valid behavior compatibility; TypeScript bugs are not parity requirements, per explicit user clarification.", - "changes": [ - "Invalid option fields consistently return 400 and do not mutate data on creates or edits.", - "Valid expirationMode and pageSource string casts accept scalar and string-_id document values.", - "Empty pageSource objects are consistently omitted.", - "No provider-specific logic was added; HTTP comparisons use the second-provider fixture." - ], - "checks": { - "actualMongooseCreateEditCases": 150, - "oracle": "backend/contracts/resource-options-database.cjs", - "raceIntegration": { - "file": "/tmp/go-resource-options-atomic-tests.log", - "sha256": "3ca2e1f379b407437fa52a1b659346c890dde8bfbceac2d0c38a0f3aabbbcc2b", - "result": "passed", - "serverSeconds": 22.446 - }, - "optionContracts": 126, - "goVet": "passed ./internal/server", - "betaBuild": { - "file": "/tmp/go-resource-options-atomic-build.log", - "sha256": "47505bcdcd90490bb56e5790c918414a6883c4101c4d3f8086a68eac106d67d7" - }, - "betaDeploy": { - "file": "/tmp/go-resource-options-atomic-deploy.log", - "sha256": "71f5121263628e93c93dcaf0e7e6e6c197ae253bd1c2af6cbeadac9f28b3aa47" - }, - "betaLive": { - "file": "/tmp/go-resource-options-atomic-live.log", - "sha256": "3c9a2c51787b2b206a0646e92eb83ff53e9279c551bf8d6ef9a32bca29a78bc5", - "result": "passed", - "uniqueRequestIDs": 94, - "temporaryKeyRevoked": true - } - }, - "intentionalDifferences": [ - "Do not reproduce Mongoose edit-time silent field omission for invalid casts.", - "Do not reproduce 500 responses for invalid client option casts.", - "Normalize empty pageSource consistently across creates and edits." - ], - "limits": [ - "Tests cover the extracted route option helpers and actual Mongoose writes, not every upstream failure ordering.", - "Remaining date consumers and path-index limits still require audit.", - "This revision has targeted race validation, not a new full-suite run." - ], - "productionChanged": false - }, - "streamingPathIndex": { - "verifiedAtUTC": "2026-11-03T17:36:23.820406+00:00", - "status": "verified_and_deployed_to_beta", - "sourceSHA256": "1127a3ec1df82fa0f8c2a15e26f70bfcac0741622ecd944e10d220bdb35a2e7e", - "imageID": "sha256:c7b26a414bdf60c274c6e2806865897c1b8d7bc77d65a7eb22bfd9c5788a077f", - "changes": [ - "Stream sorted MongoDB cursor rows to Redis in 500-row/1-MiB-target batches; remove whole-index Go map and 32-MiB total rejection.", - "Use ownership-checked HSETNX to retain first collision across batches.", - "Renew the 60-second lock and staging TTL on each batch instead of imposing a 45-second total deadline.", - "Check staging sequence to reject lost temporary hashes; request cancellation and revision retirement prevent publication; bound cleanup to five seconds." - ], - "checks": { - "raceIntegration": { - "file": "/tmp/go-path-index-streaming-verified-tests.log", - "sha256": "bb60ea2680e89241a9d1ff425bfdcda83a111dbc7eefad32ef313d0cb09bdf7c", - "result": "passed", - "serverSeconds": 88.443, - "coverage": [ - "10001-row encoded index above 32 MiB", - "byte and row batching", - "first collision across batches", - "original path precedence", - "ownership renewal and stale owners", - "lost staging and cancellation", - "metadata/commit/access/status revision guards", - "large file tree scan beyond 100000 rows", - "metadata contracts, folder paths and truncated-file recovery" - ] - }, - "vet": "passed ./internal/server", - "formatting": "passed", - "betaBuild": { - "file": "/tmp/go-path-index-streaming-final-build.log", - "sha256": "b25dba18216eac765d40dec0beb810c9d63d4fdacc602f2f46852a0868d34893" - }, - "betaDeploy": { - "file": "/tmp/go-path-index-streaming-deploy.log", - "sha256": "71f5121263628e93c93dcaf0e7e6e6c197ae253bd1c2af6cbeadac9f28b3aa47" - }, - "betaLive": { - "file": "/tmp/go-path-index-streaming-live.log", - "sha256": "cc1f46e58abcfd4f2ab537cca2df1c2cad65d35c36a2c5af5c93fcfcf1cd5a23", - "result": "passed", - "temporaryKeyRevoked": true, - "uniqueRequestIDs": 94 - } - }, - "limits": [ - "Redis still holds the complete published index; this change bounds application build buffering, not total cache storage.", - "Competing builders wait up to ten seconds; ownership loss fails closed.", - "Published-cache eviction between readiness and lookup, and remaining invalidation writers, still need audit.", - "No end-to-end speedup claim or fresh full-backend race run for this revision." - ], - "productionChanged": false - }, - "pathIndexEvictionRecovery": { - "verifiedAtUTC": "2026-11-03T17:41:15.831160+00:00", - "status": "verified_and_deployed_to_beta", - "sourceSHA256": "3ccff46126d77442b9e25dc723f82fa2fa4c9853904f1fa3671bbba6dfbd68ac", - "imageID": "sha256:744e65be99adcc006c4f7c9ec8e26d0af74d17bc447a85a6717c9375d3b4e203", - "changes": [ - "Read ready marker and entry atomically with HMGET.", - "Release build ownership before lookup and retry one evicted index; repeated eviction returns 503 instead of false 404.", - "Validate repository snapshot before missing-file recovery and after successful lookup.", - "Bound lock-release cleanup to five seconds." - ], - "checks": { - "raceIntegration": { - "file": "/tmp/go-path-index-eviction-tests.log", - "sha256": "63838c98e7b5ebb99db002e6a1e64bc65720362eb61ea5801f7ad34329ebac67", - "result": "passed", - "serverSeconds": 24.934, - "cases": [ - "one eviction rebuilds existing file", - "repeated eviction returns 503", - "genuine missing file returns 404", - "retired revision during retry returns 409", - "existing path-index capacity/collision/revision/cancellation and truncated-file recovery tests" - ] - }, - "goVet": "passed ./internal/server", - "formatting": "passed", - "betaBuild": { - "file": "/tmp/go-path-index-eviction-build.log", - "sha256": "cf20ebdb54d50756c34bc69b1ef873656e0f4d9a340b55e4d78eb648a1cd2799" - }, - "betaDeploy": { - "file": "/tmp/go-path-index-eviction-deploy.log", - "sha256": "71f5121263628e93c93dcaf0e7e6e6c197ae253bd1c2af6cbeadac9f28b3aa47" - }, - "betaLive": { - "file": "/tmp/go-path-index-eviction-live.log", - "sha256": "fb1cf1537b742abc5719c106552856d878a4789a8ef05f90821d22d425f388b0", - "result": "passed", - "uniqueRequestIDs": 94, - "temporaryKeyRevoked": true - } - }, - "limits": [ - "Pending recovery rows through transformed-path indexing require a focused regression; this is recorded in remainingCodeParityFindings.", - "Targeted race validation only on this revision; no new full backend suite." - ], - "productionChanged": false - }, - "pendingMetadataPathIndex": { - "verifiedAtUTC": "2026-11-03T17:48:44.725004+00:00", - "status": "verified_and_deployed_to_beta", - "sourceSHA256": "80fb3c27b4e052a7a1f60f69cebcd2ca721007f74bab759336174a63fffa4dbc", - "imageID": "sha256:68e7b26c066054c73e3a4f63329607b358fc2826aff0ebb81711c8b6f9d5716d", - "changes": [ - "Validate pending recovery snapshots before transformed-path indexing.", - "Complete valid recovery, then rebuild under the updated metadata revision; reject stale rows.", - "Version cache namespace to invalidate previously unchecked indexes." - ], - "checks": { - "raceIntegration": { - "file": "/tmp/go-pending-index-after.log", - "sha256": "6a246228dac6f20235571daf3056521388b5784e62a9746972e4972aa82e6976", - "result": "passed" - }, - "betaBuild": { - "file": "/tmp/go-pending-index-build.log", - "sha256": "8e66f81aff84cf4d9fb8c7d213e604403dfe276932180cfe65a133753a5dd82f", - "result": "passed" - }, - "betaDeploy": { - "file": "/tmp/go-pending-index-deploy.log", - "sha256": "c849fba097d234d35f61a7619ebcacf71853659975af643e8bf3c8f9fae8f78e", - "result": "passed" - }, - "betaLive": { - "file": "/tmp/go-pending-index-live.log", - "sha256": "d04e7b4ab073d2abf014d0836ade2936852c3b1d31c4e1204ba705386ce0bcc2", - "result": "passed", - "uniqueRequestIDs": 94, - "temporaryKeyRevoked": true - }, - "goVet": "passed ./internal/server", - "formatting": "passed" - }, - "limits": [ - "Targeted race suite on this revision; production cutover remains unverified." - ], - "productionChanged": false - }, - "documentPreviewConnectionQuery": { - "verifiedAtUTC": "2026-11-03T17:52:21.757946+00:00", - "status": "verified_and_deployed_to_beta", - "sourceSHA256": "8d93f2e1ae0f173c11fc201290f057ebda5334ae57fb081bfb0938d54c18610f", - "imageID": "sha256:bffb4018684376b4ab47e995d438f51b2adc11f99d641dce74c1bb41218ed947", - "changes": [ - "Document previews share repository preview connection validation.", - "Reject ambiguous choices before provider access; preserve custom provider connection names." - ], - "checks": { - "targetedRaceTests": { - "file": "/tmp/go-document-query-after.log", - "sha256": "66100034347ccd0023b216b6451a3555eaafd6ac66906628cb232da9a353efca", - "result": "passed" - }, - "betaBuild": { - "file": "/tmp/go-document-query-build.log", - "sha256": "b48cff62a22392f85e6a8dfb16b2896635c562684b4e7a9cda272080cd467b55", - "result": "passed" - }, - "betaDeploy": { - "file": "/tmp/go-document-query-deploy.log", - "sha256": "c849fba097d234d35f61a7619ebcacf71853659975af643e8bf3c8f9fae8f78e", - "result": "passed" - }, - "betaLive": { - "file": "/tmp/go-document-query-live.log", - "sha256": "4675ebdedfb89187f882e1ee62d9b1ccd65851609763485a0e7ddf5753d1c72b", - "result": "passed", - "uniqueRequestIDs": 94, - "temporaryKeyRevoked": true - }, - "goVet": "passed ./internal/server", - "formatting": "passed" - }, - "audit": "backend/reports/query-consumer-audit.json", - "limits": [ - "Targeted race tests only on this revision.", - "Persisted date-consumer review and final full-scope validation remain." - ], - "productionChanged": false - }, - "storedDatePresence": { - "verifiedAtUTC": "2026-11-03T17:57:32.297099+00:00", - "status": "verified_and_deployed_to_beta", - "sourceSHA256": "5fa7b8ad51e3b924f83ae57b2a64216a58acf1143b12f489be59c194429f883a", - "imageID": "sha256:350675a547af188bce3e01061364ffa859a33d47a80353ad8f16dba21f6a91e5", - "changes": [ - "Separate stored-date validity from Go zero-time value.", - "Preserve valid old dates in recovery, refresh, cache identity, membership replay, admin jobs and commit timestamps.", - "Select latest valid repository update date without a zero-time lower bound." - ], - "checks": { - "targetedRace": { - "file": "/tmp/go-stored-date-tests.log", - "sha256": "bf0dcc4f3fdce4ce2463ac6fb169d3df55512e550178bb84deb3f5e7a479f897", - "result": "passed" - }, - "lifecycleRace": { - "file": "/tmp/go-stored-date-lifecycle-tests.log", - "sha256": "93f5526b3053c6cbb84cbb3414ccfda128f3b363b13f870790d43be08f0a16ca", - "result": "passed" - }, - "betaBuild": { - "file": "/tmp/go-stored-date-build.log", - "sha256": "1b5fa294016c15d54c6500ae7edcf61a42afeac16296ec12e8ef8bbeac4be48e", - "result": "passed" - }, - "betaDeploy": { - "file": "/tmp/go-stored-date-deploy.log", - "sha256": "c849fba097d234d35f61a7619ebcacf71853659975af643e8bf3c8f9fae8f78e", - "result": "passed" - }, - "betaLive": { - "file": "/tmp/go-stored-date-live.log", - "sha256": "d9853b1ecc0b7fc21bb7c2c1af493fa30c82aae6f5a09cecec8664064974dcd8", - "result": "passed", - "uniqueRequestIDs": 94, - "temporaryKeyRevoked": true - }, - "goVet": "passed ./internal/server", - "formatting": "passed" - }, - "audit": "backend/reports/query-consumer-audit.json", - "limits": [ - "Full backend race suite now passed; see completionAudit.", - "Production cutover remains unverified." - ], - "productionChanged": false - }, - "completionAudit": { - "file": "backend/reports/implementation-completion-audit.json", - "status": "implementation_verified", - "contractsPassed": 64, - "routeContracts": 112, - "goVet": "passed ./...", - "formatting": "passed", - "vulnerabilities": "zero reachable and imported-package findings; four unused-module advisories", - "deploymentSmoke": "passed", - "fullRace": "Passed all packages after aligning the integration test context with the Go runner deadline.", - "verifiedAtUTC": "2026-11-03T18:13:34.084892+00:00", - "goSourceSHA256": "800d00337ffc0eba9983b59489a525da86e4a880f0525b63c0ce9c0b8d1dafac", - "fullRaceLogSHA256": "0ce54b362a54110feb9551427e8c65fb27738cd9f9299425574498161dab42ef" - }, - "replacementPathOptimization": { - "status": "verified_and_deployed_to_beta", - "evidence": "backend/reports/replacement-path-validation.json", - "changes": "Avoid lowercase copies and repeated output scans in replacement-heavy ASCII matching. Preserve ordered replacement and output hashes.", - "validation": "499 TypeScript differential cases, randomized matcher/reference tests, anonymizer race tests, targeted HTTP path race tests, vet, formatting, beta build and 94 authenticated checks. Full suite in completionAudit predates this optimization." - } -} diff --git a/backend/reports/container-smoke.json b/backend/reports/container-smoke.json deleted file mode 100644 index b044581..0000000 --- a/backend/reports/container-smoke.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "image": "anonymous-go-audit:local", - "uid": "10001:10001", - "readOnly": true, - "checks": [ - { - "path": "/healthcheck", - "status": 200 - }, - { - "path": "/", - "status": 200 - }, - { - "path": "/api/user", - "status": 401 - }, - { - "path": "/api/repo/container-fixture/file/XXXX-1.txt", - "status": 200 - }, - { - "path": "/w/container-fixture/", - "status": 200 - } - ], - "browser": { - "path": "/w/container-fixture/", - "visibleText": "XXXX-1 test", - "consoleErrors": 0, - "scriptInjectionExecuted": false, - "assetsHTTPStatus": 200 - } -} diff --git a/backend/reports/file-type-parity.json b/backend/reports/file-type-parity.json deleted file mode 100644 index 545a632..0000000 --- a/backend/reports/file-type-parity.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "cases": 7876, - "passed": 7876, - "failures": [] -} diff --git a/backend/reports/file-web-after.json b/backend/reports/file-web-after.json deleted file mode 100644 index 55b9aac..0000000 --- a/backend/reports/file-web-after.json +++ /dev/null @@ -1,2880 +0,0 @@ -{ - "deploymentChecks": { - "verifiedAt": "2026-11-03T20:57:28.093Z", - "hostname": "beta.durieux.me", - "configurationMode": "GitHub App enabled alongside legacy OAuth", - "checks": [ - { - "method": "GET", - "route": "/api/user", - "requestID": "88704ced-bb63-4693-821f-da569a1a8b14", - "status": 401, - "expected": 401, - "bytes": 25, - "headersMs": 287, - "firstBodyByteMs": 290, - "elapsedMs": 302 - }, - { - "method": "GET", - "route": "/api/user", - "requestID": "dbb23a3a-66f9-4c8a-9914-ba151c1bcbfa", - "status": 200, - "expected": 200, - "bytes": 100, - "headersMs": 89, - "firstBodyByteMs": 95, - "elapsedMs": 97 - }, - { - "method": "GET", - "route": "/github/connections", - "requestID": "7e7fbbba-e96f-4573-ad4e-5fc34bfa9d2d", - "status": 200, - "expected": 200, - "bytes": 456, - "headersMs": 1180, - "firstBodyByteMs": 1182, - "elapsedMs": 1186 - }, - { - "method": "GET", - "route": "/api/providers", - "requestID": "e68f7538-d5c9-407d-8bc4-edd3100412fc", - "status": 200, - "expected": 200, - "bytes": 144, - "headersMs": 46, - "firstBodyByteMs": 49, - "elapsedMs": 50 - }, - { - "method": "GET", - "route": "/api/user/dashboard", - "requestID": "94c7db98-cbbe-4491-8d0f-f04b5f654d31", - "status": 200, - "expected": 200, - "bytes": 796, - "headersMs": 54, - "firstBodyByteMs": 56, - "elapsedMs": 57 - }, - { - "method": "GET", - "route": "/api/user/default", - "requestID": "315e794a-e909-4f6c-81e7-9b87d63011d6", - "status": 200, - "expected": 200, - "bytes": 25, - "headersMs": 33, - "firstBodyByteMs": 33, - "elapsedMs": 34 - }, - { - "method": "GET", - "route": "/api/user/quota", - "requestID": "744443df-afc8-452a-920d-9516f5ab11c3", - "status": 200, - "expected": 200, - "bytes": 115, - "headersMs": 48, - "firstBodyByteMs": 50, - "elapsedMs": 51 - }, - { - "method": "GET", - "route": "/api/admin/overview", - "requestID": "ae600b67-c293-4267-a93e-942a0e05411f", - "status": 200, - "expected": 200, - "bytes": 1139, - "headersMs": 124, - "firstBodyByteMs": 124, - "elapsedMs": 127 - }, - { - "method": "GET", - "route": "/api/admin/users", - "requestID": "23319ebc-e24e-43fd-92d5-3226e162826b", - "status": 200, - "expected": 200, - "bytes": 526, - "headersMs": 53, - "firstBodyByteMs": 55, - "elapsedMs": 55 - }, - { - "method": "GET", - "route": "/api/admin/repos", - "requestID": "097d8d39-29f0-4d96-a2eb-2bbaeed2b107", - "status": 200, - "expected": 200, - "bytes": 12115, - "headersMs": 45, - "firstBodyByteMs": 49, - "elapsedMs": 51 - }, - { - "method": "GET", - "route": "/api/admin/queues", - "requestID": "7281ede6-6bf2-47df-bf1b-89ab9db0d753", - "status": 200, - "expected": 200, - "bytes": 6061, - "headersMs": 68, - "firstBodyByteMs": 69, - "elapsedMs": 71 - }, - { - "method": "GET", - "route": "/api/admin/performance", - "requestID": "1c14c6c8-3422-4fb3-88a2-599149430a0b", - "status": 200, - "expected": 200, - "bytes": 31321, - "headersMs": 87, - "firstBodyByteMs": 89, - "elapsedMs": 94 - }, - { - "method": "GET", - "route": "/api/admin/errors", - "requestID": "b4b65c6b-5bda-4461-8ba4-3df4f31ae42b", - "status": 200, - "expected": 200, - "bytes": 59479, - "headersMs": 48, - "firstBodyByteMs": 50, - "elapsedMs": 55 - }, - { - "method": "GET", - "route": "/api/admin/errors/stats", - "requestID": "7379e52a-a20d-44a9-9e40-6701419004d7", - "status": 200, - "expected": 200, - "bytes": 1396, - "headersMs": 46, - "firstBodyByteMs": 48, - "elapsedMs": 48 - }, - { - "method": "GET", - "route": "/api/admin/tokens", - "requestID": "38a6b957-d272-40e4-b60f-070b64fa4c48", - "status": 200, - "expected": 200, - "bytes": 160, - "headersMs": 44, - "firstBodyByteMs": 45, - "elapsedMs": 46 - }, - { - "method": "GET", - "route": "/api/admin/errors?limit=5001", - "requestID": "0294ba73-b7af-4c82-a9d3-78c6f1b34952", - "status": 200, - "expected": 200, - "bytes": 172095, - "headersMs": 89, - "firstBodyByteMs": 92, - "elapsedMs": 102 - }, - { - "method": "GET", - "route": "/api/admin/errors/stats", - "requestID": "4c3a7afa-6504-4231-8916-f400ff609473", - "status": 200, - "expected": 200, - "bytes": 1396, - "headersMs": 35, - "firstBodyByteMs": 36, - "elapsedMs": 36 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793739448098-missing", - "requestID": "ad38a516-8223-493c-b439-a13353cbafe0", - "status": 404, - "expected": 404, - "bytes": 26, - "headersMs": 32, - "firstBodyByteMs": 33, - "elapsedMs": 33 - }, - { - "method": "GET", - "route": "/api/admin/errors/stats", - "requestID": "9529b708-e15d-4e16-90d7-86a8db8646a3", - "status": 200, - "expected": 200, - "bytes": 1396, - "headersMs": 49, - "firstBodyByteMs": 50, - "elapsedMs": 51 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=download&range=1h", - "requestID": "bcb32c42-327d-471c-a812-0c5665f94189", - "status": 200, - "expected": 200, - "bytes": 3425, - "headersMs": 46, - "firstBodyByteMs": 47, - "elapsedMs": 48 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=download&range=6h", - "requestID": "37ef3b7b-40bd-40b5-b90b-24f3607e32d8", - "status": 200, - "expected": 200, - "bytes": 20225, - "headersMs": 33, - "firstBodyByteMs": 34, - "elapsedMs": 35 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=download&range=24h", - "requestID": "96343e10-3d37-4347-b0fb-bc600b6e11f7", - "status": 200, - "expected": 200, - "bytes": 80735, - "headersMs": 36, - "firstBodyByteMs": 37, - "elapsedMs": 40 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=download&range=7d", - "requestID": "f390ace5-2b24-4306-8385-3b985219b9a4", - "status": 200, - "expected": 200, - "bytes": 564574, - "headersMs": 127, - "firstBodyByteMs": 128, - "elapsedMs": 154 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=remove&range=1h", - "requestID": "0bb49d57-49df-43f8-acd9-a7b79cc5091d", - "status": 200, - "expected": 200, - "bytes": 3408, - "headersMs": 35, - "firstBodyByteMs": 36, - "elapsedMs": 37 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=cache&range=1h", - "requestID": "b7e501b7-21f0-4074-a1c0-d82e12652b4b", - "status": 200, - "expected": 200, - "bytes": 3401, - "headersMs": 32, - "firstBodyByteMs": 33, - "elapsedMs": 33 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=download&range=unrecognized", - "requestID": "3e54ae80-8727-4061-80b2-133293d578b7", - "status": 200, - "expected": 200, - "bytes": 3435, - "headersMs": 46, - "firstBodyByteMs": 47, - "elapsedMs": 48 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=unknown", - "requestID": "875bad4a-2bdd-40d3-815b-ada2adbddc52", - "status": 404, - "expected": 404, - "bytes": 27, - "headersMs": 46, - "firstBodyByteMs": 46, - "elapsedMs": 46 - }, - { - "method": "GET", - "route": "/api/stat", - "requestID": "c189b1f9-e87e-4858-9cb3-750290362b2f", - "status": 200, - "expected": 200, - "bytes": 69, - "headersMs": 39, - "firstBodyByteMs": 40, - "elapsedMs": 41 - }, - { - "method": "GET", - "route": "/api/stat/history?days=-2", - "requestID": "a158c0cc-81c4-45fb-994e-7f5b64c5a970", - "status": 200, - "expected": 200, - "bytes": 105, - "headersMs": 26, - "firstBodyByteMs": 27, - "elapsedMs": 28 - }, - { - "method": "GET", - "route": "/api/stat/history?days=0", - "requestID": "0011e1be-f575-453e-b5ee-5bb662235fe5", - "status": 200, - "expected": 200, - "bytes": 105, - "headersMs": 28, - "firstBodyByteMs": 29, - "elapsedMs": 29 - }, - { - "method": "GET", - "route": "/api/stat/history?days=0x10", - "requestID": "d7c5f3a5-26ae-4818-abae-0beaf8664ea2", - "status": 200, - "expected": 200, - "bytes": 105, - "headersMs": 28, - "firstBodyByteMs": 29, - "elapsedMs": 29 - }, - { - "method": "GET", - "route": "/api/stat/history?days=7suffix", - "requestID": "fd30bb3a-7707-4b9f-8b79-429cfb0bfd0b", - "status": 200, - "expected": 200, - "bytes": 105, - "headersMs": 26, - "firstBodyByteMs": 27, - "elapsedMs": 27 - }, - { - "method": "GET", - "route": "/api/stat/history?days=999", - "requestID": "6f3c4bae-4907-423f-8d3a-cf8516b1ffa5", - "status": 200, - "expected": 200, - "bytes": 105, - "headersMs": 28, - "firstBodyByteMs": 29, - "elapsedMs": 29 - }, - { - "method": "GET", - "route": "/api/stat/history?days[]=7&days[]=30", - "requestID": "e9222993-9fca-477b-94f0-2d05685fc7e9", - "status": 200, - "expected": 200, - "bytes": 105, - "headersMs": 26, - "firstBodyByteMs": 27, - "elapsedMs": 27 - }, - { - "method": "GET", - "route": "/api/stat/history?days[1]=7&days[0]=1", - "requestID": "e9085bf7-5203-4b79-8d75-5723862d5884", - "status": 200, - "expected": 200, - "bytes": 105, - "headersMs": 29, - "firstBodyByteMs": 30, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/api/stat/history?days[x]=7", - "requestID": "fcbb7efa-5f58-41dd-82e3-21f5faca7977", - "status": 200, - "expected": 200, - "bytes": 105, - "headersMs": 25, - "firstBodyByteMs": 26, - "elapsedMs": 26 - }, - { - "method": "GET", - "route": "/api/user/dashboard?statuses[]=", - "requestID": "720c6722-18e2-4fe1-92ad-9f36eadff7cb", - "status": 200, - "expected": 200, - "bytes": 64, - "headersMs": 47, - "firstBodyByteMs": 48, - "elapsedMs": 49 - }, - { - "method": "GET", - "route": "/api/user/dashboard?type[]=repo", - "requestID": "8570a081-1d05-4adc-9c77-2b743006b877", - "status": 200, - "expected": 200, - "bytes": 64, - "headersMs": 47, - "firstBodyByteMs": 48, - "elapsedMs": 48 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort[]=", - "requestID": "870c467b-fc0a-4535-a146-b3691da9262b", - "status": 400, - "expected": 400, - "bytes": 24, - "headersMs": 29, - "firstBodyByteMs": 29, - "elapsedMs": 29 - }, - { - "method": "GET", - "route": "/api/user/dashboard?cursor[]=", - "requestID": "9a0a4238-3c87-4b3d-9c88-da55eea993cf", - "status": 400, - "expected": 400, - "bytes": 26, - "headersMs": 46, - "firstBodyByteMs": 46, - "elapsedMs": 46 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort=anonymizeDate&limit=5&cursor=eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDEiLCJ2YWx1ZSI6IjIwMjQtMDMtMDFUMDA6MDA6MDAuMDAwWiJ9", - "requestID": "eb04c406-8bef-4331-aef4-883b1c9c966f", - "status": 200, - "expected": 200, - "bytes": 796, - "headersMs": 50, - "firstBodyByteMs": 51, - "elapsedMs": 53 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort=anonymizeDate&limit=5&cursor=eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDEiLCJ2YWx1ZSI6Ik1hcmNoIDEgMjAyNCJ9", - "requestID": "8fcc28ee-0a00-4071-a87f-9d11bedd5f3f", - "status": 200, - "expected": 200, - "bytes": 796, - "headersMs": 49, - "firstBodyByteMs": 50, - "elapsedMs": 50 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort=anonymizeDate&limit=5&cursor=eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDEiLCJ2YWx1ZSI6IjIwMjQtMDItMzAifQ", - "requestID": "628e1231-3bad-45a0-bb33-d7dc0400315f", - "status": 200, - "expected": 200, - "bytes": 796, - "headersMs": 51, - "firstBodyByteMs": 52, - "elapsedMs": 53 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort=anonymizeDate&limit=5&cursor=eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMjQ6MDA6MDBaIn0", - "requestID": "34f244ba-b97c-4ba9-bde3-01c06e2b1751", - "status": 200, - "expected": 200, - "bytes": 796, - "headersMs": 49, - "firstBodyByteMs": 50, - "elapsedMs": 50 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort=anonymizeDate&limit=5&cursor=eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDEiLCJ2YWx1ZSI6WyIyMDI0IiwiMyIsIjEiXX0", - "requestID": "01f1fa45-a1c3-4e14-b044-718a2a2fcecf", - "status": 200, - "expected": 200, - "bytes": 796, - "headersMs": 44, - "firstBodyByteMs": 45, - "elapsedMs": 45 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort=anonymizeDate&limit=5&cursor=eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDEiLCJ2YWx1ZSI6Im5vdCBhIGRhdGUifQ", - "requestID": "204edc83-e1b7-4371-aeea-e4b2a76b125d", - "status": 400, - "expected": 400, - "bytes": 26, - "headersMs": 30, - "firstBodyByteMs": 30, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/api/admin/performance?minutes=6e1", - "requestID": "dee96c7e-8a62-47c9-b5f8-468924b4978c", - "status": 200, - "expected": 200, - "bytes": 68527, - "headersMs": 104, - "firstBodyByteMs": 105, - "elapsedMs": 109 - }, - { - "method": "GET", - "route": "/api/admin/performance?minutes[]=60", - "requestID": "9b4d6965-b40b-4a2f-8412-f725b0a3f53e", - "status": 200, - "expected": 200, - "bytes": 68527, - "headersMs": 103, - "firstBodyByteMs": 104, - "elapsedMs": 106 - }, - { - "method": "GET", - "route": "/api/admin/performance?minutes[0]=15", - "requestID": "c6922a22-c3d7-4118-8ac4-6d95479523f1", - "status": 200, - "expected": 200, - "bytes": 31335, - "headersMs": 70, - "firstBodyByteMs": 70, - "elapsedMs": 72 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue[]=cache&range[]=6h", - "requestID": "183479d9-e4af-4987-9952-8b82dd3dd558", - "status": 200, - "expected": 200, - "bytes": 20201, - "headersMs": 36, - "firstBodyByteMs": 37, - "elapsedMs": 38 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?range[]=", - "requestID": "684098e0-4cf7-44a9-8596-a5230231d6db", - "status": 200, - "expected": 200, - "bytes": 3423, - "headersMs": 32, - "firstBodyByteMs": 33, - "elapsedMs": 33 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?range=toString", - "requestID": "21dd730f-08b5-4b2e-bd68-393b69d0c847", - "status": 200, - "expected": 200, - "bytes": 51, - "headersMs": 42, - "firstBodyByteMs": 43, - "elapsedMs": 43 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue[]=", - "requestID": "039a9e69-5b4a-47c8-8d9e-d13bae98a1e3", - "status": 404, - "expected": 404, - "bytes": 27, - "headersMs": 30, - "firstBodyByteMs": 30, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/api/admin/queues?queue[]=remove", - "requestID": "a430cc12-ce44-49c3-9c1b-93789d67c2b8", - "status": 200, - "expected": 200, - "bytes": 5784, - "headersMs": 65, - "firstBodyByteMs": 66, - "elapsedMs": 67 - }, - { - "method": "GET", - "route": "/api/admin/errors?offset[]=2&limit[]=7", - "requestID": "a6eed9a8-e491-4e62-bb4b-b2967e49c1bf", - "status": 200, - "expected": 200, - "bytes": 2220, - "headersMs": 32, - "firstBodyByteMs": 33, - "elapsedMs": 33 - }, - { - "method": "GET", - "route": "/api/repo/octocat/Hello-World?connection=", - "requestID": "b3f52467-bac2-47d9-bbe5-8b1362bc9d14", - "status": 400, - "expected": 400, - "bytes": 30, - "headersMs": 28, - "firstBodyByteMs": 29, - "elapsedMs": 29 - }, - { - "method": "GET", - "route": "/api/repo/octocat/Hello-World?connection[]=oauth", - "requestID": "ed9db750-77a2-4193-8a25-6391141295ab", - "status": 400, - "expected": 400, - "bytes": 30, - "headersMs": 44, - "firstBodyByteMs": 44, - "elapsedMs": 44 - }, - { - "method": "GET", - "route": "/api/repo/octocat/Hello-World?connection=oauth&connection[]=github-app", - "requestID": "a2f58f36-1444-40a5-92c5-c44890b4f573", - "status": 400, - "expected": 400, - "bytes": 30, - "headersMs": 28, - "firstBodyByteMs": 28, - "elapsedMs": 28 - }, - { - "method": "GET", - "route": "/api/repo/octocat/Hello-World?repositoryID[]=invalid", - "requestID": "0fb8f9a9-8596-458c-979b-87d5362334d7", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 46, - "firstBodyByteMs": 46, - "elapsedMs": 46 - }, - { - "method": "GET", - "route": "/api/repo/octocat/Hello-World?repositoryID=invalid", - "requestID": "d49fa9c7-f3ff-4568-b02e-43a500a27971", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 29, - "firstBodyByteMs": 29, - "elapsedMs": 29 - }, - { - "method": "GET", - "route": "/api/repo/octocat/Hello-World?repositoryID[$exists]=true", - "requestID": "023cfce0-98b0-4a10-b64a-ae870e114b84", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 30, - "firstBodyByteMs": 30, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/api/user/search/github-users?q[]=ab", - "requestID": "765359b2-11fa-4305-bad1-0819247a7458", - "status": 200, - "expected": 200, - "bytes": 2, - "headersMs": 28, - "firstBodyByteMs": 28, - "elapsedMs": 28 - }, - { - "method": "GET", - "route": "/api/user/search/github-users?q[length]=1", - "requestID": "33ef9dc0-ae8b-477d-ba08-190a30b510f6", - "status": 200, - "expected": 200, - "bytes": 2, - "headersMs": 29, - "firstBodyByteMs": 29, - "elapsedMs": 29 - }, - { - "method": "GET", - "route": "/api/user/search/github-users?q=ab&q=cd", - "requestID": "ceb99e3d-368e-433b-89d3-fd4c585364b3", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 32, - "firstBodyByteMs": 32, - "elapsedMs": 33 - }, - { - "method": "GET", - "route": "/api/user/search/github-users?q[x]=ab", - "requestID": "ce493579-21e0-4563-8b45-95a0c1c359c8", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 34, - "firstBodyByteMs": 35, - "elapsedMs": 35 - }, - { - "method": "GET", - "route": "/api/user/search/github-users?q[length][toString]=1", - "requestID": "3fce3862-89db-463a-a673-fafc261f5947", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 29, - "firstBodyByteMs": 29, - "elapsedMs": 29 - }, - { - "method": "GET", - "route": "/api/admin/repos?page[]=2&limit[]=2&sort[]=status&direction[]=asc&format[]=csv", - "requestID": "1df4c3dc-5a84-4222-8c9a-a4797fb7761f", - "status": 200, - "expected": 200, - "bytes": 2568, - "headersMs": 34, - "firstBodyByteMs": 35, - "elapsedMs": 36 - }, - { - "method": "GET", - "route": "/api/admin/repos?page=1000001&limit=1", - "requestID": "1583e52c-26f1-475f-aca6-9b99238558ee", - "status": 200, - "expected": 200, - "bytes": 193, - "headersMs": 32, - "firstBodyByteMs": 33, - "elapsedMs": 36 - }, - { - "method": "GET", - "route": "/api/admin/repos?page=-1", - "requestID": "3059c6f2-f343-4a8d-aba9-6d0a99939cd0", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 29, - "firstBodyByteMs": 29, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/api/admin/repos?page[toString]=x", - "requestID": "9ca6327e-407a-4033-a494-9b618bdcbe67", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 30, - "firstBodyByteMs": 30, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/api/admin/users?page[]=2&limit[]=2&sort[]=status&direction[]=asc&format[]=csv", - "requestID": "67f2bb73-4ef5-4b99-b47f-5abf3e09bb29", - "status": 200, - "expected": 200, - "bytes": 106, - "headersMs": 34, - "firstBodyByteMs": 35, - "elapsedMs": 35 - }, - { - "method": "GET", - "route": "/api/admin/users?page=1000001&limit=1", - "requestID": "f4831b8b-01c6-4694-90f5-13c2b13afe55", - "status": 200, - "expected": 200, - "bytes": 112, - "headersMs": 34, - "firstBodyByteMs": 35, - "elapsedMs": 35 - }, - { - "method": "GET", - "route": "/api/admin/users?page=-1", - "requestID": "824c41e6-4b15-4cfc-b49b-a4923276d3d2", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 34, - "firstBodyByteMs": 34, - "elapsedMs": 34 - }, - { - "method": "GET", - "route": "/api/admin/users?page[toString]=x", - "requestID": "c44bb2e4-0c33-4df8-8724-55ad0017ca27", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 38, - "firstBodyByteMs": 38, - "elapsedMs": 38 - }, - { - "method": "GET", - "route": "/api/admin/users?limit=-1", - "requestID": "8b162d5d-243a-49e2-8995-da2bc51e6e46", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 31, - "firstBodyByteMs": 31, - "elapsedMs": 31 - }, - { - "method": "GET", - "route": "/api/admin/conferences?page[]=2&limit[]=2&sort[]=status&direction[]=asc&format[]=csv", - "requestID": "437bddb2-3129-42f7-b882-d15732b4a050", - "status": 200, - "expected": 200, - "bytes": 80, - "headersMs": 34, - "firstBodyByteMs": 35, - "elapsedMs": 35 - }, - { - "method": "GET", - "route": "/api/admin/conferences?page=1000001&limit=1", - "requestID": "d26b5298-5d53-4898-a3ff-9651136d1eb0", - "status": 200, - "expected": 200, - "bytes": 86, - "headersMs": 35, - "firstBodyByteMs": 36, - "elapsedMs": 36 - }, - { - "method": "GET", - "route": "/api/admin/conferences?page=-1", - "requestID": "ff7fb6cd-b673-4700-9edf-851855d7aa7c", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 29, - "firstBodyByteMs": 29, - "elapsedMs": 29 - }, - { - "method": "GET", - "route": "/api/admin/conferences?page[toString]=x", - "requestID": "f98b33a0-c3cc-4d14-a09d-ced51b7463b9", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 27, - "firstBodyByteMs": 27, - "elapsedMs": 28 - }, - { - "method": "GET", - "route": "/api/admin/repos?limit=-1", - "requestID": "778028a7-1888-482c-a575-a5161df44a75", - "status": 200, - "expected": 200, - "bytes": 1398, - "headersMs": 35, - "firstBodyByteMs": 36, - "elapsedMs": 37 - }, - { - "method": "GET", - "route": "/api/admin/repos?ready[]=true", - "requestID": "2c0faf15-e521-4a14-88fb-83e928adaf74", - "status": 200, - "expected": 200, - "bytes": 1935, - "headersMs": 37, - "firstBodyByteMs": 38, - "elapsedMs": 38 - }, - { - "method": "GET", - "route": "/api/admin/conferences?limit=-1", - "requestID": "f795396e-f560-462f-aba0-7e615a268090", - "status": 200, - "expected": 200, - "bytes": 80, - "headersMs": 31, - "firstBodyByteMs": 32, - "elapsedMs": 33 - }, - { - "method": "GET", - "route": "/api/admin/conferences?ready[]=true", - "requestID": "79a972f9-97a3-4e00-aea8-3977981e80d0", - "status": 200, - "expected": 200, - "bytes": 117, - "headersMs": 33, - "firstBodyByteMs": 34, - "elapsedMs": 34 - }, - { - "method": "GET", - "route": "/api/admin/repos?search[]=x", - "requestID": "10e388ce-eab8-42c7-ae43-289ebe14e34a", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 28, - "firstBodyByteMs": 28, - "elapsedMs": 28 - }, - { - "method": "GET", - "route": "/api/admin/users?search[]=x", - "requestID": "ff6e073f-80ad-489b-985e-25a1fce75ba7", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 27, - "firstBodyByteMs": 27, - "elapsedMs": 28 - }, - { - "method": "GET", - "route": "/api/admin/conferences?search[]=x", - "requestID": "0a799978-95e5-45ca-903d-448e8e72d5b5", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 28, - "firstBodyByteMs": 28, - "elapsedMs": 29 - }, - { - "method": "GET", - "route": "/api/admin/users?status[]=active", - "requestID": "33b8df06-43ce-43da-b6a9-c15f509f3f2b", - "status": 200, - "expected": 200, - "bytes": 99, - "headersMs": 47, - "firstBodyByteMs": 48, - "elapsedMs": 48 - }, - { - "method": "GET", - "route": "/api/admin/users?status[$in][]=active", - "requestID": "34fb45b9-b66f-44db-b9ae-4c7f47efb22a", - "status": 200, - "expected": 200, - "bytes": 553, - "headersMs": 38, - "firstBodyByteMs": 39, - "elapsedMs": 39 - }, - { - "method": "GET", - "route": "/api/admin/users?status[a]=active", - "requestID": "bc775c8c-66a0-402c-a02d-33e02ff95390", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 27, - "firstBodyByteMs": 28, - "elapsedMs": 28 - }, - { - "method": "GET", - "route": "/api/admin/users?status[$in]=active", - "requestID": "0174f840-2e74-457c-93b6-f7b6b38212da", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 53, - "firstBodyByteMs": 53, - "elapsedMs": 53 - }, - { - "method": "GET", - "route": "/api/admin/repos?owner[a]=x", - "requestID": "820955ef-5da8-44e5-9707-ec6695988c23", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 31, - "firstBodyByteMs": 31, - "elapsedMs": 31 - }, - { - "method": "GET", - "route": "/api/admin/repos?conference[$unknown]=x", - "requestID": "f730b00d-b855-4445-8304-6227653c3dee", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 30, - "firstBodyByteMs": 31, - "elapsedMs": 31 - }, - { - "method": "GET", - "route": "/api/admin/repos?dateFrom[]=2024-02-30", - "requestID": "a149b059-cfff-4e84-97d0-158294e845d5", - "status": 200, - "expected": 200, - "bytes": 12177, - "headersMs": 44, - "firstBodyByteMs": 46, - "elapsedMs": 47 - }, - { - "method": "GET", - "route": "/api/admin/repos?dateTo=March%201%202024", - "requestID": "fa4da1bb-a946-44f9-aa69-c85fd100dbc1", - "status": 200, - "expected": 200, - "bytes": 156, - "headersMs": 35, - "firstBodyByteMs": 36, - "elapsedMs": 37 - }, - { - "method": "GET", - "route": "/api/admin/repos?dateFrom[toString]=x", - "requestID": "082507d6-7656-4d42-b1b8-79df8ff769e5", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 30, - "firstBodyByteMs": 30, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/api/admin/users?dateFrom[]=2024-02-30", - "requestID": "5c0401ad-3ad4-428e-af29-a89458686cc8", - "status": 200, - "expected": 200, - "bytes": 458, - "headersMs": 36, - "firstBodyByteMs": 37, - "elapsedMs": 38 - }, - { - "method": "GET", - "route": "/api/admin/users?dateTo=March%201%202024", - "requestID": "e28cbce4-c249-476b-9f32-edc5cf42348e", - "status": 200, - "expected": 200, - "bytes": 129, - "headersMs": 48, - "firstBodyByteMs": 49, - "elapsedMs": 50 - }, - { - "method": "GET", - "route": "/api/admin/users?dateFrom[toString]=x", - "requestID": "7d2c70cd-f76c-4790-9e4d-5370a773f354", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 28, - "firstBodyByteMs": 28, - "elapsedMs": 28 - }, - { - "method": "GET", - "route": "/api/admin/conferences?dateFrom[]=2024-02-30", - "requestID": "938ca6b0-a15b-4aac-a99d-8b50ca6a594e", - "status": 200, - "expected": 200, - "bytes": 138, - "headersMs": 35, - "firstBodyByteMs": 36, - "elapsedMs": 36 - }, - { - "method": "GET", - "route": "/api/admin/conferences?dateTo=March%201%202024", - "requestID": "fca4ff61-90e6-4c24-89aa-6f255860ffa2", - "status": 200, - "expected": 200, - "bytes": 138, - "headersMs": 36, - "firstBodyByteMs": 37, - "elapsedMs": 37 - }, - { - "method": "GET", - "route": "/api/admin/conferences?dateFrom[toString]=x", - "requestID": "d31e68bf-52cd-4ace-8c3a-e10684df0948", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 29, - "firstBodyByteMs": 29, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/github/connections", - "requestID": "d91e8700-6599-4a97-ad21-d5e027d25858", - "status": 200, - "expected": 200, - "bytes": 456, - "headersMs": 627, - "firstBodyByteMs": 629, - "elapsedMs": 630 - }, - { - "method": "POST", - "route": "/api/admin/tokens", - "requestID": "5e8bd795-9bfb-42a0-86c7-9709d620fc33", - "status": 200, - "expected": 200, - "bytes": 186, - "headersMs": 44, - "firstBodyByteMs": 46, - "elapsedMs": 46 - }, - { - "method": "GET", - "route": "/api/user", - "requestID": "7c959fa9-42f0-46ef-97da-af58dc343f0c", - "status": 200, - "expected": 200, - "bytes": 100, - "headersMs": 32, - "firstBodyByteMs": 33, - "elapsedMs": 34 - }, - { - "method": "DELETE", - "route": "/api/admin/tokens/6aea4ac035c63cb6324bb793", - "requestID": "c12c5a2c-d025-414a-a97b-38fc840ee35e", - "status": 200, - "expected": 200, - "bytes": 13, - "headersMs": 31, - "firstBodyByteMs": 31, - "elapsedMs": 32 - }, - { - "method": "GET", - "route": "/api/user", - "requestID": "799c8be5-d11d-4ad5-aeca-7bb2037ea142", - "status": 401, - "expected": 401, - "bytes": 25, - "headersMs": 42, - "firstBodyByteMs": 42, - "elapsedMs": 42 - }, - { - "method": "POST", - "route": "/github/login-token", - "requestID": "01936b74-bc5e-45a9-a007-81d15d926593", - "status": 200, - "expected": 200, - "bytes": 33, - "headersMs": 31, - "firstBodyByteMs": 31, - "elapsedMs": 32 - }, - { - "method": "GET", - "route": "/api/user", - "requestID": "f612ca16-6aca-4070-b411-c884023ef56d", - "status": 200, - "expected": 200, - "bytes": 100, - "headersMs": 28, - "firstBodyByteMs": 29, - "elapsedMs": 29 - }, - { - "method": "GET", - "route": "/api/user/logout", - "requestID": "3c083b38-1ce9-49aa-ac77-124c6ee31bf4", - "status": 302, - "expected": 302, - "bytes": 24, - "headersMs": 26, - "firstBodyByteMs": 26, - "elapsedMs": 27 - }, - { - "method": "GET", - "route": "/api/user", - "requestID": "d2cad277-fb95-45f4-8325-b22e613d765d", - "status": 401, - "expected": 401, - "bytes": 25, - "headersMs": 26, - "firstBodyByteMs": 26, - "elapsedMs": 26 - }, - { - "method": "POST", - "route": "/api/anonymize-preview", - "requestID": "cdbff02a-d1b1-4498-95ce-808a288d49f7", - "status": 200, - "expected": 200, - "bytes": 26, - "headersMs": 31, - "firstBodyByteMs": 31, - "elapsedMs": 32 - }, - { - "method": "GET", - "route": "/api/providers/github/repository/metadata?name=tdurieux%2Fsynctex-js&connection=github-app", - "requestID": "ecae6986-1b7d-471c-b308-9f1c757b2c90", - "status": 200, - "expected": 200, - "bytes": 230, - "headersMs": 3411, - "firstBodyByteMs": 3412, - "elapsedMs": 3412 - }, - { - "method": "GET", - "route": "/api/providers/github/repository/branches?name=tdurieux%2Fsynctex-js&connection=github-app", - "requestID": "fc0f83ab-e352-45aa-924d-5e170ba49f0f", - "status": 200, - "expected": 200, - "bytes": 2623, - "headersMs": 3027, - "firstBodyByteMs": 3028, - "elapsedMs": 3029 - }, - { - "method": "GET", - "route": "/api/providers/github/repository/readme?name=tdurieux%2Fsynctex-js&connection=github-app", - "requestID": "e465cb96-044e-43e4-8f9f-e8af8e9ecb9b", - "status": 200, - "expected": 200, - "bytes": 2303, - "headersMs": 3254, - "firstBodyByteMs": 3256, - "elapsedMs": 3257 - }, - { - "method": "POST", - "route": "/api/repo", - "requestID": "136c785b-caab-4cec-b49e-c9eb8870cc6b", - "status": 200, - "expected": 200, - "bytes": 22, - "headersMs": 4022, - "firstBodyByteMs": 4022, - "elapsedMs": 4023 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793739448098", - "requestID": "8ed77ac8-e150-48e6-a9ef-be8c213b2d15", - "status": 200, - "expected": 200, - "bytes": 566, - "headersMs": 83, - "firstBodyByteMs": 85, - "elapsedMs": 86 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793739448098/file/LICENSE", - "requestID": "4671d32e-7671-4b30-bf02-83b01dbaedcf", - "status": 200, - "expected": 200, - "bytes": 1074, - "headersMs": 489, - "firstBodyByteMs": 490, - "elapsedMs": 491 - }, - { - "method": "GET", - "route": "/w/go-beta-check-1793739448098/LICENSE", - "requestID": "3a9fec2c-525a-414f-9012-6b07c12e09c4", - "status": 200, - "expected": 200, - "bytes": 1074, - "headersMs": 850, - "firstBodyByteMs": 851, - "elapsedMs": 851 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793739448098/files", - "requestID": "e5b0fc31-4a4b-4d98-b53b-ce16a32ea8b5", - "status": 200, - "expected": 200, - "bytes": 170, - "headersMs": 33, - "firstBodyByteMs": 34, - "elapsedMs": 34 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793739448098/zip", - "requestID": "ed3c8906-17ba-45be-9b87-9d5f878284f1", - "status": 200, - "expected": 200, - "bytes": 7191, - "headersMs": 743, - "firstBodyByteMs": 744, - "elapsedMs": 2428 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793739448098/file/LICENSE", - "requestID": "fa14928d-07dd-4d9d-aea9-c1f26f1bdc0e", - "status": 200, - "expected": 200, - "bytes": 1074, - "headersMs": 393, - "firstBodyByteMs": 394, - "elapsedMs": 395 - }, - { - "method": "GET", - "route": "/w/go-beta-check-1793739448098/LICENSE", - "requestID": "4c83036b-3344-4382-9b45-4c31ae025eb8", - "status": 200, - "expected": 200, - "bytes": 1074, - "headersMs": 723, - "firstBodyByteMs": 724, - "elapsedMs": 725 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793739448098/zip", - "requestID": "626b9055-28a7-460e-b8a0-1a5a7270cc1b", - "status": 200, - "expected": 200, - "bytes": 7191, - "headersMs": 729, - "firstBodyByteMs": 729, - "elapsedMs": 2243 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793739448098/file/LICENSE", - "requestID": "2d950dc4-c37d-4736-8314-359fa30e17d3", - "status": 200, - "expected": 200, - "bytes": 1074, - "headersMs": 404, - "firstBodyByteMs": 405, - "elapsedMs": 406 - }, - { - "method": "GET", - "route": "/w/go-beta-check-1793739448098/LICENSE", - "requestID": "524e2314-a756-4bee-977d-b056d4ad4624", - "status": 200, - "expected": 200, - "bytes": 1074, - "headersMs": 808, - "firstBodyByteMs": 809, - "elapsedMs": 809 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793739448098/zip", - "requestID": "5ab10b1d-efd4-4374-8e18-11cd0fe2e496", - "status": 200, - "expected": 200, - "bytes": 7191, - "headersMs": 784, - "firstBodyByteMs": 785, - "elapsedMs": 2362 - }, - { - "method": "GET", - "route": "/api/admin/performance", - "requestID": "88f6f1ec-e3c5-4225-a900-e0e0c5846c31", - "status": 200, - "expected": 200, - "bytes": 31623, - "headersMs": 111, - "firstBodyByteMs": 112, - "elapsedMs": 115 - }, - { - "method": "GET", - "route": "/api/user", - "requestID": "821aecb1-f012-4735-8439-656cf6cd75c5", - "status": 401, - "expected": 401, - "bytes": 25, - "headersMs": 30, - "firstBodyByteMs": 30, - "elapsedMs": 30 - }, - { - "method": "DELETE", - "route": "/api/repo/go-beta-check-1793739448098", - "requestID": "a1de2b63-e9d8-467c-a519-aa7f851ce700", - "status": 200, - "expected": 200, - "bytes": 21, - "headersMs": 44, - "firstBodyByteMs": 44, - "elapsedMs": 45 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793739448098", - "requestID": "c2ea8589-eb70-4216-b06f-564de946d3a2", - "status": 200, - "expected": 200, - "bytes": 616, - "headersMs": 32, - "firstBodyByteMs": 34, - "elapsedMs": 34 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793739448098", - "requestID": "782e117a-c6fb-4476-bdb7-b93c8eaf0442", - "status": 200, - "expected": 200, - "bytes": 615, - "headersMs": 35, - "firstBodyByteMs": 37, - "elapsedMs": 38 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793739448098/file/LICENSE", - "requestID": "14f39160-18b0-4e7f-8822-26abf0d2eb98", - "status": 410, - "expected": 410, - "bytes": 30, - "headersMs": 27, - "firstBodyByteMs": 28, - "elapsedMs": 28 - }, - { - "method": "GET", - "route": "/api/user", - "requestID": "9f43ee53-f64d-4e86-8a5c-e49b3791ce6a", - "status": 401, - "expected": 401, - "bytes": 25, - "headersMs": 29, - "firstBodyByteMs": 29, - "elapsedMs": 29 - } - ], - "productionChanged": false, - "overviewHistoryFresh": "passed", - "overviewBrowserFields": "passed", - "queueOverviewFields": "passed", - "errorMonitoring": { - "maxEntries": 5000, - "hourlyBuckets": 24, - "routine404Counted": true - }, - "queueMetricWindows": [ - { - "queue": "download", - "range": "1h", - "points": 60 - }, - { - "queue": "download", - "range": "6h", - "points": 360 - }, - { - "queue": "download", - "range": "24h", - "points": 1440 - }, - { - "queue": "download", - "range": "7d", - "points": 10080 - }, - { - "queue": "remove", - "range": "1h", - "points": 60 - }, - { - "queue": "cache", - "range": "1h", - "points": 60 - }, - { - "queue": "download", - "range": "unrecognized", - "points": 60 - } - ], - "publicStatistics": { - "anonymousAccess": true, - "windows": [ - { - "query": "days=-2", - "days": 1, - "rows": 1 - }, - { - "query": "days=0", - "days": 30, - "rows": 1 - }, - { - "query": "days=0x10", - "days": 16, - "rows": 1 - }, - { - "query": "days=7suffix", - "days": 7, - "rows": 1 - }, - { - "query": "days=999", - "days": 365, - "rows": 1 - }, - { - "query": "days[]=7&days[]=30", - "days": 7, - "rows": 1 - }, - { - "query": "days[1]=7&days[0]=1", - "days": 1, - "rows": 1 - }, - { - "query": "days[x]=7", - "days": 30, - "rows": 1 - } - ] - }, - "dashboardExtendedQueries": "passed", - "dashboardDateCursors": "passed", - "monitoringExtendedQueries": "passed", - "adminExtendedQueries": "passed", - "previewConnectionQueries": "passed", - "previewCacheHintRejections": "passed", - "userSearchQueries": "passed", - "adminListPaginationQueries": "passed", - "adminListFilterQueries": "passed", - "adminListCastingQueries": "passed", - "adminListDateQueries": "passed", - "apiKeyLifecycle": "passed", - "sessionLoginLogout": "passed", - "exactZipContents": "passed", - "repeatedContentChecks": 3, - "performanceMonitoring": { - "requests": true, - "processSamples": true, - "runtimeHistory": true, - "stages": [ - "repository", - "authorization", - "worker_wait", - "anonymize" - ], - "upstreamObserved": false, - "upstreamNote": "Shared-cache hits need no upstream read; provider timing is checked by the integration suite." - }, - "result": "passed", - "testRepositoryRemoved": true, - "temporaryKeyRevoked": true, - "betaAccountAdmin": true, - "uniqueRequestIDsVerified": 133 - }, - "image": "sha256:03a3cacc1db58e32280727fd5ee7c0fc36c41ddae15ddb43bb5a105f3edea4c9", - "traces": [ - { - "requestID": "88704ced-bb63-4693-821f-da569a1a8b14", - "route": "/api/user", - "status": 401, - "serverMs": 3, - "firstByteMs": 2.712298, - "bytes": 25, - "stagesMs": {} - }, - { - "requestID": "dbb23a3a-66f9-4c8a-9914-ba151c1bcbfa", - "route": "/api/user", - "status": 200, - "serverMs": 7, - "firstByteMs": 7.324336, - "bytes": 100, - "stagesMs": {} - }, - { - "requestID": "7e7fbbba-e96f-4573-ad4e-5fc34bfa9d2d", - "route": "/github/connections", - "status": 200, - "serverMs": 1136, - "firstByteMs": 1135.642017, - "bytes": 456, - "stagesMs": {} - }, - { - "requestID": "e68f7538-d5c9-407d-8bc4-edd3100412fc", - "route": "/api/providers", - "status": 200, - "serverMs": 7, - "firstByteMs": 6.61148, - "bytes": 144, - "stagesMs": {} - }, - { - "requestID": "94c7db98-cbbe-4491-8d0f-f04b5f654d31", - "route": "/api/user/dashboard", - "status": 200, - "serverMs": 24, - "firstByteMs": 24.182973, - "bytes": 796, - "stagesMs": {} - }, - { - "requestID": "315e794a-e909-4f6c-81e7-9b87d63011d6", - "route": "/api/user/default", - "status": 200, - "serverMs": 5, - "firstByteMs": 5.418419, - "bytes": 25, - "stagesMs": {} - }, - { - "requestID": "744443df-afc8-452a-920d-9516f5ab11c3", - "route": "/api/user/quota", - "status": 200, - "serverMs": 8, - "firstByteMs": 8.115874, - "bytes": 115, - "stagesMs": {} - }, - { - "requestID": "ae600b67-c293-4267-a93e-942a0e05411f", - "route": "/api/admin/overview", - "status": 200, - "serverMs": 94, - "firstByteMs": 92.418591, - "bytes": 581, - "stagesMs": {} - }, - { - "requestID": "23319ebc-e24e-43fd-92d5-3226e162826b", - "route": "/api/admin/users", - "status": 200, - "serverMs": 10, - "firstByteMs": 10.116302, - "bytes": 526, - "stagesMs": {} - }, - { - "requestID": "097d8d39-29f0-4d96-a2eb-2bbaeed2b107", - "route": "/api/admin/repos", - "status": 200, - "serverMs": 16, - "firstByteMs": 13.216403, - "bytes": 2165, - "stagesMs": {} - }, - { - "requestID": "7281ede6-6bf2-47df-bf1b-89ab9db0d753", - "route": "/api/admin/queues", - "status": 200, - "serverMs": 25, - "firstByteMs": 23.569249, - "bytes": 888, - "stagesMs": {} - }, - { - "requestID": "1c14c6c8-3422-4fb3-88a2-599149430a0b", - "route": "/api/admin/performance", - "status": 200, - "serverMs": 47, - "firstByteMs": 43.435074, - "bytes": 3554, - "stagesMs": {} - }, - { - "requestID": "b4b65c6b-5bda-4461-8ba4-3df4f31ae42b", - "route": "/api/admin/errors", - "status": 200, - "serverMs": 20, - "firstByteMs": 14.535456, - "bytes": 8934, - "stagesMs": {} - }, - { - "requestID": "7379e52a-a20d-44a9-9e40-6701419004d7", - "route": "/api/admin/errors/stats", - "status": 200, - "serverMs": 8, - "firstByteMs": 6.493671, - "bytes": 269, - "stagesMs": {} - }, - { - "requestID": "38a6b957-d272-40e4-b60f-070b64fa4c48", - "route": "/api/admin/tokens", - "status": 200, - "serverMs": 6, - "firstByteMs": 6.435938, - "bytes": 160, - "stagesMs": {} - }, - { - "requestID": "0294ba73-b7af-4c82-a9d3-78c6f1b34952", - "route": "/api/admin/errors", - "status": 200, - "serverMs": 47, - "firstByteMs": 34.221919, - "bytes": 24755, - "stagesMs": {} - }, - { - "requestID": "4c3a7afa-6504-4231-8916-f400ff609473", - "route": "/api/admin/errors/stats", - "status": 200, - "serverMs": 8, - "firstByteMs": 6.604844, - "bytes": 269, - "stagesMs": {} - }, - { - "requestID": "ad38a516-8223-493c-b439-a13353cbafe0", - "route": "/api/repo/:id", - "status": 404, - "serverMs": 7, - "firstByteMs": 7.410605, - "bytes": 26, - "stagesMs": { - "repository": 1.460717 - } - }, - { - "requestID": "9529b708-e15d-4e16-90d7-86a8db8646a3", - "route": "/api/admin/errors/stats", - "status": 200, - "serverMs": 7, - "firstByteMs": 6.274037, - "bytes": 269, - "stagesMs": {} - }, - { - "requestID": "bcb32c42-327d-471c-a812-0c5665f94189", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 7, - "firstByteMs": 5.818858, - "bytes": 241, - "stagesMs": {} - }, - { - "requestID": "37ef3b7b-40bd-40b5-b90b-24f3607e32d8", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 9, - "firstByteMs": 7.658637, - "bytes": 630, - "stagesMs": {} - }, - { - "requestID": "96343e10-3d37-4347-b0fb-bc600b6e11f7", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 12, - "firstByteMs": 7.88119, - "bytes": 2025, - "stagesMs": {} - }, - { - "requestID": "f390ace5-2b24-4306-8385-3b985219b9a4", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 102, - "firstByteMs": 82.756522, - "bytes": 9796, - "stagesMs": {} - }, - { - "requestID": "0bb49d57-49df-43f8-acd9-a7b79cc5091d", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 8, - "firstByteMs": 7.033428, - "bytes": 227, - "stagesMs": {} - }, - { - "requestID": "b7e501b7-21f0-4074-a1c0-d82e12652b4b", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 7, - "firstByteMs": 5.534459, - "bytes": 186, - "stagesMs": {} - }, - { - "requestID": "3e54ae80-8727-4061-80b2-133293d578b7", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 6, - "firstByteMs": 4.693273, - "bytes": 250, - "stagesMs": {} - }, - { - "requestID": "875bad4a-2bdd-40d3-815b-ada2adbddc52", - "route": "/api/admin/queues/metrics", - "status": 404, - "serverMs": 4, - "firstByteMs": 4.44702, - "bytes": 27, - "stagesMs": {} - }, - { - "requestID": "c189b1f9-e87e-4858-9cb3-750290362b2f", - "route": "/api/stat", - "status": 200, - "serverMs": 4, - "firstByteMs": 3.705712, - "bytes": 69, - "stagesMs": {} - }, - { - "requestID": "a158c0cc-81c4-45fb-994e-7f5b64c5a970", - "route": "/api/stat/history", - "status": 200, - "serverMs": 3, - "firstByteMs": 2.892927, - "bytes": 105, - "stagesMs": {} - }, - { - "requestID": "0011e1be-f575-453e-b5ee-5bb662235fe5", - "route": "/api/stat/history", - "status": 200, - "serverMs": 4, - "firstByteMs": 3.806597, - "bytes": 105, - "stagesMs": {} - }, - { - "requestID": "d7c5f3a5-26ae-4818-abae-0beaf8664ea2", - "route": "/api/stat/history", - "status": 200, - "serverMs": 3, - "firstByteMs": 2.876968, - "bytes": 105, - "stagesMs": {} - }, - { - "requestID": "fd30bb3a-7707-4b9f-8b79-429cfb0bfd0b", - "route": "/api/stat/history", - "status": 200, - "serverMs": 3, - "firstByteMs": 3.197113, - "bytes": 105, - "stagesMs": {} - }, - { - "requestID": "6f3c4bae-4907-423f-8d3a-cf8516b1ffa5", - "route": "/api/stat/history", - "status": 200, - "serverMs": 3, - "firstByteMs": 3.082068, - "bytes": 105, - "stagesMs": {} - }, - { - "requestID": "e9222993-9fca-477b-94f0-2d05685fc7e9", - "route": "/api/stat/history", - "status": 200, - "serverMs": 1, - "firstByteMs": 0.761002, - "bytes": 105, - "stagesMs": {} - }, - { - "requestID": "e9085bf7-5203-4b79-8d75-5723862d5884", - "route": "/api/stat/history", - "status": 200, - "serverMs": 1, - "firstByteMs": 0.988078, - "bytes": 105, - "stagesMs": {} - }, - { - "requestID": "fcbb7efa-5f58-41dd-82e3-21f5faca7977", - "route": "/api/stat/history", - "status": 200, - "serverMs": 1, - "firstByteMs": 0.833445, - "bytes": 105, - "stagesMs": {} - }, - { - "requestID": "720c6722-18e2-4fe1-92ad-9f36eadff7cb", - "route": "/api/user/dashboard", - "status": 200, - "serverMs": 22, - "firstByteMs": 21.697639, - "bytes": 64, - "stagesMs": {} - }, - { - "requestID": "8570a081-1d05-4adc-9c77-2b743006b877", - "route": "/api/user/dashboard", - "status": 200, - "serverMs": 21, - "firstByteMs": 20.515225, - "bytes": 64, - "stagesMs": {} - }, - { - "requestID": "870c467b-fc0a-4535-a146-b3691da9262b", - "route": "/api/user/dashboard", - "status": 400, - "serverMs": 4, - "firstByteMs": 4.367174, - "bytes": 24, - "stagesMs": {} - }, - { - "requestID": "9a0a4238-3c87-4b3d-9c88-da55eea993cf", - "route": "/api/user/dashboard", - "status": 400, - "serverMs": 5, - "firstByteMs": 4.956131, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "eb04c406-8bef-4331-aef4-883b1c9c966f", - "route": "/api/user/dashboard", - "status": 200, - "serverMs": 25, - "firstByteMs": 25.180534, - "bytes": 796, - "stagesMs": {} - }, - { - "requestID": "8fcc28ee-0a00-4071-a87f-9d11bedd5f3f", - "route": "/api/user/dashboard", - "status": 200, - "serverMs": 23, - "firstByteMs": 23.287148, - "bytes": 796, - "stagesMs": {} - }, - { - "requestID": "628e1231-3bad-45a0-bb33-d7dc0400315f", - "route": "/api/user/dashboard", - "status": 200, - "serverMs": 25, - "firstByteMs": 24.902326, - "bytes": 796, - "stagesMs": {} - }, - { - "requestID": "34f244ba-b97c-4ba9-bde3-01c06e2b1751", - "route": "/api/user/dashboard", - "status": 200, - "serverMs": 23, - "firstByteMs": 22.985179, - "bytes": 796, - "stagesMs": {} - }, - { - "requestID": "01f1fa45-a1c3-4e14-b044-718a2a2fcecf", - "route": "/api/user/dashboard", - "status": 200, - "serverMs": 20, - "firstByteMs": 20.032634, - "bytes": 796, - "stagesMs": {} - }, - { - "requestID": "204edc83-e1b7-4371-aeea-e4b2a76b125d", - "route": "/api/user/dashboard", - "status": 400, - "serverMs": 5, - "firstByteMs": 4.918271, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "dee96c7e-8a62-47c9-b5f8-468924b4978c", - "route": "/api/admin/performance", - "status": 200, - "serverMs": 79, - "firstByteMs": 73.590445, - "bytes": 7648, - "stagesMs": {} - }, - { - "requestID": "9b4d6965-b40b-4a2f-8412-f725b0a3f53e", - "route": "/api/admin/performance", - "status": 200, - "serverMs": 78, - "firstByteMs": 72.545802, - "bytes": 7670, - "stagesMs": {} - }, - { - "requestID": "c6922a22-c3d7-4118-8ac4-6d95479523f1", - "route": "/api/admin/performance", - "status": 200, - "serverMs": 43, - "firstByteMs": 40.473196, - "bytes": 3560, - "stagesMs": {} - }, - { - "requestID": "183479d9-e4af-4987-9952-8b82dd3dd558", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 10, - "firstByteMs": 8.638246, - "bytes": 568, - "stagesMs": {} - }, - { - "requestID": "684098e0-4cf7-44a9-8596-a5230231d6db", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 6, - "firstByteMs": 4.815698, - "bytes": 242, - "stagesMs": {} - }, - { - "requestID": "21dd730f-08b5-4b2e-bd68-393b69d0c847", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 6, - "firstByteMs": 6.116715, - "bytes": 51, - "stagesMs": {} - }, - { - "requestID": "039a9e69-5b4a-47c8-8d9e-d13bae98a1e3", - "route": "/api/admin/queues/metrics", - "status": 404, - "serverMs": 5, - "firstByteMs": 4.57322, - "bytes": 27, - "stagesMs": {} - }, - { - "requestID": "a430cc12-ce44-49c3-9c1b-93789d67c2b8", - "route": "/api/admin/queues", - "status": 200, - "serverMs": 27, - "firstByteMs": 25.592515, - "bytes": 840, - "stagesMs": {} - }, - { - "requestID": "a6eed9a8-e491-4e62-bb4b-b2967e49c1bf", - "route": "/api/admin/errors", - "status": 200, - "serverMs": 8, - "firstByteMs": 6.449784, - "bytes": 688, - "stagesMs": {} - }, - { - "requestID": "b3f52467-bac2-47d9-bbe5-8b1362bc9d14", - "route": "/api/repo/:owner/:repo", - "status": 400, - "serverMs": 5, - "firstByteMs": 5.291933, - "bytes": 30, - "stagesMs": {} - }, - { - "requestID": "ed9db750-77a2-4193-8a25-6391141295ab", - "route": "/api/repo/:owner/:repo", - "status": 400, - "serverMs": 5, - "firstByteMs": 4.899856, - "bytes": 30, - "stagesMs": {} - }, - { - "requestID": "a2f58f36-1444-40a5-92c5-c44890b4f573", - "route": "/api/repo/:owner/:repo", - "status": 400, - "serverMs": 5, - "firstByteMs": 4.62398, - "bytes": 30, - "stagesMs": {} - }, - { - "requestID": "0fb8f9a9-8596-458c-979b-87d5362334d7", - "route": "/api/repo/:owner/:repo", - "status": 500, - "serverMs": 5, - "firstByteMs": 4.653564, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "d49fa9c7-f3ff-4568-b02e-43a500a27971", - "route": "/api/repo/:owner/:repo", - "status": 500, - "serverMs": 5, - "firstByteMs": 5.007281, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "023cfce0-98b0-4a10-b64a-ae870e114b84", - "route": "/api/repo/:owner/:repo", - "status": 500, - "serverMs": 6, - "firstByteMs": 6.120365, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "765359b2-11fa-4305-bad1-0819247a7458", - "route": "/api/user/search/github-users", - "status": 200, - "serverMs": 4, - "firstByteMs": 4.462264, - "bytes": 2, - "stagesMs": {} - }, - { - "requestID": "33ef9dc0-ae8b-477d-ba08-190a30b510f6", - "route": "/api/user/search/github-users", - "status": 200, - "serverMs": 4, - "firstByteMs": 4.095552, - "bytes": 2, - "stagesMs": {} - }, - { - "requestID": "ceb99e3d-368e-433b-89d3-fd4c585364b3", - "route": "/api/user/search/github-users", - "status": 500, - "serverMs": 9, - "firstByteMs": 8.874312, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "ce493579-21e0-4563-8b45-95a0c1c359c8", - "route": "/api/user/search/github-users", - "status": 500, - "serverMs": 9, - "firstByteMs": 9.158664, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "3fce3862-89db-463a-a673-fafc261f5947", - "route": "/api/user/search/github-users", - "status": 500, - "serverMs": 5, - "firstByteMs": 4.530784, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "1df4c3dc-5a84-4222-8c9a-a4797fb7761f", - "route": "/api/admin/repos", - "status": 200, - "serverMs": 11, - "firstByteMs": 9.791934, - "bytes": 896, - "stagesMs": {} - }, - { - "requestID": "1583e52c-26f1-475f-aca6-9b99238558ee", - "route": "/api/admin/repos", - "status": 200, - "serverMs": 9, - "firstByteMs": 8.634666, - "bytes": 193, - "stagesMs": {} - }, - { - "requestID": "3059c6f2-f343-4a8d-aba9-6d0a99939cd0", - "route": "/api/admin/repos", - "status": 500, - "serverMs": 5, - "firstByteMs": 4.526879, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "9ca6327e-407a-4033-a494-9b618bdcbe67", - "route": "/api/admin/repos", - "status": 500, - "serverMs": 4, - "firstByteMs": 4.209816, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "67f2bb73-4ef5-4b99-b47f-5abf3e09bb29", - "route": "/api/admin/users", - "status": 200, - "serverMs": 9, - "firstByteMs": 9.088213, - "bytes": 106, - "stagesMs": {} - }, - { - "requestID": "f4831b8b-01c6-4694-90f5-13c2b13afe55", - "route": "/api/admin/users", - "status": 200, - "serverMs": 10, - "firstByteMs": 9.701485, - "bytes": 112, - "stagesMs": {} - }, - { - "requestID": "824c41e6-4b15-4cfc-b49b-a4923276d3d2", - "route": "/api/admin/users", - "status": 500, - "serverMs": 7, - "firstByteMs": 6.952536, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "c44bb2e4-0c33-4df8-8724-55ad0017ca27", - "route": "/api/admin/users", - "status": 500, - "serverMs": 4, - "firstByteMs": 4.153728, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "8b162d5d-243a-49e2-8995-da2bc51e6e46", - "route": "/api/admin/users", - "status": 500, - "serverMs": 7, - "firstByteMs": 7.365725, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "437bddb2-3129-42f7-b882-d15732b4a050", - "route": "/api/admin/conferences", - "status": 200, - "serverMs": 9, - "firstByteMs": 9.113223, - "bytes": 80, - "stagesMs": {} - }, - { - "requestID": "d26b5298-5d53-4898-a3ff-9651136d1eb0", - "route": "/api/admin/conferences", - "status": 200, - "serverMs": 9, - "firstByteMs": 8.792868, - "bytes": 86, - "stagesMs": {} - }, - { - "requestID": "ff7fb6cd-b673-4700-9edf-851855d7aa7c", - "route": "/api/admin/conferences", - "status": 500, - "serverMs": 4, - "firstByteMs": 4.294156, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "f98b33a0-c3cc-4d14-a09d-ced51b7463b9", - "route": "/api/admin/conferences", - "status": 500, - "serverMs": 4, - "firstByteMs": 4.309215, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "778028a7-1888-482c-a575-a5161df44a75", - "route": "/api/admin/repos", - "status": 200, - "serverMs": 11, - "firstByteMs": 9.80983, - "bytes": 746, - "stagesMs": {} - }, - { - "requestID": "2c0faf15-e521-4a14-88fb-83e928adaf74", - "route": "/api/admin/repos", - "status": 200, - "serverMs": 13, - "firstByteMs": 11.371017, - "bytes": 857, - "stagesMs": {} - }, - { - "requestID": "f795396e-f560-462f-aba0-7e615a268090", - "route": "/api/admin/conferences", - "status": 200, - "serverMs": 8, - "firstByteMs": 8.418886, - "bytes": 80, - "stagesMs": {} - }, - { - "requestID": "79a972f9-97a3-4e00-aea8-3977981e80d0", - "route": "/api/admin/conferences", - "status": 200, - "serverMs": 9, - "firstByteMs": 8.988855, - "bytes": 117, - "stagesMs": {} - }, - { - "requestID": "10e388ce-eab8-42c7-ae43-289ebe14e34a", - "route": "/api/admin/repos", - "status": 500, - "serverMs": 4, - "firstByteMs": 4.270765, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "ff6e073f-80ad-489b-985e-25a1fce75ba7", - "route": "/api/admin/users", - "status": 500, - "serverMs": 4, - "firstByteMs": 4.406543, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "0a799978-95e5-45ca-903d-448e8e72d5b5", - "route": "/api/admin/conferences", - "status": 500, - "serverMs": 4, - "firstByteMs": 4.388248, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "33b8df06-43ce-43da-b6a9-c15f509f3f2b", - "route": "/api/admin/users", - "status": 200, - "serverMs": 10, - "firstByteMs": 9.962922, - "bytes": 99, - "stagesMs": {} - }, - { - "requestID": "34fb45b9-b66f-44db-b9ae-4c7f47efb22a", - "route": "/api/admin/users", - "status": 200, - "serverMs": 10, - "firstByteMs": 10.349005, - "bytes": 553, - "stagesMs": {} - }, - { - "requestID": "bc775c8c-66a0-402c-a02d-33e02ff95390", - "route": "/api/admin/users", - "status": 500, - "serverMs": 4, - "firstByteMs": 4.471774, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "0174f840-2e74-457c-93b6-f7b6b38212da", - "route": "/api/admin/users", - "status": 500, - "serverMs": 6, - "firstByteMs": 6.458108, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "820955ef-5da8-44e5-9707-ec6695988c23", - "route": "/api/admin/repos", - "status": 500, - "serverMs": 6, - "firstByteMs": 6.36874, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "f730b00d-b855-4445-8304-6227653c3dee", - "route": "/api/admin/repos", - "status": 500, - "serverMs": 6, - "firstByteMs": 6.385933, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "a149b059-cfff-4e84-97d0-158294e845d5", - "route": "/api/admin/repos", - "status": 200, - "serverMs": 18, - "firstByteMs": 15.356905, - "bytes": 2203, - "stagesMs": {} - }, - { - "requestID": "fa4da1bb-a946-44f9-aa69-c85fd100dbc1", - "route": "/api/admin/repos", - "status": 200, - "serverMs": 11, - "firstByteMs": 10.632692, - "bytes": 156, - "stagesMs": {} - }, - { - "requestID": "082507d6-7656-4d42-b1b8-79df8ff769e5", - "route": "/api/admin/repos", - "status": 500, - "serverMs": 7, - "firstByteMs": 6.608927, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "5c0401ad-3ad4-428e-af29-a89458686cc8", - "route": "/api/admin/users", - "status": 200, - "serverMs": 11, - "firstByteMs": 10.539736, - "bytes": 458, - "stagesMs": {} - }, - { - "requestID": "e28cbce4-c249-476b-9f32-edc5cf42348e", - "route": "/api/admin/users", - "status": 200, - "serverMs": 10, - "firstByteMs": 9.772955, - "bytes": 129, - "stagesMs": {} - }, - { - "requestID": "7d2c70cd-f76c-4790-9e4d-5370a773f354", - "route": "/api/admin/users", - "status": 500, - "serverMs": 5, - "firstByteMs": 4.669134, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "938ca6b0-a15b-4aac-a99d-8b50ca6a594e", - "route": "/api/admin/conferences", - "status": 200, - "serverMs": 10, - "firstByteMs": 9.588704, - "bytes": 138, - "stagesMs": {} - }, - { - "requestID": "fca4ff61-90e6-4c24-89aa-6f255860ffa2", - "route": "/api/admin/conferences", - "status": 200, - "serverMs": 11, - "firstByteMs": 11.097195, - "bytes": 138, - "stagesMs": {} - }, - { - "requestID": "d31e68bf-52cd-4ace-8c3a-e10684df0948", - "route": "/api/admin/conferences", - "status": 500, - "serverMs": 5, - "firstByteMs": 5.034137, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "d91e8700-6599-4a97-ad21-d5e027d25858", - "route": "/github/connections", - "status": 200, - "serverMs": 589, - "firstByteMs": 589.09459, - "bytes": 456, - "stagesMs": {} - }, - { - "requestID": "5e8bd795-9bfb-42a0-86c7-9709d620fc33", - "route": "/api/admin/tokens", - "status": 200, - "serverMs": 7, - "firstByteMs": 6.5691, - "bytes": 186, - "stagesMs": {} - }, - { - "requestID": "7c959fa9-42f0-46ef-97da-af58dc343f0c", - "route": "/api/user", - "status": 200, - "serverMs": 7, - "firstByteMs": 6.809217, - "bytes": 100, - "stagesMs": {} - }, - { - "requestID": "c12c5a2c-d025-414a-a97b-38fc840ee35e", - "route": "/api/admin/tokens/:id", - "status": 200, - "serverMs": 6, - "firstByteMs": 5.760672, - "bytes": 13, - "stagesMs": {} - }, - { - "requestID": "799c8be5-d11d-4ad5-aeca-7bb2037ea142", - "route": "/api/user", - "status": 401, - "serverMs": 3, - "firstByteMs": 2.816734, - "bytes": 25, - "stagesMs": {} - }, - { - "requestID": "01936b74-bc5e-45a9-a007-81d15d926593", - "route": "/github/login-token", - "status": 200, - "serverMs": 6, - "firstByteMs": 6.406791, - "bytes": 33, - "stagesMs": {} - }, - { - "requestID": "f612ca16-6aca-4070-b411-c884023ef56d", - "route": "/api/user", - "status": 200, - "serverMs": 3, - "firstByteMs": 2.637181, - "bytes": 100, - "stagesMs": {} - }, - { - "requestID": "3c083b38-1ce9-49aa-ac77-124c6ee31bf4", - "route": "/api/user/logout", - "status": 302, - "serverMs": 3, - "firstByteMs": 3.092158, - "bytes": 24, - "stagesMs": {} - }, - { - "requestID": "d2cad277-fb95-45f4-8325-b22e613d765d", - "route": "/api/user", - "status": 401, - "serverMs": 2, - "firstByteMs": 1.949669, - "bytes": 25, - "stagesMs": {} - }, - { - "requestID": "cdbff02a-d1b1-4498-95ce-808a288d49f7", - "route": "/api/anonymize-preview", - "status": 200, - "serverMs": 5, - "firstByteMs": 5.113382, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "ecae6986-1b7d-471c-b308-9f1c757b2c90", - "route": "/api/providers/:provider/repository/metadata", - "status": 200, - "serverMs": 3385, - "firstByteMs": 3385.325473, - "bytes": 230, - "stagesMs": {} - }, - { - "requestID": "fc0f83ab-e352-45aa-924d-5e170ba49f0f", - "route": "/api/providers/:provider/repository/branches", - "status": 200, - "serverMs": 3001, - "firstByteMs": 2999.125979, - "bytes": 998, - "stagesMs": {} - }, - { - "requestID": "e465cb96-044e-43e4-8f9f-e8af8e9ecb9b", - "route": "/api/providers/:provider/repository/readme", - "status": 200, - "serverMs": 3224, - "firstByteMs": 3222.642962, - "bytes": 878, - "stagesMs": {} - }, - { - "requestID": "136c785b-caab-4cec-b49e-c9eb8870cc6b", - "route": "/api/repo", - "status": 200, - "serverMs": 3995, - "firstByteMs": 3995.215676, - "bytes": 22, - "stagesMs": {} - }, - { - "requestID": "8ed77ac8-e150-48e6-a9ef-be8c213b2d15", - "route": "/api/repo/:id", - "status": 200, - "serverMs": 9, - "firstByteMs": 8.880549, - "bytes": 566, - "stagesMs": { - "repository": 1.814436 - } - }, - { - "requestID": "4671d32e-7671-4b30-bf02-83b01dbaedcf", - "route": "/api/repo/:id/file/*path", - "status": 200, - "serverMs": 461, - "firstByteMs": 458.249759, - "bytes": 672, - "stagesMs": { - "anonymize": 24.606672, - "authorization": 330.037846, - "cache_fill": 68.645492, - "cache_lookup": 12.805683, - "repository": 2.24213, - "worker_wait": 0.024155999999999997 - } - }, - { - "requestID": "3a9fec2c-525a-414f-9012-6b07c12e09c4", - "route": "/w/:id/*path", - "status": 200, - "serverMs": 740, - "firstByteMs": 738.486884, - "bytes": 672, - "stagesMs": { - "authorization": 716.3245870000001, - "cache_lookup": 1.7067420000000002, - "repository": 2.924564 - } - }, - { - "requestID": "e5b0fc31-4a4b-4d98-b53b-ce16a32ea8b5", - "route": "/api/repo/:id/files", - "status": 200, - "serverMs": 8, - "firstByteMs": 7.729528, - "bytes": 170, - "stagesMs": { - "repository": 2.605594 - } - }, - { - "requestID": "ed3c8906-17ba-45be-9b87-9d5f878284f1", - "route": "/api/repo/:id/zip", - "status": 200, - "serverMs": 2397, - "firstByteMs": 719.750659, - "bytes": 7191, - "stagesMs": { - "anonymize": 91.48962800000001, - "authorization": 2114.516784, - "cache_fill": 150.314618, - "cache_lookup": 9.652164, - "repository": 2.048655, - "worker_wait": 0.100594 - } - }, - { - "requestID": "fa14928d-07dd-4d9d-aea9-c1f26f1bdc0e", - "route": "/api/repo/:id/file/*path", - "status": 200, - "serverMs": 356, - "firstByteMs": 352.257052, - "bytes": 672, - "stagesMs": { - "authorization": 327.658451, - "cache_lookup": 1.637785, - "repository": 2.845988 - } - }, - { - "requestID": "4c83036b-3344-4382-9b45-4c31ae025eb8", - "route": "/w/:id/*path", - "status": 200, - "serverMs": 696, - "firstByteMs": 695.099425, - "bytes": 672, - "stagesMs": { - "authorization": 671.839562, - "cache_lookup": 1.6695699999999998, - "repository": 3.109298 - } - }, - { - "requestID": "626b9055-28a7-460e-b8a0-1a5a7270cc1b", - "route": "/api/repo/:id/zip", - "status": 200, - "serverMs": 2219, - "firstByteMs": 703.580369, - "bytes": 7191, - "stagesMs": { - "authorization": 2131.199348, - "cache_lookup": 9.165308999999999, - "repository": 2.739444 - } - }, - { - "requestID": "2d950dc4-c37d-4736-8314-359fa30e17d3", - "route": "/api/repo/:id/file/*path", - "status": 200, - "serverMs": 376, - "firstByteMs": 373.535292, - "bytes": 672, - "stagesMs": { - "authorization": 347.180832, - "cache_lookup": 2.633868, - "repository": 2.644478 - } - }, - { - "requestID": "524e2314-a756-4bee-977d-b056d4ad4624", - "route": "/w/:id/*path", - "status": 200, - "serverMs": 781, - "firstByteMs": 780.002568, - "bytes": 672, - "stagesMs": { - "authorization": 757.946475, - "cache_lookup": 1.783138, - "repository": 2.323455 - } - }, - { - "requestID": "5ab10b1d-efd4-4374-8e18-11cd0fe2e496", - "route": "/api/repo/:id/zip", - "status": 200, - "serverMs": 2338, - "firstByteMs": 760.029936, - "bytes": 7191, - "stagesMs": { - "authorization": 2245.1479099999997, - "cache_lookup": 9.473965, - "repository": 2.389592 - } - }, - { - "requestID": "88f6f1ec-e3c5-4225-a900-e0e0c5846c31", - "route": "/api/admin/performance", - "status": 200, - "serverMs": 65, - "firstByteMs": 62.023771, - "bytes": 3607, - "stagesMs": {} - }, - { - "requestID": "821aecb1-f012-4735-8439-656cf6cd75c5", - "route": "/api/user", - "status": 401, - "serverMs": 3, - "firstByteMs": 2.944868, - "bytes": 25, - "stagesMs": {} - }, - { - "requestID": "a1de2b63-e9d8-467c-a519-aa7f851ce700", - "route": "/api/repo/:id", - "status": 200, - "serverMs": 12, - "firstByteMs": 12.015106, - "bytes": 21, - "stagesMs": { - "repository": 1.717916 - } - }, - { - "requestID": "c2ea8589-eb70-4216-b06f-564de946d3a2", - "route": "/api/repo/:id", - "status": 200, - "serverMs": 7, - "firstByteMs": 6.580884, - "bytes": 616, - "stagesMs": { - "repository": 1.516118 - } - }, - { - "requestID": "782e117a-c6fb-4476-bdb7-b93c8eaf0442", - "route": "/api/repo/:id", - "status": 200, - "serverMs": 8, - "firstByteMs": 7.831965, - "bytes": 615, - "stagesMs": { - "repository": 1.648814 - } - }, - { - "requestID": "14f39160-18b0-4e7f-8822-26abf0d2eb98", - "route": "/api/repo/:id/file/*path", - "status": 410, - "serverMs": 3, - "firstByteMs": 3.386499, - "bytes": 30, - "stagesMs": { - "repository": 2.320042 - } - }, - { - "requestID": "9f43ee53-f64d-4e86-8a5c-e49b3791ce6a", - "route": "/api/user", - "status": 401, - "serverMs": 4, - "firstByteMs": 4.438277, - "bytes": 25, - "stagesMs": {} - } - ], - "summary": { - "/api/repo/:id/file/*path": { - "serverMs": [ - 461, - 356, - 376 - ], - "medianServerMs": 376, - "authorizationMs": [ - 330.037846, - 327.658451, - 347.180832 - ] - }, - "/api/repo/:id/zip": { - "serverMs": [ - 2397, - 2219, - 2338 - ], - "medianServerMs": 2338, - "authorizationMs": [ - 2114.516784, - 2131.199348, - 2245.1479099999997 - ] - } - } -} \ No newline at end of file diff --git a/backend/reports/file-web-before.json b/backend/reports/file-web-before.json deleted file mode 100644 index 3a3f22d..0000000 --- a/backend/reports/file-web-before.json +++ /dev/null @@ -1,2880 +0,0 @@ -{ - "deploymentChecks": { - "verifiedAt": "2026-11-03T20:55:17.214Z", - "hostname": "beta.durieux.me", - "configurationMode": "GitHub App enabled alongside legacy OAuth", - "checks": [ - { - "method": "GET", - "route": "/api/user", - "requestID": "bb2b615a-458c-4392-84be-20be2ba71379", - "status": 401, - "expected": 401, - "bytes": 25, - "headersMs": 328, - "firstBodyByteMs": 333, - "elapsedMs": 352 - }, - { - "method": "GET", - "route": "/api/user", - "requestID": "1f3eb9d7-486e-4cf2-859f-ec68495ceb52", - "status": 200, - "expected": 200, - "bytes": 100, - "headersMs": 103, - "firstBodyByteMs": 110, - "elapsedMs": 111 - }, - { - "method": "GET", - "route": "/github/connections", - "requestID": "e22226ad-49fc-47f8-8db0-7e841c4a7192", - "status": 200, - "expected": 200, - "bytes": 456, - "headersMs": 952, - "firstBodyByteMs": 955, - "elapsedMs": 959 - }, - { - "method": "GET", - "route": "/api/providers", - "requestID": "7b1f00b3-d05e-4c6b-9804-310876246bb8", - "status": 200, - "expected": 200, - "bytes": 144, - "headersMs": 46, - "firstBodyByteMs": 48, - "elapsedMs": 49 - }, - { - "method": "GET", - "route": "/api/user/dashboard", - "requestID": "dfad6cca-85b4-4838-ae04-9d92a9f2e532", - "status": 200, - "expected": 200, - "bytes": 796, - "headersMs": 53, - "firstBodyByteMs": 55, - "elapsedMs": 55 - }, - { - "method": "GET", - "route": "/api/user/default", - "requestID": "a3a1aa9b-f216-4abb-89f5-e25897f2a07f", - "status": 200, - "expected": 200, - "bytes": 25, - "headersMs": 50, - "firstBodyByteMs": 50, - "elapsedMs": 50 - }, - { - "method": "GET", - "route": "/api/user/quota", - "requestID": "72662e3e-0879-4a4b-8921-87472aac9098", - "status": 200, - "expected": 200, - "bytes": 115, - "headersMs": 53, - "firstBodyByteMs": 54, - "elapsedMs": 54 - }, - { - "method": "GET", - "route": "/api/admin/overview", - "requestID": "d3a350b3-f4e7-41dc-ab05-3281cf25c1ac", - "status": 200, - "expected": 200, - "bytes": 1146, - "headersMs": 133, - "firstBodyByteMs": 135, - "elapsedMs": 137 - }, - { - "method": "GET", - "route": "/api/admin/users", - "requestID": "c23817de-09bb-4498-bc65-6c1edec09d96", - "status": 200, - "expected": 200, - "bytes": 526, - "headersMs": 68, - "firstBodyByteMs": 70, - "elapsedMs": 71 - }, - { - "method": "GET", - "route": "/api/admin/repos", - "requestID": "7bbe10f9-aad6-4945-bd4b-9014e930e1b5", - "status": 200, - "expected": 200, - "bytes": 12094, - "headersMs": 46, - "firstBodyByteMs": 48, - "elapsedMs": 50 - }, - { - "method": "GET", - "route": "/api/admin/queues", - "requestID": "1eee16d7-e02e-46ec-b6ce-71a219bc5ed9", - "status": 200, - "expected": 200, - "bytes": 5787, - "headersMs": 78, - "firstBodyByteMs": 79, - "elapsedMs": 81 - }, - { - "method": "GET", - "route": "/api/admin/performance", - "requestID": "6d1760a3-35ca-4297-a488-2a9a02dc7775", - "status": 200, - "expected": 200, - "bytes": 17100, - "headersMs": 63, - "firstBodyByteMs": 64, - "elapsedMs": 67 - }, - { - "method": "GET", - "route": "/api/admin/errors", - "requestID": "0535319d-ee0f-4542-ae02-220412236f96", - "status": 200, - "expected": 200, - "bytes": 58823, - "headersMs": 83, - "firstBodyByteMs": 85, - "elapsedMs": 91 - }, - { - "method": "GET", - "route": "/api/admin/errors/stats", - "requestID": "a11b8d9f-d6b6-46f5-b3ce-61898c675671", - "status": 200, - "expected": 200, - "bytes": 1396, - "headersMs": 34, - "firstBodyByteMs": 35, - "elapsedMs": 35 - }, - { - "method": "GET", - "route": "/api/admin/tokens", - "requestID": "a0c443ff-0a13-4638-8a6b-1d428bd7ab26", - "status": 200, - "expected": 200, - "bytes": 160, - "headersMs": 52, - "firstBodyByteMs": 53, - "elapsedMs": 53 - }, - { - "method": "GET", - "route": "/api/admin/errors?limit=5001", - "requestID": "6608aed3-c7e6-4a9b-a1d2-0ca019706cbe", - "status": 200, - "expected": 200, - "bytes": 164139, - "headersMs": 78, - "firstBodyByteMs": 81, - "elapsedMs": 91 - }, - { - "method": "GET", - "route": "/api/admin/errors/stats", - "requestID": "e812e2d2-e762-41e3-a04c-fc655788ac95", - "status": 200, - "expected": 200, - "bytes": 1396, - "headersMs": 35, - "firstBodyByteMs": 36, - "elapsedMs": 36 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793739317218-missing", - "requestID": "d6311e18-90b0-4aa8-bfda-eb41ba6eda83", - "status": 404, - "expected": 404, - "bytes": 26, - "headersMs": 33, - "firstBodyByteMs": 33, - "elapsedMs": 33 - }, - { - "method": "GET", - "route": "/api/admin/errors/stats", - "requestID": "cdcbdbb5-2d2e-4348-a9f2-84d684ce589b", - "status": 200, - "expected": 200, - "bytes": 1396, - "headersMs": 54, - "firstBodyByteMs": 55, - "elapsedMs": 55 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=download&range=1h", - "requestID": "4e08997f-0b9c-426e-a343-7e640c2279a7", - "status": 200, - "expected": 200, - "bytes": 3422, - "headersMs": 61, - "firstBodyByteMs": 62, - "elapsedMs": 62 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=download&range=6h", - "requestID": "e4de3dab-f4cc-428b-abb1-4d1a4af5d572", - "status": 200, - "expected": 200, - "bytes": 20222, - "headersMs": 41, - "firstBodyByteMs": 42, - "elapsedMs": 43 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=download&range=24h", - "requestID": "8ee70a2a-0cbb-4ff5-b8a6-eacb04bd7804", - "status": 200, - "expected": 200, - "bytes": 80732, - "headersMs": 42, - "firstBodyByteMs": 43, - "elapsedMs": 46 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=download&range=7d", - "requestID": "6e222c3e-f28a-4354-b281-101d6f5b4ac8", - "status": 200, - "expected": 200, - "bytes": 564571, - "headersMs": 156, - "firstBodyByteMs": 157, - "elapsedMs": 182 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=remove&range=1h", - "requestID": "c52ecbff-615d-46f2-a1f7-9069c57f8dce", - "status": 200, - "expected": 200, - "bytes": 3407, - "headersMs": 33, - "firstBodyByteMs": 34, - "elapsedMs": 34 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=cache&range=1h", - "requestID": "1be6aaf2-b3a4-4407-86e4-ecdec70a31f1", - "status": 200, - "expected": 200, - "bytes": 3401, - "headersMs": 35, - "firstBodyByteMs": 36, - "elapsedMs": 37 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=download&range=unrecognized", - "requestID": "0caf7210-bc19-4d6b-8920-36ae87fb8f66", - "status": 200, - "expected": 200, - "bytes": 3432, - "headersMs": 32, - "firstBodyByteMs": 33, - "elapsedMs": 34 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=unknown", - "requestID": "14457152-4c62-446f-bb0b-0a6329cd6bbe", - "status": 404, - "expected": 404, - "bytes": 27, - "headersMs": 30, - "firstBodyByteMs": 30, - "elapsedMs": 31 - }, - { - "method": "GET", - "route": "/api/stat", - "requestID": "b2b10d13-8a20-44f4-a99b-5dd75095228c", - "status": 200, - "expected": 200, - "bytes": 69, - "headersMs": 46, - "firstBodyByteMs": 47, - "elapsedMs": 47 - }, - { - "method": "GET", - "route": "/api/stat/history?days=-2", - "requestID": "161f3dd7-8395-42d8-9838-69910019c903", - "status": 200, - "expected": 200, - "bytes": 105, - "headersMs": 27, - "firstBodyByteMs": 28, - "elapsedMs": 28 - }, - { - "method": "GET", - "route": "/api/stat/history?days=0", - "requestID": "bb84902f-44e7-441f-9772-741a138cc236", - "status": 200, - "expected": 200, - "bytes": 105, - "headersMs": 27, - "firstBodyByteMs": 28, - "elapsedMs": 28 - }, - { - "method": "GET", - "route": "/api/stat/history?days=0x10", - "requestID": "4cf8d3dc-48c3-4a12-9535-6904215e2713", - "status": 200, - "expected": 200, - "bytes": 105, - "headersMs": 59, - "firstBodyByteMs": 60, - "elapsedMs": 60 - }, - { - "method": "GET", - "route": "/api/stat/history?days=7suffix", - "requestID": "17fef989-1335-4648-8dbf-d3de261a72af", - "status": 200, - "expected": 200, - "bytes": 105, - "headersMs": 28, - "firstBodyByteMs": 29, - "elapsedMs": 29 - }, - { - "method": "GET", - "route": "/api/stat/history?days=999", - "requestID": "1f7dc9fa-52cf-40ff-be75-78e07f123a37", - "status": 200, - "expected": 200, - "bytes": 105, - "headersMs": 25, - "firstBodyByteMs": 26, - "elapsedMs": 26 - }, - { - "method": "GET", - "route": "/api/stat/history?days[]=7&days[]=30", - "requestID": "f26c94d4-aadb-4ec8-9fbe-7c150953fa39", - "status": 200, - "expected": 200, - "bytes": 105, - "headersMs": 25, - "firstBodyByteMs": 26, - "elapsedMs": 26 - }, - { - "method": "GET", - "route": "/api/stat/history?days[1]=7&days[0]=1", - "requestID": "dad0dde7-57b9-499c-8b86-49a32064762a", - "status": 200, - "expected": 200, - "bytes": 105, - "headersMs": 28, - "firstBodyByteMs": 28, - "elapsedMs": 29 - }, - { - "method": "GET", - "route": "/api/stat/history?days[x]=7", - "requestID": "807ce169-32cd-4f89-968e-cddd4f9b95ee", - "status": 200, - "expected": 200, - "bytes": 105, - "headersMs": 25, - "firstBodyByteMs": 26, - "elapsedMs": 26 - }, - { - "method": "GET", - "route": "/api/user/dashboard?statuses[]=", - "requestID": "bb15685e-23f9-49d9-a808-ca5d5ed1ddbd", - "status": 200, - "expected": 200, - "bytes": 64, - "headersMs": 45, - "firstBodyByteMs": 46, - "elapsedMs": 46 - }, - { - "method": "GET", - "route": "/api/user/dashboard?type[]=repo", - "requestID": "625f6e52-c312-4b8b-8f7f-d0d91aba2816", - "status": 200, - "expected": 200, - "bytes": 64, - "headersMs": 49, - "firstBodyByteMs": 50, - "elapsedMs": 51 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort[]=", - "requestID": "49ca98a6-3144-45a9-a1f2-9f7a7638c159", - "status": 400, - "expected": 400, - "bytes": 24, - "headersMs": 31, - "firstBodyByteMs": 31, - "elapsedMs": 31 - }, - { - "method": "GET", - "route": "/api/user/dashboard?cursor[]=", - "requestID": "7dec39a5-fb21-4ed8-8c11-e386509a86dc", - "status": 400, - "expected": 400, - "bytes": 26, - "headersMs": 30, - "firstBodyByteMs": 30, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort=anonymizeDate&limit=5&cursor=eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDEiLCJ2YWx1ZSI6IjIwMjQtMDMtMDFUMDA6MDA6MDAuMDAwWiJ9", - "requestID": "7a94b83d-9aa8-447b-ad29-ead92fe1e57d", - "status": 200, - "expected": 200, - "bytes": 796, - "headersMs": 46, - "firstBodyByteMs": 47, - "elapsedMs": 50 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort=anonymizeDate&limit=5&cursor=eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDEiLCJ2YWx1ZSI6Ik1hcmNoIDEgMjAyNCJ9", - "requestID": "174fb331-bf71-4330-adb8-66f584a59467", - "status": 200, - "expected": 200, - "bytes": 796, - "headersMs": 56, - "firstBodyByteMs": 58, - "elapsedMs": 58 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort=anonymizeDate&limit=5&cursor=eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDEiLCJ2YWx1ZSI6IjIwMjQtMDItMzAifQ", - "requestID": "0d194013-65a2-4fa2-af3c-f79a6d6711e2", - "status": 200, - "expected": 200, - "bytes": 796, - "headersMs": 49, - "firstBodyByteMs": 50, - "elapsedMs": 50 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort=anonymizeDate&limit=5&cursor=eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMjQ6MDA6MDBaIn0", - "requestID": "3fbce421-af32-49ed-a07b-3ee130737dc2", - "status": 200, - "expected": 200, - "bytes": 796, - "headersMs": 50, - "firstBodyByteMs": 51, - "elapsedMs": 51 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort=anonymizeDate&limit=5&cursor=eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDEiLCJ2YWx1ZSI6WyIyMDI0IiwiMyIsIjEiXX0", - "requestID": "b1bab7ff-9234-4087-b1f8-1855c16286ba", - "status": 200, - "expected": 200, - "bytes": 796, - "headersMs": 49, - "firstBodyByteMs": 50, - "elapsedMs": 50 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort=anonymizeDate&limit=5&cursor=eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDEiLCJ2YWx1ZSI6Im5vdCBhIGRhdGUifQ", - "requestID": "2d9ee3bf-1075-441a-add4-ff9b7c83942c", - "status": 400, - "expected": 400, - "bytes": 26, - "headersMs": 63, - "firstBodyByteMs": 63, - "elapsedMs": 63 - }, - { - "method": "GET", - "route": "/api/admin/performance?minutes=6e1", - "requestID": "ee793084-efff-420c-9a47-8ce453e5cece", - "status": 200, - "expected": 200, - "bytes": 67779, - "headersMs": 148, - "firstBodyByteMs": 149, - "elapsedMs": 155 - }, - { - "method": "GET", - "route": "/api/admin/performance?minutes[]=60", - "requestID": "889dc1c3-0fa9-4e63-a452-41a75ae28bf0", - "status": 200, - "expected": 200, - "bytes": 67779, - "headersMs": 123, - "firstBodyByteMs": 124, - "elapsedMs": 126 - }, - { - "method": "GET", - "route": "/api/admin/performance?minutes[0]=15", - "requestID": "854bfc78-89c8-4e5e-b3cf-6a3a73421919", - "status": 200, - "expected": 200, - "bytes": 21276, - "headersMs": 61, - "firstBodyByteMs": 61, - "elapsedMs": 62 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue[]=cache&range[]=6h", - "requestID": "40d3e061-44f5-492b-b1c1-ee1480c942e3", - "status": 200, - "expected": 200, - "bytes": 20201, - "headersMs": 39, - "firstBodyByteMs": 40, - "elapsedMs": 41 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?range[]=", - "requestID": "fd6ad418-3a51-48d3-a1bc-61eda2c63dcc", - "status": 200, - "expected": 200, - "bytes": 3420, - "headersMs": 33, - "firstBodyByteMs": 34, - "elapsedMs": 34 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?range=toString", - "requestID": "73ee3337-2aac-40e2-a383-f8b84ea2dab9", - "status": 200, - "expected": 200, - "bytes": 51, - "headersMs": 33, - "firstBodyByteMs": 34, - "elapsedMs": 34 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue[]=", - "requestID": "d48beab6-8c64-4eb6-a7af-b70c5bb25063", - "status": 404, - "expected": 404, - "bytes": 27, - "headersMs": 31, - "firstBodyByteMs": 32, - "elapsedMs": 32 - }, - { - "method": "GET", - "route": "/api/admin/queues?queue[]=remove", - "requestID": "7545a8cf-d5e3-4e91-9fa1-6d9b1d9464ad", - "status": 200, - "expected": 200, - "bytes": 5511, - "headersMs": 57, - "firstBodyByteMs": 58, - "elapsedMs": 58 - }, - { - "method": "GET", - "route": "/api/admin/errors?offset[]=2&limit[]=7", - "requestID": "53a45259-900b-4a0e-a76a-bb9e75eb7f37", - "status": 200, - "expected": 200, - "bytes": 2101, - "headersMs": 38, - "firstBodyByteMs": 39, - "elapsedMs": 39 - }, - { - "method": "GET", - "route": "/api/repo/octocat/Hello-World?connection=", - "requestID": "de39c81b-3f2d-41a5-947f-e0f3f892bcbc", - "status": 400, - "expected": 400, - "bytes": 30, - "headersMs": 29, - "firstBodyByteMs": 29, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/api/repo/octocat/Hello-World?connection[]=oauth", - "requestID": "1f15b38f-4bbf-4c13-b6c0-8eeea046890e", - "status": 400, - "expected": 400, - "bytes": 30, - "headersMs": 30, - "firstBodyByteMs": 30, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/api/repo/octocat/Hello-World?connection=oauth&connection[]=github-app", - "requestID": "4cdbb1d0-5dbb-40b3-bfce-3821a2aeade1", - "status": 400, - "expected": 400, - "bytes": 30, - "headersMs": 36, - "firstBodyByteMs": 37, - "elapsedMs": 37 - }, - { - "method": "GET", - "route": "/api/repo/octocat/Hello-World?repositoryID[]=invalid", - "requestID": "dad7123b-db74-4e19-85fe-2f91d4a227dc", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 41, - "firstBodyByteMs": 41, - "elapsedMs": 41 - }, - { - "method": "GET", - "route": "/api/repo/octocat/Hello-World?repositoryID=invalid", - "requestID": "73871032-6ee0-4f63-8d59-0515e3bad12f", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 29, - "firstBodyByteMs": 29, - "elapsedMs": 29 - }, - { - "method": "GET", - "route": "/api/repo/octocat/Hello-World?repositoryID[$exists]=true", - "requestID": "56ca1bbe-2a21-430b-a497-42aebb0b6515", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 42, - "firstBodyByteMs": 42, - "elapsedMs": 43 - }, - { - "method": "GET", - "route": "/api/user/search/github-users?q[]=ab", - "requestID": "18465872-06a6-43d9-82d1-79e872b96c8d", - "status": 200, - "expected": 200, - "bytes": 2, - "headersMs": 28, - "firstBodyByteMs": 28, - "elapsedMs": 29 - }, - { - "method": "GET", - "route": "/api/user/search/github-users?q[length]=1", - "requestID": "637891fd-1def-4be0-82b1-e112410865f0", - "status": 200, - "expected": 200, - "bytes": 2, - "headersMs": 44, - "firstBodyByteMs": 45, - "elapsedMs": 45 - }, - { - "method": "GET", - "route": "/api/user/search/github-users?q=ab&q=cd", - "requestID": "23c5fb61-75e1-4650-9307-9c675ff41645", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 33, - "firstBodyByteMs": 33, - "elapsedMs": 34 - }, - { - "method": "GET", - "route": "/api/user/search/github-users?q[x]=ab", - "requestID": "986f62d7-f3fb-4e1b-987a-a7a90c5b76f9", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 52, - "firstBodyByteMs": 52, - "elapsedMs": 53 - }, - { - "method": "GET", - "route": "/api/user/search/github-users?q[length][toString]=1", - "requestID": "6f86be54-6aff-4ef7-8cdb-4cbbbfbbfe32", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 36, - "firstBodyByteMs": 36, - "elapsedMs": 36 - }, - { - "method": "GET", - "route": "/api/admin/repos?page[]=2&limit[]=2&sort[]=status&direction[]=asc&format[]=csv", - "requestID": "bce0a642-01b9-458f-89a2-25e95dc626e1", - "status": 200, - "expected": 200, - "bytes": 2601, - "headersMs": 42, - "firstBodyByteMs": 43, - "elapsedMs": 44 - }, - { - "method": "GET", - "route": "/api/admin/repos?page=1000001&limit=1", - "requestID": "6814b32b-4d3d-40b2-aa93-e14465038038", - "status": 200, - "expected": 200, - "bytes": 193, - "headersMs": 37, - "firstBodyByteMs": 38, - "elapsedMs": 41 - }, - { - "method": "GET", - "route": "/api/admin/repos?page=-1", - "requestID": "fc6e7cb0-add2-4575-a948-6f8fea6cf4cc", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 30, - "firstBodyByteMs": 30, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/api/admin/repos?page[toString]=x", - "requestID": "ca1187cb-a565-4035-a10a-e663a3844f15", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 44, - "firstBodyByteMs": 44, - "elapsedMs": 44 - }, - { - "method": "GET", - "route": "/api/admin/users?page[]=2&limit[]=2&sort[]=status&direction[]=asc&format[]=csv", - "requestID": "56cecbc0-11bc-415d-b4c5-051c2e1ad300", - "status": 200, - "expected": 200, - "bytes": 106, - "headersMs": 39, - "firstBodyByteMs": 40, - "elapsedMs": 40 - }, - { - "method": "GET", - "route": "/api/admin/users?page=1000001&limit=1", - "requestID": "28e987e1-297f-4072-b9e1-3f5dcc5cce49", - "status": 200, - "expected": 200, - "bytes": 112, - "headersMs": 34, - "firstBodyByteMs": 35, - "elapsedMs": 37 - }, - { - "method": "GET", - "route": "/api/admin/users?page=-1", - "requestID": "dd63c56a-786a-49c4-b115-4a858685d483", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 33, - "firstBodyByteMs": 34, - "elapsedMs": 34 - }, - { - "method": "GET", - "route": "/api/admin/users?page[toString]=x", - "requestID": "5add7380-ac47-402b-b6af-c1bd8181cfcc", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 30, - "firstBodyByteMs": 31, - "elapsedMs": 31 - }, - { - "method": "GET", - "route": "/api/admin/users?limit=-1", - "requestID": "19f60bdf-30d5-4b51-bf70-b1bdc6b1cf90", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 31, - "firstBodyByteMs": 32, - "elapsedMs": 32 - }, - { - "method": "GET", - "route": "/api/admin/conferences?page[]=2&limit[]=2&sort[]=status&direction[]=asc&format[]=csv", - "requestID": "532fb20b-da3b-47c7-8386-cf60b334da19", - "status": 200, - "expected": 200, - "bytes": 80, - "headersMs": 50, - "firstBodyByteMs": 51, - "elapsedMs": 51 - }, - { - "method": "GET", - "route": "/api/admin/conferences?page=1000001&limit=1", - "requestID": "c3ce1322-128a-44ea-8fcc-de2a0f33fb76", - "status": 200, - "expected": 200, - "bytes": 86, - "headersMs": 38, - "firstBodyByteMs": 39, - "elapsedMs": 39 - }, - { - "method": "GET", - "route": "/api/admin/conferences?page=-1", - "requestID": "c5fbaaba-2266-4a98-9fcc-838db8da64de", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 52, - "firstBodyByteMs": 53, - "elapsedMs": 53 - }, - { - "method": "GET", - "route": "/api/admin/conferences?page[toString]=x", - "requestID": "99642150-a77a-40ec-97bc-44516b78b3cf", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 43, - "firstBodyByteMs": 43, - "elapsedMs": 43 - }, - { - "method": "GET", - "route": "/api/admin/repos?limit=-1", - "requestID": "928e5a57-ab61-4282-b6cc-ce6ddfe3a6bc", - "status": 200, - "expected": 200, - "bytes": 1377, - "headersMs": 37, - "firstBodyByteMs": 38, - "elapsedMs": 38 - }, - { - "method": "GET", - "route": "/api/admin/repos?ready[]=true", - "requestID": "6be6d19d-5c5c-4bfa-a9cf-627d55143e08", - "status": 200, - "expected": 200, - "bytes": 1935, - "headersMs": 37, - "firstBodyByteMs": 38, - "elapsedMs": 39 - }, - { - "method": "GET", - "route": "/api/admin/conferences?limit=-1", - "requestID": "fe7b29cb-4742-4524-9b86-bbeb86b93ae5", - "status": 200, - "expected": 200, - "bytes": 80, - "headersMs": 47, - "firstBodyByteMs": 47, - "elapsedMs": 47 - }, - { - "method": "GET", - "route": "/api/admin/conferences?ready[]=true", - "requestID": "df83e486-03cd-47dd-b088-5398b685d5c3", - "status": 200, - "expected": 200, - "bytes": 117, - "headersMs": 34, - "firstBodyByteMs": 35, - "elapsedMs": 35 - }, - { - "method": "GET", - "route": "/api/admin/repos?search[]=x", - "requestID": "1fc1230b-1fd2-4a41-b466-00681977a5e9", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 40, - "firstBodyByteMs": 40, - "elapsedMs": 40 - }, - { - "method": "GET", - "route": "/api/admin/users?search[]=x", - "requestID": "5568cda4-1ef7-4922-a913-ef6e633a4bc6", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 43, - "firstBodyByteMs": 43, - "elapsedMs": 43 - }, - { - "method": "GET", - "route": "/api/admin/conferences?search[]=x", - "requestID": "1e4b2d1a-c82c-448a-82b2-ac3b64204667", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 50, - "firstBodyByteMs": 51, - "elapsedMs": 51 - }, - { - "method": "GET", - "route": "/api/admin/users?status[]=active", - "requestID": "fa5fc1e3-41c6-4858-a3b8-bfd4c5997d7d", - "status": 200, - "expected": 200, - "bytes": 99, - "headersMs": 35, - "firstBodyByteMs": 35, - "elapsedMs": 36 - }, - { - "method": "GET", - "route": "/api/admin/users?status[$in][]=active", - "requestID": "5b0fe5d9-e265-465a-bca3-2f8e33461f13", - "status": 200, - "expected": 200, - "bytes": 553, - "headersMs": 36, - "firstBodyByteMs": 37, - "elapsedMs": 37 - }, - { - "method": "GET", - "route": "/api/admin/users?status[a]=active", - "requestID": "040f5c00-1a2e-4087-b8d1-7e1d5bd985e9", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 30, - "firstBodyByteMs": 30, - "elapsedMs": 31 - }, - { - "method": "GET", - "route": "/api/admin/users?status[$in]=active", - "requestID": "408cb90f-5be7-4c2f-9fd9-0a018ebdfe23", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 32, - "firstBodyByteMs": 32, - "elapsedMs": 32 - }, - { - "method": "GET", - "route": "/api/admin/repos?owner[a]=x", - "requestID": "0d334fd1-3481-4edd-8e3b-c16739349e21", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 34, - "firstBodyByteMs": 35, - "elapsedMs": 35 - }, - { - "method": "GET", - "route": "/api/admin/repos?conference[$unknown]=x", - "requestID": "4702a987-8087-4e5e-a59e-44792e2196e9", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 33, - "firstBodyByteMs": 33, - "elapsedMs": 33 - }, - { - "method": "GET", - "route": "/api/admin/repos?dateFrom[]=2024-02-30", - "requestID": "e8ed71d6-ad7a-4ae4-a4c0-55afd629da8a", - "status": 200, - "expected": 200, - "bytes": 12156, - "headersMs": 39, - "firstBodyByteMs": 40, - "elapsedMs": 40 - }, - { - "method": "GET", - "route": "/api/admin/repos?dateTo=March%201%202024", - "requestID": "be80a54d-4ea8-4291-9d6a-030861b1b586", - "status": 200, - "expected": 200, - "bytes": 156, - "headersMs": 39, - "firstBodyByteMs": 40, - "elapsedMs": 40 - }, - { - "method": "GET", - "route": "/api/admin/repos?dateFrom[toString]=x", - "requestID": "a3e1b621-5139-45b6-9dbe-289dce27d3ac", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 29, - "firstBodyByteMs": 29, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/api/admin/users?dateFrom[]=2024-02-30", - "requestID": "6e0d75fb-2812-47b5-8d8a-cbfc1b5faa40", - "status": 200, - "expected": 200, - "bytes": 458, - "headersMs": 36, - "firstBodyByteMs": 36, - "elapsedMs": 36 - }, - { - "method": "GET", - "route": "/api/admin/users?dateTo=March%201%202024", - "requestID": "a659d933-8949-46cd-b1ca-9539cd911026", - "status": 200, - "expected": 200, - "bytes": 129, - "headersMs": 39, - "firstBodyByteMs": 39, - "elapsedMs": 39 - }, - { - "method": "GET", - "route": "/api/admin/users?dateFrom[toString]=x", - "requestID": "9f4cc798-2988-4c7c-acb4-32cd0e82ee45", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 29, - "firstBodyByteMs": 29, - "elapsedMs": 29 - }, - { - "method": "GET", - "route": "/api/admin/conferences?dateFrom[]=2024-02-30", - "requestID": "26a0a111-6b42-4327-b75e-cc429b3faa28", - "status": 200, - "expected": 200, - "bytes": 138, - "headersMs": 35, - "firstBodyByteMs": 36, - "elapsedMs": 36 - }, - { - "method": "GET", - "route": "/api/admin/conferences?dateTo=March%201%202024", - "requestID": "f20af127-88ff-4c0d-bf85-2d4d2958d355", - "status": 200, - "expected": 200, - "bytes": 138, - "headersMs": 36, - "firstBodyByteMs": 37, - "elapsedMs": 41 - }, - { - "method": "GET", - "route": "/api/admin/conferences?dateFrom[toString]=x", - "requestID": "eb316bed-677c-4b25-b3a9-a1bff62cab2f", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 31, - "firstBodyByteMs": 31, - "elapsedMs": 32 - }, - { - "method": "GET", - "route": "/github/connections", - "requestID": "871e55af-5d56-45e3-acf6-4896bcf54f03", - "status": 200, - "expected": 200, - "bytes": 456, - "headersMs": 799, - "firstBodyByteMs": 801, - "elapsedMs": 801 - }, - { - "method": "POST", - "route": "/api/admin/tokens", - "requestID": "c0c9207f-e567-4898-bf48-624515457703", - "status": 200, - "expected": 200, - "bytes": 186, - "headersMs": 47, - "firstBodyByteMs": 49, - "elapsedMs": 49 - }, - { - "method": "GET", - "route": "/api/user", - "requestID": "f2c3befe-28bb-4ec2-b9aa-7e3d23197d37", - "status": 200, - "expected": 200, - "bytes": 100, - "headersMs": 30, - "firstBodyByteMs": 31, - "elapsedMs": 32 - }, - { - "method": "DELETE", - "route": "/api/admin/tokens/6aea4a3eaadfb0c81cf083de", - "requestID": "e2a7f05b-6ce4-4d38-ba72-2c5655119d90", - "status": 200, - "expected": 200, - "bytes": 13, - "headersMs": 32, - "firstBodyByteMs": 33, - "elapsedMs": 33 - }, - { - "method": "GET", - "route": "/api/user", - "requestID": "a4eeb9f9-de29-41a2-bc71-792a5a62f81e", - "status": 401, - "expected": 401, - "bytes": 25, - "headersMs": 45, - "firstBodyByteMs": 45, - "elapsedMs": 45 - }, - { - "method": "POST", - "route": "/github/login-token", - "requestID": "543aa070-97a2-409e-95d4-c11223097bdf", - "status": 200, - "expected": 200, - "bytes": 33, - "headersMs": 38, - "firstBodyByteMs": 38, - "elapsedMs": 38 - }, - { - "method": "GET", - "route": "/api/user", - "requestID": "fc7aa4cf-a6bd-4684-8467-b53bae37bc39", - "status": 200, - "expected": 200, - "bytes": 100, - "headersMs": 29, - "firstBodyByteMs": 30, - "elapsedMs": 31 - }, - { - "method": "GET", - "route": "/api/user/logout", - "requestID": "4ba0f3c3-fe0c-49b5-bd60-efa4c2fc5e9a", - "status": 302, - "expected": 302, - "bytes": 24, - "headersMs": 27, - "firstBodyByteMs": 27, - "elapsedMs": 28 - }, - { - "method": "GET", - "route": "/api/user", - "requestID": "8d97c2ea-2fc9-4c6a-b0de-b4255882d02f", - "status": 401, - "expected": 401, - "bytes": 25, - "headersMs": 35, - "firstBodyByteMs": 35, - "elapsedMs": 35 - }, - { - "method": "POST", - "route": "/api/anonymize-preview", - "requestID": "7aecfe81-9cd5-4a78-9e51-00be74df571a", - "status": 200, - "expected": 200, - "bytes": 26, - "headersMs": 30, - "firstBodyByteMs": 30, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/api/providers/github/repository/metadata?name=tdurieux%2Fsynctex-js&connection=github-app", - "requestID": "e0235b12-d5ef-4951-811c-ecca18ffc10f", - "status": 200, - "expected": 200, - "bytes": 230, - "headersMs": 2957, - "firstBodyByteMs": 2957, - "elapsedMs": 2958 - }, - { - "method": "GET", - "route": "/api/providers/github/repository/branches?name=tdurieux%2Fsynctex-js&connection=github-app", - "requestID": "743afd1a-2a43-40fe-96b9-f342cf7bc073", - "status": 200, - "expected": 200, - "bytes": 2623, - "headersMs": 3513, - "firstBodyByteMs": 3514, - "elapsedMs": 3515 - }, - { - "method": "GET", - "route": "/api/providers/github/repository/readme?name=tdurieux%2Fsynctex-js&connection=github-app", - "requestID": "692c768b-9ab9-4d33-b789-62f3778003a7", - "status": 200, - "expected": 200, - "bytes": 2303, - "headersMs": 3121, - "firstBodyByteMs": 3124, - "elapsedMs": 3125 - }, - { - "method": "POST", - "route": "/api/repo", - "requestID": "85299391-d412-4523-a136-50d17c7ad6ed", - "status": 200, - "expected": 200, - "bytes": 22, - "headersMs": 3941, - "firstBodyByteMs": 3942, - "elapsedMs": 3942 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793739317218", - "requestID": "fdccd681-be3d-4c4e-9d75-9fb43c4dfe11", - "status": 200, - "expected": 200, - "bytes": 566, - "headersMs": 112, - "firstBodyByteMs": 113, - "elapsedMs": 113 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793739317218/file/LICENSE", - "requestID": "575e2997-e8b4-4e53-a317-62ba59096e5a", - "status": 200, - "expected": 200, - "bytes": 1074, - "headersMs": 878, - "firstBodyByteMs": 879, - "elapsedMs": 880 - }, - { - "method": "GET", - "route": "/w/go-beta-check-1793739317218/LICENSE", - "requestID": "2c3e0446-6ff9-497e-8d61-50cbc628707d", - "status": 200, - "expected": 200, - "bytes": 1074, - "headersMs": 1507, - "firstBodyByteMs": 1509, - "elapsedMs": 1509 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793739317218/files", - "requestID": "5234b137-f860-4302-8849-38e8cb7549a8", - "status": 200, - "expected": 200, - "bytes": 170, - "headersMs": 37, - "firstBodyByteMs": 38, - "elapsedMs": 38 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793739317218/zip", - "requestID": "3d42b574-f9a0-4bc7-8112-875513666c66", - "status": 200, - "expected": 200, - "bytes": 7191, - "headersMs": 1148, - "firstBodyByteMs": 1149, - "elapsedMs": 4240 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793739317218/file/LICENSE", - "requestID": "866a1cba-e22c-4b3f-8937-13286c25f83d", - "status": 200, - "expected": 200, - "bytes": 1074, - "headersMs": 871, - "firstBodyByteMs": 872, - "elapsedMs": 873 - }, - { - "method": "GET", - "route": "/w/go-beta-check-1793739317218/LICENSE", - "requestID": "5eddf5cc-32ec-43cb-9d10-f20695de15ba", - "status": 200, - "expected": 200, - "bytes": 1074, - "headersMs": 1485, - "firstBodyByteMs": 1486, - "elapsedMs": 1486 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793739317218/zip", - "requestID": "8c643022-3d44-4312-8c37-a7b896100d44", - "status": 200, - "expected": 200, - "bytes": 7191, - "headersMs": 1173, - "firstBodyByteMs": 1173, - "elapsedMs": 4020 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793739317218/file/LICENSE", - "requestID": "abbf4372-c610-47ab-90e2-8ecce1dfb576", - "status": 200, - "expected": 200, - "bytes": 1074, - "headersMs": 811, - "firstBodyByteMs": 812, - "elapsedMs": 813 - }, - { - "method": "GET", - "route": "/w/go-beta-check-1793739317218/LICENSE", - "requestID": "a44ceba1-166f-4248-bb02-7e51ca67db53", - "status": 200, - "expected": 200, - "bytes": 1074, - "headersMs": 1497, - "firstBodyByteMs": 1499, - "elapsedMs": 1499 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793739317218/zip", - "requestID": "6eb8e435-880b-434f-814c-d977ca9117ce", - "status": 200, - "expected": 200, - "bytes": 7191, - "headersMs": 1092, - "firstBodyByteMs": 1092, - "elapsedMs": 4359 - }, - { - "method": "GET", - "route": "/api/admin/performance", - "requestID": "5285690a-a6ca-4e90-838f-2c6b4066abae", - "status": 200, - "expected": 200, - "bytes": 30595, - "headersMs": 186, - "firstBodyByteMs": 187, - "elapsedMs": 190 - }, - { - "method": "GET", - "route": "/api/user", - "requestID": "4bed4f9d-a2da-4f53-818e-64c9d5734770", - "status": 401, - "expected": 401, - "bytes": 25, - "headersMs": 28, - "firstBodyByteMs": 28, - "elapsedMs": 28 - }, - { - "method": "DELETE", - "route": "/api/repo/go-beta-check-1793739317218", - "requestID": "f27105cd-eb1e-4945-bf04-04a90dfc3450", - "status": 200, - "expected": 200, - "bytes": 21, - "headersMs": 53, - "firstBodyByteMs": 53, - "elapsedMs": 54 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793739317218", - "requestID": "4059c6da-c0d1-41ba-92a7-4a3347351628", - "status": 200, - "expected": 200, - "bytes": 616, - "headersMs": 39, - "firstBodyByteMs": 40, - "elapsedMs": 41 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793739317218", - "requestID": "a1a3c476-0006-44df-8f5b-4ff3f7cace53", - "status": 200, - "expected": 200, - "bytes": 615, - "headersMs": 33, - "firstBodyByteMs": 33, - "elapsedMs": 35 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793739317218/file/LICENSE", - "requestID": "2030695b-27f2-43da-8ba4-c995b311812e", - "status": 410, - "expected": 410, - "bytes": 30, - "headersMs": 29, - "firstBodyByteMs": 30, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/api/user", - "requestID": "49a8b138-50f9-4cdf-a64f-1b542ea99e01", - "status": 401, - "expected": 401, - "bytes": 25, - "headersMs": 46, - "firstBodyByteMs": 47, - "elapsedMs": 47 - } - ], - "productionChanged": false, - "overviewHistoryFresh": "passed", - "overviewBrowserFields": "passed", - "queueOverviewFields": "passed", - "errorMonitoring": { - "maxEntries": 5000, - "hourlyBuckets": 24, - "routine404Counted": true - }, - "queueMetricWindows": [ - { - "queue": "download", - "range": "1h", - "points": 60 - }, - { - "queue": "download", - "range": "6h", - "points": 360 - }, - { - "queue": "download", - "range": "24h", - "points": 1440 - }, - { - "queue": "download", - "range": "7d", - "points": 10080 - }, - { - "queue": "remove", - "range": "1h", - "points": 60 - }, - { - "queue": "cache", - "range": "1h", - "points": 60 - }, - { - "queue": "download", - "range": "unrecognized", - "points": 60 - } - ], - "publicStatistics": { - "anonymousAccess": true, - "windows": [ - { - "query": "days=-2", - "days": 1, - "rows": 1 - }, - { - "query": "days=0", - "days": 30, - "rows": 1 - }, - { - "query": "days=0x10", - "days": 16, - "rows": 1 - }, - { - "query": "days=7suffix", - "days": 7, - "rows": 1 - }, - { - "query": "days=999", - "days": 365, - "rows": 1 - }, - { - "query": "days[]=7&days[]=30", - "days": 7, - "rows": 1 - }, - { - "query": "days[1]=7&days[0]=1", - "days": 1, - "rows": 1 - }, - { - "query": "days[x]=7", - "days": 30, - "rows": 1 - } - ] - }, - "dashboardExtendedQueries": "passed", - "dashboardDateCursors": "passed", - "monitoringExtendedQueries": "passed", - "adminExtendedQueries": "passed", - "previewConnectionQueries": "passed", - "previewCacheHintRejections": "passed", - "userSearchQueries": "passed", - "adminListPaginationQueries": "passed", - "adminListFilterQueries": "passed", - "adminListCastingQueries": "passed", - "adminListDateQueries": "passed", - "apiKeyLifecycle": "passed", - "sessionLoginLogout": "passed", - "exactZipContents": "passed", - "repeatedContentChecks": 3, - "performanceMonitoring": { - "requests": true, - "processSamples": true, - "runtimeHistory": true, - "stages": [ - "repository", - "authorization", - "worker_wait", - "anonymize" - ], - "upstreamObserved": false, - "upstreamNote": "Shared-cache hits need no upstream read; provider timing is checked by the integration suite." - }, - "result": "passed", - "testRepositoryRemoved": true, - "temporaryKeyRevoked": true, - "betaAccountAdmin": true, - "uniqueRequestIDsVerified": 133 - }, - "image": "sha256:4a44b2afed6fe4e9bd526c0cf1874a1baeca531fdf473ab14a328b693b0b68e5", - "traces": [ - { - "requestID": "bb2b615a-458c-4392-84be-20be2ba71379", - "route": "/api/user", - "status": 401, - "serverMs": 3, - "firstByteMs": 2.879414, - "bytes": 25, - "stagesMs": {} - }, - { - "requestID": "1f3eb9d7-486e-4cf2-859f-ec68495ceb52", - "route": "/api/user", - "status": 200, - "serverMs": 6, - "firstByteMs": 6.395747, - "bytes": 100, - "stagesMs": {} - }, - { - "requestID": "e22226ad-49fc-47f8-8db0-7e841c4a7192", - "route": "/github/connections", - "status": 200, - "serverMs": 889, - "firstByteMs": 889.247014, - "bytes": 456, - "stagesMs": {} - }, - { - "requestID": "7b1f00b3-d05e-4c6b-9804-310876246bb8", - "route": "/api/providers", - "status": 200, - "serverMs": 5, - "firstByteMs": 5.140768, - "bytes": 144, - "stagesMs": {} - }, - { - "requestID": "dfad6cca-85b4-4838-ae04-9d92a9f2e532", - "route": "/api/user/dashboard", - "status": 200, - "serverMs": 26, - "firstByteMs": 26.475591, - "bytes": 796, - "stagesMs": {} - }, - { - "requestID": "a3a1aa9b-f216-4abb-89f5-e25897f2a07f", - "route": "/api/user/default", - "status": 200, - "serverMs": 5, - "firstByteMs": 4.558025, - "bytes": 25, - "stagesMs": {} - }, - { - "requestID": "72662e3e-0879-4a4b-8921-87472aac9098", - "route": "/api/user/quota", - "status": 200, - "serverMs": 5, - "firstByteMs": 5.204173, - "bytes": 115, - "stagesMs": {} - }, - { - "requestID": "d3a350b3-f4e7-41dc-ab05-3281cf25c1ac", - "route": "/api/admin/overview", - "status": 200, - "serverMs": 75, - "firstByteMs": 73.923338, - "bytes": 587, - "stagesMs": {} - }, - { - "requestID": "c23817de-09bb-4498-bc65-6c1edec09d96", - "route": "/api/admin/users", - "status": 200, - "serverMs": 12, - "firstByteMs": 11.501266, - "bytes": 526, - "stagesMs": {} - }, - { - "requestID": "7bbe10f9-aad6-4945-bd4b-9014e930e1b5", - "route": "/api/admin/repos", - "status": 200, - "serverMs": 15, - "firstByteMs": 12.704565, - "bytes": 2156, - "stagesMs": {} - }, - { - "requestID": "1eee16d7-e02e-46ec-b6ce-71a219bc5ed9", - "route": "/api/admin/queues", - "status": 200, - "serverMs": 28, - "firstByteMs": 26.327896, - "bytes": 856, - "stagesMs": {} - }, - { - "requestID": "6d1760a3-35ca-4297-a488-2a9a02dc7775", - "route": "/api/admin/performance", - "status": 200, - "serverMs": 36, - "firstByteMs": 33.618919, - "bytes": 2064, - "stagesMs": {} - }, - { - "requestID": "0535319d-ee0f-4542-ae02-220412236f96", - "route": "/api/admin/errors", - "status": 200, - "serverMs": 25, - "firstByteMs": 17.377906, - "bytes": 8820, - "stagesMs": {} - }, - { - "requestID": "a11b8d9f-d6b6-46f5-b3ce-61898c675671", - "route": "/api/admin/errors/stats", - "status": 200, - "serverMs": 9, - "firstByteMs": 7.517991, - "bytes": 267, - "stagesMs": {} - }, - { - "requestID": "a0c443ff-0a13-4638-8a6b-1d428bd7ab26", - "route": "/api/admin/tokens", - "status": 200, - "serverMs": 6, - "firstByteMs": 6.289227, - "bytes": 160, - "stagesMs": {} - }, - { - "requestID": "6608aed3-c7e6-4a9b-a1d2-0ca019706cbe", - "route": "/api/admin/errors", - "status": 200, - "serverMs": 54, - "firstByteMs": 27.725886, - "bytes": 23643, - "stagesMs": {} - }, - { - "requestID": "e812e2d2-e762-41e3-a04c-fc655788ac95", - "route": "/api/admin/errors/stats", - "status": 200, - "serverMs": 10, - "firstByteMs": 8.336049, - "bytes": 267, - "stagesMs": {} - }, - { - "requestID": "d6311e18-90b0-4aa8-bfda-eb41ba6eda83", - "route": "/api/repo/:id", - "status": 404, - "serverMs": 8, - "firstByteMs": 8.463127, - "bytes": 26, - "stagesMs": { - "repository": 1.547081 - } - }, - { - "requestID": "cdcbdbb5-2d2e-4348-a9f2-84d684ce589b", - "route": "/api/admin/errors/stats", - "status": 200, - "serverMs": 11, - "firstByteMs": 9.387429, - "bytes": 267, - "stagesMs": {} - }, - { - "requestID": "4e08997f-0b9c-426e-a343-7e640c2279a7", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 9, - "firstByteMs": 7.046349, - "bytes": 233, - "stagesMs": {} - }, - { - "requestID": "e4de3dab-f4cc-428b-abb1-4d1a4af5d572", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 13, - "firstByteMs": 10.643495, - "bytes": 636, - "stagesMs": {} - }, - { - "requestID": "8ee70a2a-0cbb-4ff5-b8a6-eacb04bd7804", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 13, - "firstByteMs": 8.049204, - "bytes": 2015, - "stagesMs": {} - }, - { - "requestID": "6e222c3e-f28a-4354-b281-101d6f5b4ac8", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 108, - "firstByteMs": 85.009197, - "bytes": 9844, - "stagesMs": {} - }, - { - "requestID": "c52ecbff-615d-46f2-a1f7-9069c57f8dce", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 8, - "firstByteMs": 6.57973, - "bytes": 223, - "stagesMs": {} - }, - { - "requestID": "1be6aaf2-b3a4-4407-86e4-ecdec70a31f1", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 8, - "firstByteMs": 6.332872, - "bytes": 188, - "stagesMs": {} - }, - { - "requestID": "0caf7210-bc19-4d6b-8920-36ae87fb8f66", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 7, - "firstByteMs": 5.759005, - "bytes": 243, - "stagesMs": {} - }, - { - "requestID": "14457152-4c62-446f-bb0b-0a6329cd6bbe", - "route": "/api/admin/queues/metrics", - "status": 404, - "serverMs": 7, - "firstByteMs": 6.852849, - "bytes": 27, - "stagesMs": {} - }, - { - "requestID": "b2b10d13-8a20-44f4-a99b-5dd75095228c", - "route": "/api/stat", - "status": 200, - "serverMs": 1, - "firstByteMs": 0.829969, - "bytes": 69, - "stagesMs": {} - }, - { - "requestID": "161f3dd7-8395-42d8-9838-69910019c903", - "route": "/api/stat/history", - "status": 200, - "serverMs": 1, - "firstByteMs": 0.89015, - "bytes": 105, - "stagesMs": {} - }, - { - "requestID": "bb84902f-44e7-441f-9772-741a138cc236", - "route": "/api/stat/history", - "status": 200, - "serverMs": 1, - "firstByteMs": 0.83221, - "bytes": 105, - "stagesMs": {} - }, - { - "requestID": "4cf8d3dc-48c3-4a12-9535-6904215e2713", - "route": "/api/stat/history", - "status": 200, - "serverMs": 1, - "firstByteMs": 1.060684, - "bytes": 105, - "stagesMs": {} - }, - { - "requestID": "17fef989-1335-4648-8dbf-d3de261a72af", - "route": "/api/stat/history", - "status": 200, - "serverMs": 1, - "firstByteMs": 0.796978, - "bytes": 105, - "stagesMs": {} - }, - { - "requestID": "1f7dc9fa-52cf-40ff-be75-78e07f123a37", - "route": "/api/stat/history", - "status": 200, - "serverMs": 1, - "firstByteMs": 0.822016, - "bytes": 105, - "stagesMs": {} - }, - { - "requestID": "f26c94d4-aadb-4ec8-9fbe-7c150953fa39", - "route": "/api/stat/history", - "status": 200, - "serverMs": 1, - "firstByteMs": 0.924618, - "bytes": 105, - "stagesMs": {} - }, - { - "requestID": "dad0dde7-57b9-499c-8b86-49a32064762a", - "route": "/api/stat/history", - "status": 200, - "serverMs": 1, - "firstByteMs": 0.847019, - "bytes": 105, - "stagesMs": {} - }, - { - "requestID": "807ce169-32cd-4f89-968e-cddd4f9b95ee", - "route": "/api/stat/history", - "status": 200, - "serverMs": 1, - "firstByteMs": 0.776708, - "bytes": 105, - "stagesMs": {} - }, - { - "requestID": "bb15685e-23f9-49d9-a808-ca5d5ed1ddbd", - "route": "/api/user/dashboard", - "status": 200, - "serverMs": 21, - "firstByteMs": 21.118409, - "bytes": 64, - "stagesMs": {} - }, - { - "requestID": "625f6e52-c312-4b8b-8f7f-d0d91aba2816", - "route": "/api/user/dashboard", - "status": 200, - "serverMs": 24, - "firstByteMs": 23.70666, - "bytes": 64, - "stagesMs": {} - }, - { - "requestID": "49ca98a6-3144-45a9-a1f2-9f7a7638c159", - "route": "/api/user/dashboard", - "status": 400, - "serverMs": 6, - "firstByteMs": 5.532175, - "bytes": 24, - "stagesMs": {} - }, - { - "requestID": "7dec39a5-fb21-4ed8-8c11-e386509a86dc", - "route": "/api/user/dashboard", - "status": 400, - "serverMs": 5, - "firstByteMs": 5.014226, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "7a94b83d-9aa8-447b-ad29-ead92fe1e57d", - "route": "/api/user/dashboard", - "status": 200, - "serverMs": 22, - "firstByteMs": 21.685463, - "bytes": 796, - "stagesMs": {} - }, - { - "requestID": "174fb331-bf71-4330-adb8-66f584a59467", - "route": "/api/user/dashboard", - "status": 200, - "serverMs": 29, - "firstByteMs": 29.148836, - "bytes": 796, - "stagesMs": {} - }, - { - "requestID": "0d194013-65a2-4fa2-af3c-f79a6d6711e2", - "route": "/api/user/dashboard", - "status": 200, - "serverMs": 22, - "firstByteMs": 22.13382, - "bytes": 796, - "stagesMs": {} - }, - { - "requestID": "3fbce421-af32-49ed-a07b-3ee130737dc2", - "route": "/api/user/dashboard", - "status": 200, - "serverMs": 26, - "firstByteMs": 25.736385, - "bytes": 796, - "stagesMs": {} - }, - { - "requestID": "b1bab7ff-9234-4087-b1f8-1855c16286ba", - "route": "/api/user/dashboard", - "status": 200, - "serverMs": 25, - "firstByteMs": 24.709624, - "bytes": 796, - "stagesMs": {} - }, - { - "requestID": "2d9ee3bf-1075-441a-add4-ff9b7c83942c", - "route": "/api/user/dashboard", - "status": 400, - "serverMs": 11, - "firstByteMs": 11.046608, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "ee793084-efff-420c-9a47-8ce453e5cece", - "route": "/api/admin/performance", - "status": 200, - "serverMs": 110, - "firstByteMs": 91.74114, - "bytes": 7471, - "stagesMs": {} - }, - { - "requestID": "889dc1c3-0fa9-4e63-a452-41a75ae28bf0", - "route": "/api/admin/performance", - "status": 200, - "serverMs": 75, - "firstByteMs": 69.579452, - "bytes": 7526, - "stagesMs": {} - }, - { - "requestID": "854bfc78-89c8-4e5e-b3cf-6a3a73421919", - "route": "/api/admin/performance", - "status": 200, - "serverMs": 36, - "firstByteMs": 33.207881, - "bytes": 2446, - "stagesMs": {} - }, - { - "requestID": "40d3e061-44f5-492b-b1c1-ee1480c942e3", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 13, - "firstByteMs": 10.448112, - "bytes": 584, - "stagesMs": {} - }, - { - "requestID": "fd6ad418-3a51-48d3-a1bc-61eda2c63dcc", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 6, - "firstByteMs": 4.99147, - "bytes": 235, - "stagesMs": {} - }, - { - "requestID": "73ee3337-2aac-40e2-a383-f8b84ea2dab9", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 5, - "firstByteMs": 4.734611, - "bytes": 51, - "stagesMs": {} - }, - { - "requestID": "d48beab6-8c64-4eb6-a7af-b70c5bb25063", - "route": "/api/admin/queues/metrics", - "status": 404, - "serverMs": 4, - "firstByteMs": 4.362551, - "bytes": 27, - "stagesMs": {} - }, - { - "requestID": "7545a8cf-d5e3-4e91-9fa1-6d9b1d9464ad", - "route": "/api/admin/queues", - "status": 200, - "serverMs": 26, - "firstByteMs": 24.256445, - "bytes": 806, - "stagesMs": {} - }, - { - "requestID": "53a45259-900b-4a0e-a76a-bb9e75eb7f37", - "route": "/api/admin/errors", - "status": 200, - "serverMs": 7, - "firstByteMs": 5.386569, - "bytes": 650, - "stagesMs": {} - }, - { - "requestID": "de39c81b-3f2d-41a5-947f-e0f3f892bcbc", - "route": "/api/repo/:owner/:repo", - "status": 400, - "serverMs": 5, - "firstByteMs": 5.113672, - "bytes": 30, - "stagesMs": {} - }, - { - "requestID": "1f15b38f-4bbf-4c13-b6c0-8eeea046890e", - "route": "/api/repo/:owner/:repo", - "status": 400, - "serverMs": 5, - "firstByteMs": 4.536662, - "bytes": 30, - "stagesMs": {} - }, - { - "requestID": "4cdbb1d0-5dbb-40b3-bfce-3821a2aeade1", - "route": "/api/repo/:owner/:repo", - "status": 400, - "serverMs": 6, - "firstByteMs": 5.599404, - "bytes": 30, - "stagesMs": {} - }, - { - "requestID": "dad7123b-db74-4e19-85fe-2f91d4a227dc", - "route": "/api/repo/:owner/:repo", - "status": 500, - "serverMs": 4, - "firstByteMs": 4.321809, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "73871032-6ee0-4f63-8d59-0515e3bad12f", - "route": "/api/repo/:owner/:repo", - "status": 500, - "serverMs": 5, - "firstByteMs": 4.536544, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "56ca1bbe-2a21-430b-a497-42aebb0b6515", - "route": "/api/repo/:owner/:repo", - "status": 500, - "serverMs": 5, - "firstByteMs": 5.054943, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "18465872-06a6-43d9-82d1-79e872b96c8d", - "route": "/api/user/search/github-users", - "status": 200, - "serverMs": 4, - "firstByteMs": 4.461791, - "bytes": 2, - "stagesMs": {} - }, - { - "requestID": "637891fd-1def-4be0-82b1-e112410865f0", - "route": "/api/user/search/github-users", - "status": 200, - "serverMs": 7, - "firstByteMs": 6.706126, - "bytes": 2, - "stagesMs": {} - }, - { - "requestID": "23c5fb61-75e1-4650-9307-9c675ff41645", - "route": "/api/user/search/github-users", - "status": 500, - "serverMs": 10, - "firstByteMs": 9.651042, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "986f62d7-f3fb-4e1b-987a-a7a90c5b76f9", - "route": "/api/user/search/github-users", - "status": 500, - "serverMs": 12, - "firstByteMs": 12.004061, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "6f86be54-6aff-4ef7-8cdb-4cbbbfbbfe32", - "route": "/api/user/search/github-users", - "status": 500, - "serverMs": 7, - "firstByteMs": 6.83349, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "bce0a642-01b9-458f-89a2-25e95dc626e1", - "route": "/api/admin/repos", - "status": 200, - "serverMs": 13, - "firstByteMs": 11.434117, - "bytes": 1046, - "stagesMs": {} - }, - { - "requestID": "6814b32b-4d3d-40b2-aa93-e14465038038", - "route": "/api/admin/repos", - "status": 200, - "serverMs": 10, - "firstByteMs": 10.439036, - "bytes": 193, - "stagesMs": {} - }, - { - "requestID": "fc6e7cb0-add2-4575-a948-6f8fea6cf4cc", - "route": "/api/admin/repos", - "status": 500, - "serverMs": 5, - "firstByteMs": 5.170444, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "ca1187cb-a565-4035-a10a-e663a3844f15", - "route": "/api/admin/repos", - "status": 500, - "serverMs": 5, - "firstByteMs": 5.050391, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "56cecbc0-11bc-415d-b4c5-051c2e1ad300", - "route": "/api/admin/users", - "status": 200, - "serverMs": 11, - "firstByteMs": 10.534552, - "bytes": 106, - "stagesMs": {} - }, - { - "requestID": "28e987e1-297f-4072-b9e1-3f5dcc5cce49", - "route": "/api/admin/users", - "status": 200, - "serverMs": 10, - "firstByteMs": 9.837504, - "bytes": 112, - "stagesMs": {} - }, - { - "requestID": "dd63c56a-786a-49c4-b115-4a858685d483", - "route": "/api/admin/users", - "status": 500, - "serverMs": 9, - "firstByteMs": 8.636692, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "5add7380-ac47-402b-b6af-c1bd8181cfcc", - "route": "/api/admin/users", - "status": 500, - "serverMs": 6, - "firstByteMs": 6.297014, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "19f60bdf-30d5-4b51-bf70-b1bdc6b1cf90", - "route": "/api/admin/users", - "status": 500, - "serverMs": 7, - "firstByteMs": 6.572771, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "532fb20b-da3b-47c7-8386-cf60b334da19", - "route": "/api/admin/conferences", - "status": 200, - "serverMs": 10, - "firstByteMs": 10.251656, - "bytes": 80, - "stagesMs": {} - }, - { - "requestID": "c3ce1322-128a-44ea-8fcc-de2a0f33fb76", - "route": "/api/admin/conferences", - "status": 200, - "serverMs": 9, - "firstByteMs": 8.746125, - "bytes": 86, - "stagesMs": {} - }, - { - "requestID": "c5fbaaba-2266-4a98-9fcc-838db8da64de", - "route": "/api/admin/conferences", - "status": 500, - "serverMs": 5, - "firstByteMs": 4.613963, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "99642150-a77a-40ec-97bc-44516b78b3cf", - "route": "/api/admin/conferences", - "status": 500, - "serverMs": 5, - "firstByteMs": 4.757651, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "928e5a57-ab61-4282-b6cc-ce6ddfe3a6bc", - "route": "/api/admin/repos", - "status": 200, - "serverMs": 12, - "firstByteMs": 9.712859, - "bytes": 750, - "stagesMs": {} - }, - { - "requestID": "6be6d19d-5c5c-4bfa-a9cf-627d55143e08", - "route": "/api/admin/repos", - "status": 200, - "serverMs": 13, - "firstByteMs": 11.229975, - "bytes": 857, - "stagesMs": {} - }, - { - "requestID": "fe7b29cb-4742-4524-9b86-bbeb86b93ae5", - "route": "/api/admin/conferences", - "status": 200, - "serverMs": 19, - "firstByteMs": 19.021186, - "bytes": 80, - "stagesMs": {} - }, - { - "requestID": "df83e486-03cd-47dd-b088-5398b685d5c3", - "route": "/api/admin/conferences", - "status": 200, - "serverMs": 8, - "firstByteMs": 8.297764, - "bytes": 117, - "stagesMs": {} - }, - { - "requestID": "1fc1230b-1fd2-4a41-b466-00681977a5e9", - "route": "/api/admin/repos", - "status": 500, - "serverMs": 5, - "firstByteMs": 4.780568, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "5568cda4-1ef7-4922-a913-ef6e633a4bc6", - "route": "/api/admin/users", - "status": 500, - "serverMs": 4, - "firstByteMs": 4.382012, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "1e4b2d1a-c82c-448a-82b2-ac3b64204667", - "route": "/api/admin/conferences", - "status": 500, - "serverMs": 5, - "firstByteMs": 4.958675, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "fa5fc1e3-41c6-4858-a3b8-bfd4c5997d7d", - "route": "/api/admin/users", - "status": 200, - "serverMs": 11, - "firstByteMs": 10.837904, - "bytes": 99, - "stagesMs": {} - }, - { - "requestID": "5b0fe5d9-e265-465a-bca3-2f8e33461f13", - "route": "/api/admin/users", - "status": 200, - "serverMs": 12, - "firstByteMs": 12.367332, - "bytes": 553, - "stagesMs": {} - }, - { - "requestID": "040f5c00-1a2e-4087-b8d1-7e1d5bd985e9", - "route": "/api/admin/users", - "status": 500, - "serverMs": 5, - "firstByteMs": 5.199731, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "408cb90f-5be7-4c2f-9fd9-0a018ebdfe23", - "route": "/api/admin/users", - "status": 500, - "serverMs": 7, - "firstByteMs": 7.021637, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "0d334fd1-3481-4edd-8e3b-c16739349e21", - "route": "/api/admin/repos", - "status": 500, - "serverMs": 5, - "firstByteMs": 5.491589, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "4702a987-8087-4e5e-a59e-44792e2196e9", - "route": "/api/admin/repos", - "status": 500, - "serverMs": 5, - "firstByteMs": 4.921157, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "e8ed71d6-ad7a-4ae4-a4c0-55afd629da8a", - "route": "/api/admin/repos", - "status": 200, - "serverMs": 16, - "firstByteMs": 13.191351, - "bytes": 2193, - "stagesMs": {} - }, - { - "requestID": "be80a54d-4ea8-4291-9d6a-030861b1b586", - "route": "/api/admin/repos", - "status": 200, - "serverMs": 10, - "firstByteMs": 10.470969, - "bytes": 156, - "stagesMs": {} - }, - { - "requestID": "a3e1b621-5139-45b6-9dbe-289dce27d3ac", - "route": "/api/admin/repos", - "status": 500, - "serverMs": 5, - "firstByteMs": 5.099956, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "6e0d75fb-2812-47b5-8d8a-cbfc1b5faa40", - "route": "/api/admin/users", - "status": 200, - "serverMs": 10, - "firstByteMs": 10.465047, - "bytes": 458, - "stagesMs": {} - }, - { - "requestID": "a659d933-8949-46cd-b1ca-9539cd911026", - "route": "/api/admin/users", - "status": 200, - "serverMs": 10, - "firstByteMs": 10.32379, - "bytes": 129, - "stagesMs": {} - }, - { - "requestID": "9f4cc798-2988-4c7c-acb4-32cd0e82ee45", - "route": "/api/admin/users", - "status": 500, - "serverMs": 5, - "firstByteMs": 5.128637, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "26a0a111-6b42-4327-b75e-cc429b3faa28", - "route": "/api/admin/conferences", - "status": 200, - "serverMs": 10, - "firstByteMs": 9.749657, - "bytes": 138, - "stagesMs": {} - }, - { - "requestID": "f20af127-88ff-4c0d-bf85-2d4d2958d355", - "route": "/api/admin/conferences", - "status": 200, - "serverMs": 9, - "firstByteMs": 9.294971, - "bytes": 138, - "stagesMs": {} - }, - { - "requestID": "eb316bed-677c-4b25-b3a9-a1bff62cab2f", - "route": "/api/admin/conferences", - "status": 500, - "serverMs": 5, - "firstByteMs": 5.241733, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "871e55af-5d56-45e3-acf6-4896bcf54f03", - "route": "/github/connections", - "status": 200, - "serverMs": 773, - "firstByteMs": 772.782338, - "bytes": 456, - "stagesMs": {} - }, - { - "requestID": "c0c9207f-e567-4898-bf48-624515457703", - "route": "/api/admin/tokens", - "status": 200, - "serverMs": 10, - "firstByteMs": 9.813518, - "bytes": 186, - "stagesMs": {} - }, - { - "requestID": "f2c3befe-28bb-4ec2-b9aa-7e3d23197d37", - "route": "/api/user", - "status": 200, - "serverMs": 5, - "firstByteMs": 5.028141, - "bytes": 100, - "stagesMs": {} - }, - { - "requestID": "e2a7f05b-6ce4-4d38-ba72-2c5655119d90", - "route": "/api/admin/tokens/:id", - "status": 200, - "serverMs": 7, - "firstByteMs": 7.289225, - "bytes": 13, - "stagesMs": {} - }, - { - "requestID": "a4eeb9f9-de29-41a2-bc71-792a5a62f81e", - "route": "/api/user", - "status": 401, - "serverMs": 3, - "firstByteMs": 2.881991, - "bytes": 25, - "stagesMs": {} - }, - { - "requestID": "543aa070-97a2-409e-95d4-c11223097bdf", - "route": "/github/login-token", - "status": 200, - "serverMs": 8, - "firstByteMs": 7.574105, - "bytes": 33, - "stagesMs": {} - }, - { - "requestID": "fc7aa4cf-a6bd-4684-8467-b53bae37bc39", - "route": "/api/user", - "status": 200, - "serverMs": 3, - "firstByteMs": 3.08631, - "bytes": 100, - "stagesMs": {} - }, - { - "requestID": "4ba0f3c3-fe0c-49b5-bd60-efa4c2fc5e9a", - "route": "/api/user/logout", - "status": 302, - "serverMs": 4, - "firstByteMs": 3.941611, - "bytes": 24, - "stagesMs": {} - }, - { - "requestID": "8d97c2ea-2fc9-4c6a-b0de-b4255882d02f", - "route": "/api/user", - "status": 401, - "serverMs": 2, - "firstByteMs": 1.574977, - "bytes": 25, - "stagesMs": {} - }, - { - "requestID": "7aecfe81-9cd5-4a78-9e51-00be74df571a", - "route": "/api/anonymize-preview", - "status": 200, - "serverMs": 5, - "firstByteMs": 5.303496, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "e0235b12-d5ef-4951-811c-ecca18ffc10f", - "route": "/api/providers/:provider/repository/metadata", - "status": 200, - "serverMs": 2918, - "firstByteMs": 2918.377193, - "bytes": 230, - "stagesMs": {} - }, - { - "requestID": "743afd1a-2a43-40fe-96b9-f342cf7bc073", - "route": "/api/providers/:provider/repository/branches", - "status": 200, - "serverMs": 3489, - "firstByteMs": 3488.455261, - "bytes": 998, - "stagesMs": {} - }, - { - "requestID": "692c768b-9ab9-4d33-b789-62f3778003a7", - "route": "/api/providers/:provider/repository/readme", - "status": 200, - "serverMs": 3091, - "firstByteMs": 3089.501811, - "bytes": 878, - "stagesMs": {} - }, - { - "requestID": "85299391-d412-4523-a136-50d17c7ad6ed", - "route": "/api/repo", - "status": 200, - "serverMs": 3909, - "firstByteMs": 3908.744393, - "bytes": 22, - "stagesMs": {} - }, - { - "requestID": "fdccd681-be3d-4c4e-9d75-9fb43c4dfe11", - "route": "/api/repo/:id", - "status": 200, - "serverMs": 8, - "firstByteMs": 8.178554, - "bytes": 566, - "stagesMs": { - "repository": 1.652105 - } - }, - { - "requestID": "575e2997-e8b4-4e53-a317-62ba59096e5a", - "route": "/api/repo/:id/file/*path", - "status": 200, - "serverMs": 853, - "firstByteMs": 850.103689, - "bytes": 672, - "stagesMs": { - "anonymize": 21.264678, - "authorization": 746.402718, - "cache_fill": 59.222203, - "cache_lookup": 3.53861, - "repository": 2.104613, - "worker_wait": 0.019333 - } - }, - { - "requestID": "2c3e0446-6ff9-497e-8d61-50cbc628707d", - "route": "/w/:id/*path", - "status": 200, - "serverMs": 1480, - "firstByteMs": 1478.723636, - "bytes": 643, - "stagesMs": { - "authorization": 1454.352699, - "cache_lookup": 2.257956, - "repository": 2.375819 - } - }, - { - "requestID": "5234b137-f860-4302-8849-38e8cb7549a8", - "route": "/api/repo/:id/files", - "status": 200, - "serverMs": 8, - "firstByteMs": 7.853221, - "bytes": 170, - "stagesMs": { - "repository": 2.458152 - } - }, - { - "requestID": "3d42b574-f9a0-4bc7-8112-875513666c66", - "route": "/api/repo/:id/zip", - "status": 200, - "serverMs": 4216, - "firstByteMs": 1122.645362, - "bytes": 7191, - "stagesMs": { - "anonymize": 95.65670499999999, - "authorization": 3891.9349860000007, - "cache_fill": 155.719895, - "cache_lookup": 11.026444000000003, - "repository": 2.123283, - "worker_wait": 0.13066 - } - }, - { - "requestID": "866a1cba-e22c-4b3f-8937-13286c25f83d", - "route": "/api/repo/:id/file/*path", - "status": 200, - "serverMs": 787, - "firstByteMs": 784.302817, - "bytes": 672, - "stagesMs": { - "authorization": 756.411021, - "cache_lookup": 2.4199640000000002, - "repository": 3.401617 - } - }, - { - "requestID": "5eddf5cc-32ec-43cb-9d10-f20695de15ba", - "route": "/w/:id/*path", - "status": 200, - "serverMs": 1459, - "firstByteMs": 1457.009619, - "bytes": 643, - "stagesMs": { - "authorization": 1431.10465, - "cache_lookup": 2.604495, - "repository": 2.200176 - } - }, - { - "requestID": "8c643022-3d44-4312-8c37-a7b896100d44", - "route": "/api/repo/:id/zip", - "status": 200, - "serverMs": 3995, - "firstByteMs": 1145.412201, - "bytes": 7191, - "stagesMs": { - "authorization": 3893.6502490000003, - "cache_lookup": 9.075814999999999, - "repository": 2.767015 - } - }, - { - "requestID": "abbf4372-c610-47ab-90e2-8ecce1dfb576", - "route": "/api/repo/:id/file/*path", - "status": 200, - "serverMs": 711, - "firstByteMs": 708.596744, - "bytes": 672, - "stagesMs": { - "authorization": 679.982654, - "cache_lookup": 2.419619, - "repository": 2.861784 - } - }, - { - "requestID": "a44ceba1-166f-4248-bb02-7e51ca67db53", - "route": "/w/:id/*path", - "status": 200, - "serverMs": 1468, - "firstByteMs": 1466.174505, - "bytes": 643, - "stagesMs": { - "authorization": 1441.585584, - "cache_lookup": 1.68776, - "repository": 2.343655 - } - }, - { - "requestID": "6eb8e435-880b-434f-814c-d977ca9117ce", - "route": "/api/repo/:id/zip", - "status": 200, - "serverMs": 4335, - "firstByteMs": 1067.992103, - "bytes": 7191, - "stagesMs": { - "authorization": 4240.200649, - "cache_lookup": 9.372675, - "repository": 2.460926 - } - }, - { - "requestID": "5285690a-a6ca-4e90-838f-2c6b4066abae", - "route": "/api/admin/performance", - "status": 200, - "serverMs": 44, - "firstByteMs": 41.748851, - "bytes": 3421, - "stagesMs": {} - }, - { - "requestID": "4bed4f9d-a2da-4f53-818e-64c9d5734770", - "route": "/api/user", - "status": 401, - "serverMs": 4, - "firstByteMs": 3.544922, - "bytes": 25, - "stagesMs": {} - }, - { - "requestID": "f27105cd-eb1e-4945-bf04-04a90dfc3450", - "route": "/api/repo/:id", - "status": 200, - "serverMs": 12, - "firstByteMs": 11.585484, - "bytes": 21, - "stagesMs": { - "repository": 1.810058 - } - }, - { - "requestID": "4059c6da-c0d1-41ba-92a7-4a3347351628", - "route": "/api/repo/:id", - "status": 200, - "serverMs": 8, - "firstByteMs": 8.235251, - "bytes": 616, - "stagesMs": { - "repository": 2.638341 - } - }, - { - "requestID": "a1a3c476-0006-44df-8f5b-4ff3f7cace53", - "route": "/api/repo/:id", - "status": 200, - "serverMs": 8, - "firstByteMs": 7.549959, - "bytes": 615, - "stagesMs": { - "repository": 1.417586 - } - }, - { - "requestID": "2030695b-27f2-43da-8ba4-c995b311812e", - "route": "/api/repo/:id/file/*path", - "status": 410, - "serverMs": 3, - "firstByteMs": 3.347245, - "bytes": 30, - "stagesMs": { - "repository": 2.304935 - } - }, - { - "requestID": "49a8b138-50f9-4cdf-a64f-1b542ea99e01", - "route": "/api/user", - "status": 401, - "serverMs": 5, - "firstByteMs": 4.91789, - "bytes": 25, - "stagesMs": {} - } - ], - "summary": { - "/api/repo/:id/file/*path": { - "serverMs": [ - 853, - 787, - 711 - ], - "medianServerMs": 787, - "authorizationMs": [ - 746.402718, - 756.411021, - 679.982654 - ] - }, - "/api/repo/:id/zip": { - "serverMs": [ - 4216, - 3995, - 4335 - ], - "medianServerMs": 4216, - "authorizationMs": [ - 3891.9349860000007, - 3893.6502490000003, - 4240.200649 - ] - } - } -} \ No newline at end of file diff --git a/backend/reports/file-web-optimization.json b/backend/reports/file-web-optimization.json deleted file mode 100644 index b78c5fa..0000000 --- a/backend/reports/file-web-optimization.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "verifiedAt": "2026-11-03T20:58:28.560881+00:00", - "image": "sha256:03a3cacc1db58e32280727fd5ee7c0fc36c41ddae15ddb43bb5a105f3edea4c9", - "changes": [ - "Internal shared source reads defer their release authorization to the transformed output release. Cold producers still authorize before reading upstream or legacy bytes. Raw callers still authorize on source release.", - "Binary fallback output now also checks lifecycle and authorization after copying.", - "Unacceptable encoding responses explicitly authorize before returning 406.", - "Webview removes its second pre-content authorization; initial page authorization and final output authorization remain.", - "Non-Markdown webview assets negotiate and serve cached gzip directly with Vary and Content-Length; Markdown wrapping and sandbox headers remain." - ], - "comparison": [ - { - "route": "/api/repo/:id/file/*path", - "beforeMs": [ - 853, - 787, - 711 - ], - "afterMs": [ - 461, - 356, - 376 - ], - "beforeMedianMs": 787, - "afterMedianMs": 376, - "reductionPercent": 52.2 - }, - { - "route": "/w/:id/*path", - "beforeMs": [ - 1480, - 1459, - 1468 - ], - "afterMs": [ - 740, - 696, - 781 - ], - "beforeMedianMs": 1468, - "afterMedianMs": 740, - "reductionPercent": 49.6 - }, - { - "route": "/api/repo/:id/zip", - "beforeMs": [ - 4216, - 3995, - 4335 - ], - "afterMs": [ - 2397, - 2219, - 2338 - ], - "beforeMedianMs": 4216, - "afterMedianMs": 2338, - "reductionPercent": 44.5 - } - ], - "validation": { - "raceIntegration": "passed, 17.177s server; shared source/result/HTTP, fallback, legacy cache, metadata contracts", - "vet": "passed", - "newCoverage": [ - "One authorization per warm transformed file", - "Revocation during cold fill rejects final transformed output", - "Gzip website response decodes to same anonymized content as file", - "Website GET/HEAD deny revoked access and preserve sandbox" - ], - "beforeLiveChecks": 133, - "afterLiveChecks": 133, - "result": "passed", - "temporaryKeysRevoked": true, - "temporaryRepositoriesRemoved": true - }, - "limitations": "Three serial samples on a small GitHub App fixture with existing source caches, not a load test. Website live fixture is a file asset, not a large Markdown page or directory listing. Gzip encoding and decoded parity additionally tested using a larger local fixture.", - "remainingWebsiteCost": "Webview still scans repository metadata to resolve anonymized paths and directory indexes. A dedicated collision-aware index would improve large repositories; the existing file index has different collision behavior and cannot be substituted directly.", - "productionChanged": false -} \ No newline at end of file diff --git a/backend/reports/govulncheck.txt b/backend/reports/govulncheck.txt deleted file mode 100644 index 46a7384..0000000 --- a/backend/reports/govulncheck.txt +++ /dev/null @@ -1,9 +0,0 @@ -=== Symbol Results === - -No vulnerabilities found. - -Your code is affected by 0 vulnerabilities. -This scan also found 0 vulnerabilities in packages you import and 4 -vulnerabilities in modules you require, but your code doesn't appear to call -these vulnerabilities. -Use '-show verbose' for more details. diff --git a/backend/reports/http-archive-benchmark.html b/backend/reports/http-archive-benchmark.html deleted file mode 100644 index 21513cb..0000000 --- a/backend/reports/http-archive-benchmark.html +++ /dev/null @@ -1,7 +0,0 @@ -Node and Go: archive file requests

    Node and Go: archive file requests

    Real server entrypoints, disposable MongoDB and Redis, synthetic archive originals. Every successful response was checked by SHA-256.

    FixtureNodeGoGo / Node

    Node returned HTTP 500 for the 2 MiB text fixture: its persisted term array could not be cloned into the worker. No speedup is assigned to that failed baseline.

    Three alternating-order rounds; 100 warm requests per batch. CPU includes worker processes and post-response view writes. RSS is sampled every 10 ms and excludes MongoDB, Redis and the load generator. Shared gzip caching, remote providers, S3 and startup are outside this workload.

    v24.14.1 · go version go1.27.3 linux/amd64 · Intel Xeon E312xx (Sandy Bridge, IBRS update) · 2026-11-02T22:43:06.748Z
    \ No newline at end of file diff --git a/backend/reports/http-archive-benchmark.json b/backend/reports/http-archive-benchmark.json deleted file mode 100644 index 79d902d..0000000 --- a/backend/reports/http-archive-benchmark.json +++ /dev/null @@ -1,5512 +0,0 @@ -{ - "benchmarkScriptSHA256": "30bf1760a48f39df00366830e5345cc0c8b5649e1119a3cb000ce11af974279c", - "recordedAt": "2026-11-02T22:43:06.748Z", - "node": "v24.14.1", - "typescript": "5.9.3", - "go": "go version go1.27.3 linux/amd64", - "nodeSourceSHA256": "ccef1fc05af9de24f0d2bf9223d478c2455de0305129babf05d0ad2c22a0b185", - "goBinarySHA256": "3ed441599a5872f716a7bec8538dec35982dd01d9ae3f444687f7bb152f07585", - "packageLockSHA256": "9f1d8f0dfd63fd0aa1346d298afe72ec8b4af8916205d5aaf71bd97ae3ebb43e", - "hardware": { - "kernel": "5.15.0-113-generic", - "cgroup": {}, - "loadAverage": [ - 1.74, - 1.45, - 1.65 - ], - "platform": "linux", - "arch": "x64", - "cpu": "Intel Xeon E312xx (Sandy Bridge, IBRS update)", - "logicalCPUs": 12, - "availableParallelism": 12, - "memoryBytes": 37827678208 - }, - "method": { - "entrypoints": [ - "src/server/index.ts", - "backend/cmd/server" - ], - "source": "pre-seeded archive originals; no external provider calls", - "storage": "filesystem; shared cache disabled; process-local transformed cache enabled", - "encoding": "identity", - "client": "loopback keep-alive, distinct forwarded IPv4 per request to avoid per-client throttling; both servers trust loopback", - "cold": "unique repository per request, same process; filesystem page cache is warm", - "warm": "three warmup requests then fixed-count batches at concurrency 1 and 8", - "cpu": "Linux process tree user+system, including waited-for children and post-response page-view writes", - "memory": "process-tree RSS sampled every 10 ms; excludes MongoDB, Redis and load generator", - "nodeCompilation": "transpileModule ES2022/CommonJS; no ts-node in measured process", - "quick": false - }, - "results": [ - { - "runtime": "node", - "repeat": 0, - "fixture": "64 KiB changed text", - "inputBytes": 65538, - "outputBytes": 69179, - "outputSHA256": "27668dd82518eacd8514d91acc8cb366ad6cee5fb4c72e126b76ae02fad79c34", - "cold": { - "requests": 7, - "concurrency": 1, - "elapsedMs": 629.4855520000001, - "requestsPerSecond": 11.120191683128573, - "p50Ms": 64.3200909999996, - "p95Ms": 249.0582400000003, - "maxMs": 249.0582400000003, - "p95TTFBMs": 246.40358300000116, - "cpuMs": 690, - "peakProcessTreeRssBytes": 259002368, - "samplesMs": [ - 249.0582400000003, - 98.65843800000039, - 67.74640100000033, - 64.3200909999996, - 58.39360300000044, - 44.95554900000025, - 42.32956100000047 - ] - }, - "warm": [ - { - "requests": 100, - "concurrency": 1, - "elapsedMs": 3800.2492459999994, - "requestsPerSecond": 26.314063506559805, - "p50Ms": 36.196492000000944, - "p95Ms": 45.05181799999991, - "maxMs": 82.983655, - "p95TTFBMs": 43.82662999999957, - "cpuMs": 4100, - "peakProcessTreeRssBytes": 328740864, - "samplesMs": [ - 43.27029299999958, - 35.91333300000042, - 36.13316499999928, - 42.75724900000023, - 42.810129999999845, - 43.5100450000009, - 42.11340399999972, - 42.9923060000001, - 38.61209699999927, - 44.53422899999896, - 43.97811200000069, - 44.36596400000053, - 43.82170699999915, - 49.010487999999896, - 45.05181799999991, - 82.983655, - 36.3988989999998, - 41.762321000000156, - 44.2517540000008, - 43.1375050000006, - 39.23776999999973, - 40.12062100000003, - 38.56232799999998, - 38.23706499999935, - 35.31134600000041, - 34.689354000000094, - 32.54257899999902, - 31.10642999999982, - 32.20752399999947, - 33.31526500000109, - 33.61487699999998, - 34.97501100000045, - 37.03140800000074, - 36.55886499999906, - 38.112482000000455, - 34.16083299999991, - 43.75544499999887, - 54.1794430000009, - 37.17457900000045, - 36.014830000000075, - 36.89226200000121, - 33.65331200000037, - 36.7384320000001, - 43.840940999998566, - 39.37703899999906, - 38.239612000001216, - 38.23601299999973, - 37.800578000000314, - 40.117411000001084, - 36.9767410000004, - 35.5769820000005, - 35.48128800000086, - 34.99472900000001, - 34.33002800000031, - 40.31026800000109, - 42.97143099999994, - 47.10925700000007, - 37.44744400000127, - 33.2460689999989, - 32.03229400000055, - 29.417873000000327, - 32.4385489999986, - 34.96906399999898, - 33.49158499999976, - 32.5819960000008, - 31.800734000000375, - 32.8773029999993, - 34.8249880000003, - 36.196492000000944, - 34.97208099999989, - 33.530321000000185, - 33.46932100000049, - 35.510527000000366, - 41.05484600000091, - 49.238319999998566, - 37.11297000000013, - 38.65095399999882, - 37.20729200000096, - 39.14076699999896, - 35.870082999999795, - 34.38118799999938, - 35.61483399999997, - 43.473938000001, - 33.47975099999894, - 36.619470999999976, - 34.453739000000496, - 33.88819599999988, - 32.44480199999998, - 33.995757999999114, - 32.17026699999951, - 32.57652600000074, - 33.15797100000054, - 36.620404999999664, - 34.95968400000129, - 30.76521099999991, - 32.545545999999376, - 31.1119920000001, - 33.27894800000104, - 33.6298569999999, - 33.52978400000029 - ] - }, - { - "requests": 100, - "concurrency": 8, - "elapsedMs": 2013.9374430000007, - "requestsPerSecond": 49.65397527494103, - "p50Ms": 151.89998500000002, - "p95Ms": 229.06660700000066, - "maxMs": 241.17347399999926, - "p95TTFBMs": 226.7486910000007, - "cpuMs": 2580, - "peakProcessTreeRssBytes": 336949248, - "samplesMs": [ - 152.36952500000007, - 169.4680249999983, - 179.63697599999978, - 191.89521699999932, - 202.2426370000012, - 215.22604200000023, - 229.06660700000066, - 241.17347399999926, - 174.38762599999973, - 172.38422300000093, - 169.37708199999906, - 163.85489400000006, - 187.06170999999995, - 177.47284199999922, - 184.61485300000095, - 181.10961599999973, - 166.43476099999862, - 155.14780600000086, - 173.25918400000046, - 172.57136899999932, - 167.80918399999973, - 199.298483999999, - 196.3803599999992, - 197.94466000000102, - 199.6011669999989, - 229.60502500000075, - 228.1695299999992, - 225.31350700000075, - 240.2285069999998, - 198.70910999999978, - 231.97933600000033, - 220.94397200000094, - 199.70876400000088, - 228.37931500000013, - 228.677463, - 215.7289579999997, - 230.07031599999937, - 211.06413299999986, - 217.95665599999847, - 217.62119399999938, - 180.8299330000009, - 206.159638000001, - 200.96845699999903, - 191.77402400000028, - 179.88546099999985, - 174.57809799999995, - 171.62038099999882, - 169.70437499999935, - 139.29509099999996, - 132.27010399999926, - 150.59518600000047, - 138.81925300000148, - 134.5131939999992, - 138.92330499999844, - 143.797681, - 134.51990699999988, - 129.91703300000154, - 140.9749640000009, - 143.91263299999991, - 136.09592799999882, - 131.01864599999863, - 151.89998500000002, - 145.09861499999897, - 155.91076600000088, - 148.44543200000044, - 148.34807999999975, - 147.9385259999999, - 136.57675700000073, - 146.12992399999894, - 157.17899899999975, - 135.76616000000104, - 136.10005600000113, - 122.9165950000006, - 125.91257899999982, - 120.06509499999993, - 102.73268000000098, - 102.50154300000031, - 104.32336599999871, - 101.06466600000022, - 109.75466700000106, - 107.95910900000126, - 105.87834699999985, - 112.3064170000016, - 113.31537799999933, - 113.43691200000103, - 111.9209060000012, - 108.78130300000157, - 120.90755999999965, - 110.38433000000077, - 121.07598000000144, - 105.63871500000096, - 119.37259599999925, - 118.58010099999956, - 121.32893599999989, - 109.79174000000057, - 105.10639900000024, - 90.91687199999978, - 91.05575800000042, - 77.55330199999844, - 78.68748899999991 - ] - } - ] - }, - { - "runtime": "go", - "repeat": 0, - "fixture": "64 KiB changed text", - "inputBytes": 65538, - "outputBytes": 69179, - "outputSHA256": "27668dd82518eacd8514d91acc8cb366ad6cee5fb4c72e126b76ae02fad79c34", - "cold": { - "requests": 7, - "concurrency": 1, - "elapsedMs": 421.3980279999996, - "requestsPerSecond": 16.611373416298964, - "p50Ms": 58.744848000002094, - "p95Ms": 74.34533699999884, - "maxMs": 74.34533699999884, - "p95TTFBMs": 70.1758520000003, - "cpuMs": 360, - "peakProcessTreeRssBytes": 81162240, - "samplesMs": [ - 74.34533699999884, - 63.03169100000014, - 59.13802800000121, - 58.744848000002094, - 51.950111999998626, - 58.02306600000156, - 54.91398599999957 - ] - }, - "warm": [ - { - "requests": 100, - "concurrency": 1, - "elapsedMs": 1967.9000860000015, - "requestsPerSecond": 50.81558800236768, - "p50Ms": 19.471881999998004, - "p95Ms": 22.262056999999913, - "maxMs": 25.67900600000212, - "p95TTFBMs": 19.09776899999997, - "cpuMs": 1370, - "peakProcessTreeRssBytes": 90386432, - "samplesMs": [ - 20.34685399999944, - 22.262056999999913, - 23.34924400000091, - 22.1262370000004, - 20.68783699999767, - 21.635599999997794, - 21.232953999999154, - 21.523235000000568, - 20.210213999998814, - 19.471881999998004, - 20.899098999998387, - 19.053564000001643, - 19.682597999999416, - 20.675311999999394, - 20.270895000001474, - 21.384195999999065, - 18.907289000002493, - 18.46155799999906, - 18.661401000001206, - 20.696046000000933, - 20.880936000001384, - 19.212415999998484, - 25.67900600000212, - 22.61127900000065, - 21.06889299999966, - 23.02828899999804, - 20.296949999999924, - 20.27258300000176, - 21.224277000001166, - 20.49470199999996, - 19.47202599999946, - 20.24507799999992, - 19.919410999998945, - 20.161653999999544, - 20.338332999999693, - 19.723581999998714, - 19.133569999998144, - 19.214049000001978, - 20.60943699999916, - 21.463071000001946, - 19.594694999999774, - 19.2108819999994, - 18.69846900000266, - 18.583510000000388, - 20.501048999998602, - 20.938185999999405, - 18.61959399999978, - 20.32828800000061, - 20.260975999997754, - 20.141531000001123, - 19.966033000000607, - 19.243287999997847, - 20.97855200000049, - 19.398768999999447, - 19.589725999998336, - 20.97141400000328, - 20.12171700000181, - 20.777877999997145, - 18.54423300000053, - 16.142664999999397, - 17.455627999999706, - 16.452249999998457, - 18.20641500000056, - 18.468016999999236, - 17.17739999999685, - 18.417574000002787, - 19.148239000001922, - 17.966283999998268, - 19.030392000000575, - 20.378819999998086, - 17.568845000001602, - 17.55959300000177, - 20.16052800000034, - 22.29205500000171, - 18.955963000000338, - 20.209831000000122, - 21.226926000003004, - 20.240857000000688, - 18.140912000002572, - 17.189753000002383, - 16.58132900000055, - 16.974694000000454, - 17.940144000000146, - 17.627408000000287, - 19.39580500000011, - 19.080191999997623, - 17.595666000001074, - 18.12148100000195, - 16.560033999998268, - 17.48464800000147, - 17.55637999999817, - 17.517453000000387, - 18.44544699999824, - 18.003984999999375, - 17.95284200000242, - 18.636170000001584, - 18.73367000000144, - 18.59738600000128, - 17.779922999998234, - 18.46342999999979 - ] - }, - { - "requests": 100, - "concurrency": 8, - "elapsedMs": 997.5288839999994, - "requestsPerSecond": 100.24772375413248, - "p50Ms": 78.19246099999873, - "p95Ms": 87.22244500000306, - "maxMs": 91.30516200000056, - "p95TTFBMs": 84.65601499999684, - "cpuMs": 1160, - "peakProcessTreeRssBytes": 116264960, - "samplesMs": [ - 22.461333999999624, - 30.195098000000144, - 41.70647800000006, - 50.80303600000116, - 61.04859799999758, - 70.48430400000143, - 79.86446400000204, - 91.30516200000056, - 79.82936400000108, - 78.56731599999694, - 78.98318300000028, - 79.0751280000004, - 78.45370700000058, - 78.67254300000059, - 79.39517999999953, - 78.96557499999835, - 79.03930200000104, - 80.33129299999928, - 79.95178499999747, - 81.23386599999867, - 79.9778069999993, - 79.79701700000078, - 79.26826799999981, - 79.68435099999988, - 79.15499100000306, - 79.45929500000057, - 79.27963799999998, - 77.66342799999984, - 78.91442900000038, - 79.37467000000106, - 78.3301369999972, - 78.19246099999873, - 77.33485699999801, - 76.85933700000169, - 79.38148799999908, - 79.66061099999934, - 79.32675100000051, - 77.94349499999953, - 77.3492019999976, - 77.09939300000042, - 77.19731899999897, - 77.70029799999975, - 74.92079699999886, - 74.60647999999856, - 74.56665399999838, - 75.5634710000013, - 77.91661799999929, - 77.99845500000083, - 78.72147199999745, - 78.95434500000192, - 80.31179800000245, - 80.33983699999953, - 81.06571500000064, - 80.25458300000173, - 78.92573900000207, - 78.34281800000099, - 77.75192500000048, - 76.72820800000045, - 74.70474299999842, - 74.52253399999972, - 74.72453799999857, - 75.52906900000016, - 76.55348000000231, - 76.69043999999849, - 76.36442300000272, - 75.33904599999732, - 75.39617200000066, - 75.97144499999922, - 73.35223400000177, - 71.95941400000083, - 71.48676100000012, - 71.4050709999974, - 71.80286200000046, - 73.13782999999967, - 73.56913899999927, - 73.20080000000235, - 74.83852900000056, - 75.04142199999842, - 74.36099500000273, - 76.54103699999905, - 76.87246799999775, - 77.2844440000008, - 77.88213900000119, - 77.92936899999768, - 77.89081100000112, - 79.3651600000012, - 82.23656800000026, - 82.94040500000119, - 83.5520460000007, - 83.82934899999964, - 84.98738599999706, - 85.2853670000004, - 87.45119999999952, - 88.0412209999995, - 88.26417399999991, - 87.22244500000306, - 86.06764199999816, - 89.11662299999807, - 85.16068099999757, - 84.69454000000042 - ] - } - ] - }, - { - "runtime": "node", - "repeat": 0, - "fixture": "2 MiB absent terms", - "inputBytes": 2097154, - "expectedOutputSHA256": "061bcb1e32dd40f88b2c69eceda3df06d034f42367863b92d9c7e6f2bba1258a", - "status": "failed", - "httpStatus": 500, - "failure": "DataCloneError: persisted term array cannot be cloned into the anonymization worker" - }, - { - "runtime": "go", - "repeat": 0, - "fixture": "2 MiB absent terms", - "inputBytes": 2097154, - "outputBytes": 2097154, - "outputSHA256": "061bcb1e32dd40f88b2c69eceda3df06d034f42367863b92d9c7e6f2bba1258a", - "cold": { - "requests": 7, - "concurrency": 1, - "elapsedMs": 1170.6977769999976, - "requestsPerSecond": 5.979339960769409, - "p50Ms": 164.44273800000155, - "p95Ms": 175.1807430000008, - "maxMs": 175.1807430000008, - "p95TTFBMs": 147.8380900000011, - "cpuMs": 1120, - "peakProcessTreeRssBytes": 109219840, - "samplesMs": [ - 175.1807430000008, - 174.80535699999746, - 164.44273800000155, - 162.40575700000045, - 173.6210140000003, - 156.0218780000032, - 162.9696040000017 - ] - }, - "warm": [ - { - "requests": 100, - "concurrency": 1, - "elapsedMs": 9285.952068999999, - "requestsPerSecond": 10.76895500396105, - "p50Ms": 92.1442659999957, - "p95Ms": 102.52709000000323, - "maxMs": 109.38441800000146, - "p95TTFBMs": 75.52668800000538, - "cpuMs": 7570, - "peakProcessTreeRssBytes": 112926720, - "samplesMs": [ - 109.38441800000146, - 91.23560100000032, - 89.36716200000228, - 109.36323900000207, - 85.32495700000072, - 94.53668500000276, - 89.06445499999973, - 93.88370600000053, - 93.19903300000078, - 94.89531800000259, - 100.22998100000041, - 104.74397399999725, - 95.30063299999892, - 94.69333099999858, - 94.59874800000034, - 90.16591999999946, - 92.8660009999985, - 89.11711499999728, - 92.00087200000053, - 94.06244100000185, - 90.28898599999957, - 91.20855500000107, - 90.4889320000002, - 100.6153489999997, - 91.29676000000109, - 89.3183820000013, - 89.00008600000001, - 101.15031699999963, - 95.84228900000016, - 90.87016500000027, - 96.97064700000192, - 94.17501999999877, - 91.82378999999855, - 101.58596200000102, - 94.5023779999974, - 91.99868900000001, - 97.26809899999716, - 102.21665299999586, - 100.03036400000565, - 90.08783399999811, - 94.38302599999588, - 99.0273720000041, - 97.567154999997, - 90.97695999999996, - 98.62338299999828, - 91.56766400000197, - 93.15267099999619, - 93.51289099999849, - 96.37705400000414, - 91.52325299999939, - 97.69296799999574, - 88.89484899999661, - 94.72737499999494, - 94.5906810000015, - 99.5709050000005, - 95.11109399999987, - 87.82014700000582, - 91.85706400000345, - 91.14232600000105, - 95.73976199999743, - 95.1792740000019, - 89.72839000000386, - 91.09432099999685, - 90.53153999999631, - 92.1442659999957, - 88.82189899999503, - 91.44000999999844, - 90.45757999999478, - 97.4017160000003, - 91.14905200000067, - 89.79857799999445, - 102.52709000000323, - 92.73934699999518, - 105.08545400000003, - 98.95971899999859, - 92.39186599999812, - 88.19279000000097, - 88.40024999999878, - 87.60559300000023, - 105.8966700000019, - 92.10641300000134, - 102.25596799999767, - 96.96707700000115, - 92.13308400000096, - 98.93625900000188, - 93.28505500000028, - 95.51447700000426, - 90.05378999999812, - 91.91236599999684, - 67.51310399999784, - 72.31182199999603, - 82.79036400000041, - 64.325288, - 84.01798200000485, - 89.53208499999892, - 63.896881000000576, - 66.25853999999526, - 89.0886559999999, - 90.71547299999656, - 102.33585700000549 - ] - }, - { - "requests": 100, - "concurrency": 8, - "elapsedMs": 6805.122366999996, - "requestsPerSecond": 14.694812908130627, - "p50Ms": 533.0111230000039, - "p95Ms": 612.2329880000034, - "maxMs": 629.6539009999979, - "p95TTFBMs": 585.7996490000005, - "cpuMs": 7140, - "peakProcessTreeRssBytes": 140070912, - "samplesMs": [ - 96.09026200000517, - 153.55405900000187, - 220.1649860000034, - 303.3075830000016, - 371.252545000003, - 445.1045159999994, - 530.008882999995, - 597.573215999997, - 579.6116489999986, - 628.2482499999969, - 629.6539009999979, - 612.2329880000034, - 603.4481649999943, - 596.9533740000043, - 575.4490060000026, - 566.3309080000035, - 531.089641999999, - 489.09497199999896, - 479.80514799999946, - 480.8390240000008, - 489.3192410000047, - 503.65914400000474, - 530.0295479999986, - 539.8212219999987, - 574.8055569999997, - 580.5854489999983, - 567.5838379999987, - 539.839635999997, - 515.6633199999997, - 499.21671900000365, - 482.2614519999988, - 481.2228940000059, - 487.13602900000114, - 483.913274999999, - 501.77246000000014, - 526.961338000001, - 563.5768880000032, - 563.4787539999961, - 552.4874110000019, - 554.059405, - 548.6185879999975, - 559.1510439999984, - 598.7649739999979, - 602.4057959999991, - 602.6573399999979, - 612.0002860000022, - 613.8270489999995, - 620.0860979999998, - 619.1540469999964, - 598.904051000005, - 560.9004209999985, - 558.2654360000015, - 534.0083549999981, - 521.1842459999971, - 527.2870249999978, - 520.7972809999992, - 511.07512800000404, - 514.4168199999986, - 516.9274589999986, - 527.5238830000017, - 559.7166529999959, - 567.1988619999975, - 583.8165829999998, - 590.897100000002, - 569.6089240000001, - 570.851075999999, - 540.4064779999972, - 508.44481700000324, - 506.64824700000463, - 567.0837350000002, - 527.4800659999964, - 518.7587249999997, - 562.3478289999985, - 590.0061570000034, - 583.2810570000001, - 579.0348930000036, - 560.6422479999965, - 493.3168579999983, - 491.4852449999962, - 463.7559059999985, - 452.6592210000017, - 422.05451300000277, - 453.53778499999316, - 507.594256999997, - 504.40047400000185, - 519.6128390000013, - 528.7807570000004, - 554.2108250000019, - 544.427429000003, - 549.3337840000022, - 552.3968840000016, - 521.5498080000034, - 522.1476739999998, - 514.0664189999952, - 532.7779870000013, - 536.9111350000021, - 530.585020999999, - 533.0111230000039, - 531.8456480000023, - 533.2111129999976 - ] - } - ] - }, - { - "runtime": "node", - "repeat": 0, - "fixture": "128 KiB JS boundary regex", - "inputBytes": 131072, - "outputBytes": 147456, - "outputSHA256": "580155666affe445ac48846f3c178f45b3b75ec89815cc49fad08035415e8117", - "cold": { - "requests": 7, - "concurrency": 1, - "elapsedMs": 1317.546914999999, - "requestsPerSecond": 5.312903791361392, - "p50Ms": 172.80319099999906, - "p95Ms": 307.1737340000036, - "maxMs": 307.1737340000036, - "p95TTFBMs": 304.7804290000058, - "cpuMs": 1720, - "peakProcessTreeRssBytes": 313667584, - "samplesMs": [ - 307.1737340000036, - 174.2828109999973, - 147.97193100000004, - 162.15255899999465, - 189.73145900000236, - 162.4403850000017, - 172.80319099999906 - ] - }, - "warm": [ - { - "requests": 100, - "concurrency": 1, - "elapsedMs": 10588.365356000002, - "requestsPerSecond": 9.444328433881818, - "p50Ms": 95.47633700000006, - "p95Ms": 153.51033900000039, - "maxMs": 169.44893800000136, - "p95TTFBMs": 151.5247390000004, - "cpuMs": 11190, - "peakProcessTreeRssBytes": 340422656, - "samplesMs": [ - 107.2766860000047, - 86.40718100000231, - 115.4372000000003, - 137.81203700000333, - 140.50610400000005, - 153.51033900000039, - 149.61181000000215, - 163.35581699999602, - 146.09899099999893, - 141.29265999999916, - 135.1894220000031, - 108.1464049999995, - 160.06636199999775, - 140.11461199999758, - 149.77223400000366, - 143.27251499999693, - 130.12360500000068, - 133.00318899999547, - 108.88003999999637, - 88.34944700000051, - 87.35977599999751, - 93.02010300000256, - 88.94469899999967, - 95.69992899999488, - 80.0560220000043, - 77.75047099999938, - 75.17080499999429, - 74.57920400000148, - 75.64765900000202, - 77.63251699999819, - 79.68825700000161, - 88.21831600000587, - 94.99410000000353, - 77.62374799999816, - 75.68230500000209, - 139.75904000000446, - 140.23280299999897, - 139.75142600000254, - 147.86325899999792, - 131.3174169999984, - 133.66353600000002, - 139.8860860000059, - 133.6849280000024, - 108.82344400000147, - 100.65466600000218, - 101.68794400000479, - 99.8021779999981, - 102.11331699999573, - 79.24173500000325, - 76.46191299999919, - 135.31680900000356, - 84.83881300000212, - 77.36953799999901, - 77.14431600000535, - 77.09684300000663, - 75.7973420000053, - 79.66074099999969, - 75.76728500000172, - 76.44043000000238, - 78.6544120000035, - 75.8563359999971, - 75.58667100000457, - 74.30132999999478, - 74.35438499999873, - 74.02841500000068, - 76.78855900000053, - 76.53227000000334, - 75.11681299999327, - 80.59217300000455, - 74.00732699999935, - 74.96990400000504, - 72.09306600000127, - 79.12317100000655, - 74.37090100000205, - 75.5847419999991, - 74.34603399999469, - 157.5606770000013, - 169.44893800000136, - 139.58231100000557, - 125.26734399999987, - 124.3343789999999, - 108.83099100000254, - 84.81852700000309, - 84.45686800000112, - 84.70333299999766, - 96.82353999999759, - 159.63904799999727, - 140.30184200000076, - 135.88136099999974, - 133.48920199999702, - 105.07270399999834, - 94.30715600000258, - 91.03097099999286, - 95.47633700000006, - 91.64043099999981, - 142.10450199999468, - 132.939105999998, - 134.16412000000128, - 140.83764099999826, - 100.56603900000482 - ] - }, - { - "requests": 100, - "concurrency": 8, - "elapsedMs": 6503.184586000003, - "requestsPerSecond": 15.377081594036111, - "p50Ms": 481.2282170000035, - "p95Ms": 747.0019909999974, - "maxMs": 897.9703710000031, - "p95TTFBMs": 744.1002599999993, - "cpuMs": 7260, - "peakProcessTreeRssBytes": 360243200, - "samplesMs": [ - 205.54759000000195, - 321.0193100000033, - 429.67220700000325, - 519.9602160000068, - 620.9438359999986, - 704.0358170000036, - 803.2727639999939, - 897.9703710000031, - 782.1174729999984, - 535.8247980000015, - 795.7518189999973, - 753.7570029999988, - 640.6536009999982, - 633.6498150000043, - 649.5288329999967, - 624.708682000004, - 559.5398940000014, - 489.89432099999976, - 747.0019909999974, - 681.8185329999978, - 534.0874599999952, - 669.6004130000001, - 546.4538909999974, - 541.2669499999975, - 546.4821020000018, - 548.1283630000034, - 545.5091140000004, - 542.0511499999993, - 541.2752279999986, - 540.6147229999988, - 537.4663260000016, - 531.2310230000003, - 394.2390749999977, - 513.5445340000078, - 631.4421269999948, - 508.31694599999173, - 442.2665179999967, - 548.4129990000074, - 482.40144800000417, - 481.2282170000035, - 468.9425719999999, - 400.8973379999952, - 507.0286350000097, - 450.4277069999953, - 393.3245569999999, - 496.05954900001234, - 448.54385699999693, - 452.58701299999666, - 448.81150699999125, - 446.0024529999937, - 457.19210400000156, - 455.5231649999914, - 412.2258989999973, - 515.7535799999896, - 464.72772900000564, - 460.088803000006, - 406.22953399999824, - 510.64573499999824, - 459.76112199999625, - 459.966791999992, - 448.60440200001176, - 450.0775180000055, - 459.84235900000203, - 459.8659290000069, - 451.91796500000055, - 447.27275600000576, - 445.6439759999921, - 446.73426499999186, - 395.8654530000058, - 494.23263399999996, - 433.55723999999464, - 397.8724169999914, - 494.81543500001135, - 451.9425200000114, - 447.2323280000128, - 452.5531869999977, - 453.1442010000028, - 454.4493599999987, - 459.29185999999754, - 402.8433109999896, - 503.21812099999806, - 456.07613500001025, - 457.37212, - 483.2406190000038, - 506.35046099999454, - 507.58232100000896, - 503.3719960000017, - 505.9787110000034, - 504.0235010000033, - 448.2203010000085, - 553.6549610000075, - 472.478798000011, - 448.6558220000006, - 446.4044580000045, - 444.09918299999845, - 388.79204000000027, - 489.53065299999435, - 384.8330660000065, - 487.617551000003, - 431.4712109999964 - ] - } - ] - }, - { - "runtime": "go", - "repeat": 0, - "fixture": "128 KiB JS boundary regex", - "inputBytes": 131072, - "outputBytes": 147456, - "outputSHA256": "580155666affe445ac48846f3c178f45b3b75ec89815cc49fad08035415e8117", - "cold": { - "requests": 7, - "concurrency": 1, - "elapsedMs": 854.5429149999982, - "requestsPerSecond": 8.191513705312289, - "p50Ms": 118.62878600000113, - "p95Ms": 153.5465630000108, - "maxMs": 153.5465630000108, - "p95TTFBMs": 149.6514610000013, - "cpuMs": 800, - "peakProcessTreeRssBytes": 85704704, - "samplesMs": [ - 140.04879600000277, - 120.31387699999323, - 108.33805399999255, - 116.27061600000889, - 96.54386800000793, - 153.5465630000108, - 118.62878600000113 - ] - }, - "warm": [ - { - "requests": 100, - "concurrency": 1, - "elapsedMs": 2115.991003999996, - "requestsPerSecond": 47.259180124567386, - "p50Ms": 21.17514900000242, - "p95Ms": 23.560662999996566, - "maxMs": 26.3720500000054, - "p95TTFBMs": 20.589105999999447, - "cpuMs": 1600, - "peakProcessTreeRssBytes": 93462528, - "samplesMs": [ - 23.1113170000026, - 26.3720500000054, - 23.024225000001024, - 21.952894000001834, - 22.811031999997795, - 22.02037100000598, - 23.054136999999173, - 19.757354000001214, - 20.068868000002112, - 21.830787999992026, - 21.37492800000473, - 20.984664999996312, - 22.39493900000525, - 22.91653600000427, - 23.560662999996566, - 20.449425999991945, - 22.52678200000082, - 23.95463199999358, - 22.469576000003144, - 20.897876000002725, - 18.94034699999611, - 22.5555990000139, - 22.509382999996888, - 21.684021000008215, - 22.07420899999852, - 19.84295099999872, - 21.418411000006017, - 22.218945999993593, - 21.097552999999607, - 21.052565999998478, - 21.278449000004912, - 20.949035999990883, - 23.692320000001928, - 21.971603999991203, - 19.47387799998978, - 21.580976999990526, - 18.425124000001233, - 17.803987999999663, - 18.535243999998784, - 19.02860599999258, - 21.234848000007332, - 19.756716000003507, - 18.640094000002136, - 18.165953999996418, - 19.158242000004975, - 18.33421700001054, - 19.206349000000046, - 19.366400999992038, - 21.091448999999557, - 19.26240500000131, - 21.826852999991388, - 21.60381800000323, - 23.11797099999967, - 24.240411999999196, - 19.46023100000457, - 19.576654999997118, - 17.06492600000638, - 18.296246999991126, - 16.90298700000858, - 19.59353800000099, - 18.716990000000806, - 18.009313999995356, - 20.147977000000537, - 21.26950099998794, - 22.916635000001406, - 20.7288120000012, - 21.376155999998446, - 22.50881899999513, - 20.264595999993617, - 19.52371100000164, - 21.521406999992905, - 20.023004000002402, - 20.672699000002467, - 20.676852000004146, - 20.47822599999199, - 23.360853999998653, - 23.775820999988355, - 21.470014999998966, - 19.237272999991546, - 21.752662999992026, - 21.17514900000242, - 19.932251000005635, - 18.947598999991897, - 23.354665000006207, - 23.187340999997105, - 21.43462799998815, - 22.19801800001005, - 20.47246499999892, - 21.337828000003356, - 20.37162000000535, - 22.53996599999664, - 20.85365499999898, - 20.529338000007556, - 20.990814999997383, - 21.370933999991394, - 21.849530999999843, - 23.212186999997357, - 20.388145999997505, - 21.37554999999702, - 23.45249700000568 - ] - }, - { - "requests": 100, - "concurrency": 8, - "elapsedMs": 1228.3415680000035, - "requestsPerSecond": 81.41058041601643, - "p50Ms": 97.00700900000811, - "p95Ms": 104.97017099999357, - "maxMs": 106.47893399999884, - "p95TTFBMs": 101.91241600000649, - "cpuMs": 1430, - "peakProcessTreeRssBytes": 118611968, - "samplesMs": [ - 23.445833000005223, - 35.20579200000793, - 46.21482000000833, - 58.732958000007784, - 69.96345299998939, - 82.63269899999432, - 94.38898200000403, - 106.47893399999884, - 95.79876499999955, - 96.09324799999013, - 96.23375500000839, - 98.14202100000693, - 96.34382100000221, - 96.22879100000137, - 96.21905100000731, - 97.63900799999828, - 98.25065299999551, - 98.75448699999833, - 100.7422319999896, - 99.60862699999416, - 104.07655500000692, - 105.02255399999558, - 105.58243999999831, - 104.62008400000923, - 104.97017099999357, - 105.3561139999947, - 104.69324999999662, - 104.94279799998912, - 101.7116599999863, - 101.75273800001014, - 99.79974100000982, - 99.76400100000319, - 99.49991100000625, - 97.84989700000733, - 96.58326300000772, - 95.35463200000231, - 95.68821300000127, - 96.92150899999251, - 98.45528399999603, - 96.98859100000118, - 96.93522899999516, - 97.00700900000811, - 97.75766800000565, - 97.67643799999496, - 98.45179000000644, - 96.13207799999509, - 95.10417000000598, - 95.94074499999988, - 94.8359449999989, - 95.72525599999062, - 97.3032089999906, - 97.95565099999658, - 98.19780100000207, - 98.49605099999462, - 99.06805800000438, - 100.61432100000093, - 105.5104730000021, - 104.3759229999996, - 100.96865599999728, - 99.87028499999724, - 99.24040900000546, - 99.58334100000502, - 102.54614200000651, - 103.10853500000667, - 99.3500950000016, - 99.77625799999805, - 99.2407380000077, - 99.15320499999507, - 97.64587100000062, - 96.92032999999356, - 92.78158799999801, - 90.77906899999653, - 89.62517700000899, - 89.05682300000626, - 91.14518900000257, - 93.58324500000163, - 94.93309500000032, - 94.24566100000811, - 96.55696000000171, - 98.9588839999924, - 100.04781899999944, - 102.40455900000234, - 101.21980000000622, - 97.3561209999898, - 95.23007299999881, - 94.3348779999942, - 90.4677159999992, - 87.29725699999835, - 88.38120200000412, - 86.60408900000039, - 85.67218000000867, - 85.6087259999913, - 85.72481700000935, - 87.65803099999903, - 89.58824399999867, - 93.32244600000558, - 89.98603499999444, - 88.54854400000477, - 95.05651700000453, - 98.30883399999584 - ] - } - ] - }, - { - "runtime": "node", - "repeat": 0, - "fixture": "2 MiB binary", - "inputBytes": 2097152, - "outputBytes": 2097152, - "outputSHA256": "5647f05ec18958947d32874eeb788fa396a05d0bab7c1b71f112ceb7e9b31eee", - "cold": { - "requests": 7, - "concurrency": 1, - "elapsedMs": 533.6855789999972, - "requestsPerSecond": 13.11633717575126, - "p50Ms": 58.07325299999502, - "p95Ms": 160.48260400000436, - "maxMs": 160.48260400000436, - "p95TTFBMs": 125.95116199999757, - "cpuMs": 640, - "peakProcessTreeRssBytes": 267374592, - "samplesMs": [ - 160.48260400000436, - 63.45150599999761, - 58.07325299999502, - 54.64453299999877, - 56.594192000004114, - 53.89820099998906, - 85.57506899999862 - ] - }, - "warm": [ - { - "requests": 100, - "concurrency": 1, - "elapsedMs": 4775.226761999991, - "requestsPerSecond": 20.941413881278667, - "p50Ms": 45.996220999993966, - "p95Ms": 60.767843999987235, - "maxMs": 73.08764399999927, - "p95TTFBMs": 30.965549000000465, - "cpuMs": 6880, - "peakProcessTreeRssBytes": 326492160, - "samplesMs": [ - 49.03711699999985, - 45.55590700000175, - 53.4721819999977, - 50.223718999986886, - 45.89627400001336, - 44.728430000002845, - 43.96214799999143, - 43.00604700000258, - 50.13158799998928, - 46.22801000000618, - 49.383342999994056, - 51.28813299999456, - 64.71203399999649, - 50.34819599999173, - 49.0948619999981, - 73.08764399999927, - 54.212698000003, - 45.926806000003126, - 46.564853000003495, - 49.65188599999237, - 46.71660800000245, - 62.812813999989885, - 46.850447999997414, - 45.12863400000788, - 45.856425999998464, - 41.963910999998916, - 40.69865099999879, - 43.945180000009714, - 45.998666999992565, - 45.6620280000061, - 45.26802200000384, - 51.9003759999905, - 44.389704000001075, - 44.14479500000016, - 42.625222000002395, - 41.088174000004074, - 42.30636100000993, - 43.191322999991826, - 41.51643499999773, - 42.87489900000219, - 39.98852199999965, - 48.568275999990874, - 43.00982799999474, - 37.68297799999709, - 63.53413800000271, - 45.423767000000225, - 36.96545299999707, - 48.582148000001325, - 38.601490999993985, - 40.15716699999757, - 57.221965000004275, - 39.95994500000961, - 43.536034999997355, - 44.18656300001021, - 46.29932900000131, - 55.71704600000521, - 41.79564599999867, - 46.80753900000127, - 48.209898000000976, - 60.767843999987235, - 56.47106500000518, - 57.81404100000509, - 45.244040999998106, - 43.41986100000213, - 52.667494000008446, - 47.99644199998875, - 48.361667999997735, - 51.61531900000409, - 47.3954389999999, - 44.538667000000714, - 54.67974900000263, - 43.798434000011184, - 41.08142999999109, - 43.57171400000516, - 48.191642999998294, - 58.9348980000068, - 40.70029499998782, - 41.515305000008084, - 43.563486999992165, - 45.46691000000283, - 52.885863000003155, - 42.41566100000637, - 42.66836999999941, - 43.14452300000994, - 49.74467300000833, - 52.21788199999719, - 47.5129270000034, - 43.09780899999896, - 44.2218780000112, - 48.174265000008745, - 48.30711999999767, - 51.387650000004214, - 65.77563400000508, - 45.996220999993966, - 46.099912999998196, - 45.480093999998644, - 56.99158099999477, - 46.70870800000557, - 44.300568999999086, - 50.10595100000501 - ] - }, - { - "requests": 100, - "concurrency": 8, - "elapsedMs": 2766.496127999999, - "requestsPerSecond": 36.14680641982089, - "p50Ms": 209.3473410000006, - "p95Ms": 305.56796299999405, - "maxMs": 332.21430400000827, - "p95TTFBMs": 179.7737679999991, - "cpuMs": 5910, - "peakProcessTreeRssBytes": 298897408, - "samplesMs": [ - 185.3379270000005, - 196.12677200000326, - 206.86174399999436, - 215.17170500000066, - 224.3009230000025, - 279.69287100000656, - 301.08942500001285, - 305.21672900000704, - 227.73971999999776, - 223.39490400000068, - 219.16029499999422, - 218.2281079999957, - 210.4707630000048, - 330.1159050000133, - 304.7409730000072, - 309.6235379999998, - 200.93936200000462, - 193.78293499999563, - 187.4956499999971, - 181.65675900000497, - 180.02799000000232, - 224.73431300000811, - 241.59158600000956, - 259.1375879999978, - 276.88156799999706, - 277.34123100001307, - 277.56688299999223, - 277.98629000000074, - 303.74530200001027, - 159.7502969999914, - 142.22737699998834, - 127.27222799998708, - 308.0263560000021, - 303.6479149999941, - 305.56796299999405, - 305.52815500000725, - 280.5638520000066, - 203.62346299999626, - 203.4392569999909, - 203.34289099999296, - 203.5248910000082, - 211.56109200000355, - 211.19813099999737, - 213.46319599999697, - 214.75954400000046, - 214.01172399999632, - 211.20233000000007, - 212.04231000000436, - 209.04667800001334, - 218.1150259999995, - 233.2367729999969, - 232.504288000011, - 237.1469470000011, - 246.2468860000081, - 246.54850799999258, - 248.2920230000018, - 182.04101699999592, - 209.3473410000006, - 203.78435699999682, - 186.23231999999552, - 206.22879500000272, - 195.85267300000123, - 189.59625299999607, - 191.29164599999785, - 185.81143000000156, - 193.16849199999706, - 191.7938429999922, - 213.9448890000058, - 199.31629799999064, - 194.85128999999142, - 196.35351300000912, - 207.99022700000205, - 169.42322199999762, - 196.37876099999994, - 210.78922799999418, - 206.15293699999165, - 216.05132699999376, - 222.02330800000345, - 254.23511999999755, - 327.8940990000119, - 184.07606300000043, - 169.2726149999944, - 152.72952700000315, - 138.41524899999786, - 203.878561000005, - 199.1172399999923, - 170.4585589999915, - 157.51225500000874, - 166.7798679999978, - 174.11721500000567, - 189.92514000000665, - 250.05854299999191, - 252.50896200000716, - 253.5207870000013, - 332.21430400000827, - 181.07890900000348, - 172.04584599999362, - 165.5511850000039, - 154.1986259999976, - 49.677561999997124 - ] - } - ] - }, - { - "runtime": "go", - "repeat": 0, - "fixture": "2 MiB binary", - "inputBytes": 2097152, - "outputBytes": 2097152, - "outputSHA256": "5647f05ec18958947d32874eeb788fa396a05d0bab7c1b71f112ceb7e9b31eee", - "cold": { - "requests": 7, - "concurrency": 1, - "elapsedMs": 389.5798109999887, - "requestsPerSecond": 17.968076892978942, - "p50Ms": 54.7152219999989, - "p95Ms": 70.39999499999976, - "maxMs": 70.39999499999976, - "p95TTFBMs": 39.030142999996315, - "cpuMs": 220, - "peakProcessTreeRssBytes": 63385600, - "samplesMs": [ - 70.39999499999976, - 61.458196000006865, - 54.7152219999989, - 58.87855800001125, - 47.13850800000364, - 45.51809399999911, - 50.525007000003825 - ] - }, - "warm": [ - { - "requests": 100, - "concurrency": 1, - "elapsedMs": 4231.6484460000065, - "requestsPerSecond": 23.631452677626292, - "p50Ms": 40.678060999998706, - "p95Ms": 52.13355699999374, - "maxMs": 57.215142000000924, - "p95TTFBMs": 21.64252100000158, - "cpuMs": 2670, - "peakProcessTreeRssBytes": 84008960, - "samplesMs": [ - 50.683276999989175, - 46.045729999998, - 43.42725399999472, - 41.807161999997334, - 43.35362100000202, - 47.59582400000363, - 45.97418999999354, - 48.57686400000239, - 45.182048000002396, - 48.50762299999769, - 45.54264400000102, - 44.65558900000178, - 44.203106999993906, - 44.84155299999111, - 43.502972000002046, - 43.863626999998814, - 50.333531999989646, - 42.43600699999661, - 37.66337499998917, - 38.52858699999342, - 40.8119030000089, - 38.12492899999779, - 37.583436999993864, - 38.18462400000135, - 38.8725909999921, - 40.90554899998824, - 38.627453000008245, - 39.0702900000033, - 40.227614000003086, - 39.65302800000063, - 40.70233400000143, - 54.138280999992276, - 41.49425499999779, - 45.22581699999864, - 40.0210839999927, - 38.78023399999074, - 37.85462899999402, - 43.15729200000351, - 38.26217400000314, - 49.11082099999476, - 37.72437499999069, - 48.254326000009314, - 54.27202699999907, - 52.13355699999374, - 44.00252300000284, - 39.21034399999189, - 43.452991999991355, - 47.82089899999846, - 43.60573999999906, - 37.631139999997686, - 34.79597200000717, - 35.127061000006506, - 36.24460000000545, - 38.42435299999488, - 36.499514000010095, - 42.83944100000372, - 35.08844599999429, - 36.594098000001395, - 37.89326899999287, - 37.78780900000129, - 39.06958099998883, - 41.14162999999826, - 39.07571900000039, - 40.61932300000626, - 57.215142000000924, - 39.48167100000137, - 37.79726999999548, - 41.89262800000142, - 39.30299799999921, - 38.025302000009106, - 40.48003000000608, - 37.604822999986936, - 38.035238999989815, - 39.2506599999906, - 40.34546500000579, - 39.51209999999264, - 41.50085900000704, - 38.98865699999442, - 39.64815200000885, - 39.77052499999991, - 43.87588000000687, - 53.997357999993255, - 53.11769300000742, - 40.748093999995035, - 40.036338000005344, - 39.29010899999412, - 37.704922000004444, - 51.668055000001914, - 44.92719100000977, - 42.42170000000624, - 43.0654760000034, - 49.467829000001075, - 48.9453979999962, - 42.3847470000037, - 40.198764000000665, - 37.94617300000391, - 40.160652999999, - 40.678060999998706, - 43.34369799999695, - 39.20045299999765 - ] - }, - { - "requests": 100, - "concurrency": 8, - "elapsedMs": 1878.5262149999908, - "requestsPerSecond": 53.23322038388508, - "p50Ms": 144.12930100000813, - "p95Ms": 222.25769100000616, - "maxMs": 308.42219599999953, - "p95TTFBMs": 154.75426999999036, - "cpuMs": 2180, - "peakProcessTreeRssBytes": 101662720, - "samplesMs": [ - 48.97841799999878, - 219.47242299999925, - 219.07341699999233, - 219.3563060000015, - 220.00588500000595, - 221.27659900000435, - 222.3542230000021, - 222.25769100000616, - 182.13195000000997, - 38.39011799999571, - 102.12933900000644, - 101.0214580000029, - 151.52709300001152, - 215.4115310000052, - 214.78460499999346, - 217.2967639999988, - 215.86725899999146, - 206.35777200000302, - 131.17855100000452, - 131.0190969999967, - 44.02140899999358, - 30.46558200000436, - 112.2790709999972, - 113.96224199999415, - 113.87893700000132, - 114.02467300000717, - 135.09289400000125, - 205.8491270000086, - 212.66034899999795, - 214.03066299999773, - 131.46261700001196, - 131.3194979999971, - 131.24308699999528, - 131.06365399999777, - 79.76854099999764, - 72.39253900000767, - 71.80434000000241, - 72.4555640000035, - 119.03005200000189, - 160.04609800000617, - 161.12900400000217, - 161.80853700000443, - 161.3966589999909, - 121.05112899999949, - 121.14938099999563, - 121.17445600000792, - 58.61435800000618, - 72.02288799999224, - 72.52358199999435, - 166.3269009999931, - 228.70573299999523, - 230.1863849999936, - 214.21015099999204, - 214.2336049999867, - 214.43968699999095, - 182.1044830000028, - 181.8885319999972, - 72.0717430000077, - 158.60162299999502, - 158.23953600000823, - 159.2915609999909, - 158.86846500000684, - 161.73836499999743, - 182.30736500000057, - 307.0457080000051, - 308.42219599999953, - 191.65767099999357, - 191.4871920000005, - 191.43920200000866, - 191.2321729999967, - 191.21364499999618, - 144.12930100000813, - 72.47177399999055, - 72.48267599999963, - 122.77659300000232, - 151.97550500000943, - 153.82039399999485, - 152.31932199999574, - 153.99275799999305, - 153.90421300000162, - 114.83804399998917, - 114.50567700000829, - 44.89723299999605, - 86.08340099999623, - 87.76895300000615, - 88.56778599999961, - 88.13408699999854, - 113.83734099999128, - 209.8028379999887, - 195.5463219999947, - 195.46308399998816, - 138.9834899999987, - 138.79881100000057, - 138.61630799999693, - 138.39187599999423, - 98.18277499999385, - 67.99252600000182, - 68.87581800000044, - 68.16431000000739, - 73.99617299999227 - ] - } - ] - }, - { - "runtime": "go", - "repeat": 1, - "fixture": "64 KiB changed text", - "inputBytes": 65538, - "outputBytes": 69179, - "outputSHA256": "27668dd82518eacd8514d91acc8cb366ad6cee5fb4c72e126b76ae02fad79c34", - "cold": { - "requests": 7, - "concurrency": 1, - "elapsedMs": 430.2974550000072, - "requestsPerSecond": 16.267816410859048, - "p50Ms": 59.176823000001605, - "p95Ms": 72.63749799999641, - "maxMs": 72.63749799999641, - "p95TTFBMs": 68.40444300000672, - "cpuMs": 390, - "peakProcessTreeRssBytes": 81465344, - "samplesMs": [ - 72.63749799999641, - 61.75173499999801, - 59.176823000001605, - 62.48601100000087, - 58.34403100000054, - 56.203656000012415, - 58.7113379999937 - ] - }, - "warm": [ - { - "requests": 100, - "concurrency": 1, - "elapsedMs": 1961.0983290000004, - "requestsPerSecond": 50.991833770513594, - "p50Ms": 19.39721900000586, - "p95Ms": 22.65182199999981, - "maxMs": 24.352826000002096, - "p95TTFBMs": 19.680291999990004, - "cpuMs": 1410, - "peakProcessTreeRssBytes": 90464256, - "samplesMs": [ - 23.12015899999824, - 22.57677899999544, - 22.799668000006932, - 21.844037000002572, - 22.65182199999981, - 21.498690000007628, - 21.826056000005337, - 21.60206800000742, - 24.352826000002096, - 20.877561999994214, - 21.549465999996755, - 20.64373599999817, - 20.48953999999503, - 19.999765999993542, - 21.38542399999278, - 21.295590000008815, - 21.807497999994666, - 19.666641000003438, - 21.090912999992725, - 19.588747999994666, - 23.88674399998854, - 19.798615000006976, - 18.21691699999792, - 16.53385900000285, - 17.438806999998633, - 16.169160999997985, - 18.77812700001232, - 17.494336000003386, - 17.50840999999491, - 17.940618000007817, - 17.401935000001686, - 15.930062999992515, - 15.806593000001158, - 19.52808199998981, - 18.815537000002223, - 18.79958500000066, - 16.150534999993397, - 15.68900699999358, - 20.299883999992744, - 22.13658000000578, - 20.889668999996502, - 18.195523999995203, - 19.99803499999689, - 17.98525100000552, - 17.844668000005186, - 19.653757000007317, - 19.545447999989847, - 17.70326500000374, - 19.066401999996742, - 18.26618399999279, - 18.29205199998978, - 19.50683199999912, - 18.98004100000253, - 18.48460699999123, - 18.916491999989375, - 21.314717999994173, - 19.85673400000087, - 19.952241000006325, - 19.39721900000586, - 17.68747099999746, - 17.009506000002148, - 19.178839000000153, - 16.83287700000801, - 17.857701000000816, - 19.32643500000995, - 19.371893000003183, - 19.86309600000095, - 20.410411000004387, - 20.21682500001043, - 22.166219000006095, - 19.50378999998793, - 19.18086099998618, - 19.149451999997837, - 17.577174999998533, - 23.364067999995314, - 20.036040999999386, - 18.30172700001276, - 18.461210000008577, - 18.847282999995514, - 19.992186999996193, - 20.003727000002982, - 19.722651999996742, - 21.642856999998912, - 19.731088000000454, - 18.456821000014315, - 18.409763999996358, - 18.879350000002887, - 20.321583999990253, - 20.417929999995977, - 19.52625799999805, - 21.824376999997185, - 20.392370000001392, - 18.652799000003142, - 18.360888000010164, - 18.546547000005376, - 18.797076000002562, - 17.44072199999937, - 17.78839300000982, - 19.05163000000175, - 18.086181000006036 - ] - }, - { - "requests": 100, - "concurrency": 8, - "elapsedMs": 1001.709514000002, - "requestsPerSecond": 99.82934034506914, - "p50Ms": 77.96630600000208, - "p95Ms": 88.1916429999983, - "maxMs": 108.73311699999613, - "p95TTFBMs": 85.55817400000524, - "cpuMs": 1170, - "peakProcessTreeRssBytes": 116531200, - "samplesMs": [ - 34.980543999990914, - 43.54743400000734, - 54.31282099999953, - 64.50587300000188, - 74.56099399999948, - 86.19896100000187, - 97.8200829999987, - 108.73311699999613, - 84.3064289999893, - 87.98872899998969, - 88.15308899999945, - 88.3895499999926, - 87.1702440000081, - 88.1916429999983, - 87.51929599999858, - 88.77180400000361, - 88.75854000000982, - 86.82038099999772, - 84.74815700000909, - 85.3992819999985, - 87.20978099999775, - 84.41114799999923, - 86.1290730000037, - 83.0559659999999, - 82.52122199999576, - 83.36003400001209, - 83.8692519999895, - 83.29779700000654, - 82.51861500000814, - 82.98022500000661, - 80.7324110000045, - 81.71231499999703, - 79.69533699999738, - 75.31597799999872, - 75.06677000000491, - 70.71412199999031, - 66.81275299999106, - 63.86944399999629, - 59.04924099998607, - 57.7387000000017, - 57.09871400000702, - 58.52095199999167, - 59.65060500000254, - 60.2441109999927, - 63.509505000009085, - 65.8480639999907, - 69.7063530000014, - 72.49044100000174, - 72.94708900000842, - 76.2004530000122, - 76.66554400000314, - 78.39115599999786, - 78.78561500000069, - 78.74433899999713, - 78.41494000000239, - 77.99947199999588, - 81.21048599999631, - 79.50403799999913, - 78.22826200000418, - 77.93424999999115, - 76.99352400000498, - 77.56134100000781, - 78.26384900000994, - 76.37247899999784, - 73.44995100000233, - 73.17834100000618, - 74.41764900000999, - 76.73665400000755, - 76.8083820000029, - 75.52948900000774, - 74.66130799999519, - 75.42987300000095, - 76.55553899999359, - 78.16367300000275, - 78.55023700000311, - 77.96630600000208, - 78.63407900001039, - 81.11615699999675, - 82.69935700000497, - 84.61419900000328, - 85.9369810000062, - 83.7542470000044, - 82.30186900000263, - 82.56876300000295, - 82.77903099999821, - 82.57946799999627, - 81.19294400000945, - 77.8238330000022, - 76.11394300000393, - 76.8259129999933, - 77.62594500000705, - 75.63521800001035, - 75.1730649999954, - 72.88760800000455, - 73.24079999999958, - 74.4743460000027, - 75.3856289999967, - 75.43978899999638, - 75.9852350000001, - 77.7382030000008 - ] - } - ] - }, - { - "runtime": "node", - "repeat": 1, - "fixture": "64 KiB changed text", - "inputBytes": 65538, - "outputBytes": 69179, - "outputSHA256": "27668dd82518eacd8514d91acc8cb366ad6cee5fb4c72e126b76ae02fad79c34", - "cold": { - "requests": 7, - "concurrency": 1, - "elapsedMs": 697.1016020000097, - "requestsPerSecond": 10.04157784161842, - "p50Ms": 74.32697599999665, - "p95Ms": 216.7981359999976, - "maxMs": 216.7981359999976, - "p95TTFBMs": 215.0265870000003, - "cpuMs": 780, - "peakProcessTreeRssBytes": 257957888, - "samplesMs": [ - 216.7981359999976, - 97.36413800000446, - 105.60699799998838, - 74.32697599999665, - 71.979204999996, - 67.6392829999968, - 62.38025300001027 - ] - }, - "warm": [ - { - "requests": 100, - "concurrency": 1, - "elapsedMs": 4175.901616000003, - "requestsPerSecond": 23.946924328113752, - "p50Ms": 37.82336500000383, - "p95Ms": 66.44434600000386, - "maxMs": 83.51989100000355, - "p95TTFBMs": 65.49515499999688, - "cpuMs": 4600, - "peakProcessTreeRssBytes": 329617408, - "samplesMs": [ - 58.85001200000988, - 52.498237000007066, - 55.47913600000902, - 66.44434600000386, - 56.17817600000126, - 54.25796600000467, - 57.92571599999792, - 50.540548999997554, - 54.612143000005744, - 50.016310999999405, - 49.81862799999362, - 48.11716100000194, - 50.71752099999867, - 50.99906299999566, - 46.7132649999985, - 44.42280400000163, - 83.51989100000355, - 37.90722999999707, - 38.47002799999609, - 37.56451699999161, - 34.47793200000888, - 40.27663800001028, - 33.88200899999356, - 35.496383999998216, - 33.51606100000208, - 37.90046799999254, - 35.44210299999395, - 33.9232869999978, - 34.12380900001153, - 33.46185900000273, - 32.647876000002725, - 36.235421999997925, - 25.81516900000861, - 26.21032899999409, - 24.012241000003996, - 24.437925999998697, - 26.707838999995147, - 26.988094999993336, - 23.620836999994935, - 25.94796900000074, - 33.653785000002244, - 42.94941000000108, - 64.86622999999963, - 42.18195399999968, - 49.825219000005745, - 62.416960999995354, - 59.04709699998784, - 59.55014900000242, - 61.702439000000595, - 74.72938400000567, - 64.82553899999766, - 73.30268600001, - 73.96137600000657, - 69.04188499999873, - 40.182161999997334, - 32.76157299999613, - 35.38125500000024, - 32.902117999998154, - 29.524581000005128, - 34.39200900000287, - 32.49511899999925, - 34.270060000009835, - 33.02508200000739, - 33.11926200000744, - 35.2945810000092, - 32.632245999993756, - 33.11261500000546, - 36.15691700000025, - 33.28053499999805, - 33.92114999999467, - 32.81836600000679, - 33.95788000000175, - 37.82336500000383, - 33.94063000001188, - 38.15800399999716, - 36.4576350000134, - 38.58732900000177, - 33.98933300000499, - 33.258015999992494, - 28.15897199999017, - 27.964460000002873, - 28.977602999992087, - 28.954483000008622, - 43.90385700001207, - 42.05337400001008, - 36.96170400000119, - 41.132339999996475, - 49.85021500001312, - 40.54984000000695, - 40.00169099999766, - 38.50497799999721, - 38.748279999999795, - 39.95763099999749, - 36.02231099999335, - 43.4254549999896, - 42.36359000000812, - 37.641896000001, - 42.04891800000041, - 37.875179000009666, - 35.79648799999268 - ] - }, - { - "requests": 100, - "concurrency": 8, - "elapsedMs": 1790.3289059999952, - "requestsPerSecond": 55.85565851328564, - "p50Ms": 130.5278479999979, - "p95Ms": 209.8424640000012, - "maxMs": 232.6728230000008, - "p95TTFBMs": 208.99638499999128, - "cpuMs": 2330, - "peakProcessTreeRssBytes": 337899520, - "samplesMs": [ - 97.03672299999744, - 107.59838199999649, - 112.08212400000775, - 121.67482500000915, - 126.85217999998713, - 133.92430699999386, - 137.781415999998, - 149.38204000001133, - 106.45411599999352, - 100.40238699999463, - 104.23867599999357, - 104.96285200001148, - 104.66377700000885, - 97.12798499999917, - 110.19366900000023, - 105.05922900000587, - 98.64569299999857, - 111.05841100000544, - 118.97027900000103, - 113.15311700000893, - 115.1621909999958, - 116.62891699999454, - 130.28147799998987, - 125.56166300000041, - 169.78840299999865, - 186.56689000000188, - 196.3561239999981, - 209.8424640000012, - 207.2141100000008, - 217.5777459999954, - 218.9228060000023, - 232.6728230000008, - 198.6236799999897, - 214.6647709999961, - 193.82361200000742, - 192.6110830000107, - 189.95923799999582, - 192.20312200000626, - 179.56297800000175, - 195.21395000000484, - 189.90156999998726, - 204.2280080000055, - 179.0097480000113, - 195.4203669999988, - 214.71838199999183, - 208.100946999999, - 189.31008199999633, - 191.12854700000025, - 171.02195999999822, - 183.7840520000027, - 171.3650670000061, - 168.97642500000075, - 163.6341870000033, - 155.1749470000068, - 153.96085499999754, - 149.23882499999308, - 130.27047800000582, - 133.09342600000673, - 124.6547009999922, - 137.37001800000144, - 137.34215399999812, - 126.41923200000019, - 125.54817799999728, - 141.2836360000074, - 125.87696900000446, - 142.02090899999894, - 133.4302730000054, - 144.8468559999892, - 135.9993029999896, - 130.5278479999979, - 143.8202420000016, - 139.1828269999969, - 139.9473389999912, - 136.80930400000943, - 119.78439100000833, - 131.01122699999542, - 127.3733099999954, - 132.24691800000437, - 131.2555730000022, - 129.80193500001042, - 121.03634799999418, - 105.61911299999338, - 121.89828100000159, - 118.88593299999775, - 100.75103500000841, - 119.91801799999666, - 111.99209400000109, - 105.404978999999, - 102.0890539999964, - 103.01802599999064, - 91.78501599999436, - 108.39957799999684, - 110.42437200000859, - 105.4751760000072, - 105.57896199999959, - 99.61958400000003, - 84.85093799998867, - 72.46732799999882, - 71.82182099999045, - 73.93154300001333 - ] - } - ] - }, - { - "runtime": "go", - "repeat": 1, - "fixture": "2 MiB absent terms", - "inputBytes": 2097154, - "outputBytes": 2097154, - "outputSHA256": "061bcb1e32dd40f88b2c69eceda3df06d034f42367863b92d9c7e6f2bba1258a", - "cold": { - "requests": 7, - "concurrency": 1, - "elapsedMs": 1122.516751999996, - "requestsPerSecond": 6.235987113357597, - "p50Ms": 157.06752199999755, - "p95Ms": 180.56544200000644, - "maxMs": 180.56544200000644, - "p95TTFBMs": 150.03049200000532, - "cpuMs": 1020, - "peakProcessTreeRssBytes": 131293184, - "samplesMs": [ - 180.56544200000644, - 170.05256300000474, - 157.06752199999755, - 150.64355399999477, - 151.6804520000005, - 144.2990439999994, - 167.3770749999967 - ] - }, - "warm": [ - { - "requests": 100, - "concurrency": 1, - "elapsedMs": 9000.660898999995, - "requestsPerSecond": 11.110295246331338, - "p50Ms": 89.08421799998905, - "p95Ms": 107.51090200000908, - "maxMs": 118.08804000000237, - "p95TTFBMs": 79.90837599999213, - "cpuMs": 7480, - "peakProcessTreeRssBytes": 103006208, - "samplesMs": [ - 95.36231300000509, - 105.07855299999937, - 109.7084770000074, - 107.51090200000908, - 101.00349200000346, - 110.07927400000335, - 87.3187489999982, - 90.50551600000472, - 98.87838199999533, - 88.42081199999666, - 92.73341800000344, - 90.17905299999984, - 88.25856800000474, - 87.99583100000746, - 92.69120000000112, - 93.39463400001114, - 97.8162319999974, - 102.62871400000586, - 83.69506899999396, - 84.70327500000712, - 87.7431770000112, - 98.63235200000054, - 90.11621999999625, - 89.00685900000099, - 88.77417499999865, - 95.14809599998989, - 88.74143199999526, - 90.30429499999445, - 93.83898899999622, - 84.95030199999746, - 63.86073000000033, - 87.5761499999935, - 92.55353800000739, - 89.13599500000419, - 94.92635699998937, - 86.34515000000829, - 89.40625400000135, - 91.15369399999327, - 89.69374299999618, - 85.6522580000019, - 84.97959200000332, - 87.72954700000992, - 86.14431299999706, - 88.32748400000855, - 89.08421799998905, - 92.67812199999753, - 66.28889300000446, - 90.65787899999123, - 96.6179509999929, - 90.77546900000016, - 80.15980700000364, - 105.46268500000588, - 72.6379050000105, - 72.98743199999444, - 79.55297699999937, - 108.75170799999614, - 91.49981900000421, - 94.00561200000811, - 85.51701199999661, - 87.11564300001191, - 83.6424820000102, - 99.39905900000304, - 87.5715610000043, - 86.96487100000377, - 83.09339600001113, - 84.56653300000471, - 90.6060359999974, - 103.0952879999968, - 91.79758000001311, - 95.86232899999595, - 109.89213700000255, - 96.28048499999568, - 100.26348300000245, - 82.73986099999456, - 84.14093500000308, - 96.35617800000182, - 84.82353500000318, - 106.5972749999928, - 99.25667000000249, - 90.3761230000091, - 87.1031490000023, - 91.29246599999897, - 91.22808699999587, - 85.60907200000656, - 103.51426999999967, - 118.08804000000237, - 64.71786599999177, - 70.29225399999996, - 83.77834299999813, - 69.80153900000732, - 92.21399600000586, - 86.84199499999522, - 87.3623840000073, - 76.5887389999989, - 86.43411000000197, - 86.76069000001007, - 81.37820900000224, - 84.7136060000048, - 76.97795300000871, - 69.26103599999624 - ] - }, - { - "requests": 100, - "concurrency": 8, - "elapsedMs": 6420.911298999999, - "requestsPerSecond": 15.574113290674818, - "p50Ms": 512.9615679999988, - "p95Ms": 579.8016360000038, - "maxMs": 594.4494750000013, - "p95TTFBMs": 552.7275950000039, - "cpuMs": 6680, - "peakProcessTreeRssBytes": 108224512, - "samplesMs": [ - 93.60279699999955, - 153.80596800000058, - 214.17694299999857, - 278.84574600000633, - 328.6491989999922, - 369.4046379999927, - 409.0717040000018, - 458.3384109999897, - 441.8624179999897, - 446.15398699999787, - 450.9061820000061, - 484.5296170000074, - 479.8809579999943, - 501.7053109999979, - 530.7961319999886, - 555.0984530000133, - 582.0719850000023, - 538.5149870000023, - 519.7126730000018, - 480.189314999996, - 501.7674149999948, - 505.86217100000067, - 510.7478640000045, - 492.1420389999985, - 447.8317850000021, - 492.9115119999915, - 515.2710349999979, - 520.4399799999956, - 535.5873979999888, - 515.0614880000066, - 487.72539200000756, - 512.9615679999988, - 518.6641209999943, - 511.93387899998925, - 508.46098799999163, - 510.78440799999225, - 497.2336789999972, - 517.108064, - 538.658098999993, - 526.300946000003, - 528.4346979999973, - 530.1328730000096, - 531.3989290000027, - 521.7948929999984, - 505.48009299999103, - 520.432084, - 510.27579400000104, - 517.8656350000092, - 525.9983260000008, - 534.871908999994, - 538.8372650000092, - 560.3356979999953, - 594.4494750000013, - 590.818432, - 592.2466399999976, - 575.5720830000064, - 570.8807579999993, - 574.7476409999945, - 546.095948000002, - 540.1202869999979, - 525.6712310000003, - 516.8741060000029, - 529.1644530000049, - 515.3816159999988, - 534.2667150000052, - 517.7197799999994, - 546.9891680000001, - 508.64018800000485, - 473.92555800000264, - 449.42871300000115, - 449.9257249999937, - 484.0678610000032, - 456.2769430000044, - 457.54221900000994, - 453.5884709999955, - 470.6292160000012, - 500.86670199999935, - 541.7293269999936, - 520.7577940000047, - 496.88867799998843, - 504.7430119999917, - 530.9719500000065, - 521.4342509999988, - 519.5553939999954, - 507.4735809999984, - 460.59474000000046, - 454.2902800000011, - 467.36852399999043, - 466.5112919999956, - 446.2067890000035, - 463.64922600000864, - 469.39365400001407, - 481.9694670000026, - 533.8209470000147, - 579.8490619999939, - 579.8016360000038, - 569.6839599999948, - 574.1430919999839, - 544.96288799998, - 552.6328079999948 - ] - } - ] - }, - { - "runtime": "node", - "repeat": 1, - "fixture": "2 MiB absent terms", - "inputBytes": 2097154, - "expectedOutputSHA256": "061bcb1e32dd40f88b2c69eceda3df06d034f42367863b92d9c7e6f2bba1258a", - "status": "failed", - "httpStatus": 500, - "failure": "DataCloneError: persisted term array cannot be cloned into the anonymization worker" - }, - { - "runtime": "go", - "repeat": 1, - "fixture": "128 KiB JS boundary regex", - "inputBytes": 131072, - "outputBytes": 147456, - "outputSHA256": "580155666affe445ac48846f3c178f45b3b75ec89815cc49fad08035415e8117", - "cold": { - "requests": 7, - "concurrency": 1, - "elapsedMs": 816.0133700000006, - "requestsPerSecond": 8.578290818935963, - "p50Ms": 116.89999199999147, - "p95Ms": 137.51076000000467, - "maxMs": 137.51076000000467, - "p95TTFBMs": 133.209365000017, - "cpuMs": 770, - "peakProcessTreeRssBytes": 86056960, - "samplesMs": [ - 137.51076000000467, - 117.84657799999695, - 117.88222100000712, - 111.80515699999523, - 116.89999199999147, - 111.27632500001346, - 102.01640600000974 - ] - }, - "warm": [ - { - "requests": 100, - "concurrency": 1, - "elapsedMs": 2073.5706599999976, - "requestsPerSecond": 48.22599100625783, - "p50Ms": 20.46818599998369, - "p95Ms": 24.066972000000533, - "maxMs": 25.555793000006815, - "p95TTFBMs": 20.849218000017572, - "cpuMs": 1600, - "peakProcessTreeRssBytes": 93888512, - "samplesMs": [ - 25.01210700001684, - 24.605589000013424, - 23.752731000015046, - 22.362898000021232, - 24.821996000013314, - 18.116516000009142, - 22.25533399998676, - 22.18759400001727, - 19.440093000011984, - 21.124620999995386, - 21.73870000001625, - 19.340689000004204, - 21.397117000014987, - 20.659702999982983, - 23.468510000006063, - 20.81358899999759, - 21.268004999990808, - 21.3529410000192, - 20.608440000010887, - 22.24476999999024, - 22.15263599998434, - 16.039206000015838, - 16.9416879999917, - 18.229266999987885, - 17.532276000012644, - 18.896099999983562, - 19.09716999999364, - 16.733659999998054, - 16.53063399999519, - 18.137728000001516, - 17.454632000008132, - 18.452103999996325, - 20.97781899999245, - 21.85957299999427, - 19.783480999991298, - 20.099600999994436, - 20.028867999993963, - 19.700391000020318, - 19.88703600000008, - 20.667929000017466, - 23.128774000011617, - 23.282374000002164, - 19.973268000001553, - 24.066972000000533, - 22.306578999996418, - 19.978917999978876, - 20.196811000001617, - 22.44574900000589, - 17.975415000022622, - 19.919423999992432, - 17.321261999983108, - 18.214990999986185, - 21.588733000011416, - 20.732293000008212, - 20.240067000006093, - 21.26349099999061, - 20.56309000001056, - 22.815875000000233, - 19.38718200000585, - 21.696950999990804, - 19.82536099999561, - 19.97143100001267, - 24.27405499998713, - 21.214454000000842, - 23.194287999998778, - 21.24596900001052, - 21.786777000001166, - 21.58847099999548, - 20.806352000014158, - 21.074372000002768, - 20.43488400001661, - 23.154383999994025, - 19.863489000010304, - 20.46818599998369, - 20.35403899999801, - 21.115130999998655, - 20.806148000003304, - 19.94042100000661, - 19.23555199999828, - 25.555793000006815, - 21.926000000006752, - 22.424486000003526, - 21.567780999990646, - 20.274540999991586, - 20.37934299997869, - 19.569037999986904, - 19.64973099998315, - 19.3925449999806, - 18.740097000001697, - 18.837403000012273, - 19.968926000001375, - 21.852601000020513, - 20.59993499997654, - 20.847406999993837, - 20.101072999997996, - 19.737395000003744, - 19.486118000000715, - 20.050319000001764, - 19.67255099999602, - 20.194863000011537 - ] - }, - { - "requests": 100, - "concurrency": 8, - "elapsedMs": 1242.000058000005, - "requestsPerSecond": 80.51529414662845, - "p50Ms": 96.51815799999167, - "p95Ms": 104.64475000000675, - "maxMs": 111.93066000001272, - "p95TTFBMs": 101.88513899999089, - "cpuMs": 1460, - "peakProcessTreeRssBytes": 118849536, - "samplesMs": [ - 23.50750999999582, - 34.15116000000853, - 44.98943900002632, - 58.751399000000674, - 72.52934800001094, - 87.9029659999942, - 99.85453399998369, - 111.93066000001272, - 103.28782399999909, - 104.01212199998554, - 105.45941700000549, - 103.84676300000865, - 102.26795500001754, - 100.80267800000729, - 103.27170700000715, - 103.70097499998519, - 102.58439900001395, - 102.64651099999901, - 102.17490600000019, - 104.64475000000675, - 104.7169780000113, - 103.45844099999522, - 100.95696899999166, - 99.74800800002413, - 98.99156799999764, - 97.99260300002061, - 97.53283500001999, - 95.63703200002783, - 95.64625200000592, - 95.05223800000385, - 95.35347299999557, - 95.4422290000075, - 95.1990560000122, - 95.38078800000949, - 95.49103600002127, - 94.42454100001487, - 94.01771600000211, - 94.18279799999436, - 94.70356100000208, - 94.56849400000647, - 94.60044700000435, - 95.07232999999542, - 94.64122799999313, - 94.61941000001389, - 96.31258699999307, - 97.29781499999808, - 96.04579400000512, - 95.49472499999683, - 95.82203700000537, - 95.66650200000731, - 96.57204299999285, - 96.9389599999995, - 96.60377600000356, - 95.73328799998853, - 96.54752399999416, - 97.04450499999803, - 96.79407999999239, - 99.74511400001938, - 104.90172699998948, - 101.49721399997361, - 100.07774599999539, - 103.17665300000226, - 104.09996200000751, - 105.67746599999373, - 103.9924179999798, - 100.78881999998703, - 94.8631409999798, - 98.92873399998643, - 100.34998600001563, - 97.67357700000866, - 96.07566499998211, - 93.42779899999732, - 95.27120400001877, - 95.59837900000275, - 96.51815799999167, - 94.15693800000008, - 92.4869689999905, - 93.00441699998919, - 95.0893990000186, - 96.00959200001671, - 96.90997599999537, - 96.98740600000019, - 94.81516900000861, - 95.44985500001349, - 96.75394499997492, - 96.84447300000465, - 95.51229199999943, - 95.1301370000001, - 93.51369600000908, - 93.75070900001447, - 95.15068699998665, - 96.570275999984, - 94.81050099999993, - 94.20684199998504, - 96.34123399999226, - 97.81739099998958, - 100.58085800000117, - 100.19935599999735, - 101.70627200001036, - 104.19617100001778 - ] - } - ] - }, - { - "runtime": "node", - "repeat": 1, - "fixture": "128 KiB JS boundary regex", - "inputBytes": 131072, - "outputBytes": 147456, - "outputSHA256": "580155666affe445ac48846f3c178f45b3b75ec89815cc49fad08035415e8117", - "cold": { - "requests": 7, - "concurrency": 1, - "elapsedMs": 1169.8818470000115, - "requestsPerSecond": 5.983510230499313, - "p50Ms": 173.11237499999697, - "p95Ms": 302.98123500001384, - "maxMs": 302.98123500001384, - "p95TTFBMs": 299.49156900000526, - "cpuMs": 1780, - "peakProcessTreeRssBytes": 312672256, - "samplesMs": [ - 302.98123500001384, - 195.9884439999878, - 173.11237499999697, - 209.55165800001123, - 115.56940300000133, - 86.99324599999818, - 84.72494299997925 - ] - }, - "warm": [ - { - "requests": 100, - "concurrency": 1, - "elapsedMs": 9776.634974999994, - "requestsPerSecond": 10.228468205646603, - "p50Ms": 86.17999500001315, - "p95Ms": 140.3330840000126, - "maxMs": 159.99762499998906, - "p95TTFBMs": 138.44355200001155, - "cpuMs": 9860, - "peakProcessTreeRssBytes": 344043520, - "samplesMs": [ - 145.56254000001354, - 140.09273599999142, - 136.2627999999968, - 140.4311479999742, - 137.50996699999087, - 106.0712979999953, - 103.50912000000244, - 104.42700200001127, - 94.81406699999934, - 76.65030300000217, - 78.88676799999666, - 77.1439379999938, - 83.36411200001021, - 122.11942299999646, - 129.42494900000747, - 130.20983099998557, - 128.65053700000863, - 82.30137800000375, - 93.09262100001797, - 120.58665700000711, - 126.01530099997763, - 132.5717730000033, - 108.17838399999891, - 77.82549000001745, - 84.01074100000551, - 83.72167900000932, - 105.33882599999197, - 85.38727599999402, - 80.85020400001667, - 79.24095199999283, - 92.17460800000117, - 90.60785900001065, - 76.82173900000635, - 78.17744300002232, - 80.96403499998269, - 128.88273400001344, - 127.38658200000646, - 126.36499000000185, - 112.78023099998245, - 92.76997399999527, - 89.66471000001184, - 89.7331300000078, - 91.44909400001052, - 88.0055890000076, - 76.07439700001851, - 74.40717799999402, - 76.17702399997506, - 78.9977839999774, - 78.64155500000925, - 93.07115299999714, - 79.66902700002538, - 76.47633599999244, - 77.49725399998715, - 77.5786070000031, - 76.09388699999545, - 77.95692299999064, - 81.66697400002158, - 81.17917000001762, - 76.96450900001219, - 76.39811300000292, - 76.83577599999262, - 77.46721099998103, - 76.04900100000668, - 82.0268769999966, - 78.7282449999766, - 80.57584799997858, - 85.21439099998679, - 95.38747599997441, - 81.94369000001461, - 83.00904000000446, - 76.48582900001202, - 77.81299299999955, - 140.3330840000126, - 140.13243699999293, - 138.35578100002022, - 150.11513200000627, - 159.99762499998906, - 110.02351600001566, - 88.36874099998386, - 91.76677099999506, - 82.77784100000281, - 97.98390200000722, - 87.1272009999957, - 76.67561000000569, - 79.28696100000525, - 75.82232399997883, - 74.41444500000216, - 78.01053200001479, - 76.34513100000913, - 125.26564099997631, - 124.15535800001817, - 127.33207699999912, - 89.11617899997509, - 85.65887800001656, - 82.17041600000812, - 86.17999500001315, - 122.47530600000755, - 154.4561260000046, - 104.87185999998474, - 123.85734600000433 - ] - }, - { - "requests": 100, - "concurrency": 8, - "elapsedMs": 8828.81285800002, - "requestsPerSecond": 11.32655110130547, - "p50Ms": 670.1778019999911, - "p95Ms": 954.4336659999972, - "maxMs": 1032.0874679999833, - "p95TTFBMs": 952.2650539999886, - "cpuMs": 9350, - "peakProcessTreeRssBytes": 367558656, - "samplesMs": [ - 197.21404500000062, - 286.09828399997787, - 389.97943499998655, - 500.75931299998774, - 636.4890179999929, - 749.8459399999992, - 843.7963920000184, - 954.4336659999972, - 832.0990410000086, - 1032.0874679999833, - 821.3709840000083, - 1015.1588630000188, - 863.0327269999834, - 822.9012649999931, - 809.6065790000139, - 784.3109699999914, - 764.6760239999858, - 759.7656380000117, - 771.6728129999829, - 808.5590040000097, - 754.5102199999965, - 746.8221379999886, - 970.76864200001, - 815.9345139999932, - 774.1066239999782, - 647.558469999989, - 822.1077360000054, - 665.074397999997, - 615.5102629999747, - 547.1192079999892, - 751.1062209999945, - 745.0175610000151, - 769.2615410000144, - 801.1414489999879, - 832.0854410000029, - 873.8017920000129, - 894.1110950000002, - 754.5598749999772, - 963.0456870000053, - 767.2514040000096, - 747.488932999986, - 603.5553589999909, - 815.251139, - 725.8023899999971, - 680.28706100001, - 863.1231609999959, - 823.6045979999762, - 833.3490710000042, - 648.5785810000089, - 832.7963979999768, - 985.5524589999986, - 648.939469999983, - 828.9139389999909, - 678.3620070000179, - 638.3930939999991, - 624.4096619999909, - 600.2184030000062, - 588.0863369999861, - 574.9842460000073, - 569.6743940000015, - 561.5410130000091, - 490.4215879999974, - 614.8851609999838, - 548.8505920000025, - 541.2790350000141, - 482.5773749999935, - 610.8624420000124, - 538.9110459999938, - 531.0134390000021, - 470.2814729999809, - 582.6069110000099, - 507.53984399998444, - 501.71045099999174, - 491.3235240000067, - 481.027145, - 467.6670929999964, - 469.0876280000084, - 461.76386499998625, - 461.91875700000674, - 461.2331359999953, - 454.89157799998065, - 452.35778999998, - 398.13537199998973, - 503.6310100000119, - 448.25439300001017, - 455.5842709999997, - 454.1709689999989, - 515.7321129999764, - 581.3550080000132, - 639.3980779999983, - 617.9499329999962, - 752.0941889999958, - 732.9380939999828, - 776.2893039999763, - 854.4924180000089, - 847.485480000003, - 837.6289059999981, - 670.1778019999911, - 939.5449899999949, - 945.8137690000003 - ] - } - ] - }, - { - "runtime": "go", - "repeat": 1, - "fixture": "2 MiB binary", - "inputBytes": 2097152, - "outputBytes": 2097152, - "outputSHA256": "5647f05ec18958947d32874eeb788fa396a05d0bab7c1b71f112ceb7e9b31eee", - "cold": { - "requests": 7, - "concurrency": 1, - "elapsedMs": 405.3092550000001, - "requestsPerSecond": 17.270762790748506, - "p50Ms": 57.51114600000437, - "p95Ms": 76.77849900000729, - "maxMs": 76.77849900000729, - "p95TTFBMs": 46.43207499998971, - "cpuMs": 300, - "peakProcessTreeRssBytes": 80695296, - "samplesMs": [ - 76.77849900000729, - 57.51114600000437, - 58.78197199999704, - 53.05387800000608, - 59.60982499999227, - 49.46536600001855, - 49.13906899999711 - ] - }, - "warm": [ - { - "requests": 100, - "concurrency": 1, - "elapsedMs": 4445.635650000011, - "requestsPerSecond": 22.493971137738143, - "p50Ms": 44.13252299997839, - "p95Ms": 51.178209000005154, - "maxMs": 60.302138999977615, - "p95TTFBMs": 22.951461999997264, - "cpuMs": 2800, - "peakProcessTreeRssBytes": 102572032, - "samplesMs": [ - 47.7185349999927, - 48.31020099998568, - 49.64122900000075, - 54.00095399998827, - 40.97152600000845, - 44.29932600000757, - 42.62536999999429, - 39.08139599999413, - 44.16027000002214, - 40.93990299999132, - 47.26738699999987, - 40.879404000006616, - 47.49951599998167, - 46.94975100000738, - 46.87741400001687, - 49.2135240000207, - 43.285665000003064, - 45.526433999999426, - 47.01911399999517, - 44.56122800000594, - 46.32226799998898, - 42.420386999991024, - 42.17204000000493, - 43.50250000000233, - 46.378012000001036, - 46.5952620000171, - 44.93340499998885, - 40.84046700000181, - 47.344945999997435, - 44.171308999997564, - 47.56044400000246, - 46.16312299997662, - 46.13385800001561, - 60.302138999977615, - 40.97325300000375, - 42.75376600000891, - 41.553570000018226, - 40.23454099998344, - 39.22219800000312, - 41.55586499997298, - 37.045750999997836, - 41.34039700002177, - 41.0766650000005, - 52.06323499997961, - 41.197675999981584, - 44.90680799999973, - 44.10140300000785, - 44.059465999976965, - 44.13252299997839, - 42.97973799999454, - 46.96538400001009, - 43.09878900001058, - 41.65030499998829, - 51.178209000005154, - 46.13198299999931, - 40.795432999992045, - 39.58238600002369, - 43.549537999992026, - 44.09505800000625, - 47.20380300001125, - 41.872082999994745, - 46.912017999973614, - 40.77384300000267, - 55.60430400000769, - 44.711871999985306, - 42.5905849999981, - 40.16597400000319, - 40.53358799999114, - 41.54118899998139, - 47.92901100000017, - 45.72708699997747, - 48.61713500000769, - 48.03325500001665, - 45.64400699999533, - 46.88954599999124, - 46.034740000002785, - 42.125571999989916, - 41.672901000012644, - 41.46151500000269, - 45.019690999994054, - 46.52817299999879, - 42.18342000001576, - 42.75807499999064, - 49.519161999982316, - 48.89359400002286, - 49.80087800000911, - 50.10282100000768, - 45.43781699999818, - 47.748835999984294, - 49.90032700001029, - 53.24643400000059, - 39.48300599999493, - 39.093124000006355, - 36.71735799999442, - 37.85255999999936, - 38.967035000008764, - 36.97891800000798, - 33.92985700001009, - 36.48780900001293, - 33.544997000019066 - ] - }, - { - "requests": 100, - "concurrency": 8, - "elapsedMs": 2174.6425739999977, - "requestsPerSecond": 45.984568312787985, - "p50Ms": 165.56519200000912, - "p95Ms": 321.65767600000254, - "maxMs": 336.9372319999966, - "p95TTFBMs": 166.5997250000073, - "cpuMs": 2190, - "peakProcessTreeRssBytes": 120713216, - "samplesMs": [ - 163.74313099999563, - 164.73048800000106, - 164.02983900002437, - 165.44475900000543, - 165.5178560000204, - 165.56519200000912, - 335.94278200002736, - 336.9372319999966, - 175.1191220000037, - 174.90915299998596, - 174.88549299997976, - 174.54879899998195, - 174.49106600001687, - 174.56432700000005, - 40.3599530000065, - 150.50151099998038, - 152.81551400001626, - 153.9500640000042, - 204.25634100000025, - 322.705335000006, - 321.65767600000254, - 323.51965299999574, - 323.2431210000068, - 198.66635899999528, - 198.7157189999998, - 198.8581590000249, - 106.3188970000192, - 137.21287499999744, - 136.15742500001215, - 137.27987599998596, - 138.28052500000922, - 178.7289200000232, - 278.4851149999886, - 280.0836450000061, - 279.1802289999905, - 189.84963199999765, - 189.89430000001448, - 189.70936099998653, - 189.64920600000187, - 121.92750300001353, - 134.8706339999917, - 136.5195309999981, - 135.77124100000947, - 201.50256100000115, - 275.3969020000077, - 274.6766719999723, - 275.99955800001044, - 276.0379279999761, - 184.82487599999877, - 184.6566199999943, - 184.6353989999916, - 96.96196300000884, - 126.14155099997879, - 127.7232859999931, - 128.84447999999975, - 128.13615399997798, - 165.0805190000101, - 257.856059999991, - 259.6625859999913, - 259.55584600000293, - 178.4873020000232, - 178.4089630000235, - 178.40093899998465, - 178.3574260000023, - 118.09158400000888, - 125.30700199998682, - 127.06348700000672, - 126.61233599999105, - 162.2280960000062, - 206.9452229999879, - 206.05029699997976, - 206.8351509999775, - 207.70825900000636, - 127.78179900001851, - 127.76943899999605, - 127.77652600000147, - 67.1060320000106, - 97.99964500000351, - 97.2473839999875, - 97.90787100000307, - 98.70635999998194, - 116.87779999998747, - 178.38781200000085, - 178.1585849999974, - 178.79842799998005, - 120.1547229999851, - 120.20788900001207, - 120.20210600001155, - 120.20603999999003, - 78.17494200001238, - 99.94366200000513, - 100.16659800001071, - 101.31902200001059, - 146.90780499999528, - 175.54513099999167, - 176.16504500000156, - 175.24941099999705, - 175.6703639999905, - 93.27194999999483, - 92.88884699999471 - ] - } - ] - }, - { - "runtime": "node", - "repeat": 1, - "fixture": "2 MiB binary", - "inputBytes": 2097152, - "outputBytes": 2097152, - "outputSHA256": "5647f05ec18958947d32874eeb788fa396a05d0bab7c1b71f112ceb7e9b31eee", - "cold": { - "requests": 7, - "concurrency": 1, - "elapsedMs": 535.9968179999851, - "requestsPerSecond": 13.059779022792995, - "p50Ms": 64.41268300000229, - "p95Ms": 140.8395759999985, - "maxMs": 140.8395759999985, - "p95TTFBMs": 114.28479899998638, - "cpuMs": 590, - "peakProcessTreeRssBytes": 260444160, - "samplesMs": [ - 140.8395759999985, - 66.1566429999948, - 60.25640900002327, - 63.087446999998065, - 63.00963499999489, - 64.41268300000229, - 77.24556599999778 - ] - }, - "warm": [ - { - "requests": 100, - "concurrency": 1, - "elapsedMs": 4896.763104000012, - "requestsPerSecond": 20.4216536263135, - "p50Ms": 47.082858000008855, - "p95Ms": 60.91815000001225, - "maxMs": 76.64955000000191, - "p95TTFBMs": 32.66710299998522, - "cpuMs": 6180, - "peakProcessTreeRssBytes": 330604544, - "samplesMs": [ - 48.88266000000294, - 50.242044999991776, - 51.26722300000256, - 46.309729000000516, - 50.57721099999617, - 53.28957100000116, - 49.09415699998499, - 49.90323600001284, - 54.756798999995226, - 53.76676499997848, - 59.592379000008805, - 56.127072999981465, - 60.91815000001225, - 60.70575199997984, - 50.27757800000836, - 51.251373000006424, - 71.3433199999854, - 57.769518999994034, - 49.758122999977786, - 47.28843700001016, - 49.35365000000456, - 47.082858000008855, - 49.482242999976734, - 48.294312000012724, - 47.58005599997705, - 48.99694400001317, - 46.65720799998962, - 48.43623099999968, - 54.06854000000749, - 59.433356000023196, - 48.595174999994924, - 46.16096499998821, - 48.099184999999125, - 48.2627789999824, - 44.57875600000261, - 43.96985000002314, - 43.8571660000016, - 43.76913699999568, - 42.68608200000017, - 44.03506299998844, - 43.08258200000273, - 44.131583000009414, - 45.410914999985835, - 42.819083000009414, - 43.20209999999497, - 45.72258700002567, - 53.01216199999908, - 42.34023299999535, - 55.95867199997883, - 41.31500100000994, - 41.07608899998013, - 41.6807250000129, - 45.40546800001175, - 54.416299000004074, - 44.70487600000342, - 51.62475899999845, - 76.64955000000191, - 60.1061950000003, - 46.61906200001249, - 44.76783200001228, - 45.661510000005364, - 55.62981700000819, - 48.0562440000067, - 45.69067700000596, - 56.009193000005325, - 72.60119100002339, - 45.22104999999283, - 45.887194999988424, - 52.23672799998894, - 46.51347900001565, - 41.486462000000756, - 52.950436000013724, - 45.41034400000353, - 43.66635899999528, - 44.36441599999671, - 38.721063000004506, - 37.83615099999588, - 38.10657199998968, - 39.3201640000043, - 63.94175399999949, - 45.73753799998667, - 41.571323000011034, - 40.40764200000558, - 42.92076800001087, - 43.812673000007635, - 46.90421799998148, - 41.93721199998981, - 42.54100200001267, - 53.25021200001356, - 34.53816199998255, - 44.55456099999719, - 44.67570799999521, - 63.197369999979855, - 48.80941799998982, - 60.38724199999706, - 53.29281800001627, - 50.64784000001964, - 42.98481500000344, - 42.018439999985276, - 49.068857000005664 - ] - }, - { - "requests": 100, - "concurrency": 8, - "elapsedMs": 2688.637199000019, - "requestsPerSecond": 37.193564099013756, - "p50Ms": 203.30466700001853, - "p95Ms": 319.2420700000075, - "maxMs": 355.6663210000261, - "p95TTFBMs": 188.8521409999812, - "cpuMs": 4640, - "peakProcessTreeRssBytes": 334831616, - "samplesMs": [ - 205.64953300001798, - 223.41912100001355, - 226.9829960000061, - 228.77735999997822, - 229.07686800000374, - 303.7323949999991, - 312.67017399999895, - 315.20041599997785, - 199.23115700000199, - 203.30466700001853, - 206.4861530000053, - 210.44858500000555, - 213.36122300001443, - 196.71615200000815, - 190.60143099998822, - 196.08222199999727, - 215.15029300001333, - 189.2446340000024, - 282.11721399999806, - 283.7398619999876, - 280.2240949999832, - 279.2315640000161, - 285.87533700000495, - 278.08705900001223, - 239.17415500001516, - 228.2726370000164, - 155.9022039999836, - 147.99264599999879, - 145.92117200000212, - 158.7187649999978, - 158.52323300001444, - 158.41036500001792, - 188.71048899999005, - 239.9611370000057, - 250.9900300000154, - 250.34817699997802, - 253.4589440000127, - 195.6589249999961, - 203.165279000008, - 204.3755050000036, - 117.80118499998935, - 181.3820789999736, - 181.66839299999992, - 183.18327300000237, - 191.98214600002393, - 235.3902830000152, - 238.24275699999998, - 239.38337399999727, - 238.43369999999413, - 189.72337100000004, - 199.30984799997532, - 217.73348999998416, - 207.6891820000019, - 140.26411799999187, - 151.22798700002022, - 140.49220400000922, - 175.14404699997976, - 191.487043000001, - 245.06415700001526, - 218.8173620000016, - 319.2420700000075, - 292.0560220000043, - 293.92741699999897, - 355.6663210000261, - 304.8532529999793, - 229.2567310000013, - 218.6698739999847, - 204.3279390000098, - 150.79752300001564, - 143.4246109999949, - 143.20880599998054, - 112.39388200000394, - 112.33414799999446, - 141.79669199997443, - 151.72815100001753, - 163.3294220000098, - 171.949632999982, - 177.25484300000244, - 191.03017400001409, - 186.21935299999313, - 189.08795799998916, - 191.3386869999813, - 184.87571600000956, - 206.34633399997256, - 245.72931700001936, - 327.55784799999674, - 350.9593579999928, - 328.96986499999184, - 332.02152899999055, - 243.64861299999757, - 228.76268099999288, - 217.8233210000035, - 192.59480700001586, - 154.50234500001534, - 81.815769000008, - 104.12921899999492, - 103.66531199999736, - 146.09242199998698, - 147.03660500000115, - 145.9793430000136 - ] - } - ] - }, - { - "runtime": "node", - "repeat": 2, - "fixture": "64 KiB changed text", - "inputBytes": 65538, - "outputBytes": 69179, - "outputSHA256": "27668dd82518eacd8514d91acc8cb366ad6cee5fb4c72e126b76ae02fad79c34", - "cold": { - "requests": 7, - "concurrency": 1, - "elapsedMs": 696.1150559999805, - "requestsPerSecond": 10.055808935125512, - "p50Ms": 73.33486000000266, - "p95Ms": 228.35993599999347, - "maxMs": 228.35993599999347, - "p95TTFBMs": 224.38039800000843, - "cpuMs": 770, - "peakProcessTreeRssBytes": 256831488, - "samplesMs": [ - 228.35993599999347, - 93.91066500000306, - 103.12221400000271, - 73.33486000000266, - 67.43179800000507, - 66.408036000008, - 62.546578999987105 - ] - }, - "warm": [ - { - "requests": 100, - "concurrency": 1, - "elapsedMs": 4101.185893999995, - "requestsPerSecond": 24.383191248731073, - "p50Ms": 38.32857499999227, - "p95Ms": 57.22557300000335, - "maxMs": 93.44993599998998, - "p95TTFBMs": 56.23209500001394, - "cpuMs": 4430, - "peakProcessTreeRssBytes": 327520256, - "samplesMs": [ - 50.335705999983475, - 49.07626300002448, - 58.87568999998621, - 56.75896799998009, - 50.8051470000064, - 53.475130999984685, - 48.925193000002764, - 44.45400800000061, - 50.17178800000693, - 48.21123600000283, - 55.525797000009334, - 61.62899900000775, - 60.342032000015024, - 57.067901000002166, - 93.44993599998998, - 61.95682799999486, - 46.49412400001893, - 44.67659899999853, - 41.528381999989506, - 50.55862399999751, - 51.855381000001216, - 39.46270699999877, - 34.2238200000138, - 33.127020999992965, - 31.66889399997308, - 31.313609000004362, - 32.398153999994975, - 31.36631800001487, - 31.25821200001519, - 31.614150999987032, - 32.39108599998872, - 32.49694000001182, - 33.0036020000116, - 32.47041900001932, - 33.57128000000375, - 31.915612000011606, - 32.67708799999673, - 29.756717000011122, - 36.636235999991186, - 40.93673600000329, - 46.99282400001539, - 38.70506400000886, - 38.91852400000789, - 32.65601800000877, - 34.35166300000856, - 36.83887700000196, - 34.29811000000336, - 34.7005680000002, - 34.95584800001234, - 34.5833949999942, - 38.51777800000855, - 38.68632199999411, - 41.21791800000938, - 39.359645999997156, - 40.823592999979155, - 42.22492300000158, - 45.694124000001466, - 37.494518999999855, - 36.36569199999212, - 42.17341899999883, - 42.81848600000376, - 35.65559999999823, - 41.329372000007425, - 35.29091999999946, - 35.30916299999808, - 35.121684000012465, - 33.03953500001808, - 36.19404599998961, - 34.14511599999969, - 38.32857499999227, - 36.72504099999787, - 36.081712000013795, - 41.795747000025585, - 36.70236100000329, - 38.107585999998264, - 36.30234299998847, - 35.26046399999177, - 34.07579699999769, - 35.50122599999304, - 34.210419000010006, - 34.51888200000394, - 33.53827000001911, - 36.66179800001555, - 39.96572099998593, - 45.86089900002116, - 42.06887600000482, - 40.71782299998449, - 37.646822000009706, - 43.41101700000581, - 43.146804000018165, - 37.65019200000097, - 37.083190000004834, - 44.90161599998828, - 39.61945600001491, - 40.40422400002717, - 37.97477499998058, - 42.61855300000752, - 40.06641200001468, - 43.35018800001126, - 57.22557300000335 - ] - }, - { - "requests": 100, - "concurrency": 8, - "elapsedMs": 2019.3468609999982, - "requestsPerSecond": 49.52096241181623, - "p50Ms": 154.9598989999795, - "p95Ms": 209.35862199999974, - "maxMs": 228.0663979999954, - "p95TTFBMs": 208.2615769999975, - "cpuMs": 2580, - "peakProcessTreeRssBytes": 334082048, - "samplesMs": [ - 142.42356300001848, - 148.45140900000115, - 157.21075399999972, - 170.29132799999206, - 184.3942429999879, - 189.62767300000996, - 195.95948200000566, - 216.70901900000172, - 141.78996500000358, - 130.99189200002002, - 154.9598989999795, - 138.3429269999906, - 124.8960360000201, - 136.77086100002634, - 147.57929200000945, - 142.71043799998006, - 129.41860500001349, - 136.55988200000138, - 129.82016100001056, - 144.37776299999678, - 129.3290959999722, - 141.47777699999278, - 133.6298999999999, - 130.95136200002162, - 134.83496500001638, - 131.57231399999, - 120.99605899999733, - 135.60584499998367, - 124.92850499998895, - 119.49183700000867, - 127.58310200000415, - 121.21647699997993, - 112.11283899997943, - 108.69931399999768, - 110.54095899997628, - 108.88468899999862, - 102.2564490000077, - 101.19836400001077, - 116.63464699999895, - 114.14163399999961, - 106.30441000001156, - 120.39218699999037, - 114.10349599999608, - 117.84097399999155, - 116.61993300000904, - 120.79984999998123, - 137.12140000000363, - 154.85367000001133, - 184.75465600000462, - 193.72313699999359, - 195.50397000001976, - 210.68481200002134, - 209.35862199999974, - 217.85540400000173, - 228.0663979999954, - 216.95451999999932, - 199.6025630000222, - 200.46926300000632, - 177.76898699998856, - 193.2585100000142, - 179.48966999998083, - 204.01332599998568, - 191.81501600000774, - 186.48843900000793, - 186.43661300002714, - 160.31757399998605, - 177.11261899999226, - 190.69856499999878, - 191.6161489999795, - 189.48921199998586, - 183.78803399999742, - 194.360915999976, - 184.050046999997, - 185.4756359999883, - 199.70863700000336, - 190.1722890000092, - 184.55918199999724, - 185.50966700000572, - 181.40814500002307, - 191.16032900000573, - 186.9724479999859, - 169.92073799998616, - 193.09413400001358, - 191.27960599999642, - 184.95601000002353, - 197.57815099999425, - 186.63185000000522, - 171.05185899999924, - 154.87725099999807, - 166.66040500000236, - 162.0141580000054, - 161.84465199999977, - 154.03252000000793, - 167.01415300002554, - 151.58550399998785, - 141.41644400000223, - 116.59658800001489, - 127.06162899997435, - 112.92069400000037, - 108.75227200001245 - ] - } - ] - }, - { - "runtime": "go", - "repeat": 2, - "fixture": "64 KiB changed text", - "inputBytes": 65538, - "outputBytes": 69179, - "outputSHA256": "27668dd82518eacd8514d91acc8cb366ad6cee5fb4c72e126b76ae02fad79c34", - "cold": { - "requests": 7, - "concurrency": 1, - "elapsedMs": 447.7435150000092, - "requestsPerSecond": 15.633950611210652, - "p50Ms": 61.25102799999877, - "p95Ms": 81.840228999994, - "maxMs": 81.840228999994, - "p95TTFBMs": 76.82921100000385, - "cpuMs": 400, - "peakProcessTreeRssBytes": 98557952, - "samplesMs": [ - 81.840228999994, - 66.20905000000494, - 61.25102799999877, - 55.27293800000916, - 64.00087799999164, - 60.0040990000125, - 57.95238999999128 - ] - }, - "warm": [ - { - "requests": 100, - "concurrency": 1, - "elapsedMs": 1906.4702059999981, - "requestsPerSecond": 52.452957137899325, - "p50Ms": 18.618026999989524, - "p95Ms": 22.238894000009168, - "maxMs": 27.927504999999655, - "p95TTFBMs": 19.888360999990255, - "cpuMs": 1400, - "peakProcessTreeRssBytes": 107298816, - "samplesMs": [ - 21.996573999989778, - 24.368653999990784, - 21.878281000012066, - 23.361220999999205, - 22.567479999997886, - 24.000708999985363, - 22.22173899997142, - 21.34713800001191, - 19.29022199998144, - 18.45636799998465, - 18.77107899999828, - 18.851687999995193, - 17.303309000009904, - 16.801705999998376, - 17.018223000020953, - 18.29834799998207, - 19.87632599999779, - 20.529555999994045, - 21.554341999988537, - 18.522393999999622, - 18.618026999989524, - 19.193960000004154, - 19.350405999983195, - 19.5058629999985, - 21.614474999980303, - 19.17882999998983, - 19.29191300002276, - 16.75108899999759, - 16.818468000012217, - 17.909791999991285, - 18.664809000008972, - 18.128106999996817, - 18.146607999980915, - 16.989291000005323, - 18.593091999995522, - 17.367273999989266, - 16.558720000000903, - 16.652077000006102, - 19.917006000003312, - 18.907952000008663, - 19.513057999982266, - 16.713580000010552, - 18.123603999993065, - 18.19072800001595, - 16.614306999981636, - 16.862782999989577, - 17.0847960000101, - 17.5674810000055, - 17.26821499998914, - 17.88649699999951, - 18.355039999994915, - 17.25794899999164, - 19.10401800001273, - 17.837831999990158, - 17.491508000006434, - 20.0027870000049, - 19.06847700002254, - 18.838852999993833, - 18.63282800000161, - 19.151998999994248, - 19.929043999989517, - 18.81223900002078, - 27.927504999999655, - 18.88262200000463, - 19.679509999987204, - 17.766058000008343, - 18.460863999993308, - 18.7659660000063, - 19.761607000022195, - 20.095493000000715, - 20.722801999974763, - 19.115348999999696, - 17.539231000002474, - 18.859937000001082, - 18.29951000001165, - 18.415529999998398, - 17.906886000011582, - 17.199809999990975, - 18.78875199999311, - 18.025957999983802, - 18.50311699998565, - 17.426986000005854, - 18.584388000017498, - 19.35439100000076, - 22.238894000009168, - 19.269899000006262, - 19.342382000002544, - 18.890898999990895, - 17.57238500000676, - 18.06409800000256, - 15.467246000014711, - 18.102601000020513, - 18.50127100001555, - 18.520893999986583, - 19.643874000001233, - 17.932583999994677, - 18.115141000016592, - 18.26862099999562, - 20.231884000007994, - 20.66706000000704 - ] - }, - { - "requests": 100, - "concurrency": 8, - "elapsedMs": 1176.4738819999911, - "requestsPerSecond": 84.99976202616689, - "p50Ms": 91.50240299999132, - "p95Ms": 99.68520099998568, - "maxMs": 104.96667600001092, - "p95TTFBMs": 96.79592299999786, - "cpuMs": 1410, - "peakProcessTreeRssBytes": 134053888, - "samplesMs": [ - 22.15816600000835, - 32.30861399997957, - 42.15844999998808, - 52.50425900000846, - 63.58078500002739, - 74.15314100001706, - 93.99502400000347, - 104.96667600001092, - 94.94839899998624, - 95.48840800000471, - 96.8870889999962, - 98.47302299999865, - 99.57812600000761, - 99.68520099998568, - 91.78154900000663, - 92.05401500000153, - 93.16798299999209, - 93.08305699998164, - 92.1897609999869, - 92.21198799999547, - 93.30030200001784, - 93.20546299999114, - 92.6152010000078, - 91.57267200000933, - 91.46145900001284, - 91.49662300001364, - 91.11719399999129, - 92.20689199998742, - 90.97454100000323, - 91.50240299999132, - 90.73468700001831, - 90.64063500001794, - 89.59143299999414, - 89.90493200000492, - 89.87398299999768, - 89.15670900000259, - 88.43724200001452, - 87.86083700001473, - 88.69266999998945, - 89.66401000000769, - 90.37195899998187, - 89.78643999999622, - 89.78685200001928, - 87.96770300000207, - 88.35387600000831, - 89.8128929999948, - 89.50037300001713, - 90.20496400000411, - 91.13993100001244, - 91.32906200000434, - 90.89340100000845, - 92.06203600001754, - 91.4382489999989, - 90.62603200000012, - 90.62719699999434, - 90.19891599999391, - 89.27213700002176, - 89.93653300000005, - 92.85063699999591, - 92.9946340000024, - 94.33034399998724, - 93.94627200000104, - 95.71663199999603, - 95.17562299998826, - 95.85719400001108, - 97.28251499999897, - 97.15661700000055, - 97.31640800001333, - 97.6627870000084, - 98.0936539999966, - 98.52403600001708, - 98.40160399998422, - 99.30383799999254, - 98.09345400001621, - 96.17816399998264, - 95.84187100001145, - 94.09795199998189, - 93.19735699999728, - 91.97084100000211, - 91.58651999998256, - 89.40713700000197, - 88.94149899997865, - 90.14127900000312, - 88.83441199999652, - 89.06560500001069, - 89.10541200000443, - 88.73786799999652, - 87.3812109999999, - 87.78647999998066, - 88.52467300000717, - 88.06666900002165, - 91.30096999998204, - 93.60516900001676, - 95.10795999999391, - 96.3028270000068, - 99.45618500001729, - 100.53946200001519, - 103.30798299997696, - 103.28682699997444, - 103.03328699999838 - ] - } - ] - }, - { - "runtime": "node", - "repeat": 2, - "fixture": "2 MiB absent terms", - "inputBytes": 2097154, - "expectedOutputSHA256": "061bcb1e32dd40f88b2c69eceda3df06d034f42367863b92d9c7e6f2bba1258a", - "status": "failed", - "httpStatus": 500, - "failure": "DataCloneError: persisted term array cannot be cloned into the anonymization worker" - }, - { - "runtime": "go", - "repeat": 2, - "fixture": "2 MiB absent terms", - "inputBytes": 2097154, - "outputBytes": 2097154, - "outputSHA256": "061bcb1e32dd40f88b2c69eceda3df06d034f42367863b92d9c7e6f2bba1258a", - "cold": { - "requests": 7, - "concurrency": 1, - "elapsedMs": 1295.8800800000026, - "requestsPerSecond": 5.401734395052963, - "p50Ms": 179.61519199999748, - "p95Ms": 213.37400300000445, - "maxMs": 213.37400300000445, - "p95TTFBMs": 177.9168789999967, - "cpuMs": 1200, - "peakProcessTreeRssBytes": 93532160, - "samplesMs": [ - 213.37400300000445, - 179.61519199999748, - 181.24581600000965, - 178.57289500001934, - 192.38811700002407, - 175.8508589999983, - 173.65761200000998 - ] - }, - "warm": [ - { - "requests": 100, - "concurrency": 1, - "elapsedMs": 9455.586542000005, - "requestsPerSecond": 10.575758527069484, - "p50Ms": 93.61773099997663, - "p95Ms": 109.30174200001056, - "maxMs": 135.20691599999554, - "p95TTFBMs": 78.87581800000044, - "cpuMs": 7900, - "peakProcessTreeRssBytes": 98000896, - "samplesMs": [ - 98.29322399999364, - 106.10798400000203, - 91.48346900002798, - 91.0484240000078, - 97.4759250000061, - 97.26759499998298, - 92.06341600001906, - 102.16614200000186, - 91.7105819999997, - 93.80351699999301, - 98.2656030000071, - 117.4221120000002, - 94.07957100000931, - 93.98468500000308, - 95.20362299997942, - 102.5792669999937, - 93.74963800000842, - 98.60120299999835, - 91.76004900000407, - 101.09931499999948, - 88.65397099999245, - 100.49661000000197, - 109.30174200001056, - 93.61773099997663, - 89.95788199998788, - 91.73011199999019, - 95.17484999998123, - 98.93107900000177, - 103.25408600000083, - 92.10121200000867, - 88.29379599998356, - 88.90683500000159, - 88.46303400001489, - 89.5503730000055, - 89.98606299998937, - 93.01057100002072, - 79.31402000001981, - 90.59739199999603, - 90.7745710000163, - 113.97344899998279, - 91.25884699999006, - 84.89652399998158, - 93.5437990000064, - 84.50068100000499, - 89.42778300002101, - 93.41358299998683, - 96.19002300000284, - 89.3228479999816, - 94.3940939999884, - 91.2620599999791, - 83.36023599997861, - 95.24958899998455, - 96.83263699998497, - 92.09076099999947, - 94.10876599999028, - 100.41099799997755, - 94.3272279999801, - 104.7233080000151, - 99.45686000000569, - 98.88784300000407, - 105.10283600000548, - 93.49389599999995, - 93.51997300001676, - 95.71785200000159, - 95.32471600000281, - 89.75143900001422, - 92.14712800001143, - 93.84267300000647, - 94.9662520000129, - 95.30966599998646, - 91.68266900000162, - 96.9270410000172, - 91.03718100002152, - 135.20691599999554, - 108.51568499999121, - 121.96630000000005, - 92.7616080000007, - 97.34536199999275, - 95.77543800001149, - 90.5512709999748, - 92.76045800000429, - 113.6679839999997, - 94.27099200000521, - 97.4589879999985, - 95.15778499998851, - 84.80041600001277, - 64.91677900002105, - 68.47834800000419, - 93.73249100000248, - 88.6568359999801, - 99.13093200000003, - 86.90751599997748, - 93.48882900000899, - 86.66380200002459, - 92.1200489999901, - 101.18704699998489, - 80.68218099998194, - 89.5254169999971, - 81.45441400000709, - 74.07360100001097 - ] - }, - { - "requests": 100, - "concurrency": 8, - "elapsedMs": 7256.088069999998, - "requestsPerSecond": 13.781530631284086, - "p50Ms": 577.45735099999, - "p95Ms": 603.8920930000022, - "maxMs": 617.9827649999934, - "p95TTFBMs": 579.9457430000184, - "cpuMs": 7690, - "peakProcessTreeRssBytes": 125169664, - "samplesMs": [ - 92.77372700002161, - 164.49909299999126, - 237.80494099998032, - 309.77218699999503, - 389.45890300002065, - 458.06570700000157, - 528.8203259999864, - 600.528415000008, - 577.45735099999, - 576.8792740000063, - 593.1724659999891, - 584.2408320000104, - 574.5550180000137, - 592.6736019999953, - 593.8744700000098, - 599.82441500001, - 597.2241459999932, - 607.7313030000078, - 590.2357070000144, - 602.8336200000194, - 617.9827649999934, - 612.4810839999991, - 611.253945000004, - 601.396968999994, - 594.3834050000005, - 582.3528240000014, - 578.9933129999845, - 568.6101579999959, - 549.3515520000074, - 536.451505999983, - 531.3484779999999, - 532.5163830000092, - 554.2242700000061, - 553.2253729999939, - 565.3595839999907, - 576.969975999993, - 581.7495939999935, - 583.8675900000089, - 585.4227430000028, - 591.8797370000102, - 577.9889069999917, - 577.3076890000084, - 568.9224119999853, - 567.6867940000084, - 566.2006779999938, - 565.4887180000078, - 568.2734999999811, - 561.8677950000274, - 563.4134719999856, - 570.7812530000228, - 564.3547100000142, - 557.5893700000015, - 560.1632030000037, - 564.2855879999988, - 568.2236930000072, - 574.9721330000029, - 580.7395359999791, - 567.339432000008, - 573.6037990000041, - 579.7390769999765, - 578.8990080000076, - 580.0226269999985, - 575.6544770000037, - 576.1251340000017, - 594.5995939999993, - 601.0139980000095, - 592.8442519999808, - 591.311944999994, - 587.3001369999838, - 581.0764170000039, - 585.2084130000148, - 587.2113550000067, - 569.9684499999858, - 604.0058290000015, - 603.8920930000022, - 597.112947000016, - 597.4081480000168, - 603.862202999997, - 601.2080450000067, - 588.7583320000267, - 577.1848170000012, - 543.1287500000035, - 543.2924130000174, - 557.5514149999944, - 561.9134489999851, - 566.9932870000193, - 565.7391840000055, - 568.986757000006, - 573.2445460000017, - 577.5640199999907, - 589.8779930000019, - 576.9525430000213, - 584.3154500000237, - 573.9721459999855, - 579.8996430000116, - 580.7860350000265, - 586.245831999986, - 591.0076910000062, - 583.0664809999871, - 582.9601609999954 - ] - } - ] - }, - { - "runtime": "node", - "repeat": 2, - "fixture": "128 KiB JS boundary regex", - "inputBytes": 131072, - "outputBytes": 147456, - "outputSHA256": "580155666affe445ac48846f3c178f45b3b75ec89815cc49fad08035415e8117", - "cold": { - "requests": 7, - "concurrency": 1, - "elapsedMs": 1322.289195999998, - "requestsPerSecond": 5.293849500680644, - "p50Ms": 161.29650200001197, - "p95Ms": 353.729926, - "maxMs": 353.729926, - "p95TTFBMs": 351.2548719999904, - "cpuMs": 1760, - "peakProcessTreeRssBytes": 309207040, - "samplesMs": [ - 353.729926, - 183.88939100000425, - 149.42880799999693, - 166.58734100000584, - 148.02453799999785, - 161.29650200001197, - 158.509080000018 - ] - }, - "warm": [ - { - "requests": 100, - "concurrency": 1, - "elapsedMs": 10938.85329900001, - "requestsPerSecond": 9.141726035318678, - "p50Ms": 118.49648900001193, - "p95Ms": 146.98564400000032, - "maxMs": 160.8480790000176, - "p95TTFBMs": 145.4001940000162, - "cpuMs": 11400, - "peakProcessTreeRssBytes": 339972096, - "samplesMs": [ - 137.51810200000182, - 94.55868700001156, - 88.52654500000062, - 89.82107400000677, - 94.90126600000076, - 95.19247499998892, - 82.33221500000218, - 75.87638400000287, - 76.41712100000586, - 127.37401599998702, - 138.41148700000485, - 139.82530399999814, - 141.79254500000388, - 152.45127700001467, - 126.18481499998597, - 87.3406590000086, - 87.4522280000092, - 82.76060000000871, - 134.7635339999979, - 146.00908600000548, - 138.7408600000199, - 146.00975900000776, - 138.31194700000924, - 98.72397099999944, - 81.55753600000753, - 83.15953000000445, - 82.22599700000137, - 81.8183929999941, - 85.31664500001352, - 75.5282780000125, - 133.11264100001426, - 138.57617100002244, - 123.65360200000578, - 126.26179099999717, - 75.44934200000716, - 75.42834900002345, - 74.45021700000507, - 80.59121799998684, - 78.95147500000894, - 85.97497899999144, - 78.49334499999532, - 74.22934799999348, - 75.51648699998623, - 75.76557000001776, - 76.5871089999855, - 77.14450100000249, - 75.11852300001192, - 76.76541499997256, - 138.0890220000001, - 128.36118599999463, - 124.73073399998248, - 125.30151299998397, - 127.50190299999667, - 136.17924500000663, - 92.75844100001268, - 83.72874500000034, - 85.16132800001651, - 135.80553499999223, - 142.05707100001746, - 122.12429000000702, - 127.45143600000301, - 135.43273700002464, - 120.90970499999821, - 98.37821899997653, - 126.33598500001244, - 130.0133799999894, - 134.64878400001908, - 148.88865500001702, - 132.09729599999264, - 146.98564400000032, - 134.5159430000058, - 131.69972699999926, - 149.40721600002144, - 158.85049699997762, - 160.8480790000176, - 140.61913899998763, - 138.86289700001362, - 131.79781299998285, - 129.51808700000402, - 129.30496700000367, - 133.21539800000028, - 96.32300100001157, - 88.51458300001104, - 143.31786399998236, - 136.20542700000806, - 139.47630799998296, - 118.49648900001193, - 119.17756599999848, - 119.3934790000203, - 100.31449900000007, - 77.70397100000991, - 77.35508199999458, - 78.293955000001, - 77.62700700000278, - 80.10827899997821, - 77.67034700000659, - 74.73492600000463, - 74.14217000000644, - 74.50550999998813, - 79.13113100000191 - ] - }, - { - "requests": 100, - "concurrency": 8, - "elapsedMs": 8204.154135999997, - "requestsPerSecond": 12.188947006882518, - "p50Ms": 592.4826140000077, - "p95Ms": 952.0332050000143, - "maxMs": 1157.2542210000101, - "p95TTFBMs": 950.3121089999913, - "cpuMs": 8980, - "peakProcessTreeRssBytes": 372264960, - "samplesMs": [ - 132.36381300000357, - 197.30405399997835, - 264.31545500000357, - 333.4857379999885, - 396.7166690000158, - 459.93362599998363, - 525.9440030000114, - 585.8344579999975, - 490.45659600000363, - 612.4753760000167, - 537.9055749999825, - 519.289495999983, - 522.9817079999775, - 509.1496160000097, - 498.6939729999867, - 490.47712299998966, - 477.75578400000813, - 471.01469499999075, - 468.47536500002025, - 466.61432900000364, - 456.5364469999913, - 353.6253250000009, - 479.33059700002195, - 647.9279999999853, - 585.0268999999971, - 752.9842849999841, - 765.8497789999819, - 849.4783879999886, - 850.2151270000031, - 1018.0007479999913, - 912.7497900000017, - 1157.2542210000101, - 997.318162999989, - 964.1635020000103, - 952.0332050000143, - 685.0277990000031, - 878.3977039999736, - 1063.689756000007, - 759.9380020000099, - 694.0521179999923, - 657.2655209999939, - 634.3676419999974, - 507.3968869999808, - 489.6090139999869, - 417.7610229999991, - 535.605961000023, - 836.9981829999888, - 547.1604720000178, - 471.60096700000577, - 601.1768009999942, - 413.4292220000061, - 599.5240089999861, - 591.7638940000033, - 580.1185459999833, - 641.1090590000094, - 690.6046680000145, - 673.8430440000084, - 816.2950299999793, - 770.4499239999859, - 782.5438250000007, - 804.2354310000082, - 779.3645639999886, - 731.3321320000105, - 687.129580000008, - 625.3982660000038, - 622.0899619999982, - 519.6274780000094, - 656.5105269999767, - 486.7546110000112, - 475.48790599999484, - 693.1162120000226, - 542.2790070000046, - 541.9410889999999, - 474.4943680000142, - 595.1088060000038, - 541.6461140000029, - 410.66528899999685, - 597.5082279999915, - 592.4826140000077, - 523.468624000001, - 513.8947769999795, - 450.24381499999436, - 559.6179589999956, - 487.43366400001105, - 489.4109410000092, - 425.76524999999674, - 529.0654309999954, - 492.97552100001485, - 600.8573809999798, - 663.3853919999965, - 719.3948929999897, - 761.0173080000095, - 783.4325810000009, - 823.2013720000105, - 889.7344330000051, - 928.3996120000083, - 871.6009539999941, - 863.2204170000041, - 864.165118999983, - 864.0325760000269 - ] - } - ] - }, - { - "runtime": "go", - "repeat": 2, - "fixture": "128 KiB JS boundary regex", - "inputBytes": 131072, - "outputBytes": 147456, - "outputSHA256": "580155666affe445ac48846f3c178f45b3b75ec89815cc49fad08035415e8117", - "cold": { - "requests": 7, - "concurrency": 1, - "elapsedMs": 876.761851999996, - "requestsPerSecond": 7.983924008591597, - "p50Ms": 118.44168400001945, - "p95Ms": 150.29250300000422, - "maxMs": 150.29250300000422, - "p95TTFBMs": 145.30171699999482, - "cpuMs": 820, - "peakProcessTreeRssBytes": 85139456, - "samplesMs": [ - 150.29250300000422, - 137.25215500002378, - 123.76187199997366, - 118.44168400001945, - 116.61550699998043, - 116.6730389999866, - 112.72520400001667 - ] - }, - "warm": [ - { - "requests": 100, - "concurrency": 1, - "elapsedMs": 2085.452659999981, - "requestsPerSecond": 47.95122033602092, - "p50Ms": 20.68108999999822, - "p95Ms": 23.40319000001182, - "maxMs": 25.334619999979623, - "p95TTFBMs": 20.060330999986036, - "cpuMs": 1550, - "peakProcessTreeRssBytes": 90832896, - "samplesMs": [ - 23.322629999980563, - 23.40319000001182, - 23.965372000006028, - 23.041471000004094, - 22.550278999988222, - 23.128533999988576, - 23.08700400000089, - 22.385567999997875, - 21.922729999991134, - 20.918825000000652, - 23.46977799999877, - 24.412837000010768, - 20.936805999983335, - 22.10997000001953, - 20.549803000001702, - 20.358929999987595, - 21.105720999999903, - 20.212461000017356, - 20.076301000022795, - 21.953246999997646, - 22.58141300000716, - 21.17337500001304, - 20.677025999990292, - 20.279532000015024, - 20.09918999997899, - 19.115168999996968, - 19.447278000006918, - 17.164166000002297, - 20.870685000001686, - 17.68502800000715, - 17.720587999996496, - 21.416352000000188, - 19.069594999979017, - 19.028404999990016, - 19.114468999992823, - 19.4744500000088, - 19.436046000017086, - 19.380517999990843, - 19.15395599999465, - 20.040741000004346, - 19.41659800001071, - 19.15206799999578, - 17.87863500000094, - 18.469859999982873, - 20.774560999998357, - 22.466958999983035, - 22.592109000019263, - 20.663495999993756, - 21.225988999998663, - 20.324975999974413, - 19.65483200000017, - 19.25809499999741, - 20.77801899999031, - 19.968831000005594, - 19.443594999989728, - 19.723938000010094, - 19.556809000001522, - 20.415196999994805, - 20.714139999996405, - 23.377200999995694, - 23.944982999993954, - 22.149119999987306, - 19.881056999991415, - 20.56925900001079, - 20.837274999998044, - 21.493904000002658, - 21.366864000010537, - 19.249787999986438, - 21.414134999999078, - 19.847523999982513, - 22.200520999991568, - 20.68108999999822, - 20.869112000014866, - 19.893823999998858, - 21.382391999999527, - 21.219310999993468, - 21.1667679999955, - 20.608538000000408, - 22.51480000000447, - 21.604280999978073, - 21.1731720000098, - 22.73932799999602, - 20.64533999998821, - 21.75299200002337, - 25.334619999979623, - 21.85720399999991, - 21.04822100000456, - 20.288090000045486, - 20.81210799998371, - 21.303687000006903, - 20.920104999968316, - 20.625908999994863, - 19.804193999967538, - 20.980252999986988, - 17.40902899997309, - 20.207646000024397, - 20.37113300000783, - 17.925053999992087, - 17.417388999951072, - 20.42050000000745 - ] - }, - { - "requests": 100, - "concurrency": 8, - "elapsedMs": 1312.556163000001, - "requestsPerSecond": 76.18721607419698, - "p50Ms": 103.10041000001365, - "p95Ms": 117.20215000002645, - "maxMs": 119.94385300000431, - "p95TTFBMs": 113.19574100000318, - "cpuMs": 1540, - "peakProcessTreeRssBytes": 117239808, - "samplesMs": [ - 21.955873000028078, - 35.14275699999416, - 46.43916399998125, - 58.52621499996167, - 70.77199500001734, - 82.38122199999634, - 93.38942099997075, - 104.77028399996925, - 94.50569099996937, - 91.04763000004459, - 91.17279599996982, - 90.11641499999678, - 90.94740800000727, - 89.74381999997422, - 90.27251799998339, - 90.15190599998459, - 90.62371499999426, - 92.27273800002877, - 92.50687700003618, - 92.15231500001391, - 91.07856399996672, - 91.89617100002943, - 91.96123200003058, - 93.57822999998461, - 93.93760800000746, - 93.39930900000036, - 94.58830000000307, - 94.68641299998853, - 99.07299099996453, - 99.52822999999626, - 101.22383600001922, - 101.395783999993, - 104.61086099996464, - 107.9030919999932, - 108.42829200002598, - 109.83052299998235, - 105.84457800001837, - 106.58870600000955, - 105.08497600001283, - 105.1985149999964, - 112.48512600001413, - 112.53000400000019, - 112.24806999997236, - 111.8312750000041, - 111.64691400004085, - 110.3544230000116, - 110.64699799998198, - 107.25040400004946, - 97.6709339999943, - 93.90048100001877, - 91.87486899999203, - 91.11470100004226, - 92.35151399997994, - 91.71983700001147, - 91.30732400005218, - 93.21848000003956, - 93.65644499997143, - 95.68930800003, - 95.44603700004518, - 96.4620269999723, - 96.30548699997598, - 100.72275100002298, - 99.35151700000279, - 101.8042060000007, - 101.93563599995105, - 102.55406799999764, - 103.10041000001365, - 105.16279299999587, - 108.21022000000812, - 106.75752500002272, - 111.52791999996407, - 110.49694500002079, - 110.39794600004097, - 112.68793200002983, - 114.82907699997304, - 114.16926399996737, - 112.84031399997184, - 112.23861199995736, - 111.57016900001327, - 114.7528169999714, - 114.5979309999966, - 114.78489000000991, - 114.72934700001497, - 114.38115099997958, - 113.75079600000754, - 114.72402299998794, - 114.63045699999202, - 112.27728199999547, - 112.45391599996947, - 111.43609699996887, - 111.06365800002823, - 114.40406800003257, - 116.79844099999173, - 116.61914999998407, - 117.20215000002645, - 118.518337000045, - 119.94385300000431, - 119.13472199998796, - 119.36941200000001, - 117.38598199997796 - ] - } - ] - }, - { - "runtime": "node", - "repeat": 2, - "fixture": "2 MiB binary", - "inputBytes": 2097152, - "outputBytes": 2097152, - "outputSHA256": "5647f05ec18958947d32874eeb788fa396a05d0bab7c1b71f112ceb7e9b31eee", - "cold": { - "requests": 7, - "concurrency": 1, - "elapsedMs": 504.3013379999902, - "requestsPerSecond": 13.88058978340473, - "p50Ms": 63.586734999960754, - "p95Ms": 132.4820470000268, - "maxMs": 132.4820470000268, - "p95TTFBMs": 103.0182040000218, - "cpuMs": 540, - "peakProcessTreeRssBytes": 259354624, - "samplesMs": [ - 132.4820470000268, - 73.75602400000207, - 64.4920839999686, - 59.72908799996367, - 63.586734999960754, - 54.48783200001344, - 54.79872500000056 - ] - }, - "warm": [ - { - "requests": 100, - "concurrency": 1, - "elapsedMs": 5263.089138999989, - "requestsPerSecond": 19.000248211452572, - "p50Ms": 50.20339400001103, - "p95Ms": 66.79276199999731, - "maxMs": 95.49104500003159, - "p95TTFBMs": 29.29239499999676, - "cpuMs": 6820, - "peakProcessTreeRssBytes": 330346496, - "samplesMs": [ - 52.28498299996136, - 47.62999699998181, - 47.82349699997576, - 50.630111999984365, - 58.7369690000196, - 55.97629300004337, - 57.5651319999597, - 56.83564499998465, - 55.66223999997601, - 57.06834700005129, - 62.33659099997021, - 70.71964900003513, - 54.64536200003931, - 52.12250800000038, - 52.62790500000119, - 77.97447399998782, - 66.79276199999731, - 50.173454999981914, - 48.84804599999916, - 53.36123199999565, - 50.586003999982495, - 47.355383999994956, - 46.379788999969605, - 52.9342460000189, - 56.142852999968454, - 60.094031999993604, - 55.657887000008486, - 57.096356999943964, - 64.23481500003254, - 49.64861400000518, - 46.90272100002039, - 54.7442559999763, - 47.8544160000165, - 45.874593000044115, - 47.830619999964256, - 45.44067099998938, - 45.34596399997827, - 46.28938600001857, - 45.86899500002619, - 53.37098900001729, - 53.27415900002234, - 51.87232699996093, - 47.00362799997674, - 47.19429300003685, - 50.523973000003025, - 49.98076399997808, - 54.532920000026934, - 95.49104500003159, - 53.268868000013754, - 49.78039400000125, - 48.37157299998216, - 47.83115199999884, - 50.1559310000157, - 50.23701099999016, - 49.312948999984656, - 59.44013599999016, - 56.4784820000059, - 47.24762700003339, - 52.811220000032336, - 74.12574200000381, - 51.33721199998399, - 56.59137199999532, - 54.375156999973115, - 50.75355699995998, - 50.14222100004554, - 62.77797599998303, - 52.16127300000517, - 46.86976099997992, - 45.626270000007935, - 45.40165399998659, - 45.73110199999064, - 45.788732999993954, - 48.77543399995193, - 49.734845000028145, - 68.51089199999114, - 50.304727000009734, - 52.34922999999253, - 48.27443500002846, - 46.551902000035625, - 47.48344699997688, - 48.827020000026096, - 63.27428100001998, - 52.87043299997458, - 48.3792249999824, - 46.06382600002689, - 46.46961099997861, - 44.93294699996477, - 45.36541399999987, - 60.363764000008814, - 48.40637700003572, - 53.614752000023145, - 47.71876300004078, - 49.69591800001217, - 44.07459299999755, - 52.16957100003492, - 46.12553699995624, - 45.80803900002502, - 50.20339400001103, - 48.726459999976214, - 49.47229800000787 - ] - }, - { - "requests": 100, - "concurrency": 8, - "elapsedMs": 2549.9682860000175, - "requestsPerSecond": 39.21617400068297, - "p50Ms": 198.2039329999825, - "p95Ms": 298.37447600002633, - "maxMs": 308.54939199995715, - "p95TTFBMs": 179.38819700002205, - "cpuMs": 4640, - "peakProcessTreeRssBytes": 333549568, - "samplesMs": [ - 181.5352009999915, - 211.66823000001023, - 218.76315800001612, - 270.1162070000428, - 282.24397700000554, - 289.0254180000047, - 291.83315399999265, - 294.7487529999926, - 219.0652569999802, - 195.82948700000998, - 184.40765299997292, - 238.37739199999487, - 188.5518629999715, - 193.42396000004373, - 216.61793000000762, - 227.0490109999664, - 286.5578680000035, - 307.4995270000072, - 298.7969320000266, - 298.37447600002633, - 236.19874700001674, - 288.62355200003367, - 277.93022600002587, - 252.2820589999901, - 184.1381709999987, - 176.42123600002378, - 158.7738600000157, - 165.08378399995854, - 164.06268400000408, - 164.73701800004346, - 172.21443499997258, - 174.26780899998266, - 141.68759400001727, - 153.831668000028, - 237.590251000016, - 233.13932600000408, - 207.81002299999818, - 198.2039329999825, - 232.44206299999496, - 234.1295060000266, - 157.91169500001706, - 149.4086950000492, - 108.08848599996418, - 106.74115600000368, - 102.0417829999933, - 101.93819299997995, - 82.58772800001316, - 82.57239300000947, - 170.3157089999877, - 184.2420179999899, - 201.43668099999195, - 254.6679100000183, - 257.9416809999966, - 259.217032000015, - 307.05060700001195, - 308.2658930000034, - 239.69001899997238, - 228.3101640000241, - 209.15889399999287, - 161.0901629999862, - 157.2801389999804, - 155.9893030000385, - 127.09078299999237, - 128.5094050000189, - 152.49921599996742, - 157.08725099998992, - 163.55133200000273, - 200.8080599999521, - 206.07818800001405, - 207.62135199998738, - 159.8903280000086, - 160.99361399997724, - 164.11805900000036, - 222.57495699997526, - 183.32241899997462, - 231.18826199998148, - 227.38992200000212, - 194.4992140000104, - 198.64970299997367, - 222.52621099998942, - 157.0467040000367, - 227.04828099999577, - 209.6340490000439, - 231.4084510000539, - 215.78571000002557, - 224.12470799998846, - 220.0350819999585, - 190.35646099998849, - 308.54939199995715, - 144.2658780000056, - 135.17783600004623, - 134.40872200002195, - 133.35121599998092, - 204.10537100001238, - 205.22458500001812, - 163.8480649999692, - 169.45411400002195, - 172.41063599998597, - 176.15219200000865, - 175.71597300004214 - ] - } - ] - }, - { - "runtime": "go", - "repeat": 2, - "fixture": "2 MiB binary", - "inputBytes": 2097152, - "outputBytes": 2097152, - "outputSHA256": "5647f05ec18958947d32874eeb788fa396a05d0bab7c1b71f112ceb7e9b31eee", - "cold": { - "requests": 7, - "concurrency": 1, - "elapsedMs": 385.0165310000302, - "requestsPerSecond": 18.181037530566318, - "p50Ms": 54.0014899999951, - "p95Ms": 68.63683500001207, - "maxMs": 68.63683500001207, - "p95TTFBMs": 40.84869499999331, - "cpuMs": 230, - "peakProcessTreeRssBytes": 63062016, - "samplesMs": [ - 68.63683500001207, - 55.351943999994546, - 54.0014899999951, - 50.935289999993984, - 49.80107599997427, - 55.54375399998389, - 49.88729799998691 - ] - }, - "warm": [ - { - "requests": 100, - "concurrency": 1, - "elapsedMs": 4608.570904000022, - "requestsPerSecond": 21.6987005479735, - "p50Ms": 45.30588699999498, - "p95Ms": 54.479149999970105, - "maxMs": 61.34142499999143, - "p95TTFBMs": 24.872579999966547, - "cpuMs": 3050, - "peakProcessTreeRssBytes": 85000192, - "samplesMs": [ - 48.0877980000223, - 41.52920700004324, - 41.66141400003107, - 44.12936300004367, - 40.04126800002996, - 42.81339000002481, - 42.777622999972664, - 44.6430560000008, - 49.7825320000411, - 47.59963799995603, - 47.00265799998306, - 45.50094800000079, - 46.72003100003349, - 47.4798160000355, - 49.13447400002042, - 45.779005000018515, - 50.70162300002994, - 56.10268599999836, - 41.56185200001346, - 42.06875099998433, - 43.96587700000964, - 47.63756900001317, - 47.99181599996518, - 42.28053699998418, - 42.81618200003868, - 42.74537000001874, - 46.11030300002312, - 48.6934449999826, - 45.78377999999793, - 48.573560999997426, - 44.59983600000851, - 49.48950199998217, - 48.34114799997769, - 47.26905900001293, - 58.51788800000213, - 47.502319999970496, - 45.798024000017904, - 48.943092999979854, - 45.08942700002808, - 46.52412999997614, - 44.29050699999789, - 42.40529199998127, - 44.3090460000094, - 54.51507500000298, - 50.7724889999954, - 42.14569700002903, - 42.800185000000056, - 41.87434400001075, - 45.107724000001326, - 42.75247900001705, - 44.12294600001769, - 61.34142499999143, - 41.8295260000159, - 44.98091599997133, - 40.37164099997608, - 37.891645000025164, - 39.696266999992076, - 37.859620000002906, - 43.07100600004196, - 42.96267799998168, - 42.406171999988146, - 46.558374999964144, - 44.89055999997072, - 46.22810499998741, - 50.17547999997623, - 45.72463900002185, - 45.30588699999498, - 44.863713999977335, - 54.34859300003154, - 45.84880899998825, - 48.068834999983665, - 46.03191499999957, - 45.02097799995681, - 44.10368000000017, - 47.921704999986105, - 54.479149999970105, - 49.35100500000408, - 54.24644700001227, - 47.73809200001415, - 47.0092430000077, - 47.61191500001587, - 43.21129099995596, - 41.27047799999127, - 40.52950599999167, - 45.66172999999253, - 59.78902400005609, - 43.18041699996684, - 48.63289700000314, - 43.79995300003793, - 42.093504999997094, - 40.79142399999546, - 43.494911000016145, - 49.21386900002835, - 49.5665919999592, - 51.330727999971714, - 42.47489200002747, - 42.34571100003086, - 46.14548599999398, - 41.89735699997982, - 41.48665299999993 - ] - }, - { - "requests": 100, - "concurrency": 8, - "elapsedMs": 2038.0154670000193, - "requestsPerSecond": 49.06734105762263, - "p50Ms": 152.28582199994707, - "p95Ms": 282.82277800003067, - "maxMs": 415.8909739999799, - "p95TTFBMs": 169.17905999999493, - "cpuMs": 2160, - "peakProcessTreeRssBytes": 101969920, - "samplesMs": [ - 216.15609299996868, - 216.22534100001212, - 216.75533300003735, - 218.11356599995634, - 218.56664899998577, - 218.49372000002768, - 219.23205699998653, - 415.8909739999799, - 203.07920500001637, - 202.8236850000103, - 202.62114999996265, - 202.45806700002868, - 202.2785959999892, - 202.34133099997416, - 202.50810400000773, - 42.736948999983724, - 122.69040800002404, - 122.91399500000989, - 196.41010999999708, - 280.09251499996753, - 282.82277800003067, - 282.3982960000285, - 283.67548799997894, - 292.5520249999827, - 199.90559199999552, - 199.85092100000475, - 87.58098699996481, - 180.20321800000966, - 181.64876499999082, - 182.92235199996503, - 181.231276000035, - 170.70542600000044, - 186.26572600001236, - 298.2348139999667, - 298.23869399999967, - 188.19137800001772, - 188.33924100000877, - 188.54880099999718, - 188.84562000003643, - 188.95051400002558, - 155.19081699999515, - 111.76974199997494, - 111.84307100001024, - 143.33586900000228, - 186.34753199998522, - 186.13687300001038, - 185.82961000001524, - 185.5361789999879, - 188.81879099999787, - 134.43258099997183, - 134.36359899997478, - 59.31563600001391, - 129.80900399998063, - 130.78908700001193, - 130.35660699999426, - 132.36106099997414, - 132.23553000000538, - 135.6247560000047, - 217.85011499997927, - 219.0397370000137, - 132.69004000001587, - 132.6680130000459, - 132.83394799998496, - 133.00230699998792, - 133.15685299999313, - 102.99797500000568, - 77.98360099998536, - 78.3418599999859, - 125.06475499999942, - 153.14594100002432, - 153.07323099998757, - 152.39702400000533, - 152.28582199994707, - 153.66725399997085, - 111.82115100004012, - 111.43399799999315, - 44.101542000018526, - 96.78059100004612, - 96.81594499998027, - 96.91130700003123, - 96.39835399994627, - 97.08813400001964, - 110.30130900000222, - 201.91610400000354, - 202.03947899997002, - 138.32327200000873, - 138.3656600000104, - 138.3455949999625, - 138.37451200000942, - 138.3932480000076, - 107.41386499995133, - 31.0480019999668, - 87.78451000002678, - 72.30152599996654, - 73.86332000000402, - 73.24000599997817, - 122.60929100000067, - 124.82910500001162, - 124.34566599997925, - 109.18239000003086 - ] - } - ] - } - ] -} diff --git a/backend/reports/implementation-completion-audit.json b/backend/reports/implementation-completion-audit.json deleted file mode 100644 index 3be92c1..0000000 --- a/backend/reports/implementation-completion-audit.json +++ /dev/null @@ -1,141 +0,0 @@ -{ - "objective": "Have the Go implementation preserve supported TypeScript behavior and make additional source providers easy to support.", - "policy": "Preserve functionality and supported outputs; do not reproduce TypeScript bugs. Production cutover and shipping a new external provider are separate from implementation parity.", - "status": "implementation_verified", - "requirements": [ - { - "requirement": "Retain the existing API surface and supported output behavior", - "evidence": [ - "backend/contracts/routes.cjs extracts 112 mounted routes from TypeScript AST", - "backend/internal/server/routes_test.go checks Go dispatch for every extracted route", - "64 CI contract commands passed on current source", - "Resource, validation, HTTP, dashboard, conference, admin and webhook contracts execute actual TypeScript code" - ], - "status": "verified" - }, - { - "requirement": "Retain repository, gist and PR lifecycle and access controls", - "evidence": [ - "backend/internal/server/integration_test.go", - "backend/internal/server/provider_integration_test.go", - "backend/internal/server/resource_options_integration_test.go", - "backend/internal/server/repository_recovery_integration_test.go", - "backend/internal/server/conference_recovery_integration_test.go" - ], - "status": "verified" - }, - { - "requirement": "Preserve anonymization output with bounded regex execution", - "evidence": [ - "backend/contracts/differential.cjs: 499 behavior cases and cross-language credential checks", - "backend/contracts/file-types.cjs: 7876 file type cases", - "backend/internal/anonymize/anonymize_test.go: output limits and regex deadline", - "backend/internal/anonymize/process_cache_test.go: process cancellation and publication controls" - ], - "status": "verified" - }, - { - "requirement": "Support provider adapters without rewriting lifecycle and content handlers", - "evidence": [ - "backend/internal/provider/provider.go: repository interface and optional discovery/documents/tree capabilities", - "backend/internal/server/http.go: New accepts registered provider extensions", - "backend/internal/server/provider_integration_test.go: non-GitHub fixture with nested names and opaque revisions", - "backend/internal/server/provider_identity_integration_test.go and document_identity_integration_test.go: server-owned binding and immutable identity validation", - "backend/README.md Provider adapters: registration, required methods, security obligations and API examples" - ], - "status": "verified" - }, - { - "requirement": "Retain security controls and deployment isolation", - "evidence": [ - "backend/internal/security/security_test.go", - "backend/internal/server/integration_test.go: scoped tokens, private access, revocation, forged sessions and unsigned webhooks", - "Current govulncheck: zero reachable and imported-package findings; four unused-module advisories", - "Current deployment smoke test: isolated volumes, non-root writes, static routes and graceful shutdown" - ], - "status": "verified" - }, - { - "requirement": "Validate beta and report performance without unsupported claims", - "evidence": [ - "backend/reports/shadow-monitoring-authenticated-deployment.json: 94 authenticated requests and temporary key revocation", - "backend/reports/transform-benchmark.json", - "backend/reports/http-archive-benchmark.json", - "backend/reports/transformed-cache-benchmark.jsonl", - "backend/reports/shadow-performance-browser-validation.json" - ], - "status": "verified_with_recorded_workload_limits" - } - ], - "intentionalDifferences": [ - "Invalid resource options return 400 without partial database writes.", - "Cache-ID operator objects are rejected.", - "Structured JSON errors replace framework-generated HTML parser errors.", - "Resource bounds, cancellation and credential isolation remain enforced." - ], - "operationalLimits": [ - "No production data or production deployment changed.", - "Production restore/queue handoff/rollback requires a separate target-data rehearsal.", - "Live private-repository revocation and suspension are not proven by public beta tests; automated protocol tests cover these controls.", - "No GitLab or Bitbucket adapter shipped. New adapters need their own provider-specific credential connection flow.", - "Performance measurements describe recorded workloads, not an overall production speedup." - ], - "updatedAtUTC": "2026-11-03T18:13:34.084892+00:00", - "checks": { - "contracts": { - "result": "passed", - "file": "/tmp/go-parity-final-contracts.log", - "sha256": "9ec7d3649e3b762da5f45076bcf5055dde3b08c98a6715262bde62dfa64d371d" - }, - "vulnerabilities": { - "result": "passed", - "file": "/tmp/go-parity-final-vulnerabilities.log", - "sha256": "cd603802373c0ab24cb1e859ec21635183b92cc81aeb083b21f3061103e3822f" - }, - "deployment": { - "result": "passed", - "file": "/tmp/go-parity-final-deployment.log", - "sha256": "a511be3848a8bdfc3d044f07e4e25a0fd28d58edc6f34bae47f0859cc6cf8683" - }, - "static": { - "goVet": "passed ./...", - "gofmt": "passed cmd internal" - }, - "firstFullRace": { - "result": "failed", - "file": "/tmp/go-parity-final-race.log", - "sha256": "4e0664c9b63d596b1f546cb66f3c92db5c7968b8bee7784695c6f9d041c78e4b", - "cause": "Shared TestBackendIntegration context expired at five minutes after expanded provider lifecycle checks. Subsequent DB operations failed with context deadline exceeded.", - "fix": "Use the Go test runner deadline, reserving five seconds for cleanup. Application deadlines unchanged." - }, - "interruptedFullRace": { - "result": "terminated", - "file": "/tmp/go-parity-final-race-rerun.log", - "execSessionID": 17108, - "exitCode": 143, - "cause": "SIGTERM; process confirmed terminal and disposable services removed. No completed test result." - }, - "fullRaceRerun": { - "result": "passed", - "file": "/tmp/go-parity-final-race-complete.log", - "sha256": "0ce54b362a54110feb9551427e8c65fb27738cd9f9299425574498161dab42ef", - "packages": [ - "ok \tgithub.com/tdurieux/anonymous_github/backend/cmd/server\t2.836s", - "ok \tgithub.com/tdurieux/anonymous_github/backend/internal/anonymize\t2.301s", - "ok \tgithub.com/tdurieux/anonymous_github/backend/internal/blobcache\t100.344s", - "ok \tgithub.com/tdurieux/anonymous_github/backend/internal/provider\t1.043s", - "ok \tgithub.com/tdurieux/anonymous_github/backend/internal/quotagate\t1.291s", - "ok \tgithub.com/tdurieux/anonymous_github/backend/internal/security\t1.053s", - "ok \tgithub.com/tdurieux/anonymous_github/backend/internal/server\t383.719s", - "ok \tgithub.com/tdurieux/anonymous_github/backend/internal/storage\t1.275s" - ], - "disposableInfrastructureCleanedUp": true - } - }, - "source": { - "sha256": "800d00337ffc0eba9983b59489a525da86e4a880f0525b63c0ce9c0b8d1dafac", - "files": 342, - "algorithm": "SHA-256 over sorted backend-relative path, NUL, file bytes, NUL; Go sources, go.mod and go.sum" - }, - "conclusion": "Supported TypeScript functionality and outputs are implemented and verified under the documented compatibility policy. Shared provider interfaces and non-GitHub lifecycle coverage satisfy the provider extension requirement. No implementation requirement remains open; production cutover limits are listed separately." -} diff --git a/backend/reports/permission-cache-optimization.json b/backend/reports/permission-cache-optimization.json deleted file mode 100644 index 288d421..0000000 --- a/backend/reports/permission-cache-optimization.json +++ /dev/null @@ -1,121 +0,0 @@ -{ - "measuredAt": "2026-11-04T06:36:21.500234+00:00", - "deployment": "beta.durieux.me", - "image": "sha256:b279b1b3437e54068fb0e1f83fdd595387166b52f204c29b5e6d708a68402ab8", - "permissionCacheSeconds": 3600, - "file": "/api/repo/anonymous_github-72DE/file/gulpfile.js?v=dd09af1c", - "notes": [ - "Sequential live samples, not a controlled load benchmark.", - "Warm medians exclude the first request in each series.", - "Every post-deploy file body matched the pre-deploy SHA-256.", - "Local account, credential and installation checks remain live." - ], - "before": { - "samples": [ - { - "status": 200, - "ms": 1897, - "bytes": 6007, - "id": "9f16462b-8277-482e-a5c4-bd8748656dce", - "serverMs": 1558.0, - "authorizationMs": 1511.287288 - }, - { - "status": 200, - "ms": 398, - "bytes": 6007, - "id": "de5ce9df-acfe-4c53-9e75-8c4f50c91908", - "serverMs": 357.0, - "authorizationMs": 328.736663 - }, - { - "status": 200, - "ms": 356, - "bytes": 6007, - "id": "5d030cc7-8134-4404-860c-5e8bb47b6561", - "serverMs": 315.0, - "authorizationMs": 289.065312 - }, - { - "status": 200, - "ms": 501, - "bytes": 6007, - "id": "70046936-d3f3-4e78-bc34-2e5a52c17f65", - "serverMs": 457.0, - "authorizationMs": 407.164346 - } - ], - "warmMedians": { - "ms": 398, - "serverMs": 357.0, - "authorizationMs": 328.736663 - } - }, - "after": { - "samples": [ - { - "status": 200, - "ms": 1527, - "bytes": 6007, - "id": "1fa381e0-23e5-46f4-98a9-24af5a3731e8", - "sha256": "f5d54d3ace8a175687a60b10f1e324cc17316a6f49111299d61ffe30b41b0633", - "serverMs": 1084.0, - "authorizationMs": 1030.124039 - }, - { - "status": 200, - "ms": 113, - "bytes": 6007, - "id": "c2fe4b45-c657-41d4-9c7f-c366409aa41a", - "sha256": "f5d54d3ace8a175687a60b10f1e324cc17316a6f49111299d61ffe30b41b0633", - "serverMs": 35.0, - "authorizationMs": 4.361316 - }, - { - "status": 200, - "ms": 108, - "bytes": 6007, - "id": "b9cd121b-a53c-49d9-9f66-cc0f6c8268d2", - "sha256": "f5d54d3ace8a175687a60b10f1e324cc17316a6f49111299d61ffe30b41b0633", - "serverMs": 32.0, - "authorizationMs": 4.830455 - }, - { - "status": 200, - "ms": 94, - "bytes": 6007, - "id": "f5e64477-045a-4d6b-b7a7-23799f858dc6", - "sha256": "f5d54d3ace8a175687a60b10f1e324cc17316a6f49111299d61ffe30b41b0633", - "serverMs": 29.0, - "authorizationMs": 4.426811 - }, - { - "status": 200, - "ms": 103, - "bytes": 6007, - "id": "16d193fd-af7f-408a-bf66-eeb075e47b3e", - "sha256": "f5d54d3ace8a175687a60b10f1e324cc17316a6f49111299d61ffe30b41b0633", - "serverMs": 28.0, - "authorizationMs": 4.270152 - } - ], - "warmMedians": { - "ms": 105.5, - "serverMs": 30.5, - "authorizationMs": 4.3940635 - } - }, - "validation": { - "raceTests": "targeted permission cache, installation, App selection and signed webhook suites passed (server 47.060s)", - "goVet": "passed", - "liveDeployment": { - "result": "passed", - "checks": 132, - "repeatedContentChecks": 3, - "exactZipContents": "passed", - "testRepositoryRemoved": true, - "temporaryKeyRevoked": true - }, - "zipCheckNote": "Compare CRC-validated entry names and SHA-256 of decompressed contents; streaming flush timing can legitimately alter compressed framing." - } -} \ No newline at end of file diff --git a/backend/reports/provider-parity.json b/backend/reports/provider-parity.json deleted file mode 100644 index a4b19ed..0000000 --- a/backend/reports/provider-parity.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "resourceOutputContracts": {"cases":1048,"publicDocumentOptionCombinations":1024,"privateResourceCases":24,"oracle":"actual TypeScript Gist, PullRequest and Repository classes"}, - "anonymizationContracts": {"cases":499,"passed":499}, - "fileTypeContracts": {"cases":7876,"passed":7876}, - "scope": "Synthetic compatibility checks; not proof of complete production parity or a live third-party provider integration" -} diff --git a/backend/reports/query-consumer-audit.json b/backend/reports/query-consumer-audit.json deleted file mode 100644 index 7d3e97b..0000000 --- a/backend/reports/query-consumer-audit.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "scope": "Remaining direct URL.Query reads after shared query-parser migration", - "incomingReads": [ - { - "file": "backend/internal/server/source.go", - "parameter": "name", - "use": "Generic provider PR preview; legacy GitHub route uses owner/repository path parameters." - }, - { - "file": "backend/internal/server/files.go", - "parameter": "name", - "use": "Generic provider repository preview; legacy GitHub route uses owner/repo path parameters." - } - ], - "outgoingReads": [ - { - "file": "backend/internal/server/connections.go", - "use": "Construct installation redirect URL." - }, - { - "file": "backend/internal/server/github_pagination.go", - "use": "Validate upstream pagination URL." - } - ], - "fixedRead": { - "file": "backend/internal/server/source.go", - "parameter": "connection", - "change": "Use the same typed, provider-aware connection validator as repository previews. Reject arrays and objects before provider access; retain custom provider scalar names." - }, - "dateConsumerReview": { - "internalClockSentinels": [ - "dashboard_cache.go", - "stats_cache.go", - "process_metrics.go", - "request_trace.go", - "request_metrics.go" - ], - "note": "These are review candidates, not confirmed functional requirements or requests to reproduce TypeScript bugs.", - "fixedConsumers": [ - "resources.go lastUpdateDate maximum uses zero-time initial value", - "refresh.go missing-date versus year-0001 guards", - "content_cleanup.go contentGeneration date component", - "conference_membership.go pending transition timestamp validation", - "admin.go job date formatting", - "provider_github.go author/committer fallback" - ], - "remainingZeroChecks": { - "connections.go": "Both absent and year-0001 status dates represent a stale PR download; branch already treats both as stale.", - "imported_removal.go": "Requires a positive Unix timestamp independently of IsZero, matching the recorded imported-job eligibility rule.", - "providers.go": "Optional rate-limit reset is an adapter sentinel, not a persisted record date.", - "json_http.go": "HTTP-date parsing returns validity separately; ISO fallback has a year-0001 edge outside HTTP date syntax.", - "admin_csv.go": "The IsZero check triggers a second parse for strings; successfully parsed year-0001 values are still emitted." - }, - "remainingValidation": "None for the recorded date-consumer findings. Full backend race suite and all 64 CI contract commands passed; see implementation-completion-audit.json." - } -} diff --git a/backend/reports/regex-optimization.json b/backend/reports/regex-optimization.json deleted file mode 100644 index ce2cd84..0000000 --- a/backend/reports/regex-optimization.json +++ /dev/null @@ -1,352 +0,0 @@ -{ - "measuredAt": "2026-11-02T07:33:04.703Z", - "method": "Three fresh processes per version, alternating order; transform only, excludes compilation, I/O, child startup and fixture generation. Same-machine comparison against the Go implementation before regex optimization.", - "comparison": [ - { - "name": "2 MB CSV, 47 absent terms", - "beforeMs": 3.218, - "afterMs": 1.525, - "speedup": 2.1101639344262297, - "beforeAllocatedBytes": 288, - "afterAllocatedBytes": 288, - "sha256": "b3882940c0ad7a4f8e1385dcd3e32122c721f26b90144bb820b542e394f379cd" - }, - { - "name": "100 MB CSV, 47 absent terms", - "beforeMs": 175.973, - "afterMs": 124.487, - "speedup": 1.4135853542940229, - "beforeAllocatedBytes": 288, - "afterAllocatedBytes": 288, - "sha256": "fcccff214b1f6838f5d9345237f5252cd57e2263fc95640b2a3a5278156eec48" - }, - { - "name": "50 MB CSV, sparse matches", - "beforeMs": 919.742, - "afterMs": 600.492, - "speedup": 1.5316473824797001, - "beforeAllocatedBytes": 201661064, - "afterAllocatedBytes": 201624072, - "sha256": "153ce777c4473651a70f3f2f830cac5930214f6b998c08094939646193b0f9f0" - }, - { - "name": "22 MB text, 1.2 million replacements", - "beforeMs": 875.731, - "afterMs": 453.834, - "speedup": 1.929628454456916, - "beforeAllocatedBytes": 114614880, - "afterAllocatedBytes": 114614880, - "sha256": "4e649aee83a6f15cb7178f725991ff5405affe013b0bba0b6eda18689c5c0249" - } - ], - "samples": [ - { - "run": 0, - "implementation": "before", - "allocatedBytes": 288, - "compileMs": 9.097, - "inputBytes": 1960000, - "matchMs": 3.136, - "name": "2 MB CSV, 47 absent terms", - "outputBytes": 1960000, - "runtime": "go1.27.3", - "sha256": "b3882940c0ad7a4f8e1385dcd3e32122c721f26b90144bb820b542e394f379cd" - }, - { - "run": 0, - "implementation": "before", - "allocatedBytes": 288, - "compileMs": 10.354, - "inputBytes": 100800000, - "matchMs": 203.147, - "name": "100 MB CSV, 47 absent terms", - "outputBytes": 100800000, - "runtime": "go1.27.3", - "sha256": "fcccff214b1f6838f5d9345237f5252cd57e2263fc95640b2a3a5278156eec48" - }, - { - "run": 0, - "implementation": "before", - "allocatedBytes": 201661064, - "compileMs": 4.664, - "inputBytes": 50400041, - "matchMs": 957.791, - "name": "50 MB CSV, sparse matches", - "outputBytes": 50400014, - "runtime": "go1.27.3", - "sha256": "153ce777c4473651a70f3f2f830cac5930214f6b998c08094939646193b0f9f0" - }, - { - "run": 0, - "implementation": "before", - "allocatedBytes": 114614848, - "compileMs": 3.713, - "inputBytes": 21600000, - "matchMs": 875.731, - "name": "22 MB text, 1.2 million replacements", - "outputBytes": 19800000, - "runtime": "go1.27.3", - "sha256": "4e649aee83a6f15cb7178f725991ff5405affe013b0bba0b6eda18689c5c0249" - }, - { - "run": 0, - "implementation": "after", - "allocatedBytes": 288, - "compileMs": 10.102, - "inputBytes": 1960000, - "matchMs": 2.863, - "name": "2 MB CSV, 47 absent terms", - "outputBytes": 1960000, - "runtime": "go1.27.3", - "sha256": "b3882940c0ad7a4f8e1385dcd3e32122c721f26b90144bb820b542e394f379cd" - }, - { - "run": 0, - "implementation": "after", - "allocatedBytes": 288, - "compileMs": 4.549, - "inputBytes": 100800000, - "matchMs": 82.94, - "name": "100 MB CSV, 47 absent terms", - "outputBytes": 100800000, - "runtime": "go1.27.3", - "sha256": "fcccff214b1f6838f5d9345237f5252cd57e2263fc95640b2a3a5278156eec48" - }, - { - "run": 0, - "implementation": "after", - "allocatedBytes": 201624072, - "compileMs": 3.034, - "inputBytes": 50400041, - "matchMs": 296.682, - "name": "50 MB CSV, sparse matches", - "outputBytes": 50400014, - "runtime": "go1.27.3", - "sha256": "153ce777c4473651a70f3f2f830cac5930214f6b998c08094939646193b0f9f0" - }, - { - "run": 0, - "implementation": "after", - "allocatedBytes": 114614864, - "compileMs": 2.689, - "inputBytes": 21600000, - "matchMs": 455.418, - "name": "22 MB text, 1.2 million replacements", - "outputBytes": 19800000, - "runtime": "go1.27.3", - "sha256": "4e649aee83a6f15cb7178f725991ff5405affe013b0bba0b6eda18689c5c0249" - }, - { - "run": 1, - "implementation": "after", - "allocatedBytes": 288, - "compileMs": 5.485, - "inputBytes": 1960000, - "matchMs": 1.525, - "name": "2 MB CSV, 47 absent terms", - "outputBytes": 1960000, - "runtime": "go1.27.3", - "sha256": "b3882940c0ad7a4f8e1385dcd3e32122c721f26b90144bb820b542e394f379cd" - }, - { - "run": 1, - "implementation": "after", - "allocatedBytes": 288, - "compileMs": 6.841, - "inputBytes": 100800000, - "matchMs": 138.824, - "name": "100 MB CSV, 47 absent terms", - "outputBytes": 100800000, - "runtime": "go1.27.3", - "sha256": "fcccff214b1f6838f5d9345237f5252cd57e2263fc95640b2a3a5278156eec48" - }, - { - "run": 1, - "implementation": "after", - "allocatedBytes": 201623976, - "compileMs": 4.81, - "inputBytes": 50400041, - "matchMs": 600.492, - "name": "50 MB CSV, sparse matches", - "outputBytes": 50400014, - "runtime": "go1.27.3", - "sha256": "153ce777c4473651a70f3f2f830cac5930214f6b998c08094939646193b0f9f0" - }, - { - "run": 1, - "implementation": "after", - "allocatedBytes": 114614896, - "compileMs": 2.816, - "inputBytes": 21600000, - "matchMs": 453.834, - "name": "22 MB text, 1.2 million replacements", - "outputBytes": 19800000, - "runtime": "go1.27.3", - "sha256": "4e649aee83a6f15cb7178f725991ff5405affe013b0bba0b6eda18689c5c0249" - }, - { - "run": 1, - "implementation": "before", - "allocatedBytes": 288, - "compileMs": 7.594, - "inputBytes": 1960000, - "matchMs": 3.36, - "name": "2 MB CSV, 47 absent terms", - "outputBytes": 1960000, - "runtime": "go1.27.3", - "sha256": "b3882940c0ad7a4f8e1385dcd3e32122c721f26b90144bb820b542e394f379cd" - }, - { - "run": 1, - "implementation": "before", - "allocatedBytes": 288, - "compileMs": 5.655, - "inputBytes": 100800000, - "matchMs": 175.973, - "name": "100 MB CSV, 47 absent terms", - "outputBytes": 100800000, - "runtime": "go1.27.3", - "sha256": "fcccff214b1f6838f5d9345237f5252cd57e2263fc95640b2a3a5278156eec48" - }, - { - "run": 1, - "implementation": "before", - "allocatedBytes": 201629312, - "compileMs": 3.157, - "inputBytes": 50400041, - "matchMs": 603.6, - "name": "50 MB CSV, sparse matches", - "outputBytes": 50400014, - "runtime": "go1.27.3", - "sha256": "153ce777c4473651a70f3f2f830cac5930214f6b998c08094939646193b0f9f0" - }, - { - "run": 1, - "implementation": "before", - "allocatedBytes": 114614880, - "compileMs": 5.679, - "inputBytes": 21600000, - "matchMs": 1216.761, - "name": "22 MB text, 1.2 million replacements", - "outputBytes": 19800000, - "runtime": "go1.27.3", - "sha256": "4e649aee83a6f15cb7178f725991ff5405affe013b0bba0b6eda18689c5c0249" - }, - { - "run": 2, - "implementation": "before", - "allocatedBytes": 288, - "compileMs": 7.188, - "inputBytes": 1960000, - "matchMs": 3.218, - "name": "2 MB CSV, 47 absent terms", - "outputBytes": 1960000, - "runtime": "go1.27.3", - "sha256": "b3882940c0ad7a4f8e1385dcd3e32122c721f26b90144bb820b542e394f379cd" - }, - { - "run": 2, - "implementation": "before", - "allocatedBytes": 288, - "compileMs": 7.061, - "inputBytes": 100800000, - "matchMs": 145.195, - "name": "100 MB CSV, 47 absent terms", - "outputBytes": 100800000, - "runtime": "go1.27.3", - "sha256": "fcccff214b1f6838f5d9345237f5252cd57e2263fc95640b2a3a5278156eec48" - }, - { - "run": 2, - "implementation": "before", - "allocatedBytes": 201666368, - "compileMs": 5.81, - "inputBytes": 50400041, - "matchMs": 919.742, - "name": "50 MB CSV, sparse matches", - "outputBytes": 50400014, - "runtime": "go1.27.3", - "sha256": "153ce777c4473651a70f3f2f830cac5930214f6b998c08094939646193b0f9f0" - }, - { - "run": 2, - "implementation": "before", - "allocatedBytes": 114614880, - "compileMs": 3.669, - "inputBytes": 21600000, - "matchMs": 718.816, - "name": "22 MB text, 1.2 million replacements", - "outputBytes": 19800000, - "runtime": "go1.27.3", - "sha256": "4e649aee83a6f15cb7178f725991ff5405affe013b0bba0b6eda18689c5c0249" - }, - { - "run": 2, - "implementation": "after", - "allocatedBytes": 288, - "compileMs": 4.708, - "inputBytes": 1960000, - "matchMs": 1.346, - "name": "2 MB CSV, 47 absent terms", - "outputBytes": 1960000, - "runtime": "go1.27.3", - "sha256": "b3882940c0ad7a4f8e1385dcd3e32122c721f26b90144bb820b542e394f379cd" - }, - { - "run": 2, - "implementation": "after", - "allocatedBytes": 288, - "compileMs": 5.439, - "inputBytes": 100800000, - "matchMs": 124.487, - "name": "100 MB CSV, 47 absent terms", - "outputBytes": 100800000, - "runtime": "go1.27.3", - "sha256": "fcccff214b1f6838f5d9345237f5252cd57e2263fc95640b2a3a5278156eec48" - }, - { - "run": 2, - "implementation": "after", - "allocatedBytes": 201666384, - "compileMs": 5.863, - "inputBytes": 50400041, - "matchMs": 703.321, - "name": "50 MB CSV, sparse matches", - "outputBytes": 50400014, - "runtime": "go1.27.3", - "sha256": "153ce777c4473651a70f3f2f830cac5930214f6b998c08094939646193b0f9f0" - }, - { - "run": 2, - "implementation": "after", - "allocatedBytes": 114614880, - "compileMs": 3.742, - "inputBytes": 21600000, - "matchMs": 331.288, - "name": "22 MB text, 1.2 million replacements", - "outputBytes": 19800000, - "runtime": "go1.27.3", - "sha256": "4e649aee83a6f15cb7178f725991ff5405affe013b0bba0b6eda18689c5c0249" - } - ], - "sourceHashes": { - "beforeAnonymizeGo": "19265cbb3dfb614445cf1989bfc5db230e3a4a6099ba55a84a48a4908dddbe93", - "afterAnonymizeGo": "7fb42bcfb844c3de816b736f6f49c12a618aadeb1885c8b237cacccc36e94af7", - "afterBoundariesGo": "6c679eb3d350090263e8038bb2797c2e20eb509c4e95c74184d326bcc72679c6" - }, - "fallbackBenchmarks": { - "method": "Go benchmarks, three iterations per fixture and version; 2.2 MB Unicode input with a match at the end. Allocated bytes are total allocations per operation, not peak RSS.", - "before": "goos: linux\ngoarch: amd64\npkg: github.com/tdurieux/anonymous_github/backend/internal/anonymize\ncpu: Intel Xeon E312xx (Sandy Bridge, IBRS update)\nBenchmarkFallbackOffsets-12 \t 3\t 385498159 ns/op\t 5.71 MB/s\t59815184 B/op\t 25 allocs/op\nBenchmarkFallbackLookaround-12 \t 3\t 337738925 ns/op\t 6.51 MB/s\t59811541 B/op\t 18 allocs/op\nPASS\nok \tgithub.com/tdurieux/anonymous_github/backend/internal/anonymize\t2.212s\n", - "after": "goos: linux\ngoarch: amd64\npkg: github.com/tdurieux/anonymous_github/backend/internal/anonymize\ncpu: Intel Xeon E312xx (Sandy Bridge, IBRS update)\nBenchmarkFallbackOffsets-12 \t 3\t 441831684 ns/op\t 4.98 MB/s\t16607866 B/op\t 16 allocs/op\nBenchmarkFallbackLookaround-12 \t 3\t 262234106 ns/op\t 8.39 MB/s\t16606917 B/op\t 14 allocs/op\nPASS\nok \tgithub.com/tdurieux/anonymous_github/backend/internal/anonymize\t2.150s\n", - "boundaryCorrectionTradeoff": "The boundary-bearing fallback fixture increased from 385.50 to 441.83 ms while allocation fell from 59.82 to 16.61 MB. The lookaround-only fixture improved from 337.74 to 262.23 ms with the same allocation reduction." - }, - "validation": { - "differentialCases": 499, - "passed": 499, - "previouslyFailingCasesFixed": 5, - "integrationRaceTests": "passed using disposable MongoDB and Redis", - "fuzzExecutions": 37094, - "fuzzSeconds": 10, - "goVet": "passed" - } -} diff --git a/backend/reports/replacement-path-node-comparison.json b/backend/reports/replacement-path-node-comparison.json deleted file mode 100644 index 824f031..0000000 --- a/backend/reports/replacement-path-node-comparison.json +++ /dev/null @@ -1,312 +0,0 @@ -{ - "measuredAt": "2026-11-03T19:57:12.926Z", - "method": "Three fresh processes per runtime, alternating order; transform only, excludes compilation, I/O, child startup and fixture generation. Synthetic data, not production load.", - "comparison": [ - { - "name": "2 MB CSV, 47 absent terms", - "nodeMedianMs": 7.342341000000488, - "goMedianMs": 2.269, - "speedup": 3.235936976641907, - "sha256": "b3882940c0ad7a4f8e1385dcd3e32122c721f26b90144bb820b542e394f379cd" - }, - { - "name": "100 MB CSV, 47 absent terms", - "nodeMedianMs": 238.52490300000045, - "goMedianMs": 125.287, - "speedup": 1.9038280348320291, - "sha256": "fcccff214b1f6838f5d9345237f5252cd57e2263fc95640b2a3a5278156eec48" - }, - { - "name": "50 MB CSV, sparse matches", - "nodeMedianMs": 487.7871639999994, - "goMedianMs": 345.63, - "speedup": 1.4112986835633463, - "sha256": "153ce777c4473651a70f3f2f830cac5930214f6b998c08094939646193b0f9f0" - }, - { - "name": "22 MB text, 1.2 million replacements", - "nodeMedianMs": 386.68259599999965, - "goMedianMs": 225.984, - "speedup": 1.7111060783064271, - "sha256": "4e649aee83a6f15cb7178f725991ff5405affe013b0bba0b6eda18689c5c0249" - } - ], - "samples": [ - { - "run": 0, - "implementation": "node", - "runtime": "v24.14.1", - "name": "2 MB CSV, 47 absent terms", - "inputBytes": 1960000, - "outputBytes": 1960000, - "compileMs": 58.90463600000021, - "matchMs": 7.3038470000001325, - "sha256": "b3882940c0ad7a4f8e1385dcd3e32122c721f26b90144bb820b542e394f379cd" - }, - { - "run": 0, - "implementation": "node", - "runtime": "v24.14.1", - "name": "100 MB CSV, 47 absent terms", - "inputBytes": 100800000, - "outputBytes": 100800000, - "compileMs": 0.11717599999974482, - "matchMs": 219.60045600000012, - "sha256": "fcccff214b1f6838f5d9345237f5252cd57e2263fc95640b2a3a5278156eec48" - }, - { - "run": 0, - "implementation": "node", - "runtime": "v24.14.1", - "name": "50 MB CSV, sparse matches", - "inputBytes": 50400041, - "outputBytes": 50400014, - "compileMs": 0.0605279999999766, - "matchMs": 487.4682039999998, - "sha256": "153ce777c4473651a70f3f2f830cac5930214f6b998c08094939646193b0f9f0" - }, - { - "run": 0, - "implementation": "node", - "runtime": "v24.14.1", - "name": "22 MB text, 1.2 million replacements", - "inputBytes": 21600000, - "outputBytes": 19800000, - "compileMs": 11.707684999999401, - "matchMs": 386.68259599999965, - "sha256": "4e649aee83a6f15cb7178f725991ff5405affe013b0bba0b6eda18689c5c0249" - }, - { - "run": 0, - "implementation": "go", - "allocatedBytes": 288, - "compileMs": 3.67, - "inputBytes": 1960000, - "matchMs": 0.937, - "name": "2 MB CSV, 47 absent terms", - "outputBytes": 1960000, - "runtime": "go1.27.3", - "sha256": "b3882940c0ad7a4f8e1385dcd3e32122c721f26b90144bb820b542e394f379cd" - }, - { - "run": 0, - "implementation": "go", - "allocatedBytes": 288, - "compileMs": 5.627, - "inputBytes": 100800000, - "matchMs": 125.287, - "name": "100 MB CSV, 47 absent terms", - "outputBytes": 100800000, - "runtime": "go1.27.3", - "sha256": "fcccff214b1f6838f5d9345237f5252cd57e2263fc95640b2a3a5278156eec48" - }, - { - "run": 0, - "implementation": "go", - "allocatedBytes": 100813472, - "compileMs": 3.384, - "inputBytes": 50400041, - "matchMs": 569.122, - "name": "50 MB CSV, sparse matches", - "outputBytes": 50400014, - "runtime": "go1.27.3", - "sha256": "153ce777c4473651a70f3f2f830cac5930214f6b998c08094939646193b0f9f0" - }, - { - "run": 0, - "implementation": "go", - "allocatedBytes": 70813664, - "compileMs": 4.515, - "inputBytes": 21600000, - "matchMs": 198.858, - "name": "22 MB text, 1.2 million replacements", - "outputBytes": 19800000, - "runtime": "go1.27.3", - "sha256": "4e649aee83a6f15cb7178f725991ff5405affe013b0bba0b6eda18689c5c0249" - }, - { - "run": 1, - "implementation": "go", - "allocatedBytes": 288, - "compileMs": 7.926, - "inputBytes": 1960000, - "matchMs": 2.269, - "name": "2 MB CSV, 47 absent terms", - "outputBytes": 1960000, - "runtime": "go1.27.3", - "sha256": "b3882940c0ad7a4f8e1385dcd3e32122c721f26b90144bb820b542e394f379cd" - }, - { - "run": 1, - "implementation": "go", - "allocatedBytes": 288, - "compileMs": 5.468, - "inputBytes": 100800000, - "matchMs": 116.048, - "name": "100 MB CSV, 47 absent terms", - "outputBytes": 100800000, - "runtime": "go1.27.3", - "sha256": "fcccff214b1f6838f5d9345237f5252cd57e2263fc95640b2a3a5278156eec48" - }, - { - "run": 1, - "implementation": "go", - "allocatedBytes": 100813456, - "compileMs": 3.416, - "inputBytes": 50400041, - "matchMs": 345.63, - "name": "50 MB CSV, sparse matches", - "outputBytes": 50400014, - "runtime": "go1.27.3", - "sha256": "153ce777c4473651a70f3f2f830cac5930214f6b998c08094939646193b0f9f0" - }, - { - "run": 1, - "implementation": "go", - "allocatedBytes": 70813536, - "compileMs": 6.587, - "inputBytes": 21600000, - "matchMs": 410.56, - "name": "22 MB text, 1.2 million replacements", - "outputBytes": 19800000, - "runtime": "go1.27.3", - "sha256": "4e649aee83a6f15cb7178f725991ff5405affe013b0bba0b6eda18689c5c0249" - }, - { - "run": 1, - "implementation": "node", - "runtime": "v24.14.1", - "name": "2 MB CSV, 47 absent terms", - "inputBytes": 1960000, - "outputBytes": 1960000, - "compileMs": 50.957612000000154, - "matchMs": 7.342341000000488, - "sha256": "b3882940c0ad7a4f8e1385dcd3e32122c721f26b90144bb820b542e394f379cd" - }, - { - "run": 1, - "implementation": "node", - "runtime": "v24.14.1", - "name": "100 MB CSV, 47 absent terms", - "inputBytes": 100800000, - "outputBytes": 100800000, - "compileMs": 0.10650100000020757, - "matchMs": 409.96413699999994, - "sha256": "fcccff214b1f6838f5d9345237f5252cd57e2263fc95640b2a3a5278156eec48" - }, - { - "run": 1, - "implementation": "node", - "runtime": "v24.14.1", - "name": "50 MB CSV, sparse matches", - "inputBytes": 50400041, - "outputBytes": 50400014, - "compileMs": 0.07650399999965884, - "matchMs": 569.306133, - "sha256": "153ce777c4473651a70f3f2f830cac5930214f6b998c08094939646193b0f9f0" - }, - { - "run": 1, - "implementation": "node", - "runtime": "v24.14.1", - "name": "22 MB text, 1.2 million replacements", - "inputBytes": 21600000, - "outputBytes": 19800000, - "compileMs": 13.740774999999303, - "matchMs": 379.46914800000013, - "sha256": "4e649aee83a6f15cb7178f725991ff5405affe013b0bba0b6eda18689c5c0249" - }, - { - "run": 2, - "implementation": "node", - "runtime": "v24.14.1", - "name": "2 MB CSV, 47 absent terms", - "inputBytes": 1960000, - "outputBytes": 1960000, - "compileMs": 53.339249000000564, - "matchMs": 11.713882000000012, - "sha256": "b3882940c0ad7a4f8e1385dcd3e32122c721f26b90144bb820b542e394f379cd" - }, - { - "run": 2, - "implementation": "node", - "runtime": "v24.14.1", - "name": "100 MB CSV, 47 absent terms", - "inputBytes": 100800000, - "outputBytes": 100800000, - "compileMs": 0.24719000000004598, - "matchMs": 238.52490300000045, - "sha256": "fcccff214b1f6838f5d9345237f5252cd57e2263fc95640b2a3a5278156eec48" - }, - { - "run": 2, - "implementation": "node", - "runtime": "v24.14.1", - "name": "50 MB CSV, sparse matches", - "inputBytes": 50400041, - "outputBytes": 50400014, - "compileMs": 0.07269300000007206, - "matchMs": 487.7871639999994, - "sha256": "153ce777c4473651a70f3f2f830cac5930214f6b998c08094939646193b0f9f0" - }, - { - "run": 2, - "implementation": "node", - "runtime": "v24.14.1", - "name": "22 MB text, 1.2 million replacements", - "inputBytes": 21600000, - "outputBytes": 19800000, - "compileMs": 39.50264599999991, - "matchMs": 615.7903429999997, - "sha256": "4e649aee83a6f15cb7178f725991ff5405affe013b0bba0b6eda18689c5c0249" - }, - { - "run": 2, - "implementation": "go", - "allocatedBytes": 288, - "compileMs": 8.704, - "inputBytes": 1960000, - "matchMs": 2.35, - "name": "2 MB CSV, 47 absent terms", - "outputBytes": 1960000, - "runtime": "go1.27.3", - "sha256": "b3882940c0ad7a4f8e1385dcd3e32122c721f26b90144bb820b542e394f379cd" - }, - { - "run": 2, - "implementation": "go", - "allocatedBytes": 288, - "compileMs": 11.645, - "inputBytes": 100800000, - "matchMs": 125.617, - "name": "100 MB CSV, 47 absent terms", - "outputBytes": 100800000, - "runtime": "go1.27.3", - "sha256": "fcccff214b1f6838f5d9345237f5252cd57e2263fc95640b2a3a5278156eec48" - }, - { - "run": 2, - "implementation": "go", - "allocatedBytes": 100850560, - "compileMs": 6.736, - "inputBytes": 50400041, - "matchMs": 289.984, - "name": "50 MB CSV, sparse matches", - "outputBytes": 50400014, - "runtime": "go1.27.3", - "sha256": "153ce777c4473651a70f3f2f830cac5930214f6b998c08094939646193b0f9f0" - }, - { - "run": 2, - "implementation": "go", - "allocatedBytes": 70818872, - "compileMs": 3.745, - "inputBytes": 21600000, - "matchMs": 225.984, - "name": "22 MB text, 1.2 million replacements", - "outputBytes": 19800000, - "runtime": "go1.27.3", - "sha256": "4e649aee83a6f15cb7178f725991ff5405affe013b0bba0b6eda18689c5c0249" - } - ] -} diff --git a/backend/reports/replacement-path-optimization.json b/backend/reports/replacement-path-optimization.json deleted file mode 100644 index bbac187..0000000 --- a/backend/reports/replacement-path-optimization.json +++ /dev/null @@ -1,332 +0,0 @@ -{ - "measuredAt": "2026-11-03T19:56:40.313Z", - "method": "Three fresh processes per version, alternating order; transform only, excludes compilation, I/O, child startup and fixture generation. Same-machine comparison against the Go implementation before regex optimization.", - "comparison": [ - { - "name": "2 MB CSV, 47 absent terms", - "beforeMs": 1.646, - "afterMs": 2.285, - "speedup": 0.7203501094091903, - "beforeAllocatedBytes": 288, - "afterAllocatedBytes": 288, - "sha256": "b3882940c0ad7a4f8e1385dcd3e32122c721f26b90144bb820b542e394f379cd" - }, - { - "name": "100 MB CSV, 47 absent terms", - "beforeMs": 101.618, - "afterMs": 118.113, - "speedup": 0.8603456012462641, - "beforeAllocatedBytes": 288, - "afterAllocatedBytes": 288, - "sha256": "fcccff214b1f6838f5d9345237f5252cd57e2263fc95640b2a3a5278156eec48" - }, - { - "name": "50 MB CSV, sparse matches", - "beforeMs": 591.941, - "afterMs": 269.905, - "speedup": 2.1931457364628297, - "beforeAllocatedBytes": 201666352, - "afterAllocatedBytes": 100815288, - "sha256": "153ce777c4473651a70f3f2f830cac5930214f6b998c08094939646193b0f9f0" - }, - { - "name": "22 MB text, 1.2 million replacements", - "beforeMs": 394.294, - "afterMs": 189.823, - "speedup": 2.0771666236441315, - "beforeAllocatedBytes": 114614896, - "afterAllocatedBytes": 70813536, - "sha256": "4e649aee83a6f15cb7178f725991ff5405affe013b0bba0b6eda18689c5c0249" - } - ], - "samples": [ - { - "run": 0, - "implementation": "before", - "allocatedBytes": 288, - "compileMs": 27.398, - "inputBytes": 1960000, - "matchMs": 3.181, - "name": "2 MB CSV, 47 absent terms", - "outputBytes": 1960000, - "runtime": "go1.27.3", - "sha256": "b3882940c0ad7a4f8e1385dcd3e32122c721f26b90144bb820b542e394f379cd" - }, - { - "run": 0, - "implementation": "before", - "allocatedBytes": 288, - "compileMs": 7.343, - "inputBytes": 100800000, - "matchMs": 101.618, - "name": "100 MB CSV, 47 absent terms", - "outputBytes": 100800000, - "runtime": "go1.27.3", - "sha256": "fcccff214b1f6838f5d9345237f5252cd57e2263fc95640b2a3a5278156eec48" - }, - { - "run": 0, - "implementation": "before", - "allocatedBytes": 201666352, - "compileMs": 3.131, - "inputBytes": 50400041, - "matchMs": 591.941, - "name": "50 MB CSV, sparse matches", - "outputBytes": 50400014, - "runtime": "go1.27.3", - "sha256": "153ce777c4473651a70f3f2f830cac5930214f6b998c08094939646193b0f9f0" - }, - { - "run": 0, - "implementation": "before", - "allocatedBytes": 114620200, - "compileMs": 3.847, - "inputBytes": 21600000, - "matchMs": 394.294, - "name": "22 MB text, 1.2 million replacements", - "outputBytes": 19800000, - "runtime": "go1.27.3", - "sha256": "4e649aee83a6f15cb7178f725991ff5405affe013b0bba0b6eda18689c5c0249" - }, - { - "run": 0, - "implementation": "after", - "allocatedBytes": 288, - "compileMs": 7.654, - "inputBytes": 1960000, - "matchMs": 2.15, - "name": "2 MB CSV, 47 absent terms", - "outputBytes": 1960000, - "runtime": "go1.27.3", - "sha256": "b3882940c0ad7a4f8e1385dcd3e32122c721f26b90144bb820b542e394f379cd" - }, - { - "run": 0, - "implementation": "after", - "allocatedBytes": 288, - "compileMs": 3.392, - "inputBytes": 100800000, - "matchMs": 64.824, - "name": "100 MB CSV, 47 absent terms", - "outputBytes": 100800000, - "runtime": "go1.27.3", - "sha256": "fcccff214b1f6838f5d9345237f5252cd57e2263fc95640b2a3a5278156eec48" - }, - { - "run": 0, - "implementation": "after", - "allocatedBytes": 100815272, - "compileMs": 4.167, - "inputBytes": 50400041, - "matchMs": 269.905, - "name": "50 MB CSV, sparse matches", - "outputBytes": 50400014, - "runtime": "go1.27.3", - "sha256": "153ce777c4473651a70f3f2f830cac5930214f6b998c08094939646193b0f9f0" - }, - { - "run": 0, - "implementation": "after", - "allocatedBytes": 70813568, - "compileMs": 9.856, - "inputBytes": 21600000, - "matchMs": 322.06, - "name": "22 MB text, 1.2 million replacements", - "outputBytes": 19800000, - "runtime": "go1.27.3", - "sha256": "4e649aee83a6f15cb7178f725991ff5405affe013b0bba0b6eda18689c5c0249" - }, - { - "run": 1, - "implementation": "after", - "allocatedBytes": 288, - "compileMs": 7.513, - "inputBytes": 1960000, - "matchMs": 2.285, - "name": "2 MB CSV, 47 absent terms", - "outputBytes": 1960000, - "runtime": "go1.27.3", - "sha256": "b3882940c0ad7a4f8e1385dcd3e32122c721f26b90144bb820b542e394f379cd" - }, - { - "run": 1, - "implementation": "after", - "allocatedBytes": 288, - "compileMs": 5.949, - "inputBytes": 100800000, - "matchMs": 153.087, - "name": "100 MB CSV, 47 absent terms", - "outputBytes": 100800000, - "runtime": "go1.27.3", - "sha256": "fcccff214b1f6838f5d9345237f5252cd57e2263fc95640b2a3a5278156eec48" - }, - { - "run": 1, - "implementation": "after", - "allocatedBytes": 100852328, - "compileMs": 7.187, - "inputBytes": 50400041, - "matchMs": 329.242, - "name": "50 MB CSV, sparse matches", - "outputBytes": 50400014, - "runtime": "go1.27.3", - "sha256": "153ce777c4473651a70f3f2f830cac5930214f6b998c08094939646193b0f9f0" - }, - { - "run": 1, - "implementation": "after", - "allocatedBytes": 70813536, - "compileMs": 4.706, - "inputBytes": 21600000, - "matchMs": 189.823, - "name": "22 MB text, 1.2 million replacements", - "outputBytes": 19800000, - "runtime": "go1.27.3", - "sha256": "4e649aee83a6f15cb7178f725991ff5405affe013b0bba0b6eda18689c5c0249" - }, - { - "run": 1, - "implementation": "before", - "allocatedBytes": 288, - "compileMs": 4.075, - "inputBytes": 1960000, - "matchMs": 1.269, - "name": "2 MB CSV, 47 absent terms", - "outputBytes": 1960000, - "runtime": "go1.27.3", - "sha256": "b3882940c0ad7a4f8e1385dcd3e32122c721f26b90144bb820b542e394f379cd" - }, - { - "run": 1, - "implementation": "before", - "allocatedBytes": 288, - "compileMs": 5.607, - "inputBytes": 100800000, - "matchMs": 119.659, - "name": "100 MB CSV, 47 absent terms", - "outputBytes": 100800000, - "runtime": "go1.27.3", - "sha256": "fcccff214b1f6838f5d9345237f5252cd57e2263fc95640b2a3a5278156eec48" - }, - { - "run": 1, - "implementation": "before", - "allocatedBytes": 201634616, - "compileMs": 5.299, - "inputBytes": 50400041, - "matchMs": 624.138, - "name": "50 MB CSV, sparse matches", - "outputBytes": 50400014, - "runtime": "go1.27.3", - "sha256": "153ce777c4473651a70f3f2f830cac5930214f6b998c08094939646193b0f9f0" - }, - { - "run": 1, - "implementation": "before", - "allocatedBytes": 114614896, - "compileMs": 3.318, - "inputBytes": 21600000, - "matchMs": 484.591, - "name": "22 MB text, 1.2 million replacements", - "outputBytes": 19800000, - "runtime": "go1.27.3", - "sha256": "4e649aee83a6f15cb7178f725991ff5405affe013b0bba0b6eda18689c5c0249" - }, - { - "run": 2, - "implementation": "before", - "allocatedBytes": 288, - "compileMs": 6.028, - "inputBytes": 1960000, - "matchMs": 1.646, - "name": "2 MB CSV, 47 absent terms", - "outputBytes": 1960000, - "runtime": "go1.27.3", - "sha256": "b3882940c0ad7a4f8e1385dcd3e32122c721f26b90144bb820b542e394f379cd" - }, - { - "run": 2, - "implementation": "before", - "allocatedBytes": 272, - "compileMs": 12.547, - "inputBytes": 100800000, - "matchMs": 100.802, - "name": "100 MB CSV, 47 absent terms", - "outputBytes": 100800000, - "runtime": "go1.27.3", - "sha256": "fcccff214b1f6838f5d9345237f5252cd57e2263fc95640b2a3a5278156eec48" - }, - { - "run": 2, - "implementation": "before", - "allocatedBytes": 201666400, - "compileMs": 3.38, - "inputBytes": 50400041, - "matchMs": 589.404, - "name": "50 MB CSV, sparse matches", - "outputBytes": 50400014, - "runtime": "go1.27.3", - "sha256": "153ce777c4473651a70f3f2f830cac5930214f6b998c08094939646193b0f9f0" - }, - { - "run": 2, - "implementation": "before", - "allocatedBytes": 114614880, - "compileMs": 3.723, - "inputBytes": 21600000, - "matchMs": 358.638, - "name": "22 MB text, 1.2 million replacements", - "outputBytes": 19800000, - "runtime": "go1.27.3", - "sha256": "4e649aee83a6f15cb7178f725991ff5405affe013b0bba0b6eda18689c5c0249" - }, - { - "run": 2, - "implementation": "after", - "allocatedBytes": 288, - "compileMs": 7.414, - "inputBytes": 1960000, - "matchMs": 2.286, - "name": "2 MB CSV, 47 absent terms", - "outputBytes": 1960000, - "runtime": "go1.27.3", - "sha256": "b3882940c0ad7a4f8e1385dcd3e32122c721f26b90144bb820b542e394f379cd" - }, - { - "run": 2, - "implementation": "after", - "allocatedBytes": 272, - "compileMs": 5.508, - "inputBytes": 100800000, - "matchMs": 118.113, - "name": "100 MB CSV, 47 absent terms", - "outputBytes": 100800000, - "runtime": "go1.27.3", - "sha256": "fcccff214b1f6838f5d9345237f5252cd57e2263fc95640b2a3a5278156eec48" - }, - { - "run": 2, - "implementation": "after", - "allocatedBytes": 100815288, - "compileMs": 3.414, - "inputBytes": 50400041, - "matchMs": 247.259, - "name": "50 MB CSV, sparse matches", - "outputBytes": 50400014, - "runtime": "go1.27.3", - "sha256": "153ce777c4473651a70f3f2f830cac5930214f6b998c08094939646193b0f9f0" - }, - { - "run": 2, - "implementation": "after", - "allocatedBytes": 70813536, - "compileMs": 3.909, - "inputBytes": 21600000, - "matchMs": 162.45, - "name": "22 MB text, 1.2 million replacements", - "outputBytes": 19800000, - "runtime": "go1.27.3", - "sha256": "4e649aee83a6f15cb7178f725991ff5405affe013b0bba0b6eda18689c5c0249" - } - ] -} diff --git a/backend/reports/replacement-path-validation.json b/backend/reports/replacement-path-validation.json deleted file mode 100644 index 0188c73..0000000 --- a/backend/reports/replacement-path-validation.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "measuredAtUTC": "2026-11-03T19:58:01.673983+00:00", - "status": "verified_and_deployed_to_beta", - "changes": [ - "Replace full-file lowercase copies with monotonic ASCII case-insensitive candidate matching.", - "Cache upper/lower anchor positions and skip already-verified prefix bytes.", - "Maintain conservative letter filters after replacements instead of rescanning full ASCII outputs.", - "Use standard substring matching after 128 consecutive false anchor matches." - ], - "sources": { - "backend/internal/anonymize/anonymize.go": "6620796cfe9b435aa7168873448ae769c08276afcafd802a9e2e4cb60cd8dd86", - "backend/internal/anonymize/ascii_fold_test.go": "81712736dc4e7d195e149869eae260d6f1703f7df1dfcab2b57ad0a228569858", - "backend/internal/anonymize/transform_bench_test.go": "50225eb7c3b5a6dade41a9bda9a001df9afe082e15d073a4b8d418249b4db50f" - }, - "benchmarks": { - "beforeAfter": "replacement-path-optimization.json", - "nodeComparison": "replacement-path-node-comparison.json" - }, - "checks": { - "anonymizerRace": { - "result": "passed", - "file": "/tmp/go-slow-race-final.log", - "sha256": "d846039cfc87f5b9925c13daf87642fbcbda1d5b314b8c8afcb31714e960b808" - }, - "typescriptDifferential": { - "result": "passed", - "file": "/tmp/go-slow-differential-final.log", - "sha256": "9abca4ad1b10bb12893a83d1b7287adbd5910437e42838f56439c46d1670c927" - }, - "goVet": "passed ./internal/anonymize", - "httpPathRace": { - "result": "passed", - "file": "/tmp/go-slow-integration-current.log", - "sha256": "2a64abea1bbae1f0913af685f32a49a52d93cdf63d063dceaf249771efd6f32e" - }, - "betaBuild": { - "result": "passed", - "file": "/tmp/go-slow-build.log", - "sha256": "efa722f85cf36f2dcbbad5616d8fc5b9979afb09b3f2184f64d120ac8546bb01" - }, - "betaDeploy": { - "result": "passed", - "file": "/tmp/go-slow-deploy.log", - "sha256": "c849fba097d234d35f61a7619ebcacf71853659975af643e8bf3c8f9fae8f78e" - }, - "betaLive": { - "result": "passed", - "file": "/tmp/go-slow-live.log", - "sha256": "e4a2fdabceb30a0e9475031c08e0509fca4d126b05d44d37bcfb8540452d5d3e", - "uniqueRequestIDs": 94, - "temporaryKeyRevoked": true - }, - "formatting": "passed" - }, - "limits": [ - "Synthetic transform-only benchmarks; no overall HTTP or production speedup claim.", - "Three alternating fresh-process samples per implementation; small timings vary with host load.", - "Absent-term cases measured slower in this paired run (1.6 to 2.3 ms; 101.6 to 118.1 ms). Those cases still beat Node in the separate comparison.", - "Targeted race and differential validation; full server suite from the prior parity audit predates this optimization." - ], - "baselineBinarySHA256": "324961712046a463c89360033818d60fc6c33d2655ad6fe166e24f41e887fc19", - "optimizedBenchmarkBinarySHA256": "095f993791077faaf0bfcb8492d49e365d574779085a92791bee3f797b81424d", - "verifiedAtUTC": "2026-11-03T19:59:05.137591+00:00", - "imageID": "sha256:b7b69db7e8d6962c04e92a0a8a389565abe1eeeed717a6b435e68cf7e25c76ee", - "productionChanged": false -} diff --git a/backend/reports/repository-runtime-comparison-after.json b/backend/reports/repository-runtime-comparison-after.json deleted file mode 100644 index 6826772..0000000 --- a/backend/reports/repository-runtime-comparison-after.json +++ /dev/null @@ -1,1112 +0,0 @@ -{ - "recordedAt": "2026-11-04T08:01:12.162Z", - "node": "v24.14.1", - "go": "go version go1.27.3 linux/amd64", - "nodeSourceSHA256": "ccef1fc05af9de24f0d2bf9223d478c2455de0305129babf05d0ad2c22a0b185", - "goBinarySHA256": "21a84b62aee32f574fe552610afd27092b7e60cd36c3cc943710a1e94ba502cc", - "benchmarkScriptSHA256": "e13d1c2aeb83b78c7b616ab52dd73c51b5b000a8f02352c138f6f18b2d42e8f1", - "fixture": { - "repository": "tdurieux/anonymous_github", - "commit": "b09ef0e5b0027756ad86eb3353a5ff6416016ade", - "originalFiles": 1017, - "originalBytes": 28687144, - "terms": [ - "tdurieux" - ], - "addedFixture": "1000 copies of snapshot gulpfile.js in benchmark-1000" - }, - "method": { - "entrypoints": [ - "src/server/index.ts", - "backend/cmd/server" - ], - "provider": "Same pre-seeded archive snapshot; no GitHub API calls or production database", - "localZipOrigin": false, - "zipAuthorization": "Disposable admin API key to allow the TypeScript local ZIP route", - "sharedCache": true, - "encoding": "identity", - "cold": "First endpoint request per fresh process/storage; earlier cases may warm shared dependencies", - "warm": "32 requests per concurrency 1 and 8; ZIP 3 requests at concurrency 1", - "order": "Node then Go; Go then Node", - "resources": "Process tree CPU and RSS; excludes MongoDB, Redis and client; CPU may include background work", - "scope": "HTTP backend only; excludes browser rendering, CDN, GitHub authorization and network fetch" - }, - "results": [ - { - "runtime": "node", - "repeat": 0, - "results": [ - { - "name": "root directory", - "cold": { - "ms": 132.07615000000078, - "firstBodyMs": 131.605375000001, - "status": 200, - "bytes": 1346 - }, - "output": { - "status": 200, - "sha256": "52d03ac37d3e22e85d9629413d91a29d1f98410b2d34e419785ba1ad00dafa9d", - "entries": 24 - }, - "warm": [ - { - "concurrency": 1, - "requests": 32, - "p50Ms": 29.76382999999987, - "p95Ms": 48.95969800000057, - "p50FirstBodyMs": 29.684771000000183, - "requestsPerSecond": 31.359652362573716, - "cpuMs": 1120, - "peakProcessTreeRssBytes": 270557184, - "bytes": 1346 - }, - { - "concurrency": 8, - "requests": 32, - "p50Ms": 138.9903689999992, - "p95Ms": 189.49571500000093, - "p50FirstBodyMs": 138.90810399999827, - "requestsPerSecond": 59.77863709153458, - "cpuMs": 810, - "peakProcessTreeRssBytes": 305160192, - "bytes": 1346 - } - ] - }, - { - "name": "src directory", - "cold": { - "ms": 24.306398999997327, - "firstBodyMs": 24.21460599999773, - "status": 200, - "bytes": 247 - }, - "output": { - "status": 200, - "sha256": "012081e4d80b7bf24a5931359e89d5fefa0489a7989fd86ff4fdc01bb090d92b", - "entries": 7 - }, - "warm": [ - { - "concurrency": 1, - "requests": 32, - "p50Ms": 17.885591999998724, - "p95Ms": 22.07143300000098, - "p50FirstBodyMs": 17.80536899999788, - "requestsPerSecond": 52.87592651780297, - "cpuMs": 500, - "peakProcessTreeRssBytes": 306237440, - "bytes": 247 - }, - { - "concurrency": 8, - "requests": 32, - "p50Ms": 91.7085189999998, - "p95Ms": 104.92555499999798, - "p50FirstBodyMs": 91.65466299999753, - "requestsPerSecond": 87.33676322269869, - "cpuMs": 450, - "peakProcessTreeRssBytes": 306778112, - "bytes": 247 - } - ] - }, - { - "name": "1000-file directory", - "cold": { - "ms": 106.00798700000087, - "firstBodyMs": 105.69503099999929, - "status": 200, - "bytes": 77001 - }, - "output": { - "status": 200, - "sha256": "8b091406715c6232458f52f8c2516031ed2359d2586737cb3923559f96c8c841", - "entries": 1000 - }, - "warm": [ - { - "concurrency": 1, - "requests": 32, - "p50Ms": 93.54047300000093, - "p95Ms": 126.65469999999914, - "p50FirstBodyMs": 93.20823700000255, - "requestsPerSecond": 10.29870932661209, - "cpuMs": 3110, - "peakProcessTreeRssBytes": 338878464, - "bytes": 77001 - }, - { - "concurrency": 8, - "requests": 32, - "p50Ms": 391.2864609999997, - "p95Ms": 595.172848000002, - "p50FirstBodyMs": 391.0120109999989, - "requestsPerSecond": 17.935415180858804, - "cpuMs": 2290, - "peakProcessTreeRssBytes": 355397632, - "bytes": 77001 - } - ] - }, - { - "name": "file counts", - "cold": { - "ms": 35.99600800000189, - "firstBodyMs": 35.91783300000316, - "status": 200, - "bytes": 1017 - }, - "output": { - "status": 200, - "sha256": "14157927c66f50f4a524e003f0dd849218f678cffc266a149d37b2afc6c64386", - "entries": 45 - }, - "warm": [ - { - "concurrency": 1, - "requests": 32, - "p50Ms": 27.949556999999913, - "p95Ms": 32.77352999999857, - "p50FirstBodyMs": 27.889979000003223, - "requestsPerSecond": 34.745709922493766, - "cpuMs": 400, - "peakProcessTreeRssBytes": 356749312, - "bytes": 1017 - }, - { - "concurrency": 8, - "requests": 32, - "p50Ms": 70.78673200000048, - "p95Ms": 81.72567200000049, - "p50FirstBodyMs": 70.74827799999912, - "requestsPerSecond": 107.5504101796205, - "cpuMs": 390, - "peakProcessTreeRssBytes": 357826560, - "bytes": 1017 - } - ] - }, - { - "name": "gulpfile.js", - "cold": { - "ms": 63.479858999999124, - "firstBodyMs": 63.235937000001286, - "status": 200, - "bytes": 5822 - }, - "output": { - "status": 200, - "sha256": "582a19c5d0d13b0526acfa491de26b4ad60f75c7fa13fed1054d7f66d22385fc" - }, - "warm": [ - { - "concurrency": 1, - "requests": 32, - "p50Ms": 22.11151200000313, - "p95Ms": 23.968709000000672, - "p50FirstBodyMs": 21.720893999998225, - "requestsPerSecond": 45.24260192301788, - "cpuMs": 680, - "peakProcessTreeRssBytes": 360005632, - "bytes": 5822 - }, - { - "concurrency": 8, - "requests": 32, - "p50Ms": 93.86224800000127, - "p95Ms": 112.55945500000234, - "p50FirstBodyMs": 93.6833149999984, - "requestsPerSecond": 78.42460861874304, - "cpuMs": 500, - "peakProcessTreeRssBytes": 362508288, - "bytes": 5822 - } - ] - }, - { - "name": "src/config.ts", - "cold": { - "ms": 24.758710000001884, - "firstBodyMs": 24.529631000001245, - "status": 200, - "bytes": 6767 - }, - "output": { - "status": 200, - "sha256": "dadc35430eb9fa79ccf887b613704619199cbd111af8dddfc30e5c6ca3f5d003" - }, - "warm": [ - { - "concurrency": 1, - "requests": 32, - "p50Ms": 25.391749999998865, - "p95Ms": 40.03712799999994, - "p50FirstBodyMs": 25.175090000000637, - "requestsPerSecond": 37.83757497534691, - "cpuMs": 760, - "peakProcessTreeRssBytes": 363626496, - "bytes": 6767 - }, - { - "concurrency": 8, - "requests": 32, - "p50Ms": 99.45711200000005, - "p95Ms": 119.21284200000082, - "p50FirstBodyMs": 99.21641299999828, - "requestsPerSecond": 76.61342351358961, - "cpuMs": 490, - "peakProcessTreeRssBytes": 363163648, - "bytes": 6767 - } - ] - }, - { - "name": "website gulpfile.js", - "cold": { - "ms": 22.31499299999996, - "firstBodyMs": 22.054096999996545, - "status": 200, - "bytes": 5822 - }, - "output": { - "status": 200, - "sha256": "582a19c5d0d13b0526acfa491de26b4ad60f75c7fa13fed1054d7f66d22385fc" - }, - "warm": [ - { - "concurrency": 1, - "requests": 32, - "p50Ms": 18.215135000002192, - "p95Ms": 21.07188799999858, - "p50FirstBodyMs": 17.721126000000368, - "requestsPerSecond": 53.56282593921113, - "cpuMs": 480, - "peakProcessTreeRssBytes": 365314048, - "bytes": 5822 - }, - { - "concurrency": 8, - "requests": 32, - "p50Ms": 97.19584000000032, - "p95Ms": 179.96553199999835, - "p50FirstBodyMs": 95.53990499999782, - "requestsPerSecond": 69.75880261805646, - "cpuMs": 1090, - "peakProcessTreeRssBytes": 370421760, - "bytes": 5822 - } - ] - } - ] - }, - { - "runtime": "go", - "repeat": 0, - "results": [ - { - "name": "root directory", - "cold": { - "ms": 16.048812000000908, - "firstBodyMs": 15.971614999994927, - "status": 200, - "bytes": 1346 - }, - "output": { - "status": 200, - "sha256": "52d03ac37d3e22e85d9629413d91a29d1f98410b2d34e419785ba1ad00dafa9d", - "entries": 24 - }, - "warm": [ - { - "concurrency": 1, - "requests": 32, - "p50Ms": 8.207602000002225, - "p95Ms": 11.153110999999626, - "p50FirstBodyMs": 8.11582400000043, - "requestsPerSecond": 114.71396651396722, - "cpuMs": 190, - "peakProcessTreeRssBytes": 72757248, - "bytes": 1346 - }, - { - "concurrency": 8, - "requests": 32, - "p50Ms": 10.984481999999844, - "p95Ms": 26.83585899999889, - "p50FirstBodyMs": 10.915475999994669, - "requestsPerSecond": 544.5428291528798, - "cpuMs": 190, - "peakProcessTreeRssBytes": 81264640, - "bytes": 1346 - } - ] - }, - { - "name": "src directory", - "cold": { - "ms": 7.816129999999248, - "firstBodyMs": 7.768334000000323, - "status": 200, - "bytes": 247 - }, - "output": { - "status": 200, - "sha256": "012081e4d80b7bf24a5931359e89d5fefa0489a7989fd86ff4fdc01bb090d92b", - "entries": 7 - }, - "warm": [ - { - "concurrency": 1, - "requests": 32, - "p50Ms": 5.828464999998687, - "p95Ms": 7.004590999997163, - "p50FirstBodyMs": 5.7695479999965755, - "requestsPerSecond": 164.6417718154789, - "cpuMs": 130, - "peakProcessTreeRssBytes": 82120704, - "bytes": 247 - }, - { - "concurrency": 8, - "requests": 32, - "p50Ms": 6.8658549999963725, - "p95Ms": 12.065789000000223, - "p50FirstBodyMs": 6.828740999997535, - "requestsPerSecond": 967.4306315202873, - "cpuMs": 90, - "peakProcessTreeRssBytes": 83918848, - "bytes": 247 - } - ] - }, - { - "name": "1000-file directory", - "cold": { - "ms": 66.61455299999943, - "firstBodyMs": 66.15499799999816, - "status": 200, - "bytes": 77001 - }, - "output": { - "status": 200, - "sha256": "8b091406715c6232458f52f8c2516031ed2359d2586737cb3923559f96c8c841", - "entries": 1000 - }, - "warm": [ - { - "concurrency": 1, - "requests": 32, - "p50Ms": 66.1953979999962, - "p95Ms": 73.94301500000438, - "p50FirstBodyMs": 65.5252959999998, - "requestsPerSecond": 14.91289280977921, - "cpuMs": 1880, - "peakProcessTreeRssBytes": 323821568, - "bytes": 77001 - }, - { - "concurrency": 8, - "requests": 32, - "p50Ms": 54.068994999994175, - "p95Ms": 79.28989599999477, - "p50FirstBodyMs": 53.7309580000001, - "requestsPerSecond": 127.2772545825244, - "cpuMs": 1280, - "peakProcessTreeRssBytes": 348434432, - "bytes": 77001 - } - ] - }, - { - "name": "file counts", - "cold": { - "ms": 25.211135000005015, - "firstBodyMs": 25.15098500000022, - "status": 200, - "bytes": 1017 - }, - "output": { - "status": 200, - "sha256": "14157927c66f50f4a524e003f0dd849218f678cffc266a149d37b2afc6c64386", - "entries": 45 - }, - "warm": [ - { - "concurrency": 1, - "requests": 32, - "p50Ms": 19.703330000003916, - "p95Ms": 22.6444979999942, - "p50FirstBodyMs": 19.65281700000196, - "requestsPerSecond": 49.33979385510361, - "cpuMs": 200, - "peakProcessTreeRssBytes": 350572544, - "bytes": 1017 - }, - { - "concurrency": 8, - "requests": 32, - "p50Ms": 23.741942999993626, - "p95Ms": 30.619634000002407, - "p50FirstBodyMs": 23.705472999994527, - "requestsPerSecond": 302.24180111027425, - "cpuMs": 120, - "peakProcessTreeRssBytes": 350707712, - "bytes": 1017 - } - ] - }, - { - "name": "gulpfile.js", - "cold": { - "ms": 49.494245999994746, - "firstBodyMs": 46.66990299999452, - "status": 200, - "bytes": 5822 - }, - "output": { - "status": 200, - "sha256": "582a19c5d0d13b0526acfa491de26b4ad60f75c7fa13fed1054d7f66d22385fc" - }, - "warm": [ - { - "concurrency": 1, - "requests": 32, - "p50Ms": 18.503705999995873, - "p95Ms": 20.815794999994978, - "p50FirstBodyMs": 16.028693000000203, - "requestsPerSecond": 53.07726331493991, - "cpuMs": 420, - "peakProcessTreeRssBytes": 353181696, - "bytes": 5822 - }, - { - "concurrency": 8, - "requests": 32, - "p50Ms": 64.63597999999911, - "p95Ms": 68.52337000000261, - "p50FirstBodyMs": 62.53452300000208, - "requestsPerSecond": 117.73580478349973, - "cpuMs": 310, - "peakProcessTreeRssBytes": 353857536, - "bytes": 5822 - } - ] - }, - { - "name": "src/config.ts", - "cold": { - "ms": 39.16288299999724, - "firstBodyMs": 36.97662099999434, - "status": 200, - "bytes": 6767 - }, - "output": { - "status": 200, - "sha256": "dadc35430eb9fa79ccf887b613704619199cbd111af8dddfc30e5c6ca3f5d003" - }, - "warm": [ - { - "concurrency": 1, - "requests": 32, - "p50Ms": 19.68461699999898, - "p95Ms": 22.110742999997456, - "p50FirstBodyMs": 16.962932000002183, - "requestsPerSecond": 50.387327782313704, - "cpuMs": 390, - "peakProcessTreeRssBytes": 354697216, - "bytes": 6767 - }, - { - "concurrency": 8, - "requests": 32, - "p50Ms": 68.12213099999644, - "p95Ms": 78.65266699999484, - "p50FirstBodyMs": 65.64554199999839, - "requestsPerSecond": 107.52508819039787, - "cpuMs": 400, - "peakProcessTreeRssBytes": 358858752, - "bytes": 6767 - } - ] - }, - { - "name": "website gulpfile.js", - "cold": { - "ms": 27.951101999999082, - "firstBodyMs": 27.61205300000438, - "status": 200, - "bytes": 5822 - }, - "output": { - "status": 200, - "sha256": "582a19c5d0d13b0526acfa491de26b4ad60f75c7fa13fed1054d7f66d22385fc" - }, - "warm": [ - { - "concurrency": 1, - "requests": 32, - "p50Ms": 16.365821999999753, - "p95Ms": 18.545943000004627, - "p50FirstBodyMs": 15.83622699999978, - "requestsPerSecond": 60.58860936529614, - "cpuMs": 330, - "peakProcessTreeRssBytes": 358858752, - "bytes": 5822 - }, - { - "concurrency": 8, - "requests": 32, - "p50Ms": 55.4737329999989, - "p95Ms": 61.850891000001866, - "p50FirstBodyMs": 54.89072600000509, - "requestsPerSecond": 134.37054517027696, - "cpuMs": 320, - "peakProcessTreeRssBytes": 359690240, - "bytes": 5822 - } - ] - } - ] - }, - { - "runtime": "go", - "repeat": 1, - "results": [ - { - "name": "root directory", - "cold": { - "ms": 15.569563000004564, - "firstBodyMs": 15.532813000005262, - "status": 200, - "bytes": 1346 - }, - "output": { - "status": 200, - "sha256": "52d03ac37d3e22e85d9629413d91a29d1f98410b2d34e419785ba1ad00dafa9d", - "entries": 24 - }, - "warm": [ - { - "concurrency": 1, - "requests": 32, - "p50Ms": 7.362682000006316, - "p95Ms": 10.911121999997704, - "p50FirstBodyMs": 7.337463000003481, - "requestsPerSecond": 126.75736911689602, - "cpuMs": 200, - "peakProcessTreeRssBytes": 73289728, - "bytes": 1346 - }, - { - "concurrency": 8, - "requests": 32, - "p50Ms": 8.315572999999858, - "p95Ms": 18.331459000000905, - "p50FirstBodyMs": 8.296043999995163, - "requestsPerSecond": 712.7292916949376, - "cpuMs": 180, - "peakProcessTreeRssBytes": 80904192, - "bytes": 1346 - } - ] - }, - { - "name": "src directory", - "cold": { - "ms": 7.296722999999474, - "firstBodyMs": 7.272149000003992, - "status": 200, - "bytes": 247 - }, - "output": { - "status": 200, - "sha256": "012081e4d80b7bf24a5931359e89d5fefa0489a7989fd86ff4fdc01bb090d92b", - "entries": 7 - }, - "warm": [ - { - "concurrency": 1, - "requests": 32, - "p50Ms": 5.3705059999992955, - "p95Ms": 6.401194999998552, - "p50FirstBodyMs": 5.343194000000949, - "requestsPerSecond": 180.50327392607932, - "cpuMs": 110, - "peakProcessTreeRssBytes": 81551360, - "bytes": 247 - }, - { - "concurrency": 8, - "requests": 32, - "p50Ms": 7.1888919999983045, - "p95Ms": 10.605815999995684, - "p50FirstBodyMs": 7.158136999998533, - "requestsPerSecond": 938.3227275985622, - "cpuMs": 100, - "peakProcessTreeRssBytes": 84123648, - "bytes": 247 - } - ] - }, - { - "name": "1000-file directory", - "cold": { - "ms": 74.1289620000025, - "firstBodyMs": 73.78365199999826, - "status": 200, - "bytes": 77001 - }, - "output": { - "status": 200, - "sha256": "8b091406715c6232458f52f8c2516031ed2359d2586737cb3923559f96c8c841", - "entries": 1000 - }, - "warm": [ - { - "concurrency": 1, - "requests": 32, - "p50Ms": 64.73391299999639, - "p95Ms": 75.46802899999602, - "p50FirstBodyMs": 64.08076799999981, - "requestsPerSecond": 15.590522381908842, - "cpuMs": 1780, - "peakProcessTreeRssBytes": 324775936, - "bytes": 77001 - }, - { - "concurrency": 8, - "requests": 32, - "p50Ms": 49.29750600000261, - "p95Ms": 67.78491100000247, - "p50FirstBodyMs": 48.76215300000331, - "requestsPerSecond": 146.83353324948285, - "cpuMs": 1260, - "peakProcessTreeRssBytes": 342282240, - "bytes": 77001 - } - ] - }, - { - "name": "file counts", - "cold": { - "ms": 21.11786800000118, - "firstBodyMs": 21.089144999998098, - "status": 200, - "bytes": 1017 - }, - "output": { - "status": 200, - "sha256": "14157927c66f50f4a524e003f0dd849218f678cffc266a149d37b2afc6c64386", - "entries": 45 - }, - "warm": [ - { - "concurrency": 1, - "requests": 32, - "p50Ms": 19.53651499999978, - "p95Ms": 23.80284699999902, - "p50FirstBodyMs": 19.513896999997087, - "requestsPerSecond": 49.31902311875119, - "cpuMs": 190, - "peakProcessTreeRssBytes": 344035328, - "bytes": 1017 - }, - { - "concurrency": 8, - "requests": 32, - "p50Ms": 19.604568000002473, - "p95Ms": 24.590220999998564, - "p50FirstBodyMs": 19.588872000000265, - "requestsPerSecond": 372.95386148156115, - "cpuMs": 110, - "peakProcessTreeRssBytes": 344588288, - "bytes": 1017 - } - ] - }, - { - "name": "gulpfile.js", - "cold": { - "ms": 48.854630000001634, - "firstBodyMs": 46.22104400000535, - "status": 200, - "bytes": 5822 - }, - "output": { - "status": 200, - "sha256": "582a19c5d0d13b0526acfa491de26b4ad60f75c7fa13fed1054d7f66d22385fc" - }, - "warm": [ - { - "concurrency": 1, - "requests": 32, - "p50Ms": 17.263605000000098, - "p95Ms": 20.799374999995052, - "p50FirstBodyMs": 15.127828000004229, - "requestsPerSecond": 55.7874899141009, - "cpuMs": 400, - "peakProcessTreeRssBytes": 345694208, - "bytes": 5822 - }, - { - "concurrency": 8, - "requests": 32, - "p50Ms": 63.73719500000152, - "p95Ms": 79.69453099999373, - "p50FirstBodyMs": 61.95389900000009, - "requestsPerSecond": 111.48147812929561, - "cpuMs": 340, - "peakProcessTreeRssBytes": 348315648, - "bytes": 5822 - } - ] - }, - { - "name": "src/config.ts", - "cold": { - "ms": 46.92499300000054, - "firstBodyMs": 44.245124999994005, - "status": 200, - "bytes": 6767 - }, - "output": { - "status": 200, - "sha256": "dadc35430eb9fa79ccf887b613704619199cbd111af8dddfc30e5c6ca3f5d003" - }, - "warm": [ - { - "concurrency": 1, - "requests": 32, - "p50Ms": 20.37922499999695, - "p95Ms": 23.225579999998445, - "p50FirstBodyMs": 18.05154799999582, - "requestsPerSecond": 48.29500273164038, - "cpuMs": 460, - "peakProcessTreeRssBytes": 353206272, - "bytes": 6767 - }, - { - "concurrency": 8, - "requests": 32, - "p50Ms": 67.89345099999628, - "p95Ms": 74.50259699999879, - "p50FirstBodyMs": 65.69667900000059, - "requestsPerSecond": 109.89286136281835, - "cpuMs": 350, - "peakProcessTreeRssBytes": 353857536, - "bytes": 6767 - } - ] - }, - { - "name": "website gulpfile.js", - "cold": { - "ms": 27.500686999999743, - "firstBodyMs": 26.95561799999996, - "status": 200, - "bytes": 5822 - }, - "output": { - "status": 200, - "sha256": "582a19c5d0d13b0526acfa491de26b4ad60f75c7fa13fed1054d7f66d22385fc" - }, - "warm": [ - { - "concurrency": 1, - "requests": 32, - "p50Ms": 16.731995000001916, - "p95Ms": 19.36412399999972, - "p50FirstBodyMs": 15.983568000003288, - "requestsPerSecond": 58.682785223771354, - "cpuMs": 330, - "peakProcessTreeRssBytes": 353857536, - "bytes": 5822 - }, - { - "concurrency": 8, - "requests": 32, - "p50Ms": 48.39284000000043, - "p95Ms": 54.64674599999853, - "p50FirstBodyMs": 47.85957199999393, - "requestsPerSecond": 152.38469306234558, - "cpuMs": 280, - "peakProcessTreeRssBytes": 354050048, - "bytes": 5822 - } - ] - } - ] - }, - { - "runtime": "node", - "repeat": 1, - "results": [ - { - "name": "root directory", - "cold": { - "ms": 111.79441199999565, - "firstBodyMs": 111.75863499999832, - "status": 200, - "bytes": 1346 - }, - "output": { - "status": 200, - "sha256": "52d03ac37d3e22e85d9629413d91a29d1f98410b2d34e419785ba1ad00dafa9d", - "entries": 24 - }, - "warm": [ - { - "concurrency": 1, - "requests": 32, - "p50Ms": 23.553570999996737, - "p95Ms": 37.74922599999991, - "p50FirstBodyMs": 23.535873999993782, - "requestsPerSecond": 39.997429115246646, - "cpuMs": 890, - "peakProcessTreeRssBytes": 269078528, - "bytes": 1346 - }, - { - "concurrency": 8, - "requests": 32, - "p50Ms": 158.44554400000197, - "p95Ms": 198.34757900000113, - "p50FirstBodyMs": 158.41693400000077, - "requestsPerSecond": 51.3269316662568, - "cpuMs": 880, - "peakProcessTreeRssBytes": 307257344, - "bytes": 1346 - } - ] - }, - { - "name": "src directory", - "cold": { - "ms": 28.018921000002592, - "firstBodyMs": 27.987997999996878, - "status": 200, - "bytes": 247 - }, - "output": { - "status": 200, - "sha256": "012081e4d80b7bf24a5931359e89d5fefa0489a7989fd86ff4fdc01bb090d92b", - "entries": 7 - }, - "warm": [ - { - "concurrency": 1, - "requests": 32, - "p50Ms": 18.53220500000316, - "p95Ms": 21.769655000003695, - "p50FirstBodyMs": 18.507213000004413, - "requestsPerSecond": 53.13389966875204, - "cpuMs": 520, - "peakProcessTreeRssBytes": 307527680, - "bytes": 247 - }, - { - "concurrency": 8, - "requests": 32, - "p50Ms": 107.07592699999805, - "p95Ms": 115.43733500000235, - "p50FirstBodyMs": 107.05490299999656, - "requestsPerSecond": 79.26569272893528, - "cpuMs": 500, - "peakProcessTreeRssBytes": 308068352, - "bytes": 247 - } - ] - }, - { - "name": "1000-file directory", - "cold": { - "ms": 98.9380369999999, - "firstBodyMs": 98.69705399999657, - "status": 200, - "bytes": 77001 - }, - "output": { - "status": 200, - "sha256": "8b091406715c6232458f52f8c2516031ed2359d2586737cb3923559f96c8c841", - "entries": 1000 - }, - "warm": [ - { - "concurrency": 1, - "requests": 32, - "p50Ms": 90.16207299999951, - "p95Ms": 144.1630340000047, - "p50FirstBodyMs": 89.91139300000214, - "requestsPerSecond": 10.781619790132934, - "cpuMs": 3000, - "peakProcessTreeRssBytes": 340520960, - "bytes": 77001 - }, - { - "concurrency": 8, - "requests": 32, - "p50Ms": 470.5771559999994, - "p95Ms": 783.7959610000107, - "p50FirstBodyMs": 470.3742569999886, - "requestsPerSecond": 14.513140010108506, - "cpuMs": 2390, - "peakProcessTreeRssBytes": 355172352, - "bytes": 77001 - } - ] - }, - { - "name": "file counts", - "cold": { - "ms": 44.745492999994894, - "firstBodyMs": 44.70909600000596, - "status": 200, - "bytes": 1017 - }, - "output": { - "status": 200, - "sha256": "14157927c66f50f4a524e003f0dd849218f678cffc266a149d37b2afc6c64386", - "entries": 45 - }, - "warm": [ - { - "concurrency": 1, - "requests": 32, - "p50Ms": 28.042218000002322, - "p95Ms": 35.21486399999412, - "p50FirstBodyMs": 28.016088000003947, - "requestsPerSecond": 34.27169597479083, - "cpuMs": 400, - "peakProcessTreeRssBytes": 355713024, - "bytes": 1017 - }, - { - "concurrency": 8, - "requests": 32, - "p50Ms": 64.79578699999547, - "p95Ms": 81.18939499999397, - "p50FirstBodyMs": 64.77492299998994, - "requestsPerSecond": 116.47661147640092, - "cpuMs": 360, - "peakProcessTreeRssBytes": 358146048, - "bytes": 1017 - } - ] - }, - { - "name": "gulpfile.js", - "cold": { - "ms": 64.36328400000639, - "firstBodyMs": 64.01776500001142, - "status": 200, - "bytes": 5822 - }, - "output": { - "status": 200, - "sha256": "582a19c5d0d13b0526acfa491de26b4ad60f75c7fa13fed1054d7f66d22385fc" - }, - "warm": [ - { - "concurrency": 1, - "requests": 32, - "p50Ms": 23.04718700000376, - "p95Ms": 35.1454689999955, - "p50FirstBodyMs": 22.804770999995526, - "requestsPerSecond": 40.43509920618287, - "cpuMs": 1070, - "peakProcessTreeRssBytes": 357163008, - "bytes": 5822 - }, - { - "concurrency": 8, - "requests": 32, - "p50Ms": 132.24314199999208, - "p95Ms": 148.7141330000013, - "p50FirstBodyMs": 132.2190319999936, - "requestsPerSecond": 57.26793173747026, - "cpuMs": 660, - "peakProcessTreeRssBytes": 359657472, - "bytes": 5822 - } - ] - }, - { - "name": "src/config.ts", - "cold": { - "ms": 24.21396399999503, - "firstBodyMs": 24.05641399999149, - "status": 200, - "bytes": 6767 - }, - "output": { - "status": 200, - "sha256": "dadc35430eb9fa79ccf887b613704619199cbd111af8dddfc30e5c6ca3f5d003" - }, - "warm": [ - { - "concurrency": 1, - "requests": 32, - "p50Ms": 25.17453000000387, - "p95Ms": 31.107340000002296, - "p50FirstBodyMs": 25.020793999996386, - "requestsPerSecond": 39.27303641043328, - "cpuMs": 750, - "peakProcessTreeRssBytes": 362782720, - "bytes": 6767 - }, - { - "concurrency": 8, - "requests": 32, - "p50Ms": 120.10156100000313, - "p95Ms": 141.6682690000016, - "p50FirstBodyMs": 119.95736200000101, - "requestsPerSecond": 64.7120718365949, - "cpuMs": 590, - "peakProcessTreeRssBytes": 365051904, - "bytes": 6767 - } - ] - }, - { - "name": "website gulpfile.js", - "cold": { - "ms": 22.115105000004405, - "firstBodyMs": 21.880285999999614, - "status": 200, - "bytes": 5822 - }, - "output": { - "status": 200, - "sha256": "582a19c5d0d13b0526acfa491de26b4ad60f75c7fa13fed1054d7f66d22385fc" - }, - "warm": [ - { - "concurrency": 1, - "requests": 32, - "p50Ms": 18.099130000002333, - "p95Ms": 28.06018800000311, - "p50FirstBodyMs": 17.75687399999879, - "requestsPerSecond": 52.54067338537345, - "cpuMs": 590, - "peakProcessTreeRssBytes": 365629440, - "bytes": 5822 - }, - { - "concurrency": 8, - "requests": 32, - "p50Ms": 102.15324500000861, - "p95Ms": 121.83637399999134, - "p50FirstBodyMs": 101.99620100000175, - "requestsPerSecond": 75.25089353381247, - "cpuMs": 600, - "peakProcessTreeRssBytes": 368308224, - "bytes": 5822 - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/backend/reports/repository-runtime-comparison-summary.json b/backend/reports/repository-runtime-comparison-summary.json deleted file mode 100644 index 16edb48..0000000 --- a/backend/reports/repository-runtime-comparison-summary.json +++ /dev/null @@ -1,476 +0,0 @@ -{ - "fixture": { - "repository": "tdurieux/anonymous_github", - "commit": "b09ef0e5b0027756ad86eb3353a5ff6416016ade", - "originalFiles": 1017, - "originalBytes": 28687144, - "addedFixture": "1000 copies of snapshot gulpfile.js in benchmark-1000", - "terms": [ - "tdurieux" - ] - }, - "summary": [ - { - "name": "root directory", - "node": { - "status": 200, - "output": { - "status": 200, - "sha256": "52d03ac37d3e22e85d9629413d91a29d1f98410b2d34e419785ba1ad00dafa9d", - "entries": 24 - }, - "coldMs": 124.26789300002383, - "warm": [ - { - "concurrency": 1, - "p50Ms": 27.851555499993992, - "p95Ms": 40.67887150000388, - "firstBodyMs": 27.715671000012662, - "requestsPerSecond": 33.940543569219095, - "cpuMsPerRequest": 36.71875, - "peakRSSMiB": 290.81640625 - }, - { - "concurrency": 8, - "p50Ms": 120.4976090000182, - "p95Ms": 164.89869749998434, - "firstBodyMs": 120.43483450001622, - "requestsPerSecond": 63.59059160386532, - "cpuMsPerRequest": 23.90625, - "peakRSSMiB": 296.03125 - } - ] - }, - "go": { - "status": 200, - "output": { - "status": 200, - "sha256": "52d03ac37d3e22e85d9629413d91a29d1f98410b2d34e419785ba1ad00dafa9d", - "entries": 24 - }, - "coldMs": 19.393674499988265, - "warm": [ - { - "concurrency": 1, - "p50Ms": 7.403331500001514, - "p95Ms": 10.997728000002098, - "firstBodyMs": 7.362432500005525, - "requestsPerSecond": 123.65028053177949, - "cpuMsPerRequest": 5.78125, - "peakRSSMiB": 70.28515625 - }, - { - "concurrency": 8, - "p50Ms": 9.341673500006436, - "p95Ms": 22.23802649999925, - "firstBodyMs": 9.310406999997213, - "requestsPerSecond": 625.0860770621364, - "cpuMsPerRequest": 5.625, - "peakRSSMiB": 77.53125 - } - ] - }, - "outputParity": true - }, - { - "name": "src directory", - "node": { - "status": 200, - "output": { - "status": 200, - "sha256": "012081e4d80b7bf24a5931359e89d5fefa0489a7989fd86ff4fdc01bb090d92b", - "entries": 7 - }, - "coldMs": 29.600288000001456, - "warm": [ - { - "concurrency": 1, - "p50Ms": 21.103132500018546, - "p95Ms": 26.784148500008087, - "firstBodyMs": 21.013871000019208, - "requestsPerSecond": 47.07692828634931, - "cpuMsPerRequest": 17.8125, - "peakRSSMiB": 297.3203125 - }, - { - "concurrency": 8, - "p50Ms": 99.87959550002051, - "p95Ms": 115.40365999999449, - "firstBodyMs": 99.81212050000431, - "requestsPerSecond": 78.32172661172507, - "cpuMsPerRequest": 15.46875, - "peakRSSMiB": 298.09375 - } - ] - }, - "go": { - "status": 200, - "output": { - "status": 200, - "sha256": "012081e4d80b7bf24a5931359e89d5fefa0489a7989fd86ff4fdc01bb090d92b", - "entries": 7 - }, - "coldMs": 8.060878500000399, - "warm": [ - { - "concurrency": 1, - "p50Ms": 6.060465499998827, - "p95Ms": 7.087685999991663, - "firstBodyMs": 6.018084999988787, - "requestsPerSecond": 160.05552208096725, - "cpuMsPerRequest": 3.59375, - "peakRSSMiB": 78.49609375 - }, - { - "concurrency": 8, - "p50Ms": 8.227547999998933, - "p95Ms": 12.091938999994454, - "firstBodyMs": 8.07191499998953, - "requestsPerSecond": 852.6113434439787, - "cpuMsPerRequest": 3.125, - "peakRSSMiB": 81.44921875 - } - ] - }, - "outputParity": true - }, - { - "name": "1000-file directory", - "node": { - "status": 200, - "output": { - "status": 200, - "sha256": "8b091406715c6232458f52f8c2516031ed2359d2586737cb3923559f96c8c841", - "entries": 1000 - }, - "coldMs": 111.27095649999137, - "warm": [ - { - "concurrency": 1, - "p50Ms": 87.43108849998498, - "p95Ms": 131.29066700000112, - "firstBodyMs": 87.0139924999985, - "requestsPerSecond": 10.69992739910396, - "cpuMsPerRequest": 97.5, - "peakRSSMiB": 321.40625 - }, - { - "concurrency": 8, - "p50Ms": 467.85040200000003, - "p95Ms": 714.7312750000092, - "firstBodyMs": 467.5506284999883, - "requestsPerSecond": 16.24940912171465, - "cpuMsPerRequest": 68.125, - "peakRSSMiB": 329.9140625 - } - ] - }, - "go": { - "status": 200, - "output": { - "status": 200, - "sha256": "8b091406715c6232458f52f8c2516031ed2359d2586737cb3923559f96c8c841", - "entries": 1000 - }, - "coldMs": 62.96934049999618, - "warm": [ - { - "concurrency": 1, - "p50Ms": 64.99477400000251, - "p95Ms": 77.43742199999542, - "firstBodyMs": 64.49705750000066, - "requestsPerSecond": 15.166581719605437, - "cpuMsPerRequest": 58.90625, - "peakRSSMiB": 311.6640625 - }, - { - "concurrency": 8, - "p50Ms": 53.277233500000875, - "p95Ms": 77.01955949999683, - "firstBodyMs": 52.56587999999829, - "requestsPerSecond": 133.32074875303596, - "cpuMsPerRequest": 37.5, - "peakRSSMiB": 330.89453125 - } - ] - }, - "outputParity": true - }, - { - "name": "file counts", - "node": { - "status": 200, - "output": { - "status": 200, - "sha256": "14157927c66f50f4a524e003f0dd849218f678cffc266a149d37b2afc6c64386", - "entries": 45 - }, - "coldMs": 35.10612549999678, - "warm": [ - { - "concurrency": 1, - "p50Ms": 27.46849800001837, - "p95Ms": 36.28570749999744, - "firstBodyMs": 27.41985600001135, - "requestsPerSecond": 35.061151545616575, - "cpuMsPerRequest": 12.03125, - "peakRSSMiB": 329.9140625 - }, - { - "concurrency": 8, - "p50Ms": 65.49185800000487, - "p95Ms": 85.11255699997673, - "firstBodyMs": 65.4482995000053, - "requestsPerSecond": 114.07828438374645, - "cpuMsPerRequest": 10.9375, - "peakRSSMiB": 330.9453125 - } - ] - }, - "go": { - "status": 200, - "output": { - "status": 200, - "sha256": "14157927c66f50f4a524e003f0dd849218f678cffc266a149d37b2afc6c64386", - "entries": 45 - }, - "coldMs": 69.7607330000028, - "warm": [ - { - "concurrency": 1, - "p50Ms": 69.8233264999908, - "p95Ms": 93.21686600000248, - "firstBodyMs": 69.77879499999108, - "requestsPerSecond": 13.910285428547263, - "cpuMsPerRequest": 59.375, - "peakRSSMiB": 347.93359375 - }, - { - "concurrency": 8, - "p50Ms": 78.61524899999495, - "p95Ms": 90.27311950000148, - "firstBodyMs": 78.58660099999543, - "requestsPerSecond": 96.82411463773647, - "cpuMsPerRequest": 46.25, - "peakRSSMiB": 350.60546875 - } - ] - }, - "outputParity": true - }, - { - "name": "gulpfile.js", - "node": { - "status": 200, - "output": { - "status": 200, - "sha256": "582a19c5d0d13b0526acfa491de26b4ad60f75c7fa13fed1054d7f66d22385fc" - }, - "coldMs": 87.3551985000031, - "warm": [ - { - "concurrency": 1, - "p50Ms": 24.51233999998476, - "p95Ms": 34.56796700001178, - "firstBodyMs": 24.427493499995762, - "requestsPerSecond": 38.75067075913438, - "cpuMsPerRequest": 25.46875, - "peakRSSMiB": 333.53515625 - }, - { - "concurrency": 8, - "p50Ms": 121.27679049999824, - "p95Ms": 144.72783400000299, - "firstBodyMs": 121.12374149998686, - "requestsPerSecond": 64.61059420825467, - "cpuMsPerRequest": 22.1875, - "peakRSSMiB": 334.875 - } - ] - }, - "go": { - "status": 200, - "output": { - "status": 200, - "sha256": "582a19c5d0d13b0526acfa491de26b4ad60f75c7fa13fed1054d7f66d22385fc" - }, - "coldMs": 61.77973450000354, - "warm": [ - { - "concurrency": 1, - "p50Ms": 17.54745600000024, - "p95Ms": 20.274646999998367, - "firstBodyMs": 15.356433000000834, - "requestsPerSecond": 55.82094005020072, - "cpuMsPerRequest": 11.25, - "peakRSSMiB": 351.4453125 - }, - { - "concurrency": 8, - "p50Ms": 68.20507649999126, - "p95Ms": 81.87241249999352, - "firstBodyMs": 65.7961060000016, - "requestsPerSecond": 107.10527593451862, - "cpuMsPerRequest": 11.09375, - "peakRSSMiB": 351.97265625 - } - ] - }, - "outputParity": true - }, - { - "name": "src/config.ts", - "node": { - "status": 200, - "output": { - "status": 200, - "sha256": "dadc35430eb9fa79ccf887b613704619199cbd111af8dddfc30e5c6ca3f5d003" - }, - "coldMs": 22.33179449999261, - "warm": [ - { - "concurrency": 1, - "p50Ms": 22.85149049998472, - "p95Ms": 26.94339250001758, - "firstBodyMs": 22.569827000008445, - "requestsPerSecond": 42.240803528256805, - "cpuMsPerRequest": 20.9375, - "peakRSSMiB": 337.90234375 - }, - { - "concurrency": 8, - "p50Ms": 107.67584700000043, - "p95Ms": 126.13519749999432, - "firstBodyMs": 107.52199800000744, - "requestsPerSecond": 70.66061719962136, - "cpuMsPerRequest": 17.1875, - "peakRSSMiB": 338.5703125 - } - ] - }, - "go": { - "status": 200, - "output": { - "status": 200, - "sha256": "dadc35430eb9fa79ccf887b613704619199cbd111af8dddfc30e5c6ca3f5d003" - }, - "coldMs": 58.48024899999291, - "warm": [ - { - "concurrency": 1, - "p50Ms": 18.06759750000856, - "p95Ms": 20.92086200000267, - "firstBodyMs": 15.731730000003154, - "requestsPerSecond": 55.03073104274837, - "cpuMsPerRequest": 11.875, - "peakRSSMiB": 352.23046875 - }, - { - "concurrency": 8, - "p50Ms": 60.91620750000584, - "p95Ms": 67.94174549999661, - "firstBodyMs": 58.88057199999457, - "requestsPerSecond": 122.07709644199466, - "cpuMsPerRequest": 9.375, - "peakRSSMiB": 352.36328125 - } - ] - }, - "outputParity": true - }, - { - "name": "website gulpfile.js", - "node": { - "status": 200, - "output": { - "status": 200, - "sha256": "582a19c5d0d13b0526acfa491de26b4ad60f75c7fa13fed1054d7f66d22385fc" - }, - "coldMs": 21.54110999999648, - "warm": [ - { - "concurrency": 1, - "p50Ms": 18.027288999994198, - "p95Ms": 28.667995499989047, - "firstBodyMs": 17.475921000004746, - "requestsPerSecond": 51.29987426738056, - "cpuMsPerRequest": 17.5, - "peakRSSMiB": 341.28125 - }, - { - "concurrency": 8, - "p50Ms": 96.45184400001199, - "p95Ms": 107.52514299999712, - "firstBodyMs": 96.03611900002761, - "requestsPerSecond": 81.997789194099, - "cpuMsPerRequest": 17.34375, - "peakRSSMiB": 344.38671875 - } - ] - }, - "go": { - "status": 200, - "output": { - "status": 200, - "sha256": "582a19c5d0d13b0526acfa491de26b4ad60f75c7fa13fed1054d7f66d22385fc" - }, - "coldMs": 77.46532099999968, - "warm": [ - { - "concurrency": 1, - "p50Ms": 66.96795449998899, - "p95Ms": 82.43080350001401, - "firstBodyMs": 66.29893399999855, - "requestsPerSecond": 14.836257025333925, - "cpuMsPerRequest": 52.1875, - "peakRSSMiB": 356.16015625 - }, - { - "concurrency": 8, - "p50Ms": 104.15019399999437, - "p95Ms": 144.24375450000298, - "firstBodyMs": 103.50109699999666, - "requestsPerSecond": 68.09919709456383, - "cpuMsPerRequest": 73.28125, - "peakRSSMiB": 387.59375 - } - ] - }, - "outputParity": true - }, - { - "name": "repository ZIP", - "node": { - "status": 0, - "output": { - "status": 0, - "error": "incomplete response: aborted" - }, - "coldMs": 0, - "diagnostic": "DataCloneError in TypeScript anonymization worker", - "warm": [] - }, - "go": { - "status": 200, - "output": { - "status": 200, - "sha256": "72d41a3fe5dcbf91eb33c1682cd4db5ccb220160c35e58e310ead96ac39ac600", - "entries": 2017 - }, - "coldMs": 40551.099742000006, - "warm": [ - { - "concurrency": 1, - "p50Ms": 39991.06115100001, - "p95Ms": 40371.590815000025, - "firstBodyMs": 92.73991000000387, - "requestsPerSecond": 0.025037242385530893, - "cpuMsPerRequest": 38123.333333333336, - "peakRSSMiB": 776.31640625 - } - ] - }, - "outputParity": false - } - ] -} \ No newline at end of file diff --git a/backend/reports/repository-runtime-comparison.html b/backend/reports/repository-runtime-comparison.html deleted file mode 100644 index 69337c1..0000000 --- a/backend/reports/repository-runtime-comparison.html +++ /dev/null @@ -1,9 +0,0 @@ -

    Go vs TypeScript · same repository snapshot

    1,017 repository files plus a synthetic 1,000-file directory. Two rounds with runtime order reversed.

    Use caseTypeScriptGoGo / TS

    Loopback HTTP, identical archive originals, filesystem storage, shared caches enabled, one anonymization worker, identity encoding. No CDN, GitHub round trips or browser rendering. TypeScript ZIP was retested with a temporary admin key and the same source ZIP served over loopback; its worker aborted both attempts. These are backend measurements, not beta page-load times.

    Validation and limits

    Commit b09ef0e5b0027756ad86eb3353a5ff6416016ade. Node v24.14.1; go version go1.27.3 linux/amd64. Warm results are medians of each round's p50, not pooled percentiles. Each round uses 32 requests per concurrency for normal endpoints and 3 sequential ZIP downloads. First requests can share dependencies warmed by earlier endpoints. RSS includes application workers but excludes MongoDB, Redis and the client. CPU includes background work. RSS includes caches retained from earlier cases. The OS page cache was not dropped. The selected small files contain no occurrence of the configured anonymization term; these timings do not measure replacement-heavy text.

    \ No newline at end of file diff --git a/backend/reports/repository-runtime-comparison.json b/backend/reports/repository-runtime-comparison.json deleted file mode 100644 index e7ae9a9..0000000 --- a/backend/reports/repository-runtime-comparison.json +++ /dev/null @@ -1,1199 +0,0 @@ -{ - "recordedAt": "2026-11-04T07:09:20.553Z", - "node": "v24.14.1", - "go": "go version go1.27.3 linux/amd64", - "nodeSourceSHA256": "ccef1fc05af9de24f0d2bf9223d478c2455de0305129babf05d0ad2c22a0b185", - "goBinarySHA256": "99beec84cb1ac35125705e1d267c8a1820647282380af312a8d3b81418c8a34b", - "benchmarkScriptSHA256": "7de94669b7b2d818358453fe54725c00738546602ee92086012508cda8814899", - "fixture": { - "repository": "tdurieux/anonymous_github", - "commit": "b09ef0e5b0027756ad86eb3353a5ff6416016ade", - "originalFiles": 1017, - "originalBytes": 28687144, - "addedFixture": "1000 copies of snapshot gulpfile.js in benchmark-1000", - "terms": [ - "tdurieux" - ] - }, - "method": { - "entrypoints": [ - "src/server/index.ts", - "backend/cmd/server" - ], - "provider": "Same pre-seeded archive snapshot; no GitHub API calls or production database", - "sharedCache": true, - "encoding": "identity", - "cold": "First endpoint request per fresh process/storage; earlier cases may warm shared dependencies", - "warm": "32 requests per concurrency 1 and 8; ZIP 3 requests at concurrency 1", - "order": "Node then Go; Go then Node", - "resources": "Process tree CPU and RSS; excludes MongoDB, Redis and client; CPU may include background work", - "scope": "HTTP backend only; excludes browser rendering, CDN, GitHub authorization and network fetch", - "limits": [ - "OS page cache was not dropped.", - "Process RSS includes caches retained from preceding cases; it is not per-request allocation.", - "Both selected small source files contain no occurrence of the configured term; replacement-heavy text is not represented by these file timings." - ] - }, - "results": [ - { - "runtime": "node", - "repeat": 0, - "results": [ - { - "name": "root directory", - "cold": { - "ms": 122.71835700000156, - "firstBodyMs": 122.36980400000175, - "status": 200, - "bytes": 1346 - }, - "output": { - "status": 200, - "sha256": "52d03ac37d3e22e85d9629413d91a29d1f98410b2d34e419785ba1ad00dafa9d", - "entries": 24 - }, - "warm": [ - { - "concurrency": 1, - "requests": 32, - "p50Ms": 27.478186000000278, - "p95Ms": 39.8713029999999, - "p50FirstBodyMs": 27.244082999997772, - "requestsPerSecond": 34.24750838914919, - "cpuMs": 1060, - "peakProcessTreeRssBytes": 268341248, - "bytes": 1346 - }, - { - "concurrency": 8, - "requests": 32, - "p50Ms": 137.39777099999992, - "p95Ms": 193.87670900000012, - "p50FirstBodyMs": 137.304497000001, - "requestsPerSecond": 55.15918880697452, - "cpuMs": 880, - "peakProcessTreeRssBytes": 306204672, - "bytes": 1346 - } - ] - }, - { - "name": "src directory", - "cold": { - "ms": 27.956797999999253, - "firstBodyMs": 27.87836100000277, - "status": 200, - "bytes": 247 - }, - "output": { - "status": 200, - "sha256": "012081e4d80b7bf24a5931359e89d5fefa0489a7989fd86ff4fdc01bb090d92b", - "entries": 7 - }, - "warm": [ - { - "concurrency": 1, - "requests": 32, - "p50Ms": 21.434618999999657, - "p95Ms": 29.19182699999874, - "p50FirstBodyMs": 21.28044299999965, - "requestsPerSecond": 46.46088498963779, - "cpuMs": 570, - "peakProcessTreeRssBytes": 307011584, - "bytes": 247 - }, - { - "concurrency": 8, - "requests": 32, - "p50Ms": 109.19845899999927, - "p95Ms": 125.767785, - "p50FirstBodyMs": 109.08604900000137, - "requestsPerSecond": 71.07358583720199, - "cpuMs": 540, - "peakProcessTreeRssBytes": 308363264, - "bytes": 247 - } - ] - }, - { - "name": "1000-file directory", - "cold": { - "ms": 111.9799579999999, - "firstBodyMs": 111.52818900000057, - "status": 200, - "bytes": 77001 - }, - "output": { - "status": 200, - "sha256": "8b091406715c6232458f52f8c2516031ed2359d2586737cb3923559f96c8c841", - "entries": 1000 - }, - "warm": [ - { - "concurrency": 1, - "requests": 32, - "p50Ms": 88.10585899999933, - "p95Ms": 134.37410400000226, - "p50FirstBodyMs": 87.62740000000122, - "requestsPerSecond": 10.672770004036357, - "cpuMs": 3280, - "peakProcessTreeRssBytes": 337018880, - "bytes": 77001 - }, - { - "concurrency": 8, - "requests": 32, - "p50Ms": 410.4933749999982, - "p95Ms": 685.9115450000027, - "p50FirstBodyMs": 410.11956799999825, - "requestsPerSecond": 17.430954350219643, - "cpuMs": 2050, - "peakProcessTreeRssBytes": 345939968, - "bytes": 77001 - } - ] - }, - { - "name": "file counts", - "cold": { - "ms": 38.296760000001086, - "firstBodyMs": 38.21965999999884, - "status": 200, - "bytes": 1017 - }, - "output": { - "status": 200, - "sha256": "14157927c66f50f4a524e003f0dd849218f678cffc266a149d37b2afc6c64386", - "entries": 45 - }, - "warm": [ - { - "concurrency": 1, - "requests": 32, - "p50Ms": 28.525291000001744, - "p95Ms": 31.150327999999718, - "p50FirstBodyMs": 28.46045099999901, - "requestsPerSecond": 34.688640712236904, - "cpuMs": 390, - "peakProcessTreeRssBytes": 345939968, - "bytes": 1017 - }, - { - "concurrency": 8, - "requests": 32, - "p50Ms": 64.52676000000065, - "p95Ms": 77.6502819999987, - "p50FirstBodyMs": 64.47342299999946, - "requestsPerSecond": 118.42821437332162, - "cpuMs": 340, - "peakProcessTreeRssBytes": 347021312, - "bytes": 1017 - } - ] - }, - { - "name": "gulpfile.js", - "cold": { - "ms": 98.37575799999831, - "firstBodyMs": 98.1176209999976, - "status": 200, - "bytes": 5822 - }, - "output": { - "status": 200, - "sha256": "582a19c5d0d13b0526acfa491de26b4ad60f75c7fa13fed1054d7f66d22385fc" - }, - "warm": [ - { - "concurrency": 1, - "requests": 32, - "p50Ms": 25.983281999997416, - "p95Ms": 35.96626499999911, - "p50FirstBodyMs": 25.931988999996975, - "requestsPerSecond": 36.53065101305134, - "cpuMs": 860, - "peakProcessTreeRssBytes": 349736960, - "bytes": 5822 - }, - { - "concurrency": 8, - "requests": 32, - "p50Ms": 128.36582899999848, - "p95Ms": 162.9606509999976, - "p50FirstBodyMs": 128.1694069999976, - "requestsPerSecond": 60.3252631867758, - "cpuMs": 880, - "peakProcessTreeRssBytes": 351141888, - "bytes": 5822 - } - ] - }, - { - "name": "src/config.ts", - "cold": { - "ms": 22.052059999998164, - "firstBodyMs": 21.851400999999896, - "status": 200, - "bytes": 6767 - }, - "output": { - "status": 200, - "sha256": "dadc35430eb9fa79ccf887b613704619199cbd111af8dddfc30e5c6ca3f5d003" - }, - "warm": [ - { - "concurrency": 1, - "requests": 32, - "p50Ms": 21.71337400000266, - "p95Ms": 25.36504000000059, - "p50FirstBodyMs": 21.38178600000174, - "requestsPerSecond": 44.24535907144863, - "cpuMs": 630, - "peakProcessTreeRssBytes": 352043008, - "bytes": 6767 - }, - { - "concurrency": 8, - "requests": 32, - "p50Ms": 106.70195700000113, - "p95Ms": 126.02715399999943, - "p50FirstBodyMs": 106.50513800000044, - "requestsPerSecond": 72.14599392989301, - "cpuMs": 530, - "peakProcessTreeRssBytes": 355016704, - "bytes": 6767 - } - ] - }, - { - "name": "website gulpfile.js", - "cold": { - "ms": 21.144544999999198, - "firstBodyMs": 20.807443000001513, - "status": 200, - "bytes": 5822 - }, - "output": { - "status": 200, - "sha256": "582a19c5d0d13b0526acfa491de26b4ad60f75c7fa13fed1054d7f66d22385fc" - }, - "warm": [ - { - "concurrency": 1, - "requests": 32, - "p50Ms": 18.186322000001383, - "p95Ms": 35.36705300000176, - "p50FirstBodyMs": 17.379272999998648, - "requestsPerSecond": 49.93749885065716, - "cpuMs": 600, - "peakProcessTreeRssBytes": 357859328, - "bytes": 5822 - }, - { - "concurrency": 8, - "requests": 32, - "p50Ms": 92.10191000000123, - "p95Ms": 104.85323099999732, - "p50FirstBodyMs": 91.47235, - "requestsPerSecond": 84.83231841140555, - "cpuMs": 540, - "peakProcessTreeRssBytes": 361115648, - "bytes": 5822 - } - ] - }, - { - "name": "repository ZIP", - "cold": { - "ms": 67.0347299999994, - "firstBodyMs": 66.97301599999992, - "status": 403, - "bytes": 32 - }, - "output": { - "status": 403, - "error": "{\"error\":\"download_not_enabled\"}" - }, - "warm": [], - "diagnostic": "{\"error\":\"download_not_enabled\"}" - } - ] - }, - { - "runtime": "go", - "repeat": 0, - "results": [ - { - "name": "root directory", - "cold": { - "ms": 17.265111000000616, - "firstBodyMs": 17.189674000001105, - "status": 200, - "bytes": 1346 - }, - "output": { - "status": 200, - "sha256": "52d03ac37d3e22e85d9629413d91a29d1f98410b2d34e419785ba1ad00dafa9d", - "entries": 24 - }, - "warm": [ - { - "concurrency": 1, - "requests": 32, - "p50Ms": 7.390237999999954, - "p95Ms": 11.097055999998702, - "p50FirstBodyMs": 7.337950000001001, - "requestsPerSecond": 124.27798037267587, - "cpuMs": 180, - "peakProcessTreeRssBytes": 73699328, - "bytes": 1346 - }, - { - "concurrency": 8, - "requests": 32, - "p50Ms": 10.761182999995071, - "p95Ms": 24.80059999999503, - "p50FirstBodyMs": 10.72039699999732, - "requestsPerSecond": 555.5450233477785, - "cpuMs": 190, - "peakProcessTreeRssBytes": 81285120, - "bytes": 1346 - } - ] - }, - { - "name": "src directory", - "cold": { - "ms": 8.306752999997116, - "firstBodyMs": 8.253642999996373, - "status": 200, - "bytes": 247 - }, - "output": { - "status": 200, - "sha256": "012081e4d80b7bf24a5931359e89d5fefa0489a7989fd86ff4fdc01bb090d92b", - "entries": 7 - }, - "warm": [ - { - "concurrency": 1, - "requests": 32, - "p50Ms": 6.231132000000798, - "p95Ms": 7.372082000001683, - "p50FirstBodyMs": 6.173620999994455, - "requestsPerSecond": 153.8259930269406, - "cpuMs": 110, - "peakProcessTreeRssBytes": 81842176, - "bytes": 247 - }, - { - "concurrency": 8, - "requests": 32, - "p50Ms": 8.967047999998613, - "p95Ms": 13.48560500000167, - "p50FirstBodyMs": 8.90258499999618, - "requestsPerSecond": 773.5657498735931, - "cpuMs": 110, - "peakProcessTreeRssBytes": 85405696, - "bytes": 247 - } - ] - }, - { - "name": "1000-file directory", - "cold": { - "ms": 62.688161999998556, - "firstBodyMs": 62.390119000003324, - "status": 200, - "bytes": 77001 - }, - "output": { - "status": 200, - "sha256": "8b091406715c6232458f52f8c2516031ed2359d2586737cb3923559f96c8c841", - "entries": 1000 - }, - "warm": [ - { - "concurrency": 1, - "requests": 32, - "p50Ms": 64.99671800000215, - "p95Ms": 80.31517000000167, - "p50FirstBodyMs": 64.58419899999717, - "requestsPerSecond": 15.03115082000453, - "cpuMs": 1900, - "peakProcessTreeRssBytes": 325074944, - "bytes": 77001 - }, - { - "concurrency": 8, - "requests": 32, - "p50Ms": 53.61489099999744, - "p95Ms": 78.79278899999917, - "p50FirstBodyMs": 52.5865399999966, - "requestsPerSecond": 134.6920347440794, - "cpuMs": 1280, - "peakProcessTreeRssBytes": 346705920, - "bytes": 77001 - } - ] - }, - { - "name": "file counts", - "cold": { - "ms": 75.27337599999737, - "firstBodyMs": 75.21523899999738, - "status": 200, - "bytes": 1017 - }, - "output": { - "status": 200, - "sha256": "14157927c66f50f4a524e003f0dd849218f678cffc266a149d37b2afc6c64386", - "entries": 45 - }, - "warm": [ - { - "concurrency": 1, - "requests": 32, - "p50Ms": 69.93024399999558, - "p95Ms": 99.14382100000512, - "p50FirstBodyMs": 69.88319500000216, - "requestsPerSecond": 13.791304723301867, - "cpuMs": 1940, - "peakProcessTreeRssBytes": 362668032, - "bytes": 1017 - }, - { - "concurrency": 8, - "requests": 32, - "p50Ms": 80.63233500000206, - "p95Ms": 95.86279800000193, - "p50FirstBodyMs": 80.59442500000296, - "requestsPerSecond": 95.55265942743986, - "cpuMs": 1510, - "peakProcessTreeRssBytes": 364265472, - "bytes": 1017 - } - ] - }, - { - "name": "gulpfile.js", - "cold": { - "ms": 52.59039699999994, - "firstBodyMs": 49.484010000000126, - "status": 200, - "bytes": 5822 - }, - "output": { - "status": 200, - "sha256": "582a19c5d0d13b0526acfa491de26b4ad60f75c7fa13fed1054d7f66d22385fc" - }, - "warm": [ - { - "concurrency": 1, - "requests": 32, - "p50Ms": 16.83640000000014, - "p95Ms": 18.668002999998862, - "p50FirstBodyMs": 14.824468999999226, - "requestsPerSecond": 57.951684141589574, - "cpuMs": 350, - "peakProcessTreeRssBytes": 364998656, - "bytes": 5822 - }, - { - "concurrency": 8, - "requests": 32, - "p50Ms": 69.94520799999736, - "p95Ms": 80.50802900000417, - "p50FirstBodyMs": 67.40058699999645, - "requestsPerSecond": 106.74156473200074, - "cpuMs": 360, - "peakProcessTreeRssBytes": 365613056, - "bytes": 5822 - } - ] - }, - { - "name": "src/config.ts", - "cold": { - "ms": 70.46918000000005, - "firstBodyMs": 68.32195199999842, - "status": 200, - "bytes": 6767 - }, - "output": { - "status": 200, - "sha256": "dadc35430eb9fa79ccf887b613704619199cbd111af8dddfc30e5c6ca3f5d003" - }, - "warm": [ - { - "concurrency": 1, - "requests": 32, - "p50Ms": 20.522250999994867, - "p95Ms": 22.422712000006868, - "p50FirstBodyMs": 17.934375999997428, - "requestsPerSecond": 47.97705245586774, - "cpuMs": 430, - "peakProcessTreeRssBytes": 365887488, - "bytes": 6767 - }, - { - "concurrency": 8, - "requests": 32, - "p50Ms": 63.94478900000104, - "p95Ms": 68.46585099999356, - "p50FirstBodyMs": 61.734375, - "requestsPerSecond": 118.75430783571171, - "cpuMs": 320, - "peakProcessTreeRssBytes": 366022656, - "bytes": 6767 - } - ] - }, - { - "name": "website gulpfile.js", - "cold": { - "ms": 85.68376799999533, - "firstBodyMs": 85.05221199999505, - "status": 200, - "bytes": 5822 - }, - "output": { - "status": 200, - "sha256": "582a19c5d0d13b0526acfa491de26b4ad60f75c7fa13fed1054d7f66d22385fc" - }, - "warm": [ - { - "concurrency": 1, - "requests": 32, - "p50Ms": 71.13029200000165, - "p95Ms": 91.89054900000338, - "p50FirstBodyMs": 70.37803999999596, - "requestsPerSecond": 13.738627958576977, - "cpuMs": 1790, - "peakProcessTreeRssBytes": 371220480, - "bytes": 5822 - }, - { - "concurrency": 8, - "requests": 32, - "p50Ms": 86.40857200000028, - "p95Ms": 122.46237800000381, - "p50FirstBodyMs": 85.72724000000017, - "requestsPerSecond": 78.60686333473342, - "cpuMs": 1770, - "peakProcessTreeRssBytes": 406421504, - "bytes": 5822 - } - ] - }, - { - "name": "repository ZIP", - "cold": { - "ms": 41124.943269, - "firstBodyMs": 91.30350200000248, - "status": 200, - "bytes": 13045827 - }, - "output": { - "status": 200, - "sha256": "72d41a3fe5dcbf91eb33c1682cd4db5ccb220160c35e58e310ead96ac39ac600", - "entries": 2017 - }, - "warm": [ - { - "concurrency": 1, - "requests": 3, - "p50Ms": 40265.23591, - "p95Ms": 40467.015759000016, - "p50FirstBodyMs": 94.0935569999856, - "requestsPerSecond": 0.024921550735146774, - "cpuMs": 114730, - "peakProcessTreeRssBytes": 814026752, - "bytes": 13045813 - } - ] - } - ] - }, - { - "runtime": "go", - "repeat": 1, - "results": [ - { - "name": "root directory", - "cold": { - "ms": 21.522237999975914, - "firstBodyMs": 21.483194999978878, - "status": 200, - "bytes": 1346 - }, - "output": { - "status": 200, - "sha256": "52d03ac37d3e22e85d9629413d91a29d1f98410b2d34e419785ba1ad00dafa9d", - "entries": 24 - }, - "warm": [ - { - "concurrency": 1, - "requests": 32, - "p50Ms": 7.416425000003073, - "p95Ms": 10.898400000005495, - "p50FirstBodyMs": 7.386915000010049, - "requestsPerSecond": 123.02258069088312, - "cpuMs": 190, - "peakProcessTreeRssBytes": 73351168, - "bytes": 1346 - }, - { - "concurrency": 8, - "requests": 32, - "p50Ms": 7.922164000017801, - "p95Ms": 19.675453000003472, - "p50FirstBodyMs": 7.9004169999971054, - "requestsPerSecond": 694.6271307764944, - "cpuMs": 170, - "peakProcessTreeRssBytes": 81297408, - "bytes": 1346 - } - ] - }, - { - "name": "src directory", - "cold": { - "ms": 7.8150040000036824, - "firstBodyMs": 7.788174000015715, - "status": 200, - "bytes": 247 - }, - "output": { - "status": 200, - "sha256": "012081e4d80b7bf24a5931359e89d5fefa0489a7989fd86ff4fdc01bb090d92b", - "entries": 7 - }, - "warm": [ - { - "concurrency": 1, - "requests": 32, - "p50Ms": 5.889798999996856, - "p95Ms": 6.803289999981644, - "p50FirstBodyMs": 5.862548999983119, - "requestsPerSecond": 166.28505113499392, - "cpuMs": 120, - "peakProcessTreeRssBytes": 82309120, - "bytes": 247 - }, - { - "concurrency": 8, - "requests": 32, - "p50Ms": 7.488047999999253, - "p95Ms": 10.698272999987239, - "p50FirstBodyMs": 7.241244999982882, - "requestsPerSecond": 931.6569370143645, - "cpuMs": 90, - "peakProcessTreeRssBytes": 85397504, - "bytes": 247 - } - ] - }, - { - "name": "1000-file directory", - "cold": { - "ms": 63.2505189999938, - "firstBodyMs": 62.53154199998244, - "status": 200, - "bytes": 77001 - }, - "output": { - "status": 200, - "sha256": "8b091406715c6232458f52f8c2516031ed2359d2586737cb3923559f96c8c841", - "entries": 1000 - }, - "warm": [ - { - "concurrency": 1, - "requests": 32, - "p50Ms": 64.99283000000287, - "p95Ms": 74.55967399998917, - "p50FirstBodyMs": 64.40991600000416, - "requestsPerSecond": 15.302012619206344, - "cpuMs": 1870, - "peakProcessTreeRssBytes": 326803456, - "bytes": 77001 - }, - { - "concurrency": 8, - "requests": 32, - "p50Ms": 52.93957600000431, - "p95Ms": 75.24632999999449, - "p50FirstBodyMs": 52.54521999999997, - "requestsPerSecond": 131.94946276199252, - "cpuMs": 1120, - "peakProcessTreeRssBytes": 346968064, - "bytes": 77001 - } - ] - }, - { - "name": "file counts", - "cold": { - "ms": 64.24809000000823, - "firstBodyMs": 64.20179900000221, - "status": 200, - "bytes": 1017 - }, - "output": { - "status": 200, - "sha256": "14157927c66f50f4a524e003f0dd849218f678cffc266a149d37b2afc6c64386", - "entries": 45 - }, - "warm": [ - { - "concurrency": 1, - "requests": 32, - "p50Ms": 69.71640899998602, - "p95Ms": 87.28991099999985, - "p50FirstBodyMs": 69.67439499998, - "requestsPerSecond": 14.02926613379266, - "cpuMs": 1860, - "peakProcessTreeRssBytes": 364834816, - "bytes": 1017 - }, - { - "concurrency": 8, - "requests": 32, - "p50Ms": 76.59816299998784, - "p95Ms": 84.68344100000104, - "p50FirstBodyMs": 76.5787769999879, - "requestsPerSecond": 98.09556984803308, - "cpuMs": 1450, - "peakProcessTreeRssBytes": 367636480, - "bytes": 1017 - } - ] - }, - { - "name": "gulpfile.js", - "cold": { - "ms": 70.96907200000715, - "firstBodyMs": 68.29711499999394, - "status": 200, - "bytes": 5822 - }, - "output": { - "status": 200, - "sha256": "582a19c5d0d13b0526acfa491de26b4ad60f75c7fa13fed1054d7f66d22385fc" - }, - "warm": [ - { - "concurrency": 1, - "requests": 32, - "p50Ms": 18.258512000000337, - "p95Ms": 21.881290999997873, - "p50FirstBodyMs": 15.888397000002442, - "requestsPerSecond": 53.690195958811856, - "cpuMs": 370, - "peakProcessTreeRssBytes": 368517120, - "bytes": 5822 - }, - { - "concurrency": 8, - "requests": 32, - "p50Ms": 66.46494499998516, - "p95Ms": 83.23679599998286, - "p50FirstBodyMs": 64.19162500000675, - "requestsPerSecond": 107.46898713703649, - "cpuMs": 350, - "peakProcessTreeRssBytes": 369070080, - "bytes": 5822 - } - ] - }, - { - "name": "src/config.ts", - "cold": { - "ms": 46.49131799998577, - "firstBodyMs": 44.160680000000866, - "status": 200, - "bytes": 6767 - }, - "output": { - "status": 200, - "sha256": "dadc35430eb9fa79ccf887b613704619199cbd111af8dddfc30e5c6ca3f5d003" - }, - "warm": [ - { - "concurrency": 1, - "requests": 32, - "p50Ms": 15.612944000022253, - "p95Ms": 19.419011999998474, - "p50FirstBodyMs": 13.52908400000888, - "requestsPerSecond": 62.08440962962901, - "cpuMs": 330, - "peakProcessTreeRssBytes": 369340416, - "bytes": 6767 - }, - { - "concurrency": 8, - "requests": 32, - "p50Ms": 57.88762600001064, - "p95Ms": 67.41763999999966, - "p50FirstBodyMs": 56.026768999989145, - "requestsPerSecond": 125.3998850482776, - "cpuMs": 280, - "peakProcessTreeRssBytes": 369479680, - "bytes": 6767 - } - ] - }, - { - "name": "website gulpfile.js", - "cold": { - "ms": 69.24687400000403, - "firstBodyMs": 68.97722699999576, - "status": 200, - "bytes": 5822 - }, - "output": { - "status": 200, - "sha256": "582a19c5d0d13b0526acfa491de26b4ad60f75c7fa13fed1054d7f66d22385fc" - }, - "warm": [ - { - "concurrency": 1, - "requests": 32, - "p50Ms": 62.80561699997634, - "p95Ms": 72.97105800002464, - "p50FirstBodyMs": 62.219828000001144, - "requestsPerSecond": 15.933886092090873, - "cpuMs": 1550, - "peakProcessTreeRssBytes": 373460992, - "bytes": 5822 - }, - { - "concurrency": 8, - "requests": 32, - "p50Ms": 121.89181599998847, - "p95Ms": 166.02513100000215, - "p50FirstBodyMs": 121.27495399999316, - "requestsPerSecond": 57.591530854394264, - "cpuMs": 2920, - "peakProcessTreeRssBytes": 400773120, - "bytes": 5822 - } - ] - }, - { - "name": "repository ZIP", - "cold": { - "ms": 39977.256215, - "firstBodyMs": 116.98298600001726, - "status": 200, - "bytes": 13045808 - }, - "output": { - "status": 200, - "sha256": "72d41a3fe5dcbf91eb33c1682cd4db5ccb220160c35e58e310ead96ac39ac600", - "entries": 2017 - }, - "warm": [ - { - "concurrency": 1, - "requests": 3, - "p50Ms": 39716.886392000015, - "p95Ms": 40276.165871000034, - "p50FirstBodyMs": 91.38626300002215, - "requestsPerSecond": 0.025152934035915016, - "cpuMs": 114010, - "peakProcessTreeRssBytes": 803639296, - "bytes": 13045813 - } - ] - } - ] - }, - { - "runtime": "node", - "repeat": 1, - "results": [ - { - "name": "root directory", - "cold": { - "ms": 125.8174290000461, - "firstBodyMs": 125.76461900002323, - "status": 200, - "bytes": 1346 - }, - "output": { - "status": 200, - "sha256": "52d03ac37d3e22e85d9629413d91a29d1f98410b2d34e419785ba1ad00dafa9d", - "entries": 24 - }, - "warm": [ - { - "concurrency": 1, - "requests": 32, - "p50Ms": 28.224924999987707, - "p95Ms": 41.48644000000786, - "p50FirstBodyMs": 28.187259000027552, - "requestsPerSecond": 33.633578749289, - "cpuMs": 1290, - "peakProcessTreeRssBytes": 304943104, - "bytes": 1346 - }, - { - "concurrency": 8, - "requests": 32, - "p50Ms": 103.59744700003648, - "p95Ms": 135.92068599996855, - "p50FirstBodyMs": 103.56517200003145, - "requestsPerSecond": 72.02199440075611, - "cpuMs": 650, - "peakProcessTreeRssBytes": 310411264, - "bytes": 1346 - } - ] - }, - { - "name": "src directory", - "cold": { - "ms": 31.24377800000366, - "firstBodyMs": 31.209121999971103, - "status": 200, - "bytes": 247 - }, - "output": { - "status": 200, - "sha256": "012081e4d80b7bf24a5931359e89d5fefa0489a7989fd86ff4fdc01bb090d92b", - "entries": 7 - }, - "warm": [ - { - "concurrency": 1, - "requests": 32, - "p50Ms": 20.771646000037435, - "p95Ms": 24.376470000017434, - "p50FirstBodyMs": 20.747299000038765, - "requestsPerSecond": 47.692971583060825, - "cpuMs": 570, - "peakProcessTreeRssBytes": 311762944, - "bytes": 247 - }, - { - "concurrency": 8, - "requests": 32, - "p50Ms": 90.56073200004175, - "p95Ms": 105.03953499998897, - "p50FirstBodyMs": 90.53819200000726, - "requestsPerSecond": 85.56986738624815, - "cpuMs": 450, - "peakProcessTreeRssBytes": 312573952, - "bytes": 247 - } - ] - }, - { - "name": "1000-file directory", - "cold": { - "ms": 110.56195499998285, - "firstBodyMs": 110.30669900000794, - "status": 200, - "bytes": 77001 - }, - "output": { - "status": 200, - "sha256": "8b091406715c6232458f52f8c2516031ed2359d2586737cb3923559f96c8c841", - "entries": 1000 - }, - "warm": [ - { - "concurrency": 1, - "requests": 32, - "p50Ms": 86.75631799997063, - "p95Ms": 128.20722999999998, - "p50FirstBodyMs": 86.40058499999577, - "requestsPerSecond": 10.72708479417156, - "cpuMs": 2960, - "peakProcessTreeRssBytes": 332849152, - "bytes": 77001 - }, - { - "concurrency": 8, - "requests": 32, - "p50Ms": 525.2074290000019, - "p95Ms": 743.5510050000157, - "p50FirstBodyMs": 524.9816889999784, - "requestsPerSecond": 15.067863893209658, - "cpuMs": 2310, - "peakProcessTreeRssBytes": 343531520, - "bytes": 77001 - } - ] - }, - { - "name": "file counts", - "cold": { - "ms": 31.91549099999247, - "firstBodyMs": 31.879987000022084, - "status": 200, - "bytes": 1017 - }, - "output": { - "status": 200, - "sha256": "14157927c66f50f4a524e003f0dd849218f678cffc266a149d37b2afc6c64386", - "entries": 45 - }, - "warm": [ - { - "concurrency": 1, - "requests": 32, - "p50Ms": 26.411705000035, - "p95Ms": 41.42108699999517, - "p50FirstBodyMs": 26.37926100002369, - "requestsPerSecond": 35.433662378996246, - "cpuMs": 380, - "peakProcessTreeRssBytes": 344883200, - "bytes": 1017 - }, - { - "concurrency": 8, - "requests": 32, - "p50Ms": 66.45695600000909, - "p95Ms": 92.57483199995477, - "p50FirstBodyMs": 66.42317600001115, - "requestsPerSecond": 109.72835439417129, - "cpuMs": 360, - "peakProcessTreeRssBytes": 345694208, - "bytes": 1017 - } - ] - }, - { - "name": "gulpfile.js", - "cold": { - "ms": 76.33463900000788, - "firstBodyMs": 76.20579900004668, - "status": 200, - "bytes": 5822 - }, - "output": { - "status": 200, - "sha256": "582a19c5d0d13b0526acfa491de26b4ad60f75c7fa13fed1054d7f66d22385fc" - }, - "warm": [ - { - "concurrency": 1, - "requests": 32, - "p50Ms": 23.041397999972105, - "p95Ms": 33.16966900002444, - "p50FirstBodyMs": 22.92299799999455, - "requestsPerSecond": 40.970690505217426, - "cpuMs": 770, - "peakProcessTreeRssBytes": 347406336, - "bytes": 5822 - }, - { - "concurrency": 8, - "requests": 32, - "p50Ms": 114.187751999998, - "p95Ms": 126.49501700000837, - "p50FirstBodyMs": 114.07807599997614, - "requestsPerSecond": 68.89592522973355, - "cpuMs": 540, - "peakProcessTreeRssBytes": 350384128, - "bytes": 5822 - } - ] - }, - { - "name": "src/config.ts", - "cold": { - "ms": 22.61152899998706, - "firstBodyMs": 22.479772999999113, - "status": 200, - "bytes": 6767 - }, - "output": { - "status": 200, - "sha256": "dadc35430eb9fa79ccf887b613704619199cbd111af8dddfc30e5c6ca3f5d003" - }, - "warm": [ - { - "concurrency": 1, - "requests": 32, - "p50Ms": 23.98960699996678, - "p95Ms": 28.52174500003457, - "p50FirstBodyMs": 23.75786800001515, - "requestsPerSecond": 40.236247985064985, - "cpuMs": 710, - "peakProcessTreeRssBytes": 354316288, - "bytes": 6767 - }, - { - "concurrency": 8, - "requests": 32, - "p50Ms": 108.64973699999973, - "p95Ms": 126.24324099998921, - "p50FirstBodyMs": 108.53885800001444, - "requestsPerSecond": 69.17524046934969, - "cpuMs": 570, - "peakProcessTreeRssBytes": 354697216, - "bytes": 6767 - } - ] - }, - { - "name": "website gulpfile.js", - "cold": { - "ms": 21.93767499999376, - "firstBodyMs": 21.71805999998469, - "status": 200, - "bytes": 5822 - }, - "output": { - "status": 200, - "sha256": "582a19c5d0d13b0526acfa491de26b4ad60f75c7fa13fed1054d7f66d22385fc" - }, - "warm": [ - { - "concurrency": 1, - "requests": 32, - "p50Ms": 17.868255999987014, - "p95Ms": 21.968937999976333, - "p50FirstBodyMs": 17.572569000010844, - "requestsPerSecond": 52.66224968410396, - "cpuMs": 520, - "peakProcessTreeRssBytes": 354004992, - "bytes": 5822 - }, - { - "concurrency": 8, - "requests": 32, - "p50Ms": 100.80177800002275, - "p95Ms": 110.19705499999691, - "p50FirstBodyMs": 100.59988800005522, - "requestsPerSecond": 79.16325997679245, - "cpuMs": 570, - "peakProcessTreeRssBytes": 359641088, - "bytes": 5822 - } - ] - }, - { - "name": "repository ZIP", - "cold": { - "ms": 67.74902599997586, - "firstBodyMs": 67.7159559999709, - "status": 403, - "bytes": 32 - }, - "output": { - "status": 403, - "error": "{\"error\":\"download_not_enabled\"}" - }, - "warm": [], - "diagnostic": "{\"error\":\"download_not_enabled\"}" - } - ] - } - ] -} \ No newline at end of file diff --git a/backend/reports/repository-zip-node-comparison.json b/backend/reports/repository-zip-node-comparison.json deleted file mode 100644 index f09c4a2..0000000 --- a/backend/reports/repository-zip-node-comparison.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "recordedAt": "2026-11-04T07:12:26.398Z", - "node": "v24.14.1", - "go": "go version go1.27.3 linux/amd64", - "nodeSourceSHA256": "ccef1fc05af9de24f0d2bf9223d478c2455de0305129babf05d0ad2c22a0b185", - "goBinarySHA256": "99beec84cb1ac35125705e1d267c8a1820647282380af312a8d3b81418c8a34b", - "benchmarkScriptSHA256": "aebc3ee79db1d9ff8d87ee1e95af1ea437df0ace1563b8d126043ae5447562f5", - "fixture": { - "repository": "tdurieux/anonymous_github", - "commit": "b09ef0e5b0027756ad86eb3353a5ff6416016ade", - "originalFiles": 1017, - "originalBytes": 28687144, - "addedFixture": "1000 copies of snapshot gulpfile.js in benchmark-1000", - "terms": [ - "tdurieux" - ] - }, - "method": { - "entrypoints": [ - "src/server/index.ts", - "backend/cmd/server" - ], - "provider": "Same pre-seeded archive snapshot; no GitHub API calls or production database", - "localZipOrigin": "Only codeload origin in temporary compiled TS redirected to loopback serving the identical snapshot ZIP; no tracked TS sources changed", - "zipAuthorization": "Disposable admin API key to allow the TypeScript local ZIP route", - "sharedCache": true, - "encoding": "identity", - "cold": "First endpoint request per fresh process/storage; earlier cases may warm shared dependencies", - "warm": "32 requests per concurrency 1 and 8; ZIP 3 requests at concurrency 1", - "order": "Node then Go; Go then Node", - "resources": "Process tree CPU and RSS; excludes MongoDB, Redis and client; CPU may include background work", - "scope": "HTTP backend only; excludes browser rendering, CDN, GitHub authorization and network fetch", - "limits": [ - "OS page cache was not dropped.", - "Process RSS includes caches retained from preceding cases; it is not per-request allocation.", - "Both selected small source files contain no occurrence of the configured term; replacement-heavy text is not represented by these file timings." - ] - }, - "results": [ - { - "runtime": "node", - "repeat": 0, - "results": [ - { - "name": "repository ZIP", - "cold": { - "ms": 0, - "firstBodyMs": null, - "status": 0, - "bytes": 28 - }, - "output": { - "status": 0, - "error": "incomplete response: aborted" - }, - "warm": [], - "diagnostic": "DataCloneError in TypeScript anonymization worker" - } - ] - }, - { - "runtime": "node", - "repeat": 1, - "results": [ - { - "name": "repository ZIP", - "cold": { - "ms": 0, - "firstBodyMs": null, - "status": 0, - "bytes": 28 - }, - "output": { - "status": 0, - "error": "incomplete response: aborted" - }, - "warm": [], - "diagnostic": "DataCloneError in TypeScript anonymization worker" - } - ] - } - ] -} \ No newline at end of file diff --git a/backend/reports/session-persistence.json b/backend/reports/session-persistence.json deleted file mode 100644 index 81733ac..0000000 --- a/backend/reports/session-persistence.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "date": "2026-11-04", - "deployment": "beta.durieux.me", - "image": "sha256:9fe2455d966903eb44044af22d2347904a8e5b277ed10cdb8a748849eda2cee8", - "findings": [ - "Browser login cookie had no persistent expiry", - "Redis session TTL was fixed at 24 hours and never renewed during authenticated reads", - "Redis reported zero evicted keys" - ], - "policy": { - "authenticatedLifetimeDays": 30, - "renewalIntervalDays": 1, - "idleLifetimeDays": [ - 29, - 30 - ], - "anonymousRedisLifetimeHours": 24, - "oauthStateLifetimeMinutes": 10 - }, - "validation": { - "raceTests": [ - "OAuth callback session and identity", - "persistent rolling session", - "removed account and forged session fail closed" - ], - "vet": "passed", - "live": { - "result": "passed", - "requests": 133, - "persistentCookie": "passed", - "sessionLoginLogout": "passed" - } - }, - "notes": [ - "Existing valid browser sessions upgrade on their next authenticated request. Expired sessions require login again.", - "Renewal compare-and-set cannot recreate deleted sessions. Account status continues to be checked on each request." - ] -} \ No newline at end of file diff --git a/backend/reports/shadow-app-authenticated-deployment.json b/backend/reports/shadow-app-authenticated-deployment.json deleted file mode 100644 index d473563..0000000 --- a/backend/reports/shadow-app-authenticated-deployment.json +++ /dev/null @@ -1,1597 +0,0 @@ -{ - "verifiedAt": "2026-11-04T12:22:14.083Z", - "hostname": "beta.durieux.me", - "configurationMode": "GitHub App enabled alongside legacy OAuth", - "checks": [ - { - "method": "GET", - "route": "/api/user", - "requestID": "0bc86df3-c35c-417d-8499-54654faa33dd", - "status": 401, - "expected": 401, - "bytes": 25, - "headersMs": 466, - "firstBodyByteMs": 469, - "elapsedMs": 477 - }, - { - "method": "GET", - "route": "/api/user", - "requestID": "74dab0dc-26d4-4aee-802c-69e1bb0e6730", - "status": 200, - "expected": 200, - "bytes": 100, - "headersMs": 102, - "firstBodyByteMs": 108, - "elapsedMs": 110 - }, - { - "method": "GET", - "route": "/github/connections", - "requestID": "d3eb152f-1f46-429c-8670-13a874352ac0", - "status": 200, - "expected": 200, - "bytes": 456, - "headersMs": 1100, - "firstBodyByteMs": 1102, - "elapsedMs": 1103 - }, - { - "method": "GET", - "route": "/api/providers", - "requestID": "49b7a7ae-dd09-4a35-9067-5aa8812c23c0", - "status": 200, - "expected": 200, - "bytes": 144, - "headersMs": 50, - "firstBodyByteMs": 52, - "elapsedMs": 53 - }, - { - "method": "GET", - "route": "/api/user/dashboard", - "requestID": "6feed968-e71b-46de-b888-13c92de872e7", - "status": 200, - "expected": 200, - "bytes": 797, - "headersMs": 51, - "firstBodyByteMs": 53, - "elapsedMs": 54 - }, - { - "method": "GET", - "route": "/api/user/default", - "requestID": "9bbed90f-4faf-4436-b598-ce7454b089da", - "status": 200, - "expected": 200, - "bytes": 25, - "headersMs": 42, - "firstBodyByteMs": 43, - "elapsedMs": 43 - }, - { - "method": "GET", - "route": "/api/user/quota", - "requestID": "9ab2b461-9e60-4bde-9442-c00272475fe5", - "status": 200, - "expected": 200, - "bytes": 115, - "headersMs": 47, - "firstBodyByteMs": 48, - "elapsedMs": 49 - }, - { - "method": "GET", - "route": "/api/admin/overview", - "requestID": "b9892c67-04fa-4414-9b25-5a29a5fb8e2e", - "status": 200, - "expected": 200, - "bytes": 1244, - "headersMs": 141, - "firstBodyByteMs": 143, - "elapsedMs": 145 - }, - { - "method": "GET", - "route": "/api/admin/users", - "requestID": "2ae05b81-c3e9-4775-9aef-7b7a364877b0", - "status": 200, - "expected": 200, - "bytes": 526, - "headersMs": 53, - "firstBodyByteMs": 55, - "elapsedMs": 55 - }, - { - "method": "GET", - "route": "/api/admin/repos", - "requestID": "d78c6d61-b2d0-4ab3-a782-e9e58602f12f", - "status": 200, - "expected": 200, - "bytes": 12586, - "headersMs": 61, - "firstBodyByteMs": 62, - "elapsedMs": 64 - }, - { - "method": "GET", - "route": "/api/admin/queues", - "requestID": "3906a948-ff48-4209-bb3b-95bd3ab4321d", - "status": 200, - "expected": 200, - "bytes": 8527, - "headersMs": 51, - "firstBodyByteMs": 52, - "elapsedMs": 53 - }, - { - "method": "GET", - "route": "/api/admin/performance", - "requestID": "3976e54f-189c-477c-9e37-53297c8a04ae", - "status": 200, - "expected": 200, - "bytes": 23310, - "headersMs": 59, - "firstBodyByteMs": 61, - "elapsedMs": 66 - }, - { - "method": "GET", - "route": "/api/admin/errors", - "requestID": "e539722c-3445-4e5b-abf1-156e7db13d46", - "status": 200, - "expected": 200, - "bytes": 61078, - "headersMs": 47, - "firstBodyByteMs": 49, - "elapsedMs": 53 - }, - { - "method": "GET", - "route": "/api/admin/errors/stats", - "requestID": "88ebee57-d1cf-442b-b70e-26b3acc3052b", - "status": 200, - "expected": 200, - "bytes": 1406, - "headersMs": 53, - "firstBodyByteMs": 55, - "elapsedMs": 55 - }, - { - "method": "GET", - "route": "/api/admin/tokens", - "requestID": "6e8c2542-9ad2-4af0-8a7d-242fcfe22d09", - "status": 200, - "expected": 200, - "bytes": 160, - "headersMs": 30, - "firstBodyByteMs": 31, - "elapsedMs": 31 - }, - { - "method": "GET", - "route": "/api/admin/errors?limit=5001", - "requestID": "217c8ce2-6f9c-4429-98d9-ce0926d8c311", - "status": 200, - "expected": 200, - "bytes": 249056, - "headersMs": 107, - "firstBodyByteMs": 109, - "elapsedMs": 123 - }, - { - "method": "GET", - "route": "/api/admin/errors/stats", - "requestID": "64fa5c8d-49c3-4d8f-8ae2-14fa98fd2575", - "status": 200, - "expected": 200, - "bytes": 1406, - "headersMs": 32, - "firstBodyByteMs": 33, - "elapsedMs": 33 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793794934086-missing", - "requestID": "c8f2b165-3810-4c78-9662-43b4dc57c34b", - "status": 404, - "expected": 404, - "bytes": 26, - "headersMs": 45, - "firstBodyByteMs": 45, - "elapsedMs": 45 - }, - { - "method": "GET", - "route": "/api/admin/errors/stats", - "requestID": "9ff30159-873c-484e-881d-600ace768ff1", - "status": 200, - "expected": 200, - "bytes": 1406, - "headersMs": 47, - "firstBodyByteMs": 47, - "elapsedMs": 48 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=download&range=1h", - "requestID": "f0c64ab5-3d59-4fb3-858a-2806a2104460", - "status": 200, - "expected": 200, - "bytes": 3404, - "headersMs": 49, - "firstBodyByteMs": 50, - "elapsedMs": 50 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=download&range=6h", - "requestID": "3236a697-27f5-42db-8336-f3442e2a34e9", - "status": 200, - "expected": 200, - "bytes": 20220, - "headersMs": 31, - "firstBodyByteMs": 32, - "elapsedMs": 33 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=download&range=24h", - "requestID": "070c7683-d929-45a9-9239-c5ca3de18822", - "status": 200, - "expected": 200, - "bytes": 80739, - "headersMs": 54, - "firstBodyByteMs": 55, - "elapsedMs": 58 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=download&range=7d", - "requestID": "cf62c667-318a-475e-90c3-7b7f0dff58c7", - "status": 200, - "expected": 200, - "bytes": 564593, - "headersMs": 136, - "firstBodyByteMs": 138, - "elapsedMs": 167 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=remove&range=1h", - "requestID": "46abd1d2-5307-4ffa-8160-795ad27ab18f", - "status": 200, - "expected": 200, - "bytes": 3402, - "headersMs": 31, - "firstBodyByteMs": 33, - "elapsedMs": 33 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=cache&range=1h", - "requestID": "34be6525-b51d-4a2e-8f8e-00a88fa20e8b", - "status": 200, - "expected": 200, - "bytes": 3401, - "headersMs": 51, - "firstBodyByteMs": 52, - "elapsedMs": 53 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=download&range=unrecognized", - "requestID": "d1d23985-9eda-4ca1-a446-dbf6700c7841", - "status": 200, - "expected": 200, - "bytes": 3414, - "headersMs": 32, - "firstBodyByteMs": 33, - "elapsedMs": 33 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=unknown", - "requestID": "ec2d564c-3057-4b15-b98e-6ca4c06796d2", - "status": 404, - "expected": 404, - "bytes": 27, - "headersMs": 28, - "firstBodyByteMs": 28, - "elapsedMs": 28 - }, - { - "method": "GET", - "route": "/api/stat", - "requestID": "8a6ac2a6-1d90-4d5e-9405-b179c5812b69", - "status": 200, - "expected": 200, - "bytes": 70, - "headersMs": 45, - "firstBodyByteMs": 46, - "elapsedMs": 46 - }, - { - "method": "GET", - "route": "/api/stat/history?days=-2", - "requestID": "b19269a8-50b9-422f-a4f3-7ea667227a58", - "status": 200, - "expected": 200, - "bytes": 106, - "headersMs": 28, - "firstBodyByteMs": 29, - "elapsedMs": 29 - }, - { - "method": "GET", - "route": "/api/stat/history?days=0", - "requestID": "291bbf9f-3533-49ec-912d-55042eb83ee9", - "status": 200, - "expected": 200, - "bytes": 208, - "headersMs": 27, - "firstBodyByteMs": 28, - "elapsedMs": 28 - }, - { - "method": "GET", - "route": "/api/stat/history?days=0x10", - "requestID": "2d632341-d294-422b-a7ed-e3d6ce20bc82", - "status": 200, - "expected": 200, - "bytes": 208, - "headersMs": 50, - "firstBodyByteMs": 51, - "elapsedMs": 51 - }, - { - "method": "GET", - "route": "/api/stat/history?days=7suffix", - "requestID": "e4c15d60-2f4d-4246-a0e0-cb56284d8afc", - "status": 200, - "expected": 200, - "bytes": 208, - "headersMs": 47, - "firstBodyByteMs": 48, - "elapsedMs": 49 - }, - { - "method": "GET", - "route": "/api/stat/history?days=999", - "requestID": "dd499cfe-bda4-4050-bf77-0074ad2aeccc", - "status": 200, - "expected": 200, - "bytes": 208, - "headersMs": 29, - "firstBodyByteMs": 30, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/api/stat/history?days[]=7&days[]=30", - "requestID": "7fafd061-0d91-4c55-b091-6c3094e04473", - "status": 200, - "expected": 200, - "bytes": 208, - "headersMs": 26, - "firstBodyByteMs": 27, - "elapsedMs": 27 - }, - { - "method": "GET", - "route": "/api/stat/history?days[1]=7&days[0]=1", - "requestID": "485dbe81-7677-44cd-957e-a4aab5a81aaa", - "status": 200, - "expected": 200, - "bytes": 106, - "headersMs": 49, - "firstBodyByteMs": 51, - "elapsedMs": 51 - }, - { - "method": "GET", - "route": "/api/stat/history?days[x]=7", - "requestID": "51c73de8-6c65-425c-9163-67585b270103", - "status": 200, - "expected": 200, - "bytes": 208, - "headersMs": 26, - "firstBodyByteMs": 26, - "elapsedMs": 27 - }, - { - "method": "GET", - "route": "/api/user/dashboard?statuses[]=", - "requestID": "436563f7-50f1-46e2-a061-a96c42946cdc", - "status": 200, - "expected": 200, - "bytes": 64, - "headersMs": 61, - "firstBodyByteMs": 62, - "elapsedMs": 62 - }, - { - "method": "GET", - "route": "/api/user/dashboard?type[]=repo", - "requestID": "a65b33f8-bc7b-4d41-b91b-8af2d4199311", - "status": 200, - "expected": 200, - "bytes": 64, - "headersMs": 64, - "firstBodyByteMs": 65, - "elapsedMs": 68 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort[]=", - "requestID": "e51e8b5a-c6a4-4d19-b3a8-b0f64045f888", - "status": 400, - "expected": 400, - "bytes": 24, - "headersMs": 32, - "firstBodyByteMs": 32, - "elapsedMs": 32 - }, - { - "method": "GET", - "route": "/api/user/dashboard?cursor[]=", - "requestID": "fcb75254-9b24-411e-a09a-86c3bdba88f7", - "status": 400, - "expected": 400, - "bytes": 26, - "headersMs": 42, - "firstBodyByteMs": 42, - "elapsedMs": 43 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort=anonymizeDate&limit=5&cursor=eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDEiLCJ2YWx1ZSI6IjIwMjQtMDMtMDFUMDA6MDA6MDAuMDAwWiJ9", - "requestID": "ff19c5a6-d884-4dc3-9512-6dcc5215f9e5", - "status": 200, - "expected": 200, - "bytes": 797, - "headersMs": 60, - "firstBodyByteMs": 61, - "elapsedMs": 61 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort=anonymizeDate&limit=5&cursor=eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDEiLCJ2YWx1ZSI6Ik1hcmNoIDEgMjAyNCJ9", - "requestID": "11ab6ad4-85ba-482a-96a5-2100251e3d09", - "status": 200, - "expected": 200, - "bytes": 797, - "headersMs": 45, - "firstBodyByteMs": 46, - "elapsedMs": 46 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort=anonymizeDate&limit=5&cursor=eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDEiLCJ2YWx1ZSI6IjIwMjQtMDItMzAifQ", - "requestID": "560704eb-49aa-4ce8-ae6b-bcd572f1cb93", - "status": 200, - "expected": 200, - "bytes": 797, - "headersMs": 52, - "firstBodyByteMs": 53, - "elapsedMs": 53 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort=anonymizeDate&limit=5&cursor=eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMjQ6MDA6MDBaIn0", - "requestID": "e1e402b2-6e0b-46d1-9f70-903248ab635f", - "status": 200, - "expected": 200, - "bytes": 797, - "headersMs": 50, - "firstBodyByteMs": 51, - "elapsedMs": 51 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort=anonymizeDate&limit=5&cursor=eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDEiLCJ2YWx1ZSI6WyIyMDI0IiwiMyIsIjEiXX0", - "requestID": "4f2ba84e-384e-4e1e-b45b-a05bd7069a9c", - "status": 200, - "expected": 200, - "bytes": 797, - "headersMs": 49, - "firstBodyByteMs": 51, - "elapsedMs": 51 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort=anonymizeDate&limit=5&cursor=eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDEiLCJ2YWx1ZSI6Im5vdCBhIGRhdGUifQ", - "requestID": "36ccdd59-911c-40a7-9eeb-79408f4ec7bd", - "status": 400, - "expected": 400, - "bytes": 26, - "headersMs": 30, - "firstBodyByteMs": 30, - "elapsedMs": 31 - }, - { - "method": "GET", - "route": "/api/admin/performance?minutes=6e1", - "requestID": "7577f6c0-0b39-420c-af20-89a8aaaf07bd", - "status": 200, - "expected": 200, - "bytes": 57408, - "headersMs": 102, - "firstBodyByteMs": 104, - "elapsedMs": 107 - }, - { - "method": "GET", - "route": "/api/admin/performance?minutes[]=60", - "requestID": "a52aaeca-71c8-472c-bf36-2f1d763fe232", - "status": 200, - "expected": 200, - "bytes": 57412, - "headersMs": 72, - "firstBodyByteMs": 72, - "elapsedMs": 74 - }, - { - "method": "GET", - "route": "/api/admin/performance?minutes[0]=15", - "requestID": "24af2efe-f7b5-488d-93c2-d7bd1cb39b08", - "status": 200, - "expected": 200, - "bytes": 27278, - "headersMs": 62, - "firstBodyByteMs": 62, - "elapsedMs": 64 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue[]=cache&range[]=6h", - "requestID": "b1b741dd-a58b-4fe7-b2a4-2f657c87bf71", - "status": 200, - "expected": 200, - "bytes": 20201, - "headersMs": 40, - "firstBodyByteMs": 41, - "elapsedMs": 42 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?range[]=", - "requestID": "e084673c-0053-4339-84f9-81564ff747f9", - "status": 200, - "expected": 200, - "bytes": 3402, - "headersMs": 32, - "firstBodyByteMs": 33, - "elapsedMs": 33 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?range=toString", - "requestID": "a0304bc4-edc8-49ef-aa9d-1ff9daeab2c8", - "status": 200, - "expected": 200, - "bytes": 51, - "headersMs": 30, - "firstBodyByteMs": 31, - "elapsedMs": 31 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue[]=", - "requestID": "cd762157-0f70-46f5-aad0-f49c9da2dd95", - "status": 404, - "expected": 404, - "bytes": 27, - "headersMs": 27, - "firstBodyByteMs": 27, - "elapsedMs": 27 - }, - { - "method": "GET", - "route": "/api/admin/queues?queue[]=remove", - "requestID": "efd07bdc-9340-44a8-8e61-b06bff57e098", - "status": 200, - "expected": 200, - "bytes": 8241, - "headersMs": 57, - "firstBodyByteMs": 58, - "elapsedMs": 59 - }, - { - "method": "GET", - "route": "/api/admin/errors?offset[]=2&limit[]=7", - "requestID": "c3256466-2395-453e-9134-434d528f5de3", - "status": 200, - "expected": 200, - "bytes": 2614, - "headersMs": 33, - "firstBodyByteMs": 34, - "elapsedMs": 34 - }, - { - "method": "GET", - "route": "/api/repo/octocat/Hello-World?connection=", - "requestID": "84e7f166-0a5e-4552-934c-7ddc52a3c2a6", - "status": 400, - "expected": 400, - "bytes": 30, - "headersMs": 28, - "firstBodyByteMs": 28, - "elapsedMs": 28 - }, - { - "method": "GET", - "route": "/api/repo/octocat/Hello-World?connection[]=oauth", - "requestID": "1882c329-7ee5-4af8-a9eb-5597be787ccd", - "status": 400, - "expected": 400, - "bytes": 30, - "headersMs": 38, - "firstBodyByteMs": 38, - "elapsedMs": 38 - }, - { - "method": "GET", - "route": "/api/repo/octocat/Hello-World?connection=oauth&connection[]=github-app", - "requestID": "4d7ea5b6-c139-4849-a3e8-2854439dcb24", - "status": 400, - "expected": 400, - "bytes": 30, - "headersMs": 30, - "firstBodyByteMs": 30, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/api/repo/octocat/Hello-World?repositoryID[]=invalid", - "requestID": "65768778-d6f5-422d-a86f-af6b848162f0", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 27, - "firstBodyByteMs": 27, - "elapsedMs": 27 - }, - { - "method": "GET", - "route": "/api/repo/octocat/Hello-World?repositoryID=invalid", - "requestID": "bb084c6c-8471-4d86-a29a-f1c71ce4ae07", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 28, - "firstBodyByteMs": 28, - "elapsedMs": 29 - }, - { - "method": "GET", - "route": "/api/repo/octocat/Hello-World?repositoryID[$exists]=true", - "requestID": "d4a9079a-a479-413a-a768-e09258105ffa", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 43, - "firstBodyByteMs": 43, - "elapsedMs": 43 - }, - { - "method": "GET", - "route": "/api/user/search/github-users?q[]=ab", - "requestID": "1a0ac382-560a-4cfb-b486-59ae2fce8306", - "status": 200, - "expected": 200, - "bytes": 2, - "headersMs": 32, - "firstBodyByteMs": 32, - "elapsedMs": 32 - }, - { - "method": "GET", - "route": "/api/user/search/github-users?q[length]=1", - "requestID": "bce5d125-da01-4fae-8f2f-e7cfece1fb30", - "status": 200, - "expected": 200, - "bytes": 2, - "headersMs": 29, - "firstBodyByteMs": 30, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/api/user/search/github-users?q=ab&q=cd", - "requestID": "d1a408e7-3f5d-470c-9ae3-0afd1175dbcd", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 33, - "firstBodyByteMs": 33, - "elapsedMs": 33 - }, - { - "method": "GET", - "route": "/api/user/search/github-users?q[x]=ab", - "requestID": "82da2252-eb95-48f8-8c0e-1ae9ec00720b", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 31, - "firstBodyByteMs": 31, - "elapsedMs": 31 - }, - { - "method": "GET", - "route": "/api/user/search/github-users?q[length][toString]=1", - "requestID": "4879997b-8f85-47b1-9604-f3541fe2ccfe", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 30, - "firstBodyByteMs": 30, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/api/admin/repos?page[]=2&limit[]=2&sort[]=status&direction[]=asc&format[]=csv", - "requestID": "5b93d88d-2170-4442-8c0a-b1f91510c9d8", - "status": 200, - "expected": 200, - "bytes": 2680, - "headersMs": 46, - "firstBodyByteMs": 46, - "elapsedMs": 47 - }, - { - "method": "GET", - "route": "/api/admin/repos?page=1000001&limit=1", - "requestID": "626dd034-c3d8-4e61-a5d7-c1a06f66f759", - "status": 200, - "expected": 200, - "bytes": 193, - "headersMs": 35, - "firstBodyByteMs": 36, - "elapsedMs": 36 - }, - { - "method": "GET", - "route": "/api/admin/repos?page=-1", - "requestID": "677785bb-e4a5-4e1e-90d3-47d8dc23c698", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 27, - "firstBodyByteMs": 27, - "elapsedMs": 27 - }, - { - "method": "GET", - "route": "/api/admin/repos?page[toString]=x", - "requestID": "674a61c9-bc51-4e3a-b032-1089e7208bde", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 28, - "firstBodyByteMs": 28, - "elapsedMs": 28 - }, - { - "method": "GET", - "route": "/api/admin/users?page[]=2&limit[]=2&sort[]=status&direction[]=asc&format[]=csv", - "requestID": "2fb87f65-25c0-4ef1-80c8-a5e2c2f41686", - "status": 200, - "expected": 200, - "bytes": 106, - "headersMs": 35, - "firstBodyByteMs": 36, - "elapsedMs": 36 - }, - { - "method": "GET", - "route": "/api/admin/users?page=1000001&limit=1", - "requestID": "806ccbe5-6dbb-49f0-bf42-9d8109d441a7", - "status": 200, - "expected": 200, - "bytes": 112, - "headersMs": 34, - "firstBodyByteMs": 35, - "elapsedMs": 36 - }, - { - "method": "GET", - "route": "/api/admin/users?page=-1", - "requestID": "783ba75c-a9d3-4499-9cee-1fb04560ffb5", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 33, - "firstBodyByteMs": 33, - "elapsedMs": 33 - }, - { - "method": "GET", - "route": "/api/admin/users?page[toString]=x", - "requestID": "2d9a5865-2f5b-400c-b9b6-291c7a8358e6", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 40, - "firstBodyByteMs": 41, - "elapsedMs": 41 - }, - { - "method": "GET", - "route": "/api/admin/users?limit=-1", - "requestID": "85e79d8b-4b4a-4c45-a057-5dd8a60a367e", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 33, - "firstBodyByteMs": 33, - "elapsedMs": 33 - }, - { - "method": "GET", - "route": "/api/admin/conferences?page[]=2&limit[]=2&sort[]=status&direction[]=asc&format[]=csv", - "requestID": "e3e5a0a0-4365-4d1c-b309-3234c590737e", - "status": 200, - "expected": 200, - "bytes": 80, - "headersMs": 33, - "firstBodyByteMs": 35, - "elapsedMs": 35 - }, - { - "method": "GET", - "route": "/api/admin/conferences?page=1000001&limit=1", - "requestID": "4c5d078f-0ba0-4e05-91ed-2eaaafe48154", - "status": 200, - "expected": 200, - "bytes": 86, - "headersMs": 34, - "firstBodyByteMs": 35, - "elapsedMs": 35 - }, - { - "method": "GET", - "route": "/api/admin/conferences?page=-1", - "requestID": "dc18fb07-42f9-47c9-9064-e847a521e726", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 28, - "firstBodyByteMs": 28, - "elapsedMs": 28 - }, - { - "method": "GET", - "route": "/api/admin/conferences?page[toString]=x", - "requestID": "e9e4704f-0fb2-4dd1-9165-ba4a33d7bcf4", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 27, - "firstBodyByteMs": 28, - "elapsedMs": 28 - }, - { - "method": "GET", - "route": "/api/admin/repos?limit=-1", - "requestID": "b625d4aa-9344-4d67-b913-9927687421b4", - "status": 200, - "expected": 200, - "bytes": 1398, - "headersMs": 37, - "firstBodyByteMs": 38, - "elapsedMs": 38 - }, - { - "method": "GET", - "route": "/api/admin/repos?ready[]=true", - "requestID": "13ac920e-0d5d-49ff-8f13-9b066a8c9e2f", - "status": 200, - "expected": 200, - "bytes": 1936, - "headersMs": 36, - "firstBodyByteMs": 37, - "elapsedMs": 38 - }, - { - "method": "GET", - "route": "/api/admin/conferences?limit=-1", - "requestID": "15748a70-e659-4560-897c-3630a55e2cc3", - "status": 200, - "expected": 200, - "bytes": 80, - "headersMs": 32, - "firstBodyByteMs": 33, - "elapsedMs": 33 - }, - { - "method": "GET", - "route": "/api/admin/conferences?ready[]=true", - "requestID": "60ce6665-fc12-40a0-81f0-fc996db5a2be", - "status": 200, - "expected": 200, - "bytes": 117, - "headersMs": 33, - "firstBodyByteMs": 34, - "elapsedMs": 34 - }, - { - "method": "GET", - "route": "/api/admin/repos?search[]=x", - "requestID": "df4aa966-a8e9-42f7-8ca3-266c23a43266", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 28, - "firstBodyByteMs": 28, - "elapsedMs": 28 - }, - { - "method": "GET", - "route": "/api/admin/users?search[]=x", - "requestID": "b4ee24aa-7bb9-4f0b-9343-7db9ea5fbdeb", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 29, - "firstBodyByteMs": 30, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/api/admin/conferences?search[]=x", - "requestID": "58bdc037-f90f-4e3b-8d00-efd5d9ee4a17", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 27, - "firstBodyByteMs": 27, - "elapsedMs": 28 - }, - { - "method": "GET", - "route": "/api/admin/users?status[]=active", - "requestID": "bd3112ba-974b-4cbf-aa93-7c7aca262d04", - "status": 200, - "expected": 200, - "bytes": 99, - "headersMs": 35, - "firstBodyByteMs": 36, - "elapsedMs": 37 - }, - { - "method": "GET", - "route": "/api/admin/users?status[$in][]=active", - "requestID": "18d1f7ca-3842-43c6-939b-5e055cc54b37", - "status": 200, - "expected": 200, - "bytes": 553, - "headersMs": 32, - "firstBodyByteMs": 33, - "elapsedMs": 33 - }, - { - "method": "GET", - "route": "/api/admin/users?status[a]=active", - "requestID": "0328ef8f-3aff-43b5-857e-9eb5ce92456a", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 29, - "firstBodyByteMs": 29, - "elapsedMs": 29 - }, - { - "method": "GET", - "route": "/api/admin/users?status[$in]=active", - "requestID": "d44681ca-734b-4877-b0b7-303a1466c2bd", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 29, - "firstBodyByteMs": 29, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/api/admin/repos?owner[a]=x", - "requestID": "a6ee9858-8ddd-45b7-aee7-96db092545b5", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 29, - "firstBodyByteMs": 30, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/api/admin/repos?conference[$unknown]=x", - "requestID": "46b26d26-f725-4b07-98bb-4ca31085eadb", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 28, - "firstBodyByteMs": 28, - "elapsedMs": 29 - }, - { - "method": "GET", - "route": "/api/admin/repos?dateFrom[]=2024-02-30", - "requestID": "44387e04-541a-45d9-bc90-6c3dff5900cc", - "status": 200, - "expected": 200, - "bytes": 12648, - "headersMs": 38, - "firstBodyByteMs": 39, - "elapsedMs": 39 - }, - { - "method": "GET", - "route": "/api/admin/repos?dateTo=March%201%202024", - "requestID": "dbc8304f-d931-48aa-b404-d81ab43075d4", - "status": 200, - "expected": 200, - "bytes": 156, - "headersMs": 36, - "firstBodyByteMs": 36, - "elapsedMs": 37 - }, - { - "method": "GET", - "route": "/api/admin/repos?dateFrom[toString]=x", - "requestID": "162e40bf-dd3a-4aba-ad0a-5d6ebcb1af5b", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 30, - "firstBodyByteMs": 30, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/api/admin/users?dateFrom[]=2024-02-30", - "requestID": "bfbe4453-6b4e-4d71-a92b-603656857f41", - "status": 200, - "expected": 200, - "bytes": 458, - "headersMs": 32, - "firstBodyByteMs": 33, - "elapsedMs": 33 - }, - { - "method": "GET", - "route": "/api/admin/users?dateTo=March%201%202024", - "requestID": "6f4930cf-3785-4657-9775-1abec0698ce3", - "status": 200, - "expected": 200, - "bytes": 129, - "headersMs": 34, - "firstBodyByteMs": 35, - "elapsedMs": 35 - }, - { - "method": "GET", - "route": "/api/admin/users?dateFrom[toString]=x", - "requestID": "fccfdc28-7e17-4389-91de-ed977d5dd088", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 27, - "firstBodyByteMs": 27, - "elapsedMs": 27 - }, - { - "method": "GET", - "route": "/api/admin/conferences?dateFrom[]=2024-02-30", - "requestID": "499361b8-b3fa-4385-8c79-c77914f08c61", - "status": 200, - "expected": 200, - "bytes": 138, - "headersMs": 33, - "firstBodyByteMs": 35, - "elapsedMs": 35 - }, - { - "method": "GET", - "route": "/api/admin/conferences?dateTo=March%201%202024", - "requestID": "337ee80f-20f1-4e4f-923b-597df0b92e79", - "status": 200, - "expected": 200, - "bytes": 138, - "headersMs": 36, - "firstBodyByteMs": 37, - "elapsedMs": 37 - }, - { - "method": "GET", - "route": "/api/admin/conferences?dateFrom[toString]=x", - "requestID": "eab83fbb-5ea0-4a68-bcdb-c1b18c023779", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 28, - "firstBodyByteMs": 28, - "elapsedMs": 28 - }, - { - "method": "GET", - "route": "/github/connections", - "requestID": "90f9b664-6d8f-44a4-b874-c5de00cf5614", - "status": 200, - "expected": 200, - "bytes": 456, - "headersMs": 786, - "firstBodyByteMs": 788, - "elapsedMs": 788 - }, - { - "method": "POST", - "route": "/api/admin/tokens", - "requestID": "56a2f576-9161-4e70-b02e-da6f34e39256", - "status": 200, - "expected": 200, - "bytes": 186, - "headersMs": 40, - "firstBodyByteMs": 41, - "elapsedMs": 42 - }, - { - "method": "GET", - "route": "/api/user", - "requestID": "becb6a87-2101-43e9-a885-aa6bf445ba68", - "status": 200, - "expected": 200, - "bytes": 100, - "headersMs": 30, - "firstBodyByteMs": 31, - "elapsedMs": 34 - }, - { - "method": "DELETE", - "route": "/api/admin/tokens/6aeb237f0f6b6688df229e8c", - "requestID": "55ad3228-ab89-4ff9-b25c-0f6dda0d8293", - "status": 200, - "expected": 200, - "bytes": 13, - "headersMs": 51, - "firstBodyByteMs": 51, - "elapsedMs": 51 - }, - { - "method": "GET", - "route": "/api/user", - "requestID": "5ab77080-11ad-4b78-8a54-1cc6e8dcadd5", - "status": 401, - "expected": 401, - "bytes": 25, - "headersMs": 26, - "firstBodyByteMs": 26, - "elapsedMs": 26 - }, - { - "method": "POST", - "route": "/github/login-token", - "requestID": "5442c341-1709-4ab7-8063-da0bcf30633f", - "status": 200, - "expected": 200, - "bytes": 33, - "headersMs": 34, - "firstBodyByteMs": 34, - "elapsedMs": 34 - }, - { - "method": "GET", - "route": "/api/user", - "requestID": "3aa210a6-73c1-4e84-954d-a95ce44fb671", - "status": 200, - "expected": 200, - "bytes": 100, - "headersMs": 38, - "firstBodyByteMs": 39, - "elapsedMs": 39 - }, - { - "method": "GET", - "route": "/api/user/logout", - "requestID": "7caf6a88-9ad6-425d-9e6b-b2d970175746", - "status": 302, - "expected": 302, - "bytes": 24, - "headersMs": 27, - "firstBodyByteMs": 28, - "elapsedMs": 28 - }, - { - "method": "GET", - "route": "/api/user", - "requestID": "f66ae9d7-b61f-470a-93bb-3017cffbfbd0", - "status": 401, - "expected": 401, - "bytes": 25, - "headersMs": 24, - "firstBodyByteMs": 24, - "elapsedMs": 24 - }, - { - "method": "POST", - "route": "/api/anonymize-preview", - "requestID": "b1429a3b-471a-49fb-b0fb-d1d431bd880f", - "status": 200, - "expected": 200, - "bytes": 26, - "headersMs": 31, - "firstBodyByteMs": 31, - "elapsedMs": 31 - }, - { - "method": "GET", - "route": "/api/providers/github/repository/metadata?name=tdurieux%2Fsynctex-js&connection=github-app", - "requestID": "f3bdb206-0631-48f7-ae9e-d1224839adae", - "status": 200, - "expected": 200, - "bytes": 230, - "headersMs": 2716, - "firstBodyByteMs": 2717, - "elapsedMs": 2717 - }, - { - "method": "GET", - "route": "/api/providers/github/repository/branches?name=tdurieux%2Fsynctex-js&connection=github-app", - "requestID": "ca1b174b-0c89-4a10-a653-be9c602ee9f9", - "status": 200, - "expected": 200, - "bytes": 2623, - "headersMs": 2269, - "firstBodyByteMs": 2270, - "elapsedMs": 2274 - }, - { - "method": "GET", - "route": "/api/providers/github/repository/readme?name=tdurieux%2Fsynctex-js&connection=github-app", - "requestID": "00b0f2ff-c400-4d0c-b6d7-7b6a8cd3de0f", - "status": 200, - "expected": 200, - "bytes": 2303, - "headersMs": 2131, - "firstBodyByteMs": 2133, - "elapsedMs": 2134 - }, - { - "method": "POST", - "route": "/api/repo", - "requestID": "6105035e-7912-49fe-9ff0-10b2b260cf13", - "status": 200, - "expected": 200, - "bytes": 22, - "headersMs": 3362, - "firstBodyByteMs": 3362, - "elapsedMs": 3362 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793794934086", - "requestID": "9f438c13-138b-4b4d-9996-6300233755cf", - "status": 200, - "expected": 200, - "bytes": 566, - "headersMs": 104, - "firstBodyByteMs": 105, - "elapsedMs": 106 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793794934086/file/LICENSE", - "requestID": "59c0c4e1-b312-493d-af14-8cacbddc6268", - "status": 200, - "expected": 200, - "bytes": 1074, - "headersMs": 171, - "firstBodyByteMs": 172, - "elapsedMs": 173 - }, - { - "method": "GET", - "route": "/w/go-beta-check-1793794934086/LICENSE", - "requestID": "87aeaef9-5c6f-4967-9d2c-ad6341000e29", - "status": 200, - "expected": 200, - "bytes": 1074, - "headersMs": 54, - "firstBodyByteMs": 55, - "elapsedMs": 58 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793794934086/files", - "requestID": "244f03cf-b38d-44e5-aa35-049a788bcb61", - "status": 200, - "expected": 200, - "bytes": 170, - "headersMs": 29, - "firstBodyByteMs": 30, - "elapsedMs": 31 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793794934086/zip", - "requestID": "466df9d9-bf27-48b5-bf34-8f3a82010a66", - "status": 200, - "expected": 200, - "bytes": 7171, - "headersMs": 829, - "firstBodyByteMs": 829, - "elapsedMs": 948 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793794934086/file/LICENSE", - "requestID": "4e2eb3d5-cca3-4003-8714-b075e8253264", - "status": 200, - "expected": 200, - "bytes": 1074, - "headersMs": 60, - "firstBodyByteMs": 61, - "elapsedMs": 61 - }, - { - "method": "GET", - "route": "/w/go-beta-check-1793794934086/LICENSE", - "requestID": "2aa2c744-80d4-4881-a48e-605dea2143ab", - "status": 200, - "expected": 200, - "bytes": 1074, - "headersMs": 54, - "firstBodyByteMs": 54, - "elapsedMs": 55 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793794934086/zip", - "requestID": "20d7c67a-3f06-4bf2-89de-9c21d6356126", - "status": 200, - "expected": 200, - "bytes": 7171, - "headersMs": 538, - "firstBodyByteMs": 538, - "elapsedMs": 562 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793794934086/file/LICENSE", - "requestID": "9a1bae83-5246-4fc1-a281-2067c1c11470", - "status": 200, - "expected": 200, - "bytes": 1074, - "headersMs": 69, - "firstBodyByteMs": 71, - "elapsedMs": 72 - }, - { - "method": "GET", - "route": "/w/go-beta-check-1793794934086/LICENSE", - "requestID": "e7c53d62-958b-4113-b136-863d82d580ed", - "status": 200, - "expected": 200, - "bytes": 1074, - "headersMs": 51, - "firstBodyByteMs": 52, - "elapsedMs": 53 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793794934086/zip", - "requestID": "6b5fe822-65ab-4b98-a306-fa284ea839d9", - "status": 200, - "expected": 200, - "bytes": 7171, - "headersMs": 552, - "firstBodyByteMs": 552, - "elapsedMs": 574 - }, - { - "method": "GET", - "route": "/api/admin/performance", - "requestID": "595812c1-bb1b-4958-86f6-45226a6f683d", - "status": 200, - "expected": 200, - "bytes": 35774, - "headersMs": 102, - "firstBodyByteMs": 103, - "elapsedMs": 105 - }, - { - "method": "GET", - "route": "/api/user", - "requestID": "c027b60b-3625-43a7-afef-de90e9ff03b7", - "status": 401, - "expected": 401, - "bytes": 25, - "headersMs": 29, - "firstBodyByteMs": 29, - "elapsedMs": 29 - }, - { - "method": "DELETE", - "route": "/api/repo/go-beta-check-1793794934086", - "requestID": "316aa198-e5f4-4ca0-aa2c-ae71c7fd08fa", - "status": 200, - "expected": 200, - "bytes": 21, - "headersMs": 45, - "firstBodyByteMs": 46, - "elapsedMs": 46 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793794934086", - "requestID": "f978bb8c-114f-4dd3-a15c-bf31aed42e02", - "status": 200, - "expected": 200, - "bytes": 616, - "headersMs": 35, - "firstBodyByteMs": 36, - "elapsedMs": 36 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793794934086", - "requestID": "5207ddf9-2151-4168-92b0-13db905e8f4d", - "status": 200, - "expected": 200, - "bytes": 615, - "headersMs": 35, - "firstBodyByteMs": 36, - "elapsedMs": 36 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793794934086/file/LICENSE", - "requestID": "c506b84b-1d28-488f-831b-5e9ba8e3d32b", - "status": 410, - "expected": 410, - "bytes": 30, - "headersMs": 28, - "firstBodyByteMs": 28, - "elapsedMs": 28 - }, - { - "method": "GET", - "route": "/api/user", - "requestID": "0138d671-9173-434f-a092-8230108204ed", - "status": 401, - "expected": 401, - "bytes": 25, - "headersMs": 38, - "firstBodyByteMs": 39, - "elapsedMs": 39 - } - ], - "productionChanged": false, - "overviewHistoryFresh": "passed", - "overviewBrowserFields": "passed", - "queueOverviewFields": "passed", - "errorMonitoring": { - "maxEntries": 5000, - "hourlyBuckets": 24, - "routine404Counted": true - }, - "queueMetricWindows": [ - { - "queue": "download", - "range": "1h", - "points": 60 - }, - { - "queue": "download", - "range": "6h", - "points": 360 - }, - { - "queue": "download", - "range": "24h", - "points": 1440 - }, - { - "queue": "download", - "range": "7d", - "points": 10080 - }, - { - "queue": "remove", - "range": "1h", - "points": 60 - }, - { - "queue": "cache", - "range": "1h", - "points": 60 - }, - { - "queue": "download", - "range": "unrecognized", - "points": 60 - } - ], - "publicStatistics": { - "anonymousAccess": true, - "windows": [ - { - "query": "days=-2", - "days": 1, - "rows": 1 - }, - { - "query": "days=0", - "days": 30, - "rows": 2 - }, - { - "query": "days=0x10", - "days": 16, - "rows": 2 - }, - { - "query": "days=7suffix", - "days": 7, - "rows": 2 - }, - { - "query": "days=999", - "days": 365, - "rows": 2 - }, - { - "query": "days[]=7&days[]=30", - "days": 7, - "rows": 2 - }, - { - "query": "days[1]=7&days[0]=1", - "days": 1, - "rows": 1 - }, - { - "query": "days[x]=7", - "days": 30, - "rows": 2 - } - ] - }, - "dashboardExtendedQueries": "passed", - "dashboardDateCursors": "passed", - "monitoringExtendedQueries": "passed", - "adminExtendedQueries": "passed", - "previewConnectionQueries": "passed", - "previewCacheHintRejections": "passed", - "userSearchQueries": "passed", - "adminListPaginationQueries": "passed", - "adminListFilterQueries": "passed", - "adminListCastingQueries": "passed", - "adminListDateQueries": "passed", - "apiKeyLifecycle": "passed", - "sessionLoginLogout": "passed", - "zipManifestSHA256": "e6fdc1385a4d0b50e3deea32ab2fcf34de88d1147ed5001b81cbd0968dcf5a81", - "zipEntries": 5, - "zipSourceCommit": "912f3c897c5ac1bbc225f65cfd1387579fb3385e", - "exactZipContents": "passed", - "repeatedContentChecks": 3, - "performanceMonitoring": { - "requests": true, - "processSamples": true, - "runtimeHistory": true, - "stages": [ - "repository", - "authorization", - "worker_wait", - "anonymize" - ], - "upstreamObserved": true, - "upstreamNote": "Shared-cache hits need no upstream read; provider timing is checked by the integration suite." - }, - "result": "passed", - "testRepositoryRemoved": true, - "temporaryKeyRevoked": true, - "betaAccountAdmin": true, - "uniqueRequestIDsVerified": 133 -} diff --git a/backend/reports/shadow-app-deployment.json b/backend/reports/shadow-app-deployment.json deleted file mode 100644 index 488a7ad..0000000 --- a/backend/reports/shadow-app-deployment.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "verifiedAt": "2026-11-03T12:14:58.433Z", - "appId": 5594414, - "clientId": "Iv23liBTMkyVIOs59hNF", - "slug": "anonymous-github-beta", - "appJWTAuthentication": "passed", - "installationsObserved": 1, - "permissionsReadOnly": true, - "webhookAdmission": [ - { - "signed": false, - "status": 401 - }, - { - "signed": true, - "status": 204 - } - ], - "appAndLegacyLoginRedirects": "passed", - "isolationAndPublicOutput": "passed", - "liveOAuthCallback": "App user grant observed in beta; authenticated App repository access verified", - "liveInstallation": "verified through GitHub App API", - "githubWebhookDelivery": { - "result": "passed", - "configurationFix": "Configured missing GitHub-side signing secret to match beta", - "event": "installation", - "redeliveryStatus": 204, - "installationBlocked": false, - "reconciliationPending": false - }, - "productionChanged": false, - "installationTokenCheck": { - "installationId": 178175103, - "tokenIssued": true, - "repositoryAccessStatus": 200, - "repositoryCount": 183, - "permissions": { - "contents": "read", - "metadata": "read" - }, - "temporaryTokenRevoked": true - }, - "legacyOAuthRegression": { - "result": "passed", - "requests": 38, - "report": "shadow-authenticated-deployment.json" - }, - "authenticatedAppLifecycle": { - "report": "backend/reports/shadow-app-authenticated-deployment.json", - "requests": 37, - "result": "passed", - "explicitAppBinding": true, - "checkedFile": "LICENSE", - "zipCRC": true, - "exactAnonymizedFileAndZipEntry": true, - "testRepositoryRemoved": true, - "temporaryKeyRevoked": true - } -} diff --git a/backend/reports/shadow-authenticated-deployment.json b/backend/reports/shadow-authenticated-deployment.json deleted file mode 100644 index d4cd29a..0000000 --- a/backend/reports/shadow-authenticated-deployment.json +++ /dev/null @@ -1,294 +0,0 @@ -{ - "verifiedAt": "2026-11-03T12:51:24.531Z", - "hostname": "beta.durieux.me", - "configurationMode": "GitHub App enabled alongside legacy OAuth", - "checks": [ - { - "method": "GET", - "route": "/api/user", - "status": 401, - "expected": 401, - "elapsedMs": 266 - }, - { - "method": "GET", - "route": "/api/user", - "status": 200, - "expected": 200, - "elapsedMs": 88 - }, - { - "method": "GET", - "route": "/github/connections", - "status": 200, - "expected": 200, - "elapsedMs": 976 - }, - { - "method": "GET", - "route": "/api/providers", - "status": 200, - "expected": 200, - "elapsedMs": 47 - }, - { - "method": "GET", - "route": "/api/user/dashboard", - "status": 200, - "expected": 200, - "elapsedMs": 46 - }, - { - "method": "GET", - "route": "/api/user/default", - "status": 200, - "expected": 200, - "elapsedMs": 31 - }, - { - "method": "GET", - "route": "/api/user/quota", - "status": 200, - "expected": 200, - "elapsedMs": 47 - }, - { - "method": "GET", - "route": "/api/admin/overview", - "status": 200, - "expected": 200, - "elapsedMs": 79 - }, - { - "method": "GET", - "route": "/api/admin/users", - "status": 200, - "expected": 200, - "elapsedMs": 57 - }, - { - "method": "GET", - "route": "/api/admin/repos", - "status": 200, - "expected": 200, - "elapsedMs": 60 - }, - { - "method": "GET", - "route": "/api/admin/queues", - "status": 200, - "expected": 200, - "elapsedMs": 61 - }, - { - "method": "GET", - "route": "/api/admin/performance", - "status": 200, - "expected": 200, - "elapsedMs": 83 - }, - { - "method": "GET", - "route": "/api/admin/tokens", - "status": 200, - "expected": 200, - "elapsedMs": 49 - }, - { - "method": "POST", - "route": "/api/admin/tokens", - "status": 200, - "expected": 200, - "elapsedMs": 47 - }, - { - "method": "GET", - "route": "/api/user", - "status": 200, - "expected": 200, - "elapsedMs": 41 - }, - { - "method": "DELETE", - "route": "/api/admin/tokens/6ae9d8d1fe8c381df8defc29", - "status": 200, - "expected": 200, - "elapsedMs": 58 - }, - { - "method": "GET", - "route": "/api/user", - "status": 401, - "expected": 401, - "elapsedMs": 26 - }, - { - "method": "POST", - "route": "/github/login-token", - "status": 200, - "expected": 200, - "elapsedMs": 43 - }, - { - "method": "GET", - "route": "/api/user", - "status": 200, - "expected": 200, - "elapsedMs": 39 - }, - { - "method": "GET", - "route": "/api/user/logout", - "status": 302, - "expected": 302, - "elapsedMs": 31 - }, - { - "method": "GET", - "route": "/api/user", - "status": 401, - "expected": 401, - "elapsedMs": 44 - }, - { - "method": "POST", - "route": "/api/anonymize-preview", - "status": 200, - "expected": 200, - "elapsedMs": 28 - }, - { - "method": "GET", - "route": "/api/providers/github/repository/metadata?name=octocat%2FHello-World&connection=oauth", - "status": 200, - "expected": 200, - "elapsedMs": 387 - }, - { - "method": "GET", - "route": "/api/providers/github/repository/branches?name=octocat%2FHello-World&connection=oauth", - "status": 200, - "expected": 200, - "elapsedMs": 410 - }, - { - "method": "GET", - "route": "/api/providers/github/repository/readme?name=octocat%2FHello-World&connection=oauth", - "status": 200, - "expected": 200, - "elapsedMs": 419 - }, - { - "method": "POST", - "route": "/api/repo", - "status": 200, - "expected": 200, - "elapsedMs": 669 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793710284535", - "status": 200, - "expected": 200, - "elapsedMs": 36 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793710284535", - "status": 200, - "expected": 200, - "elapsedMs": 33 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793710284535/file/README", - "status": 200, - "expected": 200, - "elapsedMs": 144 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793710284535/files", - "status": 200, - "expected": 200, - "elapsedMs": 56 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793710284535/zip", - "status": 200, - "expected": 200, - "elapsedMs": 62 - }, - { - "method": "GET", - "route": "/api/admin/performance", - "status": 200, - "expected": 200, - "elapsedMs": 72 - }, - { - "method": "GET", - "route": "/api/user", - "status": 401, - "expected": 401, - "elapsedMs": 28 - }, - { - "method": "DELETE", - "route": "/api/repo/go-beta-check-1793710284535", - "status": 200, - "expected": 200, - "elapsedMs": 56 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793710284535", - "status": 200, - "expected": 200, - "elapsedMs": 38 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793710284535", - "status": 200, - "expected": 200, - "elapsedMs": 38 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793710284535/file/README", - "status": 410, - "expected": 410, - "elapsedMs": 29 - }, - { - "method": "GET", - "route": "/api/user", - "status": 401, - "expected": 401, - "elapsedMs": 31 - } - ], - "productionChanged": false, - "overviewBrowserFields": "passed", - "apiKeyLifecycle": "passed", - "sessionLoginLogout": "passed", - "exactZipContents": "passed", - "performanceMonitoring": { - "requests": true, - "processSamples": true, - "runtimeHistory": true, - "stages": [ - "repository", - "authorization", - "upstream", - "worker_wait", - "anonymize" - ] - }, - "result": "passed", - "testRepositoryRemoved": true, - "temporaryKeyRevoked": true, - "betaAccountAdmin": true -} diff --git a/backend/reports/shadow-beta-deployment.json b/backend/reports/shadow-beta-deployment.json deleted file mode 100644 index 0054ce2..0000000 --- a/backend/reports/shadow-beta-deployment.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "verifiedAt": "2026-11-03T08:25:36.021003+00:00", - "hostname": "beta.durieux.me", - "server": "vps-1593", - "originIP": "212.127.73.172", - "productionChanged": false, - "productionDataImported": false, - "publicDeploymentHeader": "go-shadow-beta", - "httpsCertificateVerified": true, - "githubOutboundTLSStatus": 200, - "oauth": { - "legacyEnabled": true, - "githubAppEnabled": false, - "clientMatchesBetaConfiguration": true, - "callback": "https://beta.durieux.me/github/auth", - "redirectStatus": 302, - "cookieSecure": true, - "cookieHttpOnly": true, - "cookieSameSite": "Lax", - "completedUserAuthorization": true, - "authorizationEvidence": { - "userReportedSignIn": true, - "activeGitHubAccountObserved": true, - "authenticatedGitHubRepositoryLifecycle": "passed", - "report": "shadow-authenticated-deployment.json", - "verifiedAt": "2026-11-03T08:33:37.756Z" - } - }, - "browser": { - "legacyOAuthCopyRendered": true, - "loginPath": "/github/login" - }, - "checks": { - "isolation": "passed", - "health": "passed", - "authentication": "User-reported OAuth sign-in, active account, API-key authentication and live GitHub repository lifecycle verified", - "exactAnonymizedFileChecks": 9, - "zip": "passed", - "demo": "https://beta.durieux.me/r/shadow-demo/" - }, - "configurationSHA256": { - "backend/compose.shadow.yml": "175cff66898963bbab81a06727e47e57855a748111865ab3119ef1647b3b14e5", - "backend/compose.shadow-beta.yml": "29f7874bd8210f2be036e08f87bb64347dd59a47345a1bc27e1d58dfebb585c6", - "backend/shadow-beta-nginx.conf": "89feaf1fd4d56b6d5cc9ddb09c505c44cbf26be10e20cf02272b60090e9ab9a8", - "backend/shadow-beta.caddy": "985ab1b605946d68c528c89f42f9f5d4279ad1509e30e4df168c0f83bda46904", - "backend/scripts/check-shadow.cjs": "1869cef7fdccb8a2ce70e90de5b0e16c82d48be9d11b7987cc40d651b0915499" - } -} diff --git a/backend/reports/shadow-browser-validation.json b/backend/reports/shadow-browser-validation.json deleted file mode 100644 index 494618f..0000000 --- a/backend/reports/shadow-browser-validation.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "verifiedAt": "2026-11-03T12:19:48.910Z", - "hostname": "beta.durieux.me", - "browserProfile": "incognito", - "dashboard": "rendered with authenticated API responses", - "connections": "GitHub App and legacy OAuth both rendered Connected", - "adminOverview": { - "result": "passed after backend field fix", - "cards": [ - "7", - "15%", - "90%", - "68%", - "0m" - ] - }, - "fix": { - "files": [ - "internal/server/system_overview.go", - "internal/server/system_overview_linux.go", - "internal/server/system_overview_other.go", - "internal/server/system_overview_test.go", - "internal/server/observability.go" - ], - "unitTest": "TestSystemOverviewBrowserContract passed", - "raceTest": "TestSystemOverviewBrowserContract passed with -race", - "deployment": "rebuilt and verified in browser" - }, - "temporaryKeyRevoked": true, - "testSessionLoggedOut": true, - "productionChanged": false, - "limits": [ - "Read-only browser smoke checks, not every form or workflow", - "/api/message returns expected 404 because beta has no message.txt" - ] -} diff --git a/backend/reports/shadow-deployment.json b/backend/reports/shadow-deployment.json deleted file mode 100644 index 6bc1ff3..0000000 --- a/backend/reports/shadow-deployment.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "verifiedAt": "2026-11-03T08:17:45.880981+00:00", - "server": "vps-1593", - "project": "anonymous-go-shadow", - "productionOriginConfirmed": "ubuntu@51.161.12.79", - "connectionEvidenceThread": "917b9e27-e932-4af2-8c15-2918fbbcd738", - "productionChanged": false, - "productionTrafficMirrored": false, - "dataset": "synthetic shadow-demo archive only", - "checks": { - "isolation": "passed", - "health": "passed", - "authentication": "disabled until a separate callback is configured", - "exactAnonymizedFileChecks": 9, - "zip": "passed", - "demo": "http://127.0.0.1:5001/r/shadow-demo/" - }, - "browser": { - "demoRendered": true, - "anonymizedHeading": "XXXX-1 shadow demo", - "expectedResponses": { - "unauthenticatedUser": 401, - "noConfiguredSiteMessage": 404 - } - }, - "containers": [ - { - "name": "anonymous-go-shadow-app-1", - "imageID": "sha256:76c31eded038116b0efa3c90418a52424cd66644cda1f27ff1ff6f4677821cea", - "healthy": true, - "networks": [ - "anonymous-go-shadow_default" - ], - "ports": { - "5000/tcp": null - } - }, - { - "name": "anonymous-go-shadow-gateway-1", - "imageID": "sha256:3d6cab9c2941df2441024a2f02a65ebe1b8916c3cbe7b9527f62627accea8004", - "healthy": true, - "networks": [ - "anonymous-go-shadow_default", - "anonymous-go-shadow_ingress" - ], - "ports": { - "80/tcp": null, - "8080/tcp": [ - { - "HostIp": "127.0.0.1", - "HostPort": "5001" - } - ] - } - }, - { - "name": "anonymous-go-shadow-mongodb-1", - "imageID": "sha256:ac1502203bffd13c241ca25a7bae60cbd968fd0011247f6727524634b3f2f6e3", - "healthy": true, - "networks": [ - "anonymous-go-shadow_default" - ], - "ports": { - "27017/tcp": null - } - }, - { - "name": "anonymous-go-shadow-redis-1", - "imageID": "sha256:f84b0c4678011602b9b98c227a4dcd5468bf8b088b02fdd4165cb7758bad8058", - "healthy": true, - "networks": [ - "anonymous-go-shadow_default" - ], - "ports": { - "6379/tcp": null - } - } - ], - "configurationSHA256": { - "backend/compose.shadow.yml": "175cff66898963bbab81a06727e47e57855a748111865ab3119ef1647b3b14e5", - "backend/shadow-nginx.conf": "1ee5d1944c5f666d7116755f504f63ccfeca85e92d0893613b75ad52b911c59b", - "backend/scripts/check-shadow.cjs": "0bf685baaa2faf847db42641d0608a92c04df8ec41c51faa55e7c109b8eb871d", - "backend/scripts/init-shadow.cjs": "e33870ad4c65bea17f4b2fd1b8efdeac5baa3d0d1401d59f3fdafb35437bfd7e" - }, - "remaining": [ - "Choose a separate hostname and OAuth callback before enabling login.", - "Prepare sanitized representative fixtures before comparing production workloads.", - "No automated live-traffic replay is configured." - ] -} diff --git a/backend/reports/shadow-file-query-deployment.json b/backend/reports/shadow-file-query-deployment.json deleted file mode 100644 index 9a9123b..0000000 --- a/backend/reports/shadow-file-query-deployment.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "verifiedAt": "2026-11-03T15:42:06.881Z", - "hostname": "beta.durieux.me", - "checks": [ - { - "query": "download=", - "status": 200, - "attachment": false - }, - { - "query": "download[]=", - "status": 200, - "attachment": true - }, - { - "query": "download[x]=", - "status": 200, - "attachment": true - }, - { - "query": "download=&download=", - "status": 200, - "attachment": true - }, - { - "query": "q=README", - "status": 200, - "found": true - }, - { - "query": "q=%EF%BB%BFREADME%EF%BB%BF", - "status": 200, - "found": true - }, - { - "query": "q=%C3%A9", - "status": 200, - "found": false - }, - { - "query": "q[]=README", - "status": 500, - "found": false - }, - { - "endpoint": "files", - "query": "", - "status": 200 - }, - { - "endpoint": "files", - "query": "path[]=docs", - "status": 500 - } - ], - "productionChanged": false, - "result": "passed" -} diff --git a/backend/reports/shadow-monitoring-authenticated-deployment.json b/backend/reports/shadow-monitoring-authenticated-deployment.json deleted file mode 100644 index 65bb312..0000000 --- a/backend/reports/shadow-monitoring-authenticated-deployment.json +++ /dev/null @@ -1,771 +0,0 @@ -{ - "verifiedAt": "2026-11-03T19:58:47.307Z", - "hostname": "beta.durieux.me", - "configurationMode": "GitHub App enabled alongside legacy OAuth", - "checks": [ - { - "method": "GET", - "route": "/api/user", - "status": 401, - "expected": 401, - "elapsedMs": 348 - }, - { - "method": "GET", - "route": "/api/user", - "status": 200, - "expected": 200, - "elapsedMs": 118 - }, - { - "method": "GET", - "route": "/api/admin/overview", - "status": 200, - "expected": 200, - "elapsedMs": 161 - }, - { - "method": "GET", - "route": "/api/admin/queues", - "status": 200, - "expected": 200, - "elapsedMs": 70 - }, - { - "method": "GET", - "route": "/api/admin/performance", - "status": 200, - "expected": 200, - "elapsedMs": 89 - }, - { - "method": "GET", - "route": "/api/admin/errors", - "status": 200, - "expected": 200, - "elapsedMs": 67 - }, - { - "method": "GET", - "route": "/api/admin/errors/stats", - "status": 200, - "expected": 200, - "elapsedMs": 62 - }, - { - "method": "GET", - "route": "/api/admin/errors?limit=5001", - "status": 200, - "expected": 200, - "elapsedMs": 69 - }, - { - "method": "GET", - "route": "/api/admin/errors/stats", - "status": 200, - "expected": 200, - "elapsedMs": 38 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793735927311-missing", - "status": 404, - "expected": 404, - "elapsedMs": 61 - }, - { - "method": "GET", - "route": "/api/admin/errors/stats", - "status": 200, - "expected": 200, - "elapsedMs": 52 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=download&range=1h", - "status": 200, - "expected": 200, - "elapsedMs": 48 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=download&range=6h", - "status": 200, - "expected": 200, - "elapsedMs": 37 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=download&range=24h", - "status": 200, - "expected": 200, - "elapsedMs": 44 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=download&range=7d", - "status": 200, - "expected": 200, - "elapsedMs": 156 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=remove&range=1h", - "status": 200, - "expected": 200, - "elapsedMs": 34 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=cache&range=1h", - "status": 200, - "expected": 200, - "elapsedMs": 35 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=download&range=unrecognized", - "status": 200, - "expected": 200, - "elapsedMs": 61 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=unknown", - "status": 404, - "expected": 404, - "elapsedMs": 28 - }, - { - "method": "GET", - "route": "/api/stat", - "status": 200, - "expected": 200, - "elapsedMs": 57 - }, - { - "method": "GET", - "route": "/api/stat/history?days=-2", - "status": 200, - "expected": 200, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/api/stat/history?days=0", - "status": 200, - "expected": 200, - "elapsedMs": 27 - }, - { - "method": "GET", - "route": "/api/stat/history?days=0x10", - "status": 200, - "expected": 200, - "elapsedMs": 29 - }, - { - "method": "GET", - "route": "/api/stat/history?days=7suffix", - "status": 200, - "expected": 200, - "elapsedMs": 29 - }, - { - "method": "GET", - "route": "/api/stat/history?days=999", - "status": 200, - "expected": 200, - "elapsedMs": 28 - }, - { - "method": "GET", - "route": "/api/stat/history?days[]=7&days[]=30", - "status": 200, - "expected": 200, - "elapsedMs": 45 - }, - { - "method": "GET", - "route": "/api/stat/history?days[1]=7&days[0]=1", - "status": 200, - "expected": 200, - "elapsedMs": 26 - }, - { - "method": "GET", - "route": "/api/stat/history?days[x]=7", - "status": 200, - "expected": 200, - "elapsedMs": 29 - }, - { - "method": "GET", - "route": "/api/user/dashboard?statuses[]=", - "status": 200, - "expected": 200, - "elapsedMs": 45 - }, - { - "method": "GET", - "route": "/api/user/dashboard?type[]=repo", - "status": 200, - "expected": 200, - "elapsedMs": 45 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort[]=", - "status": 400, - "expected": 400, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/api/user/dashboard?cursor[]=", - "status": 400, - "expected": 400, - "elapsedMs": 51 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort=anonymizeDate&limit=5&cursor=eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDEiLCJ2YWx1ZSI6IjIwMjQtMDMtMDFUMDA6MDA6MDAuMDAwWiJ9", - "status": 200, - "expected": 200, - "elapsedMs": 48 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort=anonymizeDate&limit=5&cursor=eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDEiLCJ2YWx1ZSI6Ik1hcmNoIDEgMjAyNCJ9", - "status": 200, - "expected": 200, - "elapsedMs": 48 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort=anonymizeDate&limit=5&cursor=eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDEiLCJ2YWx1ZSI6IjIwMjQtMDItMzAifQ", - "status": 200, - "expected": 200, - "elapsedMs": 45 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort=anonymizeDate&limit=5&cursor=eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMjQ6MDA6MDBaIn0", - "status": 200, - "expected": 200, - "elapsedMs": 46 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort=anonymizeDate&limit=5&cursor=eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDEiLCJ2YWx1ZSI6WyIyMDI0IiwiMyIsIjEiXX0", - "status": 200, - "expected": 200, - "elapsedMs": 42 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort=anonymizeDate&limit=5&cursor=eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDEiLCJ2YWx1ZSI6Im5vdCBhIGRhdGUifQ", - "status": 400, - "expected": 400, - "elapsedMs": 28 - }, - { - "method": "GET", - "route": "/api/admin/performance?minutes=6e1", - "status": 200, - "expected": 200, - "elapsedMs": 107 - }, - { - "method": "GET", - "route": "/api/admin/performance?minutes[]=60", - "status": 200, - "expected": 200, - "elapsedMs": 108 - }, - { - "method": "GET", - "route": "/api/admin/performance?minutes[0]=15", - "status": 200, - "expected": 200, - "elapsedMs": 69 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue[]=cache&range[]=6h", - "status": 200, - "expected": 200, - "elapsedMs": 38 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?range[]=", - "status": 200, - "expected": 200, - "elapsedMs": 56 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?range=toString", - "status": 200, - "expected": 200, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue[]=", - "status": 404, - "expected": 404, - "elapsedMs": 27 - }, - { - "method": "GET", - "route": "/api/admin/queues?queue[]=remove", - "status": 200, - "expected": 200, - "elapsedMs": 70 - }, - { - "method": "GET", - "route": "/api/admin/errors?offset[]=2&limit[]=7", - "status": 200, - "expected": 200, - "elapsedMs": 31 - }, - { - "method": "GET", - "route": "/api/repo/octocat/Hello-World?connection=", - "status": 400, - "expected": 400, - "elapsedMs": 27 - }, - { - "method": "GET", - "route": "/api/repo/octocat/Hello-World?connection[]=oauth", - "status": 400, - "expected": 400, - "elapsedMs": 46 - }, - { - "method": "GET", - "route": "/api/repo/octocat/Hello-World?connection=oauth&connection[]=github-app", - "status": 400, - "expected": 400, - "elapsedMs": 28 - }, - { - "method": "GET", - "route": "/api/repo/octocat/Hello-World?repositoryID[]=invalid", - "status": 500, - "expected": 500, - "elapsedMs": 31 - }, - { - "method": "GET", - "route": "/api/repo/octocat/Hello-World?repositoryID=invalid", - "status": 500, - "expected": 500, - "elapsedMs": 60 - }, - { - "method": "GET", - "route": "/api/repo/octocat/Hello-World?repositoryID[$exists]=true", - "status": 500, - "expected": 500, - "elapsedMs": 46 - }, - { - "method": "GET", - "route": "/api/user/search/github-users?q[]=ab", - "status": 200, - "expected": 200, - "elapsedMs": 29 - }, - { - "method": "GET", - "route": "/api/user/search/github-users?q[length]=1", - "status": 200, - "expected": 200, - "elapsedMs": 41 - }, - { - "method": "GET", - "route": "/api/user/search/github-users?q=ab&q=cd", - "status": 500, - "expected": 500, - "elapsedMs": 33 - }, - { - "method": "GET", - "route": "/api/user/search/github-users?q[x]=ab", - "status": 500, - "expected": 500, - "elapsedMs": 32 - }, - { - "method": "GET", - "route": "/api/user/search/github-users?q[length][toString]=1", - "status": 500, - "expected": 500, - "elapsedMs": 29 - }, - { - "method": "GET", - "route": "/api/admin/repos?page[]=2&limit[]=2&sort[]=status&direction[]=asc&format[]=csv", - "status": 200, - "expected": 200, - "elapsedMs": 52 - }, - { - "method": "GET", - "route": "/api/admin/repos?page=1000001&limit=1", - "status": 200, - "expected": 200, - "elapsedMs": 37 - }, - { - "method": "GET", - "route": "/api/admin/repos?page=-1", - "status": 500, - "expected": 500, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/api/admin/repos?page[toString]=x", - "status": 500, - "expected": 500, - "elapsedMs": 32 - }, - { - "method": "GET", - "route": "/api/admin/users?page[]=2&limit[]=2&sort[]=status&direction[]=asc&format[]=csv", - "status": 200, - "expected": 200, - "elapsedMs": 39 - }, - { - "method": "GET", - "route": "/api/admin/users?page=1000001&limit=1", - "status": 200, - "expected": 200, - "elapsedMs": 70 - }, - { - "method": "GET", - "route": "/api/admin/users?page=-1", - "status": 500, - "expected": 500, - "elapsedMs": 35 - }, - { - "method": "GET", - "route": "/api/admin/users?page[toString]=x", - "status": 500, - "expected": 500, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/api/admin/users?limit=-1", - "status": 500, - "expected": 500, - "elapsedMs": 36 - }, - { - "method": "GET", - "route": "/api/admin/conferences?page[]=2&limit[]=2&sort[]=status&direction[]=asc&format[]=csv", - "status": 200, - "expected": 200, - "elapsedMs": 35 - }, - { - "method": "GET", - "route": "/api/admin/conferences?page=1000001&limit=1", - "status": 200, - "expected": 200, - "elapsedMs": 39 - }, - { - "method": "GET", - "route": "/api/admin/conferences?page=-1", - "status": 500, - "expected": 500, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/api/admin/conferences?page[toString]=x", - "status": 500, - "expected": 500, - "elapsedMs": 45 - }, - { - "method": "GET", - "route": "/api/admin/repos?limit=-1", - "status": 200, - "expected": 200, - "elapsedMs": 39 - }, - { - "method": "GET", - "route": "/api/admin/repos?ready[]=true", - "status": 200, - "expected": 200, - "elapsedMs": 40 - }, - { - "method": "GET", - "route": "/api/admin/conferences?limit=-1", - "status": 200, - "expected": 200, - "elapsedMs": 38 - }, - { - "method": "GET", - "route": "/api/admin/conferences?ready[]=true", - "status": 200, - "expected": 200, - "elapsedMs": 39 - }, - { - "method": "GET", - "route": "/api/admin/repos?search[]=x", - "status": 500, - "expected": 500, - "elapsedMs": 31 - }, - { - "method": "GET", - "route": "/api/admin/users?search[]=x", - "status": 500, - "expected": 500, - "elapsedMs": 44 - }, - { - "method": "GET", - "route": "/api/admin/conferences?search[]=x", - "status": 500, - "expected": 500, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/api/admin/users?status[]=active", - "status": 200, - "expected": 200, - "elapsedMs": 37 - }, - { - "method": "GET", - "route": "/api/admin/users?status[$in][]=active", - "status": 200, - "expected": 200, - "elapsedMs": 39 - }, - { - "method": "GET", - "route": "/api/admin/users?status[a]=active", - "status": 500, - "expected": 500, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/api/admin/users?status[$in]=active", - "status": 500, - "expected": 500, - "elapsedMs": 32 - }, - { - "method": "GET", - "route": "/api/admin/repos?owner[a]=x", - "status": 500, - "expected": 500, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/api/admin/repos?conference[$unknown]=x", - "status": 500, - "expected": 500, - "elapsedMs": 44 - }, - { - "method": "GET", - "route": "/api/admin/repos?dateFrom[]=2024-02-30", - "status": 200, - "expected": 200, - "elapsedMs": 43 - }, - { - "method": "GET", - "route": "/api/admin/repos?dateTo=March%201%202024", - "status": 200, - "expected": 200, - "elapsedMs": 39 - }, - { - "method": "GET", - "route": "/api/admin/repos?dateFrom[toString]=x", - "status": 500, - "expected": 500, - "elapsedMs": 36 - }, - { - "method": "GET", - "route": "/api/admin/users?dateFrom[]=2024-02-30", - "status": 200, - "expected": 200, - "elapsedMs": 52 - }, - { - "method": "GET", - "route": "/api/admin/users?dateTo=March%201%202024", - "status": 200, - "expected": 200, - "elapsedMs": 38 - }, - { - "method": "GET", - "route": "/api/admin/users?dateFrom[toString]=x", - "status": 500, - "expected": 500, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/api/admin/conferences?dateFrom[]=2024-02-30", - "status": 200, - "expected": 200, - "elapsedMs": 54 - }, - { - "method": "GET", - "route": "/api/admin/conferences?dateTo=March%201%202024", - "status": 200, - "expected": 200, - "elapsedMs": 37 - }, - { - "method": "GET", - "route": "/api/admin/conferences?dateFrom[toString]=x", - "status": 500, - "expected": 500, - "elapsedMs": 28 - }, - { - "method": "GET", - "route": "/api/user", - "status": 401, - "expected": 401, - "elapsedMs": 32 - } - ], - "productionChanged": false, - "overviewHistoryFresh": "passed", - "overviewBrowserFields": "passed", - "queueOverviewFields": "passed", - "errorMonitoring": { - "maxEntries": 5000, - "hourlyBuckets": 24, - "routine404Counted": true - }, - "queueMetricWindows": [ - { - "queue": "download", - "range": "1h", - "points": 60 - }, - { - "queue": "download", - "range": "6h", - "points": 360 - }, - { - "queue": "download", - "range": "24h", - "points": 1440 - }, - { - "queue": "download", - "range": "7d", - "points": 10080 - }, - { - "queue": "remove", - "range": "1h", - "points": 60 - }, - { - "queue": "cache", - "range": "1h", - "points": 60 - }, - { - "queue": "download", - "range": "unrecognized", - "points": 60 - } - ], - "publicStatistics": { - "anonymousAccess": true, - "windows": [ - { - "query": "days=-2", - "days": 1, - "rows": 1 - }, - { - "query": "days=0", - "days": 30, - "rows": 1 - }, - { - "query": "days=0x10", - "days": 16, - "rows": 1 - }, - { - "query": "days=7suffix", - "days": 7, - "rows": 1 - }, - { - "query": "days=999", - "days": 365, - "rows": 1 - }, - { - "query": "days[]=7&days[]=30", - "days": 7, - "rows": 1 - }, - { - "query": "days[1]=7&days[0]=1", - "days": 1, - "rows": 1 - }, - { - "query": "days[x]=7", - "days": 30, - "rows": 1 - } - ] - }, - "dashboardExtendedQueries": "passed", - "dashboardDateCursors": "passed", - "monitoringExtendedQueries": "passed", - "adminExtendedQueries": "passed", - "previewConnectionQueries": "passed", - "previewCacheHintRejections": "passed", - "userSearchQueries": "passed", - "adminListPaginationQueries": "passed", - "adminListFilterQueries": "passed", - "adminListCastingQueries": "passed", - "adminListDateQueries": "passed", - "result": "passed", - "temporaryKeyRevoked": true, - "betaAccountAdmin": true, - "uniqueRequestIDsVerified": 94 -} diff --git a/backend/reports/shadow-oauth-query-deployment.json b/backend/reports/shadow-oauth-query-deployment.json deleted file mode 100644 index 954b410..0000000 --- a/backend/reports/shadow-oauth-query-deployment.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "verifiedAt": "2026-11-03T14:30:22.080Z", - "hostname": "beta.durieux.me", - "accessMode": "public DNS", - "checks": [ - { - "name": "mixed-state", - "status": 400, - "error": "invalid_auth_state", - "replayRejected": true - }, - { - "name": "mixed-code", - "status": 400, - "error": "github_app_authorization_cancelled", - "replayRejected": true - }, - { - "name": "empty-array-error", - "status": 400, - "error": "github_app_authorization_cancelled", - "replayRejected": true - }, - { - "name": "missing-state", - "status": 400, - "replayRejected": true - }, - { - "name": "bracket-only-state", - "status": 400, - "replayRejected": true - }, - { - "name": "wrong-state", - "status": 400, - "replayRejected": true - }, - { - "name": "superseded-attempt", - "status": 400, - "replayRejected": true - }, - { - "name": "foreign-session-cannot-consume-owner-flow", - "status": 400 - } - ], - "productionChanged": false, - "result": "passed" -} diff --git a/backend/reports/shadow-performance-browser-validation.json b/backend/reports/shadow-performance-browser-validation.json deleted file mode 100644 index 6d5d7c3..0000000 --- a/backend/reports/shadow-performance-browser-validation.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "status": 200, - "available": true, - "windowMinutes": 60, - "routeCount": 35, - "stages": [ - "first_byte", - "cache_fill", - "authorization", - "worker_wait", - "repository", - "anonymize", - "upstream", - "cache_lookup" - ], - "instances": 1, - "runtimePoints": 6, - "hasNaN": false, - "stageView": "Request performance\n\nRequest latency and process health · refreshes every 30 seconds\n\nTime range\nLast 15 minutes\nLast hour\nRoutes\nProcesses\nWork stages\nWork stages and cache results\nWork stage\tSamples\tAverage\tp95\nupstream\napi\n\t10\t0 ms\t≤ 10 ms\nrepository\napi\n\t27\t2 ms\t≤ 10 ms\ncache_fill\napi\n\t6\t53 ms\t≤ 100 ms\nanonymize\napi\n\t7\t23 ms\t≤ 50 ms\nworker_wait\napi\n\t23\t2 ms\t≤ 50 ms\ncache_lookup\napi\n\t28\t1 ms\t≤ 10 ms\nauthorization\napi\n\t74\t168 ms\t≤ 1000 ms\nHow to read these metrics", - "processView": { - "rendered": true, - "eventLoop": "Not applicable", - "noNaN": true - }, - "temporaryBrowserKeyRemoved": true, - "browserSessionLoggedOut": true, - "verifiedAt": "2026-11-03T12:52:06.227Z" -} diff --git a/backend/reports/shadow-request-trace-validation.json b/backend/reports/shadow-request-trace-validation.json deleted file mode 100644 index 07e0f5a..0000000 --- a/backend/reports/shadow-request-trace-validation.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "verifiedAt": "2026-11-03T13:00:13.177Z", - "deployment": "beta", - "generatedV4RequestID": true, - "incomingIDIgnored": true, - "responseLogCorrelation": true, - "queryExcludedFromLogs": true, - "productionChanged": false -} diff --git a/backend/reports/slower-path-optimization.html b/backend/reports/slower-path-optimization.html deleted file mode 100644 index 7b0dc0e..0000000 --- a/backend/reports/slower-path-optimization.html +++ /dev/null @@ -1,5 +0,0 @@ -

    Go’s slower paths, corrected

    Same repository snapshot and 1,000-file directory fixture. Both runtimes rerun in alternating order; all seven successful response signatures still match.

    Use caseTypeScriptGo beforeGo after

    Other measured endpoints
    Use caseTypeScriptGo beforeGo after

    Counts now aggregate by directory in MongoDB. Website files use verified direct lookups or a collision-aware path index, with live snapshot and authorization checks.

    Loopback backend timings, identity encoding, shared caches enabled, one worker. Two rounds; medians of per-round medians. Excludes GitHub, CDN and browser rendering. First masked/custom-path requests can still build an index. ZIP was not rerun because these changes do not alter its serving path.

    \ No newline at end of file diff --git a/backend/reports/slower-path-optimization.json b/backend/reports/slower-path-optimization.json deleted file mode 100644 index 38e26fc..0000000 --- a/backend/reports/slower-path-optimization.json +++ /dev/null @@ -1,562 +0,0 @@ -{ - "fixture": { - "repository": "tdurieux/anonymous_github", - "commit": "b09ef0e5b0027756ad86eb3353a5ff6416016ade", - "originalFiles": 1017, - "originalBytes": 28687144, - "terms": [ - "tdurieux" - ], - "addedFixture": "1000 copies of snapshot gulpfile.js in benchmark-1000" - }, - "method": { - "entrypoints": [ - "src/server/index.ts", - "backend/cmd/server" - ], - "provider": "Same pre-seeded archive snapshot; no GitHub API calls or production database", - "localZipOrigin": false, - "zipAuthorization": "Disposable admin API key to allow the TypeScript local ZIP route", - "sharedCache": true, - "encoding": "identity", - "cold": "First endpoint request per fresh process/storage; earlier cases may warm shared dependencies", - "warm": "32 requests per concurrency 1 and 8; ZIP 3 requests at concurrency 1", - "order": "Node then Go; Go then Node", - "resources": "Process tree CPU and RSS; excludes MongoDB, Redis and client; CPU may include background work", - "scope": "HTTP backend only; excludes browser rendering, CDN, GitHub authorization and network fetch" - }, - "validation": { - "outputs": "All seven response signatures match TypeScript, Go before and Go after in both rounds.", - "tests": [ - "Targeted race suites passed: large tree scans, index parity/eviction/collisions, website lookup, shared HTTP authorization and representations.", - "go vet passed." - ] - }, - "summary": [ - { - "name": "root directory", - "ts": { - "output": { - "status": 200, - "sha256": "52d03ac37d3e22e85d9629413d91a29d1f98410b2d34e419785ba1ad00dafa9d", - "entries": 24 - }, - "coldMs": 121.93528099999821, - "warm": { - "1": { - "p50Ms": 26.658700499998304, - "p95Ms": 43.35446200000024, - "cpuMs": 1005, - "peakProcessTreeRssBytes": 269817856, - "requestsPerSecond": 35.67854073891018 - }, - "8": { - "p50Ms": 148.71795650000058, - "p95Ms": 193.92164700000103, - "cpuMs": 845, - "peakProcessTreeRssBytes": 306208768, - "requestsPerSecond": 55.55278437889569 - } - } - }, - "goBefore": { - "output": { - "status": 200, - "sha256": "52d03ac37d3e22e85d9629413d91a29d1f98410b2d34e419785ba1ad00dafa9d", - "entries": 24 - }, - "coldMs": 19.393674499988265, - "warm": { - "1": { - "p50Ms": 7.403331500001514, - "p95Ms": 10.997728000002098, - "cpuMs": 185, - "peakProcessTreeRssBytes": 73525248, - "requestsPerSecond": 123.65028053177949 - }, - "8": { - "p50Ms": 9.341673500006436, - "p95Ms": 22.23802649999925, - "cpuMs": 180, - "peakProcessTreeRssBytes": 81291264, - "requestsPerSecond": 625.0860770621364 - } - } - }, - "goAfter": { - "output": { - "status": 200, - "sha256": "52d03ac37d3e22e85d9629413d91a29d1f98410b2d34e419785ba1ad00dafa9d", - "entries": 24 - }, - "coldMs": 15.809187500002736, - "warm": { - "1": { - "p50Ms": 7.785142000004271, - "p95Ms": 11.032116499998665, - "cpuMs": 195, - "peakProcessTreeRssBytes": 73023488, - "requestsPerSecond": 120.73566781543161 - }, - "8": { - "p50Ms": 9.650027499999851, - "p95Ms": 22.583658999999898, - "cpuMs": 185, - "peakProcessTreeRssBytes": 81084416, - "requestsPerSecond": 628.6360604239087 - } - } - } - }, - { - "name": "src directory", - "ts": { - "output": { - "status": 200, - "sha256": "012081e4d80b7bf24a5931359e89d5fefa0489a7989fd86ff4fdc01bb090d92b", - "entries": 7 - }, - "coldMs": 26.16265999999996, - "warm": { - "1": { - "p50Ms": 18.20889850000094, - "p95Ms": 21.920544000002337, - "cpuMs": 510, - "peakProcessTreeRssBytes": 306882560, - "requestsPerSecond": 53.00491309327751 - }, - "8": { - "p50Ms": 99.39222299999892, - "p95Ms": 110.18144500000017, - "cpuMs": 475, - "peakProcessTreeRssBytes": 307423232, - "requestsPerSecond": 83.30122797581699 - } - } - }, - "goBefore": { - "output": { - "status": 200, - "sha256": "012081e4d80b7bf24a5931359e89d5fefa0489a7989fd86ff4fdc01bb090d92b", - "entries": 7 - }, - "coldMs": 8.060878500000399, - "warm": { - "1": { - "p50Ms": 6.060465499998827, - "p95Ms": 7.087685999991663, - "cpuMs": 115, - "peakProcessTreeRssBytes": 82075648, - "requestsPerSecond": 160.05552208096725 - }, - "8": { - "p50Ms": 8.227547999998933, - "p95Ms": 12.091938999994454, - "cpuMs": 100, - "peakProcessTreeRssBytes": 85401600, - "requestsPerSecond": 852.6113434439787 - } - } - }, - "goAfter": { - "output": { - "status": 200, - "sha256": "012081e4d80b7bf24a5931359e89d5fefa0489a7989fd86ff4fdc01bb090d92b", - "entries": 7 - }, - "coldMs": 7.556426499999361, - "warm": { - "1": { - "p50Ms": 5.599485499998991, - "p95Ms": 6.702892999997857, - "cpuMs": 120, - "peakProcessTreeRssBytes": 81836032, - "requestsPerSecond": 172.5725228707791 - }, - "8": { - "p50Ms": 7.0273734999973385, - "p95Ms": 11.335802499997953, - "cpuMs": 95, - "peakProcessTreeRssBytes": 84021248, - "requestsPerSecond": 952.8766795594247 - } - } - } - }, - { - "name": "1000-file directory", - "ts": { - "output": { - "status": 200, - "sha256": "8b091406715c6232458f52f8c2516031ed2359d2586737cb3923559f96c8c841", - "entries": 1000 - }, - "coldMs": 102.47301200000038, - "warm": { - "1": { - "p50Ms": 91.85127300000022, - "p95Ms": 135.40886700000192, - "cpuMs": 3055, - "peakProcessTreeRssBytes": 339699712, - "requestsPerSecond": 10.540164558372513 - }, - "8": { - "p50Ms": 430.93180849999953, - "p95Ms": 689.4844045000063, - "cpuMs": 2340, - "peakProcessTreeRssBytes": 355284992, - "requestsPerSecond": 16.224277595483656 - } - } - }, - "goBefore": { - "output": { - "status": 200, - "sha256": "8b091406715c6232458f52f8c2516031ed2359d2586737cb3923559f96c8c841", - "entries": 1000 - }, - "coldMs": 62.96934049999618, - "warm": { - "1": { - "p50Ms": 64.99477400000251, - "p95Ms": 77.43742199999542, - "cpuMs": 1885, - "peakProcessTreeRssBytes": 325939200, - "requestsPerSecond": 15.166581719605437 - }, - "8": { - "p50Ms": 53.277233500000875, - "p95Ms": 77.01955949999683, - "cpuMs": 1200, - "peakProcessTreeRssBytes": 346836992, - "requestsPerSecond": 133.32074875303596 - } - } - }, - "goAfter": { - "output": { - "status": 200, - "sha256": "8b091406715c6232458f52f8c2516031ed2359d2586737cb3923559f96c8c841", - "entries": 1000 - }, - "coldMs": 70.37175750000097, - "warm": { - "1": { - "p50Ms": 65.4646554999963, - "p95Ms": 74.7055220000002, - "cpuMs": 1830, - "peakProcessTreeRssBytes": 324298752, - "requestsPerSecond": 15.251707595844026 - }, - "8": { - "p50Ms": 51.683250499998394, - "p95Ms": 73.53740349999862, - "cpuMs": 1270, - "peakProcessTreeRssBytes": 345358336, - "requestsPerSecond": 137.05539391600362 - } - } - } - }, - { - "name": "file counts", - "ts": { - "output": { - "status": 200, - "sha256": "14157927c66f50f4a524e003f0dd849218f678cffc266a149d37b2afc6c64386", - "entries": 45 - }, - "coldMs": 40.370750499998394, - "warm": { - "1": { - "p50Ms": 27.995887500001118, - "p95Ms": 33.99419699999635, - "cpuMs": 400, - "peakProcessTreeRssBytes": 356231168, - "requestsPerSecond": 34.508702948642295 - }, - "8": { - "p50Ms": 67.79125949999798, - "p95Ms": 81.45753349999723, - "cpuMs": 375, - "peakProcessTreeRssBytes": 357986304, - "requestsPerSecond": 112.01351082801071 - } - } - }, - "goBefore": { - "output": { - "status": 200, - "sha256": "14157927c66f50f4a524e003f0dd849218f678cffc266a149d37b2afc6c64386", - "entries": 45 - }, - "coldMs": 69.7607330000028, - "warm": { - "1": { - "p50Ms": 69.8233264999908, - "p95Ms": 93.21686600000248, - "cpuMs": 1900, - "peakProcessTreeRssBytes": 363751424, - "requestsPerSecond": 13.910285428547263 - }, - "8": { - "p50Ms": 78.61524899999495, - "p95Ms": 90.27311950000148, - "cpuMs": 1480, - "peakProcessTreeRssBytes": 365950976, - "requestsPerSecond": 96.82411463773647 - } - } - }, - "goAfter": { - "output": { - "status": 200, - "sha256": "14157927c66f50f4a524e003f0dd849218f678cffc266a149d37b2afc6c64386", - "entries": 45 - }, - "coldMs": 23.164501500003098, - "warm": { - "1": { - "p50Ms": 19.61992250000185, - "p95Ms": 23.22367249999661, - "cpuMs": 195, - "peakProcessTreeRssBytes": 347303936, - "requestsPerSecond": 49.3294084869274 - }, - "8": { - "p50Ms": 21.67325549999805, - "p95Ms": 27.604927500000485, - "cpuMs": 115, - "peakProcessTreeRssBytes": 347648000, - "requestsPerSecond": 337.5978312959177 - } - } - } - }, - { - "name": "gulpfile.js", - "ts": { - "output": { - "status": 200, - "sha256": "582a19c5d0d13b0526acfa491de26b4ad60f75c7fa13fed1054d7f66d22385fc" - }, - "coldMs": 63.921571500002756, - "warm": { - "1": { - "p50Ms": 22.579349500003445, - "p95Ms": 29.557088999998086, - "cpuMs": 875, - "peakProcessTreeRssBytes": 358584320, - "requestsPerSecond": 42.83885056460038 - }, - "8": { - "p50Ms": 113.05269499999667, - "p95Ms": 130.63679400000183, - "cpuMs": 580, - "peakProcessTreeRssBytes": 361082880, - "requestsPerSecond": 67.84627017810665 - } - } - }, - "goBefore": { - "output": { - "status": 200, - "sha256": "582a19c5d0d13b0526acfa491de26b4ad60f75c7fa13fed1054d7f66d22385fc" - }, - "coldMs": 61.77973450000354, - "warm": { - "1": { - "p50Ms": 17.54745600000024, - "p95Ms": 20.274646999998367, - "cpuMs": 360, - "peakProcessTreeRssBytes": 366757888, - "requestsPerSecond": 55.82094005020072 - }, - "8": { - "p50Ms": 68.20507649999126, - "p95Ms": 81.87241249999352, - "cpuMs": 355, - "peakProcessTreeRssBytes": 367341568, - "requestsPerSecond": 107.10527593451862 - } - } - }, - "goAfter": { - "output": { - "status": 200, - "sha256": "582a19c5d0d13b0526acfa491de26b4ad60f75c7fa13fed1054d7f66d22385fc" - }, - "coldMs": 49.17443799999819, - "warm": { - "1": { - "p50Ms": 17.883655499997985, - "p95Ms": 20.807584999995015, - "cpuMs": 410, - "peakProcessTreeRssBytes": 349437952, - "requestsPerSecond": 54.43237661452041 - }, - "8": { - "p50Ms": 64.18658750000031, - "p95Ms": 74.10895049999817, - "cpuMs": 325, - "peakProcessTreeRssBytes": 351086592, - "requestsPerSecond": 114.60864145639766 - } - } - } - }, - { - "name": "src/config.ts", - "ts": { - "output": { - "status": 200, - "sha256": "dadc35430eb9fa79ccf887b613704619199cbd111af8dddfc30e5c6ca3f5d003" - }, - "coldMs": 24.486336999998457, - "warm": { - "1": { - "p50Ms": 25.283140000001367, - "p95Ms": 35.57223400000112, - "cpuMs": 755, - "peakProcessTreeRssBytes": 363204608, - "requestsPerSecond": 38.555305692890094 - }, - "8": { - "p50Ms": 109.77933650000159, - "p95Ms": 130.4405555000012, - "cpuMs": 540, - "peakProcessTreeRssBytes": 364107776, - "requestsPerSecond": 70.66274767509225 - } - } - }, - "goBefore": { - "output": { - "status": 200, - "sha256": "dadc35430eb9fa79ccf887b613704619199cbd111af8dddfc30e5c6ca3f5d003" - }, - "coldMs": 58.48024899999291, - "warm": { - "1": { - "p50Ms": 18.06759750000856, - "p95Ms": 20.92086200000267, - "cpuMs": 380, - "peakProcessTreeRssBytes": 367613952, - "requestsPerSecond": 55.03073104274837 - }, - "8": { - "p50Ms": 60.91620750000584, - "p95Ms": 67.94174549999661, - "cpuMs": 300, - "peakProcessTreeRssBytes": 367751168, - "requestsPerSecond": 122.07709644199466 - } - } - }, - "goAfter": { - "output": { - "status": 200, - "sha256": "dadc35430eb9fa79ccf887b613704619199cbd111af8dddfc30e5c6ca3f5d003" - }, - "coldMs": 43.04393799999889, - "warm": { - "1": { - "p50Ms": 20.031920999997965, - "p95Ms": 22.66816149999795, - "cpuMs": 425, - "peakProcessTreeRssBytes": 353951744, - "requestsPerSecond": 49.34116525697704 - }, - "8": { - "p50Ms": 68.00779099999636, - "p95Ms": 76.57763199999681, - "cpuMs": 375, - "peakProcessTreeRssBytes": 356358144, - "requestsPerSecond": 108.7089747766081 - } - } - } - }, - { - "name": "website gulpfile.js", - "ts": { - "output": { - "status": 200, - "sha256": "582a19c5d0d13b0526acfa491de26b4ad60f75c7fa13fed1054d7f66d22385fc" - }, - "coldMs": 22.215049000002182, - "warm": { - "1": { - "p50Ms": 18.157132500002263, - "p95Ms": 24.566038000000844, - "cpuMs": 535, - "peakProcessTreeRssBytes": 365471744, - "requestsPerSecond": 53.051749662292295 - }, - "8": { - "p50Ms": 99.67454250000446, - "p95Ms": 150.90095299999484, - "cpuMs": 845, - "peakProcessTreeRssBytes": 369364992, - "requestsPerSecond": 72.50484807593446 - } - } - }, - "goBefore": { - "output": { - "status": 200, - "sha256": "582a19c5d0d13b0526acfa491de26b4ad60f75c7fa13fed1054d7f66d22385fc" - }, - "coldMs": 77.46532099999968, - "warm": { - "1": { - "p50Ms": 66.96795449998899, - "p95Ms": 82.43080350001401, - "cpuMs": 1670, - "peakProcessTreeRssBytes": 372340736, - "requestsPerSecond": 14.836257025333925 - }, - "8": { - "p50Ms": 104.15019399999437, - "p95Ms": 144.24375450000298, - "cpuMs": 2345, - "peakProcessTreeRssBytes": 403597312, - "requestsPerSecond": 68.09919709456383 - } - } - }, - "goAfter": { - "output": { - "status": 200, - "sha256": "582a19c5d0d13b0526acfa491de26b4ad60f75c7fa13fed1054d7f66d22385fc" - }, - "coldMs": 27.725894499999413, - "warm": { - "1": { - "p50Ms": 16.548908500000834, - "p95Ms": 18.955033500002173, - "cpuMs": 330, - "peakProcessTreeRssBytes": 356358144, - "requestsPerSecond": 59.63569729453375 - }, - "8": { - "p50Ms": 51.93328649999967, - "p95Ms": 58.2488185000002, - "cpuMs": 300, - "peakProcessTreeRssBytes": 356870144, - "requestsPerSecond": 143.37761911631128 - } - } - } - } - ], - "deployment": { - "hostname": "beta.durieux.me", - "image": "sha256:6571d863d07b14c0b14ad555ded18bad891cc947861ce007a3c8273d7b7427d6", - "health": "healthy", - "checks": 133, - "result": "passed", - "testRepositoryRemoved": true, - "temporaryKeyRevoked": true - } -} \ No newline at end of file diff --git a/backend/reports/statistics-query-parser-gaps.json b/backend/reports/statistics-query-parser-gaps.json deleted file mode 100644 index 1c57327..0000000 --- a/backend/reports/statistics-query-parser-gaps.json +++ /dev/null @@ -1,110 +0,0 @@ -{ - "observedAt": "2026-11-03T13:53:18.309Z", - "reference": "Express extended query parser configured in src/server/index.ts", - "cases": [ - { - "query": "days[]=7&days[]=30", - "parsed": [ - "7", - "30" - ], - "coerced": "7,30", - "expectedDays": 7 - }, - { - "query": "days[1]=7&days[0]=2", - "parsed": [ - "2", - "7" - ], - "coerced": "2,7", - "expectedDays": 2 - }, - { - "query": "days=3&days[]=7", - "parsed": [ - "3", - "7" - ], - "coerced": "3,7", - "expectedDays": 3 - }, - { - "query": "days[]=7&days=3", - "parsed": [ - "7", - "3" - ], - "coerced": "7,3", - "expectedDays": 7 - }, - { - "query": "days[1]=7&days=3", - "parsed": [ - "7", - "3" - ], - "coerced": "7,3", - "expectedDays": 7 - }, - { - "query": "days[21]=7", - "parsed": { - "21": "7" - }, - "coerced": "[object Object]", - "expectedDays": 30 - }, - { - "query": "days[x]=7", - "parsed": { - "x": "7" - }, - "coerced": "[object Object]", - "expectedDays": 30 - }, - { - "query": "days=3&days[x]=7", - "parsed": [ - "3", - { - "x": "7" - } - ], - "coerced": "3,[object Object]", - "expectedDays": 3 - }, - { - "query": "days[x]=7&days=3", - "parsed": [ - { - "x": "7" - }, - "3" - ], - "coerced": "[object Object],3", - "expectedDays": 30 - }, - { - "query": "days[0][]=7", - "parsed": [ - [ - "7" - ] - ], - "coerced": "7", - "expectedDays": 7 - }, - { - "query": "days[0]=3&days[0]=7", - "parsed": [ - [ - "3", - "7" - ] - ], - "coerced": "3,7", - "expectedDays": 3 - } - ] -} diff --git a/backend/reports/streaming-investigation.json b/backend/reports/streaming-investigation.json deleted file mode 100644 index 0e84d66..0000000 --- a/backend/reports/streaming-investigation.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "verifiedAt": "2026-11-03T20:18:57.814099+00:00", - "image": "sha256:4a44b2afed6fe4e9bd526c0cf1874a1baeca531fdf473ab14a328b693b0b68e5", - "implemented": [ - "ZIP compression flush after authorized entry payload, first entry immediately and subsequent entries at most once per 250ms.", - "Flush archive and HTTP buffers together; X-Accel-Buffering: no disables nginx buffering for ZIP responses.", - "Check request cancellation between ZIP copy reads.", - "Record client headers and first body-byte timings in beta validation." - ], - "before": { - "firstBodyByteMs": [ - 3575, - 3341, - 3347 - ], - "medianFirstBodyByteMs": 3347, - "totalMs": [ - 4396, - 4067, - 4125 - ], - "medianTotalMs": 4125, - "bytes": [ - 7166, - 7166, - 7166 - ] - }, - "after": { - "firstBodyByteMs": [ - 1124, - 1220, - 1109 - ], - "medianFirstBodyByteMs": 1124, - "totalMs": [ - 4345, - 4201, - 4014 - ], - "medianTotalMs": 4201, - "bytes": [ - 7191, - 7191, - 7191 - ] - }, - "firstBodyLatencyReductionPercent": 66.4, - "validation": { - "targetedRaceTests": "passed, 2.854s server; streaming payload gate, ZIP CRC/output, cancellation, integration ZIP and shared cache/HTTP paths", - "vet": "passed", - "liveChecksBefore": 131, - "liveChecksAfter": 130, - "result": "passed", - "temporaryKeysRevoked": true, - "temporaryRepositoriesRemoved": true, - "decodedContentAndCRC": "passed; repeated ZIP bytes identical within each run" - }, - "tradeoffs": [ - "Sync flush slightly increases ZIP size.", - "Authorization remains per-entry and serial; this reduces initial body latency, not total authorization work.", - "A partial ZIP cannot be opened as a complete archive until its central directory arrives.", - "Entry copies are synchronous and respect transport backpressure; no producer queue or archive-sized memory buffer added." - ], - "remainingFindings": [ - { - "area": "Cold text transforms", - "finding": "Worker spools input, processes whole-file regex, and publishes output before serving. Generic chunking can change regex matches or leak boundary-spanning terms. A streaming fast path needs a provably bounded pattern subset." - }, - { - "area": "Large ZIP metadata", - "finding": "ZIP loads up to 100000 file rows before streaming. A Mongo cursor with projection would reduce metadata memory and preparation latency; name collision detection must remain." - }, - { - "area": "ZIP compression", - "finding": "Cached gzip results are decoded and recompressed for ZIP. Raw deflate reuse could reduce CPU, but needs gzip-header/trailer, CRC and size validation plus corruption tests." - }, - { - "area": "Large/slow downloads", - "finding": "Server has a two-minute absolute write deadline. Consider bounded idle write deadlines for long active streams, retaining protection from stalled clients." - } - ], - "methodology": "Three sequential samples per deployment through https://beta.durieux.me. Existing source caches may be warm. Client firstBodyByteMs measures actual body arrival, not only response headers. Not a load test.", - "productionChanged": false -} \ No newline at end of file diff --git a/backend/reports/transform-benchmark.json b/backend/reports/transform-benchmark.json deleted file mode 100644 index db53b10..0000000 --- a/backend/reports/transform-benchmark.json +++ /dev/null @@ -1,312 +0,0 @@ -{ - "measuredAt": "2026-11-02T07:33:36.343Z", - "method": "Three fresh processes per runtime, alternating order; transform only, excludes compilation, I/O, child startup and fixture generation. Synthetic data, not production load.", - "comparison": [ - { - "name": "2 MB CSV, 47 absent terms", - "nodeMedianMs": 7.438604999999825, - "goMedianMs": 2.247, - "speedup": 3.310460614152125, - "sha256": "b3882940c0ad7a4f8e1385dcd3e32122c721f26b90144bb820b542e394f379cd" - }, - { - "name": "100 MB CSV, 47 absent terms", - "nodeMedianMs": 234.2948919999999, - "goMedianMs": 117.23, - "speedup": 1.998591589183655, - "sha256": "fcccff214b1f6838f5d9345237f5252cd57e2263fc95640b2a3a5278156eec48" - }, - { - "name": "50 MB CSV, sparse matches", - "nodeMedianMs": 509.48461799999995, - "goMedianMs": 593.558, - "speedup": 0.8583569221541955, - "sha256": "153ce777c4473651a70f3f2f830cac5930214f6b998c08094939646193b0f9f0" - }, - { - "name": "22 MB text, 1.2 million replacements", - "nodeMedianMs": 373.11418800000047, - "goMedianMs": 503.779, - "speedup": 0.7406306892506446, - "sha256": "4e649aee83a6f15cb7178f725991ff5405affe013b0bba0b6eda18689c5c0249" - } - ], - "samples": [ - { - "run": 0, - "implementation": "node", - "runtime": "v24.14.1", - "name": "2 MB CSV, 47 absent terms", - "inputBytes": 1960000, - "outputBytes": 1960000, - "compileMs": 157.8505640000003, - "matchMs": 14.796227999999246, - "sha256": "b3882940c0ad7a4f8e1385dcd3e32122c721f26b90144bb820b542e394f379cd" - }, - { - "run": 0, - "implementation": "node", - "runtime": "v24.14.1", - "name": "100 MB CSV, 47 absent terms", - "inputBytes": 100800000, - "outputBytes": 100800000, - "compileMs": 0.09445300000061252, - "matchMs": 385.5493370000004, - "sha256": "fcccff214b1f6838f5d9345237f5252cd57e2263fc95640b2a3a5278156eec48" - }, - { - "run": 0, - "implementation": "node", - "runtime": "v24.14.1", - "name": "50 MB CSV, sparse matches", - "inputBytes": 50400041, - "outputBytes": 50400014, - "compileMs": 0.07295400000020891, - "matchMs": 550.3266210000002, - "sha256": "153ce777c4473651a70f3f2f830cac5930214f6b998c08094939646193b0f9f0" - }, - { - "run": 0, - "implementation": "node", - "runtime": "v24.14.1", - "name": "22 MB text, 1.2 million replacements", - "inputBytes": 21600000, - "outputBytes": 19800000, - "compileMs": 13.61435900000015, - "matchMs": 373.11418800000047, - "sha256": "4e649aee83a6f15cb7178f725991ff5405affe013b0bba0b6eda18689c5c0249" - }, - { - "run": 0, - "implementation": "go", - "allocatedBytes": 288, - "compileMs": 7.598, - "inputBytes": 1960000, - "matchMs": 2.305, - "name": "2 MB CSV, 47 absent terms", - "outputBytes": 1960000, - "runtime": "go1.27.3", - "sha256": "b3882940c0ad7a4f8e1385dcd3e32122c721f26b90144bb820b542e394f379cd" - }, - { - "run": 0, - "implementation": "go", - "allocatedBytes": 288, - "compileMs": 5.31, - "inputBytes": 100800000, - "matchMs": 117.23, - "name": "100 MB CSV, 47 absent terms", - "outputBytes": 100800000, - "runtime": "go1.27.3", - "sha256": "fcccff214b1f6838f5d9345237f5252cd57e2263fc95640b2a3a5278156eec48" - }, - { - "run": 0, - "implementation": "go", - "allocatedBytes": 201666368, - "compileMs": 3.38, - "inputBytes": 50400041, - "matchMs": 549.325, - "name": "50 MB CSV, sparse matches", - "outputBytes": 50400014, - "runtime": "go1.27.3", - "sha256": "153ce777c4473651a70f3f2f830cac5930214f6b998c08094939646193b0f9f0" - }, - { - "run": 0, - "implementation": "go", - "allocatedBytes": 114614864, - "compileMs": 4.315, - "inputBytes": 21600000, - "matchMs": 486.411, - "name": "22 MB text, 1.2 million replacements", - "outputBytes": 19800000, - "runtime": "go1.27.3", - "sha256": "4e649aee83a6f15cb7178f725991ff5405affe013b0bba0b6eda18689c5c0249" - }, - { - "run": 1, - "implementation": "go", - "allocatedBytes": 288, - "compileMs": 5.263, - "inputBytes": 1960000, - "matchMs": 1.576, - "name": "2 MB CSV, 47 absent terms", - "outputBytes": 1960000, - "runtime": "go1.27.3", - "sha256": "b3882940c0ad7a4f8e1385dcd3e32122c721f26b90144bb820b542e394f379cd" - }, - { - "run": 1, - "implementation": "go", - "allocatedBytes": 288, - "compileMs": 6.292, - "inputBytes": 100800000, - "matchMs": 115.855, - "name": "100 MB CSV, 47 absent terms", - "outputBytes": 100800000, - "runtime": "go1.27.3", - "sha256": "fcccff214b1f6838f5d9345237f5252cd57e2263fc95640b2a3a5278156eec48" - }, - { - "run": 1, - "implementation": "go", - "allocatedBytes": 201624088, - "compileMs": 5.409, - "inputBytes": 50400041, - "matchMs": 657.892, - "name": "50 MB CSV, sparse matches", - "outputBytes": 50400014, - "runtime": "go1.27.3", - "sha256": "153ce777c4473651a70f3f2f830cac5930214f6b998c08094939646193b0f9f0" - }, - { - "run": 1, - "implementation": "go", - "allocatedBytes": 114614912, - "compileMs": 7.727, - "inputBytes": 21600000, - "matchMs": 520.535, - "name": "22 MB text, 1.2 million replacements", - "outputBytes": 19800000, - "runtime": "go1.27.3", - "sha256": "4e649aee83a6f15cb7178f725991ff5405affe013b0bba0b6eda18689c5c0249" - }, - { - "run": 1, - "implementation": "node", - "runtime": "v24.14.1", - "name": "2 MB CSV, 47 absent terms", - "inputBytes": 1960000, - "outputBytes": 1960000, - "compileMs": 81.97248799999988, - "matchMs": 7.438604999999825, - "sha256": "b3882940c0ad7a4f8e1385dcd3e32122c721f26b90144bb820b542e394f379cd" - }, - { - "run": 1, - "implementation": "node", - "runtime": "v24.14.1", - "name": "100 MB CSV, 47 absent terms", - "inputBytes": 100800000, - "outputBytes": 100800000, - "compileMs": 0.049205999999685446, - "matchMs": 228.0686410000003, - "sha256": "fcccff214b1f6838f5d9345237f5252cd57e2263fc95640b2a3a5278156eec48" - }, - { - "run": 1, - "implementation": "node", - "runtime": "v24.14.1", - "name": "50 MB CSV, sparse matches", - "inputBytes": 50400041, - "outputBytes": 50400014, - "compileMs": 0.06957400000010239, - "matchMs": 489.20430399999987, - "sha256": "153ce777c4473651a70f3f2f830cac5930214f6b998c08094939646193b0f9f0" - }, - { - "run": 1, - "implementation": "node", - "runtime": "v24.14.1", - "name": "22 MB text, 1.2 million replacements", - "inputBytes": 21600000, - "outputBytes": 19800000, - "compileMs": 12.034295000000384, - "matchMs": 362.4566530000002, - "sha256": "4e649aee83a6f15cb7178f725991ff5405affe013b0bba0b6eda18689c5c0249" - }, - { - "run": 2, - "implementation": "node", - "runtime": "v24.14.1", - "name": "2 MB CSV, 47 absent terms", - "inputBytes": 1960000, - "outputBytes": 1960000, - "compileMs": 62.2435889999997, - "matchMs": 7.031358999999611, - "sha256": "b3882940c0ad7a4f8e1385dcd3e32122c721f26b90144bb820b542e394f379cd" - }, - { - "run": 2, - "implementation": "node", - "runtime": "v24.14.1", - "name": "100 MB CSV, 47 absent terms", - "inputBytes": 100800000, - "outputBytes": 100800000, - "compileMs": 0.06787899999972069, - "matchMs": 234.2948919999999, - "sha256": "fcccff214b1f6838f5d9345237f5252cd57e2263fc95640b2a3a5278156eec48" - }, - { - "run": 2, - "implementation": "node", - "runtime": "v24.14.1", - "name": "50 MB CSV, sparse matches", - "inputBytes": 50400041, - "outputBytes": 50400014, - "compileMs": 0.06817700000010518, - "matchMs": 509.48461799999995, - "sha256": "153ce777c4473651a70f3f2f830cac5930214f6b998c08094939646193b0f9f0" - }, - { - "run": 2, - "implementation": "node", - "runtime": "v24.14.1", - "name": "22 MB text, 1.2 million replacements", - "inputBytes": 21600000, - "outputBytes": 19800000, - "compileMs": 13.108901000000515, - "matchMs": 389.08548900000005, - "sha256": "4e649aee83a6f15cb7178f725991ff5405affe013b0bba0b6eda18689c5c0249" - }, - { - "run": 2, - "implementation": "go", - "allocatedBytes": 288, - "compileMs": 7.56, - "inputBytes": 1960000, - "matchMs": 2.247, - "name": "2 MB CSV, 47 absent terms", - "outputBytes": 1960000, - "runtime": "go1.27.3", - "sha256": "b3882940c0ad7a4f8e1385dcd3e32122c721f26b90144bb820b542e394f379cd" - }, - { - "run": 2, - "implementation": "go", - "allocatedBytes": 272, - "compileMs": 5.386, - "inputBytes": 100800000, - "matchMs": 117.329, - "name": "100 MB CSV, 47 absent terms", - "outputBytes": 100800000, - "runtime": "go1.27.3", - "sha256": "fcccff214b1f6838f5d9345237f5252cd57e2263fc95640b2a3a5278156eec48" - }, - { - "run": 2, - "implementation": "go", - "allocatedBytes": 201666384, - "compileMs": 6.097, - "inputBytes": 50400041, - "matchMs": 593.558, - "name": "50 MB CSV, sparse matches", - "outputBytes": 50400014, - "runtime": "go1.27.3", - "sha256": "153ce777c4473651a70f3f2f830cac5930214f6b998c08094939646193b0f9f0" - }, - { - "run": 2, - "implementation": "go", - "allocatedBytes": 114614880, - "compileMs": 3.222, - "inputBytes": 21600000, - "matchMs": 503.779, - "name": "22 MB text, 1.2 million replacements", - "outputBytes": 19800000, - "runtime": "go1.27.3", - "sha256": "4e649aee83a6f15cb7178f725991ff5405affe013b0bba0b6eda18689c5c0249" - } - ] -} diff --git a/backend/reports/transformed-cache-benchmark.jsonl b/backend/reports/transformed-cache-benchmark.jsonl deleted file mode 100644 index c67f280..0000000 --- a/backend/reports/transformed-cache-benchmark.jsonl +++ /dev/null @@ -1,4 +0,0 @@ -{"arch":"amd64","cpuCount":12,"fixture":"small text","inputBytes":60000,"measuredAt":"2026-11-02T16:52:37Z","medianSpeedup":4.6064853134731605,"os":"linux","outputBytes":72000,"outputSHA256":"118d0150d59641133d53176c4d450d09ad36f78261e8c87f4da19d5137e8d404","runtime":"go1.27.3","samples":[{"mode":"cold","medianMs":15.126583,"p95Ms":17.093684,"samplesMs":[16.486396,13.94044,17.093684,15.548432,14.567217,15.126583,13.806685],"workerStarts":7},{"mode":"warm","medianMs":3.283758,"p95Ms":3.838574,"samplesMs":[3.838574,3.258028,3.272828,3.283758,3.296155,3.281165,3.346716],"workerStarts":0}],"scope":"single sequential worker/cache path; excludes HTTP, MongoDB, Redis, provider access, and authorization"} -{"arch":"amd64","cpuCount":12,"fixture":"2 MiB absent terms","inputBytes":2097154,"measuredAt":"2026-11-02T16:52:39Z","medianSpeedup":1.7838819569043223,"os":"linux","outputBytes":2097154,"outputSHA256":"061bcb1e32dd40f88b2c69eceda3df06d034f42367863b92d9c7e6f2bba1258a","runtime":"go1.27.3","samples":[{"mode":"cold","medianMs":139.42978,"p95Ms":154.503075,"samplesMs":[140.030018,136.891267,136.317014,136.069174,139.967639,139.42978,154.503075],"workerStarts":7},{"mode":"warm","medianMs":78.160878,"p95Ms":93.078738,"samplesMs":[91.492585,90.030334,93.078738,74.420729,72.499256,78.160878,73.065254],"workerStarts":0}],"scope":"single sequential worker/cache path; excludes HTTP, MongoDB, Redis, provider access, and authorization"} -{"arch":"amd64","cpuCount":12,"fixture":"2 MiB replacements","inputBytes":2097158,"measuredAt":"2026-11-02T16:52:41Z","medianSpeedup":2.69916467168942,"os":"linux","outputBytes":2696346,"outputSHA256":"c1a1b2aa43d076f8757082b399d443a70b3ff33948e3533f1511cbad811cfb5a","runtime":"go1.27.3","samples":[{"mode":"cold","medianMs":258.840893,"p95Ms":309.127399,"samplesMs":[246.404674,294.377709,309.127399,295.424455,258.840893,257.798613,244.475289],"workerStarts":7},{"mode":"warm","medianMs":95.896666,"p95Ms":106.755014,"samplesMs":[92.409295,104.544167,106.755014,92.464092,89.650314,97.793635,95.896666],"workerStarts":0}],"scope":"single sequential worker/cache path; excludes HTTP, MongoDB, Redis, provider access, and authorization"} -{"arch":"amd64","cpuCount":12,"fixture":"128 KiB JavaScript boundary","inputBytes":131072,"measuredAt":"2026-11-02T16:52:42Z","medianSpeedup":9.464317069400291,"os":"linux","outputBytes":147456,"outputSHA256":"580155666affe445ac48846f3c178f45b3b75ec89815cc49fad08035415e8117","runtime":"go1.27.3","samples":[{"mode":"cold","medianMs":58.406591,"p95Ms":63.380017,"samplesMs":[63.380017,60.595941,58.406591,57.892132,62.557902,58.406013,56.661644],"workerStarts":7},{"mode":"warm","medianMs":6.171242,"p95Ms":7.41266,"samplesMs":[5.906539,6.171242,6.061922,6.034595,6.397643,6.691857,7.41266],"workerStarts":0}],"scope":"single sequential worker/cache path; excludes HTTP, MongoDB, Redis, provider access, and authorization"} diff --git a/backend/reports/viewer-waterfall-optimization.json b/backend/reports/viewer-waterfall-optimization.json deleted file mode 100644 index 98d3896..0000000 --- a/backend/reports/viewer-waterfall-optimization.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "verifiedAt": "2026-11-03T21:51:05.394239+00:00", - "changes": [ - "Direct file URLs fetch content after options without waiting for directory listings.", - "Parent directory listings run concurrently.", - "Editor library loads alongside file content.", - "Background listing errors do not overwrite successful file previews.", - "Repository reinitialization cancels obsolete content loads." - ], - "browserSample": { - "route": "/r/anonymous_github-72DE/src/config.ts", - "before": { - "optionsEndMs": 806, - "fileStartMs": 1033, - "fileEndMs": 2865, - "editorStartMs": 2874 - }, - "after": { - "optionsEndMs": 546, - "fileStartMs": 584, - "fileEndMs": 2137, - "editorStartMs": 583, - "directoryStartsMs": [ - 585, - 585 - ] - }, - "optionsToFileStartBeforeMs": 227, - "optionsToFileStartAfterMs": 38, - "remainingServerRequestMs": 1500, - "remainingAuthorizationMs": 1446.886908 - }, - "validation": { - "uiTests": "6 passing; delayed directory responses, editor preload, cancellation and safe error recovery", - "liveBrowser": "editor rendered with no viewer error; parallel requests confirmed", - "deployment": "healthy" - }, - "limitations": "One browser trace each; cache warmth and external GitHub latency differ, so total page times are not a controlled speedup measurement. Fresh upstream authorization remains the dominant cost.", - "permissionCaching": "Not enabled. User preference requested because caching changes revocation freshness.", - "productionChanged": false -} \ No newline at end of file diff --git a/backend/reports/zip-memory-after.json b/backend/reports/zip-memory-after.json deleted file mode 100644 index 4385716..0000000 --- a/backend/reports/zip-memory-after.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "recordedAt": "2026-11-04T08:20:41.122Z", - "node": "v24.14.1", - "go": "go version go1.27.3 linux/amd64", - "nodeSourceSHA256": "ccef1fc05af9de24f0d2bf9223d478c2455de0305129babf05d0ad2c22a0b185", - "goBinarySHA256": "0b47e343190010c650e53526422922f5d2e1918bc047693ac47bcfc17edbe4fc", - "benchmarkScriptSHA256": "9c48ba40bbfab912462028ce5456f172769b4a71497f04e53ef5bf04db434f5c", - "fixture": { - "repository": "tdurieux/anonymous_github", - "commit": "b09ef0e5b0027756ad86eb3353a5ff6416016ade", - "originalFiles": 1017, - "originalBytes": 28687144, - "terms": [ - "tdurieux" - ], - "addedFixture": "1000 copies of snapshot gulpfile.js in benchmark-1000" - }, - "method": { - "entrypoints": [ - "src/server/index.ts", - "backend/cmd/server" - ], - "provider": "Same pre-seeded archive snapshot; no GitHub API calls or production database", - "localZipOrigin": false, - "zipAuthorization": "Disposable admin API key to allow the TypeScript local ZIP route", - "sharedCache": true, - "encoding": "identity", - "cold": "First endpoint request per fresh process/storage; earlier cases may warm shared dependencies", - "warm": "1 requests per tested concurrency", - "rounds": 1, - "order": "go", - "resources": "Process tree CPU and RSS; excludes MongoDB, Redis and client; CPU may include background work", - "scope": "HTTP backend only; excludes browser rendering, CDN, GitHub authorization and network fetch" - }, - "results": [ - { - "runtime": "go", - "repeat": 0, - "results": [ - { - "name": "repository ZIP", - "cold": { - "ms": 36796.176851, - "firstBodyMs": 55.14695500000016, - "status": 200, - "bytes": 13045739 - }, - "output": { - "status": 200, - "sha256": "72d41a3fe5dcbf91eb33c1682cd4db5ccb220160c35e58e310ead96ac39ac600", - "entries": 2017 - }, - "warm": [ - { - "concurrency": 1, - "requests": 1, - "p50Ms": 35981.36801400001, - "p95Ms": 35981.36801400001, - "p50FirstBodyMs": 39.2833660000033, - "requestsPerSecond": 0.027762249951141002, - "cpuMs": 35640, - "peakProcessTreeRssBytes": 74838016, - "bytes": 13045723 - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/backend/reports/zip-memory-before-heap.txt b/backend/reports/zip-memory-before-heap.txt deleted file mode 100644 index 8344c28..0000000 --- a/backend/reports/zip-memory-before-heap.txt +++ /dev/null @@ -1,50 +0,0 @@ -File: server -Build ID: f0c223e44b7b4768d6506a0c71a5a595b8d2a722 -Type: inuse_space -Time: 2026-11-04 08:08:07 UTC -Showing nodes accounting for 246.29MB, 97.42% of 252.81MB total -Dropped 57 nodes (cum <= 1.26MB) - flat flat% sum% cum cum% - 192MB 75.95% 75.95% 192MB 75.95% github.com/klauspost/compress/zstd.(*fastBase).ensureHist (inline) - 48.86MB 19.33% 95.27% 48.86MB 19.33% github.com/klauspost/compress/zstd.encoderOptions.encoder - 3.29MB 1.30% 96.57% 3.29MB 1.30% github.com/klauspost/compress/zstd.(*blockEnc).init - 1.50MB 0.59% 97.17% 1.50MB 0.59% runtime.mallocgc - 0.64MB 0.25% 97.42% 1.36MB 0.54% compress/flate.NewWriter (inline) - 0 0% 97.42% 1.36MB 0.54% archive/zip.(*Writer).CreateHeader - 0 0% 97.42% 244.15MB 96.57% github.com/klauspost/compress/zstd.(*Encoder).EncodeAll - 0 0% 97.42% 195.29MB 77.25% github.com/klauspost/compress/zstd.(*Encoder).encodeAll - 0 0% 97.42% 48.86MB 19.33% github.com/klauspost/compress/zstd.(*Encoder).initialize - 0 0% 97.42% 192MB 75.95% github.com/klauspost/compress/zstd.(*betterFastEncoder).EncodeNoHist - 0 0% 97.42% 3.29MB 1.30% github.com/klauspost/compress/zstd.(*betterFastEncoder).Reset - 0 0% 97.42% 3.29MB 1.30% github.com/klauspost/compress/zstd.(*fastBase).resetBase - 0 0% 97.42% 3.11MB 1.23% github.com/redis/go-redis/v9/internal/pool.(*ConnPool).dialConn - 0 0% 97.42% 3.11MB 1.23% github.com/redis/go-redis/v9/internal/pool.(*ConnPool).newConn - 0 0% 97.42% 3.11MB 1.23% github.com/redis/go-redis/v9/internal/pool.(*ConnPool).queuedNewConn.func2 - 0 0% 97.42% 2.11MB 0.84% github.com/redis/go-redis/v9/internal/pool.NewConnWithBufferSize - 0 0% 97.42% 2.53MB 1% github.com/tdurieux/anonymous_github/backend/internal/server.(*Server).ServeHTTP - 0 0% 97.42% 2.53MB 1% github.com/tdurieux/anonymous_github/backend/internal/server.(*Server).zip - 0 0% 97.42% 161.65MB 63.94% github.com/tdurieux/anonymous_github/backend/internal/server.(*Store).ensureIndexes - 0 0% 97.42% 2.03MB 0.8% github.com/tdurieux/anonymous_github/backend/internal/server.(*streamZIP).add - 0 0% 97.42% 244.15MB 96.57% github.com/tdurieux/anonymous_github/backend/internal/server.Connect - 0 0% 97.42% 1.36MB 0.54% github.com/tdurieux/anonymous_github/backend/internal/server.newStreamZIP.func1 - 0 0% 97.42% 65.94MB 26.08% go.mongodb.org/mongo-driver/v2/mongo.(*Client).Ping - 0 0% 97.42% 65.94MB 26.08% go.mongodb.org/mongo-driver/v2/mongo.(*Database).RunCommand - 0 0% 97.42% 178.21MB 70.49% go.mongodb.org/mongo-driver/v2/mongo.(*createIndexesOp).execute - 0 0% 97.42% 178.21MB 70.49% go.mongodb.org/mongo-driver/v2/mongo.IndexView.CreateMany - 0 0% 97.42% 65.13MB 25.76% go.mongodb.org/mongo-driver/v2/mongo.IndexView.CreateOne - 0 0% 97.42% 244.15MB 96.57% go.mongodb.org/mongo-driver/v2/x/mongo/driver.CompressPayload - 0 0% 97.42% 244.65MB 96.77% go.mongodb.org/mongo-driver/v2/x/mongo/driver.Operation.Execute - 0 0% 97.42% 244.15MB 96.57% go.mongodb.org/mongo-driver/v2/x/mongo/driver/topology.(*Connection).CompressWireMessage - 0 0% 97.42% 244.15MB 96.57% main.main - 0 0% 97.42% 244.15MB 96.57% main.run - 0 0% 97.42% 2.53MB 1% net/http.(*conn).serve - 0 0% 97.42% 2.53MB 1% net/http.serverHandler.ServeHTTP - 0 0% 97.42% 1.50MB 0.59% runtime.allocm - 0 0% 97.42% 244.67MB 96.78% runtime.main - 0 0% 97.42% 1.50MB 0.59% runtime.newm - 0 0% 97.42% 1.50MB 0.59% runtime.newobject - 0 0% 97.42% 1.50MB 0.59% runtime.schedule - 0 0% 97.42% 1.50MB 0.59% runtime.startm - 0 0% 97.42% 1.50MB 0.59% runtime.wakep - 0 0% 97.42% 48.86MB 19.33% sync.(*Once).Do (inline) - 0 0% 97.42% 48.86MB 19.33% sync.(*Once).doSlow diff --git a/backend/reports/zip-memory-before.json b/backend/reports/zip-memory-before.json deleted file mode 100644 index d5ae9a0..0000000 --- a/backend/reports/zip-memory-before.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "recordedAt": "2026-11-04T08:18:48.380Z", - "node": "v24.14.1", - "go": "go version go1.27.3 linux/amd64", - "nodeSourceSHA256": "ccef1fc05af9de24f0d2bf9223d478c2455de0305129babf05d0ad2c22a0b185", - "goBinarySHA256": "21a84b62aee32f574fe552610afd27092b7e60cd36c3cc943710a1e94ba502cc", - "benchmarkScriptSHA256": "9c48ba40bbfab912462028ce5456f172769b4a71497f04e53ef5bf04db434f5c", - "fixture": { - "repository": "tdurieux/anonymous_github", - "commit": "b09ef0e5b0027756ad86eb3353a5ff6416016ade", - "originalFiles": 1017, - "originalBytes": 28687144, - "terms": [ - "tdurieux" - ], - "addedFixture": "1000 copies of snapshot gulpfile.js in benchmark-1000" - }, - "method": { - "entrypoints": [ - "src/server/index.ts", - "backend/cmd/server" - ], - "provider": "Same pre-seeded archive snapshot; no GitHub API calls or production database", - "localZipOrigin": false, - "zipAuthorization": "Disposable admin API key to allow the TypeScript local ZIP route", - "sharedCache": true, - "encoding": "identity", - "cold": "First endpoint request per fresh process/storage; earlier cases may warm shared dependencies", - "warm": "1 requests per tested concurrency", - "rounds": 1, - "order": "go", - "resources": "Process tree CPU and RSS; excludes MongoDB, Redis and client; CPU may include background work", - "scope": "HTTP backend only; excludes browser rendering, CDN, GitHub authorization and network fetch" - }, - "results": [ - { - "runtime": "go", - "repeat": 0, - "results": [ - { - "name": "repository ZIP", - "cold": { - "ms": 40264.038648, - "firstBodyMs": 177.61004400000093, - "status": 200, - "bytes": 13045815 - }, - "output": { - "status": 200, - "sha256": "72d41a3fe5dcbf91eb33c1682cd4db5ccb220160c35e58e310ead96ac39ac600", - "entries": 2017 - }, - "warm": [ - { - "concurrency": 1, - "requests": 1, - "p50Ms": 39293.266413000005, - "p95Ms": 39293.266413000005, - "p50FirstBodyMs": 148.60325800000282, - "requestsPerSecond": 0.025418685391377722, - "cpuMs": 38020, - "peakProcessTreeRssBytes": 696705024, - "bytes": 13045799 - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/backend/reports/zip-memory-improvement.html b/backend/reports/zip-memory-improvement.html deleted file mode 100644 index 8c03338..0000000 --- a/backend/reports/zip-memory-improvement.html +++ /dev/null @@ -1 +0,0 @@ -

    ZIP peak memory: 89% lower

    Same repository snapshot · 2,017 files · Go before and after

    Before664 MiB
    After71 MiB
    Repeated downloadBeforeAfter
    Total time39.3 s36.0 s
    First body bytes149 ms39 ms
    Contents verified2,017 / 2,017 match

    MongoDB’s zstd buffers dominated the heap. Snappy reduces that cost; ZIP metadata now arrives in batches and entry copies reuse one buffer.

    One initial and one repeated request per build, sequential loopback runs. Memory is peak process-tree RSS during the repeated request; excludes database, Redis and client. Timing is indicative. ZIP directory metadata still grows with entry count.

    \ No newline at end of file diff --git a/backend/reports/zip-memory-improvement.json b/backend/reports/zip-memory-improvement.json deleted file mode 100644 index e6da78f..0000000 --- a/backend/reports/zip-memory-improvement.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "fixture": { - "repository": "tdurieux/anonymous_github", - "commit": "b09ef0e5b0027756ad86eb3353a5ff6416016ade", - "originalFiles": 1017, - "originalBytes": 28687144, - "terms": [ - "tdurieux" - ], - "addedFixture": "1000 copies of snapshot gulpfile.js in benchmark-1000" - }, - "output": { - "status": 200, - "sha256": "72d41a3fe5dcbf91eb33c1682cd4db5ccb220160c35e58e310ead96ac39ac600", - "entries": 2017 - }, - "method": "One fresh process per binary, one initial and one repeated archive download, sequential loopback runs. Peak RSS sampled every 20 ms during repeated request; includes worker processes, excludes MongoDB, Redis and benchmark client. No profiler attached. Filesystem caches were not dropped. Timing is indicative, not a multi-run statistical estimate.", - "before": { - "name": "repository ZIP", - "cold": { - "ms": 40264.038648, - "firstBodyMs": 177.61004400000093, - "status": 200, - "bytes": 13045815 - }, - "output": { - "status": 200, - "sha256": "72d41a3fe5dcbf91eb33c1682cd4db5ccb220160c35e58e310ead96ac39ac600", - "entries": 2017 - }, - "warm": [ - { - "concurrency": 1, - "requests": 1, - "p50Ms": 39293.266413000005, - "p95Ms": 39293.266413000005, - "p50FirstBodyMs": 148.60325800000282, - "requestsPerSecond": 0.025418685391377722, - "cpuMs": 38020, - "peakProcessTreeRssBytes": 696705024, - "bytes": 13045799 - } - ] - }, - "after": { - "name": "repository ZIP", - "cold": { - "ms": 36796.176851, - "firstBodyMs": 55.14695500000016, - "status": 200, - "bytes": 13045739 - }, - "output": { - "status": 200, - "sha256": "72d41a3fe5dcbf91eb33c1682cd4db5ccb220160c35e58e310ead96ac39ac600", - "entries": 2017 - }, - "warm": [ - { - "concurrency": 1, - "requests": 1, - "p50Ms": 35981.36801400001, - "p95Ms": 35981.36801400001, - "p50FirstBodyMs": 39.2833660000033, - "requestsPerSecond": 0.027762249951141002, - "cpuMs": 35640, - "peakProcessTreeRssBytes": 74838016, - "bytes": 13045723 - } - ] - }, - "memoryReductionPercent": 89.25829247357345, - "changes": [ - "Default MongoDB wire compression changed from zstd to Snappy; explicit URI compressor settings respected", - "Projected MongoDB cursor with 128-entry batches; removed silent 100000-file truncation", - "One 32 KiB copy buffer reused per ZIP" - ], - "validation": { - "raceTests": "ZIP streaming/cancellation, multi-batch archive contents and exclusions, second-provider lifecycle: passed (302.324s server package)", - "vet": "passed", - "live": { - "hostname": "beta.durieux.me", - "checks": 133, - "temporaryKeyRevoked": true, - "testRepositoryRemoved": true, - "image": "sha256:6817b036c77e372bbeb5fb2570e3df044af920d66fc51cbdb44536f866c92d28" - } - }, - "limitations": [ - "ZIP central directory and duplicate-name set still scale with entry count", - "Individual transformation workers still have their existing input and memory limits", - "Explicitly configuring zstd in the MongoDB URI can reintroduce its encoder memory costs" - ] -} diff --git a/backend/reports/zip-memory-profile-run.json b/backend/reports/zip-memory-profile-run.json deleted file mode 100644 index f2a27dc..0000000 --- a/backend/reports/zip-memory-profile-run.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "recordedAt": "2026-11-04T08:08:07.563Z", - "node": "v24.14.1", - "go": "go version go1.27.3 linux/amd64", - "nodeSourceSHA256": "ccef1fc05af9de24f0d2bf9223d478c2455de0305129babf05d0ad2c22a0b185", - "goBinarySHA256": "40731330f7b0e1ff37d66125be8ffbb78cafe05e49a015ba032595607ed658ab", - "benchmarkScriptSHA256": "c5f8dc0bbc86ad7f428200b44decec436edd3388d11b4d34a4d7defbf27dac92", - "fixture": { - "repository": "tdurieux/anonymous_github", - "commit": "b09ef0e5b0027756ad86eb3353a5ff6416016ade", - "originalFiles": 1017, - "originalBytes": 28687144, - "terms": [ - "tdurieux" - ], - "addedFixture": "1000 copies of snapshot gulpfile.js in benchmark-1000" - }, - "method": { - "entrypoints": [ - "src/server/index.ts", - "backend/cmd/server" - ], - "provider": "Same pre-seeded archive snapshot; no GitHub API calls or production database", - "localZipOrigin": false, - "zipAuthorization": "Disposable admin API key to allow the TypeScript local ZIP route", - "sharedCache": true, - "encoding": "identity", - "cold": "First endpoint request per fresh process/storage; earlier cases may warm shared dependencies", - "warm": "32 requests per concurrency 1 and 8; ZIP 3 requests at concurrency 1", - "order": "Node then Go; Go then Node", - "resources": "Process tree CPU and RSS; excludes MongoDB, Redis and client; CPU may include background work", - "scope": "HTTP backend only; excludes browser rendering, CDN, GitHub authorization and network fetch" - }, - "results": [ - { - "runtime": "go", - "repeat": 0, - "results": [ - { - "name": "repository ZIP", - "cold": { - "ms": 40412.255588, - "firstBodyMs": 156.57588399999986, - "status": 200, - "bytes": 13045823 - }, - "output": { - "status": 200, - "sha256": "72d41a3fe5dcbf91eb33c1682cd4db5ccb220160c35e58e310ead96ac39ac600", - "entries": 2017 - }, - "warm": [ - { - "concurrency": 1, - "requests": 1, - "p50Ms": 40517.237882, - "p95Ms": 40517.237882, - "p50FirstBodyMs": 100.12094200000138, - "requestsPerSecond": 0.024650866801216115, - "cpuMs": 38800, - "peakProcessTreeRssBytes": 703557632, - "bytes": 13045826 - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/backend/reports/zip-stream-after.json b/backend/reports/zip-stream-after.json deleted file mode 100644 index 22c33f1..0000000 --- a/backend/reports/zip-stream-after.json +++ /dev/null @@ -1,2808 +0,0 @@ -{ - "deploymentChecks": { - "verifiedAt": "2026-11-03T20:17:53.660Z", - "hostname": "beta.durieux.me", - "configurationMode": "GitHub App enabled alongside legacy OAuth", - "checks": [ - { - "method": "GET", - "route": "/api/user", - "requestID": "e13ae09c-6254-4ad0-9d39-c07b83607857", - "status": 401, - "expected": 401, - "bytes": 25, - "headersMs": 233, - "firstBodyByteMs": 237, - "elapsedMs": 249 - }, - { - "method": "GET", - "route": "/api/user", - "requestID": "e7441f45-83ad-4355-b58f-0b85aaa2d2de", - "status": 200, - "expected": 200, - "bytes": 100, - "headersMs": 82, - "firstBodyByteMs": 89, - "elapsedMs": 91 - }, - { - "method": "GET", - "route": "/github/connections", - "requestID": "52fe6072-9d64-40e5-9d65-10e04c86ba41", - "status": 200, - "expected": 200, - "bytes": 456, - "headersMs": 768, - "firstBodyByteMs": 770, - "elapsedMs": 774 - }, - { - "method": "GET", - "route": "/api/providers", - "requestID": "649c0b46-52b4-481e-a986-f8482f1598f9", - "status": 200, - "expected": 200, - "bytes": 144, - "headersMs": 32, - "firstBodyByteMs": 34, - "elapsedMs": 35 - }, - { - "method": "GET", - "route": "/api/user/dashboard", - "requestID": "6925412e-0032-4873-8041-f148ed6104b4", - "status": 200, - "expected": 200, - "bytes": 796, - "headersMs": 52, - "firstBodyByteMs": 54, - "elapsedMs": 55 - }, - { - "method": "GET", - "route": "/api/user/default", - "requestID": "559de36f-2e68-4bc7-b9f2-248b0efc52b6", - "status": 200, - "expected": 200, - "bytes": 25, - "headersMs": 43, - "firstBodyByteMs": 43, - "elapsedMs": 44 - }, - { - "method": "GET", - "route": "/api/user/quota", - "requestID": "0fe7e27c-f909-486c-96a3-bcd536b36998", - "status": 200, - "expected": 200, - "bytes": 115, - "headersMs": 45, - "firstBodyByteMs": 47, - "elapsedMs": 47 - }, - { - "method": "GET", - "route": "/api/admin/overview", - "requestID": "46514e73-74ac-4419-a647-243f3b78ab96", - "status": 200, - "expected": 200, - "bytes": 1134, - "headersMs": 146, - "firstBodyByteMs": 149, - "elapsedMs": 150 - }, - { - "method": "GET", - "route": "/api/admin/users", - "requestID": "72f4a1dc-c09c-4c2e-96c2-367d7ef069f9", - "status": 200, - "expected": 200, - "bytes": 526, - "headersMs": 66, - "firstBodyByteMs": 68, - "elapsedMs": 69 - }, - { - "method": "GET", - "route": "/api/admin/repos", - "requestID": "c0f3a146-554d-4f79-95c1-afd7f8c53b31", - "status": 200, - "expected": 200, - "bytes": 12192, - "headersMs": 44, - "firstBodyByteMs": 46, - "elapsedMs": 49 - }, - { - "method": "GET", - "route": "/api/admin/queues", - "requestID": "dd47ccb8-a943-44ab-b3f9-5e8b1fbb74f3", - "status": 200, - "expected": 200, - "bytes": 5513, - "headersMs": 52, - "firstBodyByteMs": 54, - "elapsedMs": 55 - }, - { - "method": "GET", - "route": "/api/admin/performance", - "requestID": "2a0d1fb1-5e20-459f-9d9b-6ced23031e94", - "status": 200, - "expected": 200, - "bytes": 37221, - "headersMs": 73, - "firstBodyByteMs": 74, - "elapsedMs": 80 - }, - { - "method": "GET", - "route": "/api/admin/errors", - "requestID": "6bb45a5d-b2ec-4b55-8a30-e382cacd7a80", - "status": 200, - "expected": 200, - "bytes": 58285, - "headersMs": 57, - "firstBodyByteMs": 59, - "elapsedMs": 64 - }, - { - "method": "GET", - "route": "/api/admin/errors/stats", - "requestID": "fcc0a1a9-a49b-4a50-a1ff-a20db60e2fa3", - "status": 200, - "expected": 200, - "bytes": 1395, - "headersMs": 33, - "firstBodyByteMs": 35, - "elapsedMs": 35 - }, - { - "method": "GET", - "route": "/api/admin/tokens", - "requestID": "d684e4cf-a91d-46e0-9fd3-3ced509be12d", - "status": 200, - "expected": 200, - "bytes": 160, - "headersMs": 57, - "firstBodyByteMs": 58, - "elapsedMs": 59 - }, - { - "method": "GET", - "route": "/api/admin/errors?limit=5001", - "requestID": "468538d8-6598-437b-8772-01f73d021a2d", - "status": 200, - "expected": 200, - "bytes": 156515, - "headersMs": 68, - "firstBodyByteMs": 71, - "elapsedMs": 80 - }, - { - "method": "GET", - "route": "/api/admin/errors/stats", - "requestID": "007f8ca6-7efc-467a-a94c-2f8f7a47a23e", - "status": 200, - "expected": 200, - "bytes": 1395, - "headersMs": 32, - "firstBodyByteMs": 33, - "elapsedMs": 34 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793737073663-missing", - "requestID": "b4cbcc3f-c35c-458b-b29b-2721ee4f0f26", - "status": 404, - "expected": 404, - "bytes": 26, - "headersMs": 31, - "firstBodyByteMs": 32, - "elapsedMs": 32 - }, - { - "method": "GET", - "route": "/api/admin/errors/stats", - "requestID": "c0d883d0-fac2-4388-87e5-02a43dfebc83", - "status": 200, - "expected": 200, - "bytes": 1395, - "headersMs": 36, - "firstBodyByteMs": 37, - "elapsedMs": 41 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=download&range=1h", - "requestID": "47d1a277-fa2f-419c-973f-073238f69d1f", - "status": 200, - "expected": 200, - "bytes": 3419, - "headersMs": 31, - "firstBodyByteMs": 32, - "elapsedMs": 32 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=download&range=6h", - "requestID": "aa9c6d17-9561-483a-baa9-f343fe0c5d3b", - "status": 200, - "expected": 200, - "bytes": 20219, - "headersMs": 64, - "firstBodyByteMs": 65, - "elapsedMs": 66 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=download&range=24h", - "requestID": "87d0b7c7-79c0-41e9-8f9b-0522274ff3e4", - "status": 200, - "expected": 200, - "bytes": 80729, - "headersMs": 63, - "firstBodyByteMs": 64, - "elapsedMs": 67 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=download&range=7d", - "requestID": "c86ce07b-b2a5-41a8-a056-6f910a3edfb3", - "status": 200, - "expected": 200, - "bytes": 564568, - "headersMs": 129, - "firstBodyByteMs": 130, - "elapsedMs": 157 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=remove&range=1h", - "requestID": "668d5295-d607-4fef-8622-338b35f6cbb4", - "status": 200, - "expected": 200, - "bytes": 3406, - "headersMs": 61, - "firstBodyByteMs": 62, - "elapsedMs": 63 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=cache&range=1h", - "requestID": "5b1e15b5-93ba-4b7c-a614-b14877267707", - "status": 200, - "expected": 200, - "bytes": 3401, - "headersMs": 30, - "firstBodyByteMs": 31, - "elapsedMs": 32 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=download&range=unrecognized", - "requestID": "832e855a-5c5a-47a1-a1de-da2c60a6b2f7", - "status": 200, - "expected": 200, - "bytes": 3429, - "headersMs": 30, - "firstBodyByteMs": 31, - "elapsedMs": 31 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=unknown", - "requestID": "685eae83-b0f2-483b-8e1f-c979276f78a6", - "status": 404, - "expected": 404, - "bytes": 27, - "headersMs": 27, - "firstBodyByteMs": 27, - "elapsedMs": 28 - }, - { - "method": "GET", - "route": "/api/stat", - "requestID": "d1d25e0d-cfdb-4e29-b72b-c924700c0714", - "status": 200, - "expected": 200, - "bytes": 69, - "headersMs": 55, - "firstBodyByteMs": 56, - "elapsedMs": 57 - }, - { - "method": "GET", - "route": "/api/stat/history?days=-2", - "requestID": "64060c5d-3f84-439c-8231-1cc46c0e851f", - "status": 200, - "expected": 200, - "bytes": 105, - "headersMs": 27, - "firstBodyByteMs": 28, - "elapsedMs": 28 - }, - { - "method": "GET", - "route": "/api/stat/history?days=0", - "requestID": "94b6fec2-2574-4f84-a895-9554c004526d", - "status": 200, - "expected": 200, - "bytes": 105, - "headersMs": 27, - "firstBodyByteMs": 28, - "elapsedMs": 28 - }, - { - "method": "GET", - "route": "/api/stat/history?days=0x10", - "requestID": "cdc2246f-d274-44d2-ad43-a4ff393c6780", - "status": 200, - "expected": 200, - "bytes": 105, - "headersMs": 30, - "firstBodyByteMs": 31, - "elapsedMs": 31 - }, - { - "method": "GET", - "route": "/api/stat/history?days=7suffix", - "requestID": "2581f829-d790-4651-bef3-a824fbe254d0", - "status": 200, - "expected": 200, - "bytes": 105, - "headersMs": 26, - "firstBodyByteMs": 27, - "elapsedMs": 28 - }, - { - "method": "GET", - "route": "/api/stat/history?days=999", - "requestID": "668ab4b7-68c0-42a2-9c05-087e35a2837e", - "status": 200, - "expected": 200, - "bytes": 105, - "headersMs": 28, - "firstBodyByteMs": 28, - "elapsedMs": 29 - }, - { - "method": "GET", - "route": "/api/stat/history?days[]=7&days[]=30", - "requestID": "1d19cfcf-f558-4f05-a336-102f569dbd26", - "status": 200, - "expected": 200, - "bytes": 105, - "headersMs": 25, - "firstBodyByteMs": 26, - "elapsedMs": 26 - }, - { - "method": "GET", - "route": "/api/stat/history?days[1]=7&days[0]=1", - "requestID": "feec70e7-9cd6-44f5-aa0f-8fc213b11d43", - "status": 200, - "expected": 200, - "bytes": 105, - "headersMs": 24, - "firstBodyByteMs": 25, - "elapsedMs": 25 - }, - { - "method": "GET", - "route": "/api/stat/history?days[x]=7", - "requestID": "4d08d212-679f-4f7a-8e9c-5285730e8caa", - "status": 200, - "expected": 200, - "bytes": 105, - "headersMs": 24, - "firstBodyByteMs": 25, - "elapsedMs": 25 - }, - { - "method": "GET", - "route": "/api/user/dashboard?statuses[]=", - "requestID": "fbafa353-6e82-47c5-bddd-5bb6668079ad", - "status": 200, - "expected": 200, - "bytes": 64, - "headersMs": 53, - "firstBodyByteMs": 54, - "elapsedMs": 55 - }, - { - "method": "GET", - "route": "/api/user/dashboard?type[]=repo", - "requestID": "075f0be3-8343-4b04-a9d8-4394bee5fa71", - "status": 200, - "expected": 200, - "bytes": 64, - "headersMs": 72, - "firstBodyByteMs": 74, - "elapsedMs": 74 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort[]=", - "requestID": "f2e8517f-cd36-4f1c-9f7a-dc457b47dd97", - "status": 400, - "expected": 400, - "bytes": 24, - "headersMs": 29, - "firstBodyByteMs": 30, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/api/user/dashboard?cursor[]=", - "requestID": "bcc47c96-df48-4eb1-a383-9cbfe7188ed4", - "status": 400, - "expected": 400, - "bytes": 26, - "headersMs": 56, - "firstBodyByteMs": 56, - "elapsedMs": 57 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort=anonymizeDate&limit=5&cursor=eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDEiLCJ2YWx1ZSI6IjIwMjQtMDMtMDFUMDA6MDA6MDAuMDAwWiJ9", - "requestID": "638ec003-4d84-4226-ab6f-1e828124f371", - "status": 200, - "expected": 200, - "bytes": 796, - "headersMs": 55, - "firstBodyByteMs": 56, - "elapsedMs": 56 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort=anonymizeDate&limit=5&cursor=eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDEiLCJ2YWx1ZSI6Ik1hcmNoIDEgMjAyNCJ9", - "requestID": "433d7820-4c6d-45b1-9e1c-325a8241661b", - "status": 200, - "expected": 200, - "bytes": 796, - "headersMs": 49, - "firstBodyByteMs": 50, - "elapsedMs": 54 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort=anonymizeDate&limit=5&cursor=eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDEiLCJ2YWx1ZSI6IjIwMjQtMDItMzAifQ", - "requestID": "6dc40c5a-9230-438b-bf30-68b12c94b070", - "status": 200, - "expected": 200, - "bytes": 796, - "headersMs": 50, - "firstBodyByteMs": 51, - "elapsedMs": 51 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort=anonymizeDate&limit=5&cursor=eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMjQ6MDA6MDBaIn0", - "requestID": "8c9950bf-d1d8-4422-a05b-28db351a1575", - "status": 200, - "expected": 200, - "bytes": 796, - "headersMs": 47, - "firstBodyByteMs": 48, - "elapsedMs": 49 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort=anonymizeDate&limit=5&cursor=eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDEiLCJ2YWx1ZSI6WyIyMDI0IiwiMyIsIjEiXX0", - "requestID": "0d725769-abb8-4794-abff-8d44af2cb2d8", - "status": 200, - "expected": 200, - "bytes": 796, - "headersMs": 45, - "firstBodyByteMs": 47, - "elapsedMs": 47 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort=anonymizeDate&limit=5&cursor=eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDEiLCJ2YWx1ZSI6Im5vdCBhIGRhdGUifQ", - "requestID": "f26ffef6-16e3-424c-aa7b-763288c40993", - "status": 400, - "expected": 400, - "bytes": 26, - "headersMs": 31, - "firstBodyByteMs": 31, - "elapsedMs": 31 - }, - { - "method": "GET", - "route": "/api/admin/performance?minutes=6e1", - "requestID": "53278c5f-eaa6-423f-b7fe-ac1edb30c007", - "status": 200, - "expected": 200, - "bytes": 68455, - "headersMs": 133, - "firstBodyByteMs": 134, - "elapsedMs": 137 - }, - { - "method": "GET", - "route": "/api/admin/performance?minutes[]=60", - "requestID": "2d11ff4a-ffa6-4938-a033-9001a369b24e", - "status": 200, - "expected": 200, - "bytes": 68455, - "headersMs": 99, - "firstBodyByteMs": 100, - "elapsedMs": 102 - }, - { - "method": "GET", - "route": "/api/admin/performance?minutes[0]=15", - "requestID": "a14d5fdd-f19e-4d43-b6ff-dd47ff835f42", - "status": 200, - "expected": 200, - "bytes": 37225, - "headersMs": 107, - "firstBodyByteMs": 107, - "elapsedMs": 109 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue[]=cache&range[]=6h", - "requestID": "3b65497d-e040-4c68-92f4-45903daf3b7d", - "status": 200, - "expected": 200, - "bytes": 20201, - "headersMs": 38, - "firstBodyByteMs": 39, - "elapsedMs": 40 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?range[]=", - "requestID": "0ff02af0-8290-4148-8932-332192d01520", - "status": 200, - "expected": 200, - "bytes": 3417, - "headersMs": 31, - "firstBodyByteMs": 32, - "elapsedMs": 33 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?range=toString", - "requestID": "19e659e1-9fa6-4715-988b-49653947ed94", - "status": 200, - "expected": 200, - "bytes": 51, - "headersMs": 27, - "firstBodyByteMs": 28, - "elapsedMs": 28 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue[]=", - "requestID": "64d056d6-d9a6-4762-9585-9af69fac2e44", - "status": 404, - "expected": 404, - "bytes": 27, - "headersMs": 30, - "firstBodyByteMs": 30, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/api/admin/queues?queue[]=remove", - "requestID": "01571fd9-527d-431e-8c30-e32127178e0e", - "status": 200, - "expected": 200, - "bytes": 5238, - "headersMs": 60, - "firstBodyByteMs": 61, - "elapsedMs": 62 - }, - { - "method": "GET", - "route": "/api/admin/errors?offset[]=2&limit[]=7", - "requestID": "dda97d3f-aa1c-420c-bee6-87e69271b49d", - "status": 200, - "expected": 200, - "bytes": 2102, - "headersMs": 55, - "firstBodyByteMs": 56, - "elapsedMs": 57 - }, - { - "method": "GET", - "route": "/api/repo/octocat/Hello-World?connection=", - "requestID": "225b54af-e04b-4505-8b78-068e4d4838da", - "status": 400, - "expected": 400, - "bytes": 30, - "headersMs": 27, - "firstBodyByteMs": 27, - "elapsedMs": 28 - }, - { - "method": "GET", - "route": "/api/repo/octocat/Hello-World?connection[]=oauth", - "requestID": "76d63dc3-545d-41bb-9d14-8f7a3a8422d7", - "status": 400, - "expected": 400, - "bytes": 30, - "headersMs": 29, - "firstBodyByteMs": 29, - "elapsedMs": 29 - }, - { - "method": "GET", - "route": "/api/repo/octocat/Hello-World?connection=oauth&connection[]=github-app", - "requestID": "ae2be23a-0344-4994-b36b-1ae4969c54a5", - "status": 400, - "expected": 400, - "bytes": 30, - "headersMs": 33, - "firstBodyByteMs": 33, - "elapsedMs": 33 - }, - { - "method": "GET", - "route": "/api/repo/octocat/Hello-World?repositoryID[]=invalid", - "requestID": "5ecdfa39-7f05-454f-b43a-b88d6a132f24", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 63, - "firstBodyByteMs": 63, - "elapsedMs": 63 - }, - { - "method": "GET", - "route": "/api/repo/octocat/Hello-World?repositoryID=invalid", - "requestID": "3ffece1a-bacd-4467-bfcc-74a440a07883", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 29, - "firstBodyByteMs": 30, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/api/repo/octocat/Hello-World?repositoryID[$exists]=true", - "requestID": "b5c9e73f-2d7d-4d09-91ed-9f6bfe893c0a", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 29, - "firstBodyByteMs": 29, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/api/user/search/github-users?q[]=ab", - "requestID": "a2bd2ebe-f9b4-44ad-9659-760a969457db", - "status": 200, - "expected": 200, - "bytes": 2, - "headersMs": 29, - "firstBodyByteMs": 29, - "elapsedMs": 29 - }, - { - "method": "GET", - "route": "/api/user/search/github-users?q[length]=1", - "requestID": "947b52fa-bd8f-41a6-9937-ba7a759aec78", - "status": 200, - "expected": 200, - "bytes": 2, - "headersMs": 27, - "firstBodyByteMs": 28, - "elapsedMs": 28 - }, - { - "method": "GET", - "route": "/api/user/search/github-users?q=ab&q=cd", - "requestID": "7a7a5f15-3cca-4faf-9b41-cb374e26b255", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 33, - "firstBodyByteMs": 33, - "elapsedMs": 33 - }, - { - "method": "GET", - "route": "/api/user/search/github-users?q[x]=ab", - "requestID": "7ec747e3-6ed3-4082-8e6e-de3ded0e87e9", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 37, - "firstBodyByteMs": 37, - "elapsedMs": 37 - }, - { - "method": "GET", - "route": "/api/user/search/github-users?q[length][toString]=1", - "requestID": "872e93dc-9e01-4346-85dd-8cfff466cdb6", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 30, - "firstBodyByteMs": 30, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/api/admin/repos?page[]=2&limit[]=2&sort[]=status&direction[]=asc&format[]=csv", - "requestID": "4b57030e-a02c-487a-a2eb-9a67a9294a1f", - "status": 200, - "expected": 200, - "bytes": 2601, - "headersMs": 48, - "firstBodyByteMs": 49, - "elapsedMs": 50 - }, - { - "method": "GET", - "route": "/api/admin/repos?page=1000001&limit=1", - "requestID": "18a1c29b-48e6-4b0f-9988-887fbafdcd97", - "status": 200, - "expected": 200, - "bytes": 193, - "headersMs": 59, - "firstBodyByteMs": 60, - "elapsedMs": 61 - }, - { - "method": "GET", - "route": "/api/admin/repos?page=-1", - "requestID": "01b023bd-b119-4d0b-99a7-a540af58663d", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 33, - "firstBodyByteMs": 33, - "elapsedMs": 33 - }, - { - "method": "GET", - "route": "/api/admin/repos?page[toString]=x", - "requestID": "3db51337-cdd2-4094-ab37-0a112554f7b8", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 31, - "firstBodyByteMs": 32, - "elapsedMs": 32 - }, - { - "method": "GET", - "route": "/api/admin/users?page[]=2&limit[]=2&sort[]=status&direction[]=asc&format[]=csv", - "requestID": "280cddd2-5603-4bb3-af07-8201621b091f", - "status": 200, - "expected": 200, - "bytes": 106, - "headersMs": 35, - "firstBodyByteMs": 36, - "elapsedMs": 37 - }, - { - "method": "GET", - "route": "/api/admin/users?page=1000001&limit=1", - "requestID": "f8a3608f-bf7e-48b8-8858-3987d893ec11", - "status": 200, - "expected": 200, - "bytes": 112, - "headersMs": 33, - "firstBodyByteMs": 34, - "elapsedMs": 34 - }, - { - "method": "GET", - "route": "/api/admin/users?page=-1", - "requestID": "ab67ae6a-fd51-4bff-9a0d-45b9cec233e3", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 32, - "firstBodyByteMs": 32, - "elapsedMs": 32 - }, - { - "method": "GET", - "route": "/api/admin/users?page[toString]=x", - "requestID": "d33f6f0a-2f73-4ac2-b2e7-249dff9476a6", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 30, - "firstBodyByteMs": 30, - "elapsedMs": 31 - }, - { - "method": "GET", - "route": "/api/admin/users?limit=-1", - "requestID": "e1f2edc7-6eb9-4ccb-b882-839c44e27ee7", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 35, - "firstBodyByteMs": 35, - "elapsedMs": 35 - }, - { - "method": "GET", - "route": "/api/admin/conferences?page[]=2&limit[]=2&sort[]=status&direction[]=asc&format[]=csv", - "requestID": "d7775c64-6dc2-40fd-a340-988f9b69f3f5", - "status": 200, - "expected": 200, - "bytes": 80, - "headersMs": 36, - "firstBodyByteMs": 37, - "elapsedMs": 37 - }, - { - "method": "GET", - "route": "/api/admin/conferences?page=1000001&limit=1", - "requestID": "1d96d6e4-87a2-42e6-8113-9b05432e77d2", - "status": 200, - "expected": 200, - "bytes": 86, - "headersMs": 39, - "firstBodyByteMs": 39, - "elapsedMs": 40 - }, - { - "method": "GET", - "route": "/api/admin/conferences?page=-1", - "requestID": "b8554b09-5ee5-42f6-b202-3413d3d67d05", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 31, - "firstBodyByteMs": 32, - "elapsedMs": 32 - }, - { - "method": "GET", - "route": "/api/admin/conferences?page[toString]=x", - "requestID": "ff5a77fe-780f-48da-84ed-78f12302464b", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 30, - "firstBodyByteMs": 30, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/api/admin/repos?limit=-1", - "requestID": "37b2bfc6-2104-4d22-a7bb-66d4ee9961d7", - "status": 200, - "expected": 200, - "bytes": 1532, - "headersMs": 37, - "firstBodyByteMs": 38, - "elapsedMs": 38 - }, - { - "method": "GET", - "route": "/api/admin/repos?ready[]=true", - "requestID": "91bba8e1-d3a9-4493-b9bf-e23a2b3e4125", - "status": 200, - "expected": 200, - "bytes": 1935, - "headersMs": 42, - "firstBodyByteMs": 43, - "elapsedMs": 44 - }, - { - "method": "GET", - "route": "/api/admin/conferences?limit=-1", - "requestID": "d74d4aa3-ac32-4967-8b70-e3475074a9ba", - "status": 200, - "expected": 200, - "bytes": 80, - "headersMs": 37, - "firstBodyByteMs": 38, - "elapsedMs": 38 - }, - { - "method": "GET", - "route": "/api/admin/conferences?ready[]=true", - "requestID": "e03c2601-b58f-47d4-b2b3-b74be49ceb6e", - "status": 200, - "expected": 200, - "bytes": 117, - "headersMs": 32, - "firstBodyByteMs": 32, - "elapsedMs": 33 - }, - { - "method": "GET", - "route": "/api/admin/repos?search[]=x", - "requestID": "f2f928b4-b54c-4192-9a5a-ec10e13fb666", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 37, - "firstBodyByteMs": 38, - "elapsedMs": 38 - }, - { - "method": "GET", - "route": "/api/admin/users?search[]=x", - "requestID": "38d707db-111c-46cd-8e06-e18710160f88", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 28, - "firstBodyByteMs": 29, - "elapsedMs": 29 - }, - { - "method": "GET", - "route": "/api/admin/conferences?search[]=x", - "requestID": "910049e5-0b15-4bd7-98b9-ddc50890505d", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 30, - "firstBodyByteMs": 31, - "elapsedMs": 31 - }, - { - "method": "GET", - "route": "/api/admin/users?status[]=active", - "requestID": "39484c6c-bd84-45e0-8d14-eb052d197471", - "status": 200, - "expected": 200, - "bytes": 99, - "headersMs": 37, - "firstBodyByteMs": 38, - "elapsedMs": 38 - }, - { - "method": "GET", - "route": "/api/admin/users?status[$in][]=active", - "requestID": "6ecebf3b-6f71-4a6e-b36f-2c45f94a5ac9", - "status": 200, - "expected": 200, - "bytes": 553, - "headersMs": 33, - "firstBodyByteMs": 34, - "elapsedMs": 35 - }, - { - "method": "GET", - "route": "/api/admin/users?status[a]=active", - "requestID": "4ba48e4d-a816-4882-bfc4-06a0f3535147", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 30, - "firstBodyByteMs": 31, - "elapsedMs": 31 - }, - { - "method": "GET", - "route": "/api/admin/users?status[$in]=active", - "requestID": "c88017da-3a77-41b0-ab8f-d5e7aa0aeb31", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 30, - "firstBodyByteMs": 31, - "elapsedMs": 31 - }, - { - "method": "GET", - "route": "/api/admin/repos?owner[a]=x", - "requestID": "9de24de7-b0d4-4ce5-a5dd-159b4557cd99", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 28, - "firstBodyByteMs": 28, - "elapsedMs": 28 - }, - { - "method": "GET", - "route": "/api/admin/repos?conference[$unknown]=x", - "requestID": "061bb9e9-da4b-4fe6-9594-7bba431a0cf4", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 30, - "firstBodyByteMs": 31, - "elapsedMs": 31 - }, - { - "method": "GET", - "route": "/api/admin/repos?dateFrom[]=2024-02-30", - "requestID": "d741f39c-540b-4123-bafd-9102c39a0214", - "status": 200, - "expected": 200, - "bytes": 12254, - "headersMs": 42, - "firstBodyByteMs": 43, - "elapsedMs": 44 - }, - { - "method": "GET", - "route": "/api/admin/repos?dateTo=March%201%202024", - "requestID": "744b538e-aa6e-4921-8d4d-c8a79dbf93b8", - "status": 200, - "expected": 200, - "bytes": 156, - "headersMs": 35, - "firstBodyByteMs": 36, - "elapsedMs": 36 - }, - { - "method": "GET", - "route": "/api/admin/repos?dateFrom[toString]=x", - "requestID": "9e82eeae-6c5e-4178-8140-2bf69243d432", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 29, - "firstBodyByteMs": 29, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/api/admin/users?dateFrom[]=2024-02-30", - "requestID": "7d606480-35e0-4888-81a4-943d41d2ceb0", - "status": 200, - "expected": 200, - "bytes": 458, - "headersMs": 36, - "firstBodyByteMs": 39, - "elapsedMs": 39 - }, - { - "method": "GET", - "route": "/api/admin/users?dateTo=March%201%202024", - "requestID": "c54af911-aed9-4603-9e51-84da130c1a6d", - "status": 200, - "expected": 200, - "bytes": 129, - "headersMs": 39, - "firstBodyByteMs": 39, - "elapsedMs": 40 - }, - { - "method": "GET", - "route": "/api/admin/users?dateFrom[toString]=x", - "requestID": "3c7bdc0b-9fc0-494a-9734-42782e2c2d2d", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 33, - "firstBodyByteMs": 33, - "elapsedMs": 33 - }, - { - "method": "GET", - "route": "/api/admin/conferences?dateFrom[]=2024-02-30", - "requestID": "d85361b8-6fdc-419a-924f-b0c7eeaf8e0b", - "status": 200, - "expected": 200, - "bytes": 138, - "headersMs": 37, - "firstBodyByteMs": 38, - "elapsedMs": 38 - }, - { - "method": "GET", - "route": "/api/admin/conferences?dateTo=March%201%202024", - "requestID": "0ae98985-b98e-4cdd-9f77-57335c450f43", - "status": 200, - "expected": 200, - "bytes": 138, - "headersMs": 35, - "firstBodyByteMs": 36, - "elapsedMs": 41 - }, - { - "method": "GET", - "route": "/api/admin/conferences?dateFrom[toString]=x", - "requestID": "a3edad0e-88d4-4ef6-ac71-f03ba358216b", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 30, - "firstBodyByteMs": 31, - "elapsedMs": 31 - }, - { - "method": "GET", - "route": "/github/connections", - "requestID": "53b21ee9-39b4-47bd-898b-61b0948b5f3e", - "status": 200, - "expected": 200, - "bytes": 456, - "headersMs": 542, - "firstBodyByteMs": 544, - "elapsedMs": 545 - }, - { - "method": "POST", - "route": "/api/admin/tokens", - "requestID": "af059503-2428-4ea1-829d-90519251a941", - "status": 200, - "expected": 200, - "bytes": 186, - "headersMs": 43, - "firstBodyByteMs": 45, - "elapsedMs": 45 - }, - { - "method": "GET", - "route": "/api/user", - "requestID": "726f9d29-54ff-4bf7-839f-a8192c97d97d", - "status": 200, - "expected": 200, - "bytes": 100, - "headersMs": 33, - "firstBodyByteMs": 35, - "elapsedMs": 35 - }, - { - "method": "DELETE", - "route": "/api/admin/tokens/6aea4179aadfb0c81cf083d2", - "requestID": "e92b1842-d7eb-422d-b48b-c73164df24f3", - "status": 200, - "expected": 200, - "bytes": 13, - "headersMs": 31, - "firstBodyByteMs": 32, - "elapsedMs": 32 - }, - { - "method": "GET", - "route": "/api/user", - "requestID": "a7c08557-34b6-4ece-8968-7f78fde5bd29", - "status": 401, - "expected": 401, - "bytes": 25, - "headersMs": 55, - "firstBodyByteMs": 55, - "elapsedMs": 55 - }, - { - "method": "POST", - "route": "/github/login-token", - "requestID": "ca0013d8-6103-45a3-ba97-db164bc8403d", - "status": 200, - "expected": 200, - "bytes": 33, - "headersMs": 34, - "firstBodyByteMs": 34, - "elapsedMs": 35 - }, - { - "method": "GET", - "route": "/api/user", - "requestID": "19b71bb3-efb6-4ec8-8501-61621cce2822", - "status": 200, - "expected": 200, - "bytes": 100, - "headersMs": 30, - "firstBodyByteMs": 31, - "elapsedMs": 31 - }, - { - "method": "GET", - "route": "/api/user/logout", - "requestID": "70439e9e-d990-4560-97b0-d926e9a67b82", - "status": 302, - "expected": 302, - "bytes": 24, - "headersMs": 28, - "firstBodyByteMs": 28, - "elapsedMs": 29 - }, - { - "method": "GET", - "route": "/api/user", - "requestID": "0f4bc20b-aa09-453c-a7e7-f87a357f883f", - "status": 401, - "expected": 401, - "bytes": 25, - "headersMs": 29, - "firstBodyByteMs": 29, - "elapsedMs": 29 - }, - { - "method": "POST", - "route": "/api/anonymize-preview", - "requestID": "6270d975-1c6a-4b3f-aaa5-3a2f3e5eb1aa", - "status": 200, - "expected": 200, - "bytes": 26, - "headersMs": 60, - "firstBodyByteMs": 61, - "elapsedMs": 61 - }, - { - "method": "GET", - "route": "/api/providers/github/repository/metadata?name=tdurieux%2Fsynctex-js&connection=github-app", - "requestID": "54bd75b1-921d-4089-bdcd-dc24176112a5", - "status": 200, - "expected": 200, - "bytes": 230, - "headersMs": 4245, - "firstBodyByteMs": 4247, - "elapsedMs": 4247 - }, - { - "method": "GET", - "route": "/api/providers/github/repository/branches?name=tdurieux%2Fsynctex-js&connection=github-app", - "requestID": "d97b6354-76ba-4340-9e2f-60fdd97808b5", - "status": 200, - "expected": 200, - "bytes": 2623, - "headersMs": 3976, - "firstBodyByteMs": 3978, - "elapsedMs": 3980 - }, - { - "method": "GET", - "route": "/api/providers/github/repository/readme?name=tdurieux%2Fsynctex-js&connection=github-app", - "requestID": "2ec1959c-4186-4afe-9627-b2faeecfaa17", - "status": 200, - "expected": 200, - "bytes": 2303, - "headersMs": 3206, - "firstBodyByteMs": 3207, - "elapsedMs": 3208 - }, - { - "method": "POST", - "route": "/api/repo", - "requestID": "f505a581-c148-4b22-9352-66e16faeb877", - "status": 200, - "expected": 200, - "bytes": 22, - "headersMs": 3853, - "firstBodyByteMs": 3854, - "elapsedMs": 3854 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793737073663", - "requestID": "72ae305c-58e0-4cd3-9d6e-70d242181b69", - "status": 200, - "expected": 200, - "bytes": 510, - "headersMs": 74, - "firstBodyByteMs": 75, - "elapsedMs": 75 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793737073663/file/LICENSE", - "requestID": "a6cec650-5380-42ea-a3c3-2468b21beec6", - "status": 200, - "expected": 200, - "bytes": 1074, - "headersMs": 930, - "firstBodyByteMs": 932, - "elapsedMs": 932 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793737073663/files", - "requestID": "d369f74d-fecd-47ef-93a0-bebac30c0b8d", - "status": 200, - "expected": 200, - "bytes": 170, - "headersMs": 63, - "firstBodyByteMs": 64, - "elapsedMs": 65 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793737073663/zip", - "requestID": "fd295b18-a3be-4b65-b21e-9ef778fddf9b", - "status": 200, - "expected": 200, - "bytes": 7191, - "headersMs": 1124, - "firstBodyByteMs": 1124, - "elapsedMs": 4345 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793737073663/file/LICENSE", - "requestID": "f06eb5d9-969d-4ff9-8f0e-59e3e544e59d", - "status": 200, - "expected": 200, - "bytes": 1074, - "headersMs": 822, - "firstBodyByteMs": 823, - "elapsedMs": 824 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793737073663/zip", - "requestID": "d8609a19-5327-4c1c-bb9a-782239026e79", - "status": 200, - "expected": 200, - "bytes": 7191, - "headersMs": 1220, - "firstBodyByteMs": 1220, - "elapsedMs": 4201 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793737073663/file/LICENSE", - "requestID": "61d1b4cc-f4b1-42a4-8a75-9afefa20668c", - "status": 200, - "expected": 200, - "bytes": 1074, - "headersMs": 848, - "firstBodyByteMs": 849, - "elapsedMs": 850 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793737073663/zip", - "requestID": "7c99e12e-4ab2-4beb-921d-38985c9d5113", - "status": 200, - "expected": 200, - "bytes": 7191, - "headersMs": 1108, - "firstBodyByteMs": 1109, - "elapsedMs": 4014 - }, - { - "method": "GET", - "route": "/api/admin/performance", - "requestID": "a5410fa3-955f-4ffc-acc2-a78fe3afb0db", - "status": 200, - "expected": 200, - "bytes": 37485, - "headersMs": 142, - "firstBodyByteMs": 144, - "elapsedMs": 147 - }, - { - "method": "GET", - "route": "/api/user", - "requestID": "d7e2aa73-317b-40b7-97eb-e0916c694424", - "status": 401, - "expected": 401, - "bytes": 25, - "headersMs": 60, - "firstBodyByteMs": 61, - "elapsedMs": 61 - }, - { - "method": "DELETE", - "route": "/api/repo/go-beta-check-1793737073663", - "requestID": "ed62154f-8f69-4b44-acc2-8fa67979513c", - "status": 200, - "expected": 200, - "bytes": 21, - "headersMs": 38, - "firstBodyByteMs": 38, - "elapsedMs": 38 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793737073663", - "requestID": "3cd884a3-4be9-4ad6-a6ed-6958897d690e", - "status": 200, - "expected": 200, - "bytes": 560, - "headersMs": 57, - "firstBodyByteMs": 58, - "elapsedMs": 61 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793737073663", - "requestID": "d261bd28-bc69-4f82-8f58-947fe35770c1", - "status": 200, - "expected": 200, - "bytes": 559, - "headersMs": 33, - "firstBodyByteMs": 35, - "elapsedMs": 35 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793737073663/file/LICENSE", - "requestID": "f8032c55-bf39-4407-92f2-b519b23167dc", - "status": 410, - "expected": 410, - "bytes": 30, - "headersMs": 53, - "firstBodyByteMs": 54, - "elapsedMs": 54 - }, - { - "method": "GET", - "route": "/api/user", - "requestID": "115dd032-2e6d-4a7a-a014-9fa95f174d1d", - "status": 401, - "expected": 401, - "bytes": 25, - "headersMs": 41, - "firstBodyByteMs": 41, - "elapsedMs": 42 - } - ], - "productionChanged": false, - "overviewHistoryFresh": "passed", - "overviewBrowserFields": "passed", - "queueOverviewFields": "passed", - "errorMonitoring": { - "maxEntries": 5000, - "hourlyBuckets": 24, - "routine404Counted": true - }, - "queueMetricWindows": [ - { - "queue": "download", - "range": "1h", - "points": 60 - }, - { - "queue": "download", - "range": "6h", - "points": 360 - }, - { - "queue": "download", - "range": "24h", - "points": 1440 - }, - { - "queue": "download", - "range": "7d", - "points": 10080 - }, - { - "queue": "remove", - "range": "1h", - "points": 60 - }, - { - "queue": "cache", - "range": "1h", - "points": 60 - }, - { - "queue": "download", - "range": "unrecognized", - "points": 60 - } - ], - "publicStatistics": { - "anonymousAccess": true, - "windows": [ - { - "query": "days=-2", - "days": 1, - "rows": 1 - }, - { - "query": "days=0", - "days": 30, - "rows": 1 - }, - { - "query": "days=0x10", - "days": 16, - "rows": 1 - }, - { - "query": "days=7suffix", - "days": 7, - "rows": 1 - }, - { - "query": "days=999", - "days": 365, - "rows": 1 - }, - { - "query": "days[]=7&days[]=30", - "days": 7, - "rows": 1 - }, - { - "query": "days[1]=7&days[0]=1", - "days": 1, - "rows": 1 - }, - { - "query": "days[x]=7", - "days": 30, - "rows": 1 - } - ] - }, - "dashboardExtendedQueries": "passed", - "dashboardDateCursors": "passed", - "monitoringExtendedQueries": "passed", - "adminExtendedQueries": "passed", - "previewConnectionQueries": "passed", - "previewCacheHintRejections": "passed", - "userSearchQueries": "passed", - "adminListPaginationQueries": "passed", - "adminListFilterQueries": "passed", - "adminListCastingQueries": "passed", - "adminListDateQueries": "passed", - "apiKeyLifecycle": "passed", - "sessionLoginLogout": "passed", - "exactZipContents": "passed", - "repeatedContentChecks": 3, - "performanceMonitoring": { - "requests": true, - "processSamples": true, - "runtimeHistory": true, - "stages": [ - "repository", - "authorization", - "worker_wait", - "anonymize" - ], - "upstreamObserved": true, - "upstreamNote": "Shared-cache hits need no upstream read; provider timing is checked by the integration suite." - }, - "result": "passed", - "testRepositoryRemoved": true, - "temporaryKeyRevoked": true, - "betaAccountAdmin": true, - "uniqueRequestIDsVerified": 130 - }, - "image": "sha256:4a44b2afed6fe4e9bd526c0cf1874a1baeca531fdf473ab14a328b693b0b68e5", - "traces": [ - { - "requestID": "e13ae09c-6254-4ad0-9d39-c07b83607857", - "route": "/api/user", - "status": 401, - "serverMs": 3, - "firstByteMs": 3.076478, - "bytes": 25, - "stagesMs": {} - }, - { - "requestID": "e7441f45-83ad-4355-b58f-0b85aaa2d2de", - "route": "/api/user", - "status": 200, - "serverMs": 7, - "firstByteMs": 6.7952, - "bytes": 100, - "stagesMs": {} - }, - { - "requestID": "52fe6072-9d64-40e5-9d65-10e04c86ba41", - "route": "/github/connections", - "status": 200, - "serverMs": 725, - "firstByteMs": 725.368342, - "bytes": 456, - "stagesMs": {} - }, - { - "requestID": "649c0b46-52b4-481e-a986-f8482f1598f9", - "route": "/api/providers", - "status": 200, - "serverMs": 5, - "firstByteMs": 5.061175, - "bytes": 144, - "stagesMs": {} - }, - { - "requestID": "6925412e-0032-4873-8041-f148ed6104b4", - "route": "/api/user/dashboard", - "status": 200, - "serverMs": 25, - "firstByteMs": 24.880511, - "bytes": 796, - "stagesMs": {} - }, - { - "requestID": "559de36f-2e68-4bc7-b9f2-248b0efc52b6", - "route": "/api/user/default", - "status": 200, - "serverMs": 5, - "firstByteMs": 4.770858, - "bytes": 25, - "stagesMs": {} - }, - { - "requestID": "0fe7e27c-f909-486c-96a3-bcd536b36998", - "route": "/api/user/quota", - "status": 200, - "serverMs": 9, - "firstByteMs": 8.737904, - "bytes": 115, - "stagesMs": {} - }, - { - "requestID": "46514e73-74ac-4419-a647-243f3b78ab96", - "route": "/api/admin/overview", - "status": 200, - "serverMs": 97, - "firstByteMs": 95.808882, - "bytes": 578, - "stagesMs": {} - }, - { - "requestID": "72f4a1dc-c09c-4c2e-96c2-367d7ef069f9", - "route": "/api/admin/users", - "status": 200, - "serverMs": 11, - "firstByteMs": 11.030048, - "bytes": 526, - "stagesMs": {} - }, - { - "requestID": "c0f3a146-554d-4f79-95c1-afd7f8c53b31", - "route": "/api/admin/repos", - "status": 200, - "serverMs": 15, - "firstByteMs": 13.224131, - "bytes": 2342, - "stagesMs": {} - }, - { - "requestID": "dd47ccb8-a943-44ab-b3f9-5e8b1fbb74f3", - "route": "/api/admin/queues", - "status": 200, - "serverMs": 27, - "firstByteMs": 24.985364, - "bytes": 827, - "stagesMs": {} - }, - { - "requestID": "2a0d1fb1-5e20-459f-9d9b-6ced23031e94", - "route": "/api/admin/performance", - "status": 200, - "serverMs": 48, - "firstByteMs": 44.191527, - "bytes": 4473, - "stagesMs": {} - }, - { - "requestID": "6bb45a5d-b2ec-4b55-8a30-e382cacd7a80", - "route": "/api/admin/errors", - "status": 200, - "serverMs": 20, - "firstByteMs": 15.226241, - "bytes": 8748, - "stagesMs": {} - }, - { - "requestID": "fcc0a1a9-a49b-4a50-a1ff-a20db60e2fa3", - "route": "/api/admin/errors/stats", - "status": 200, - "serverMs": 9, - "firstByteMs": 7.132238, - "bytes": 267, - "stagesMs": {} - }, - { - "requestID": "d684e4cf-a91d-46e0-9fd3-3ced509be12d", - "route": "/api/admin/tokens", - "status": 200, - "serverMs": 6, - "firstByteMs": 6.462043, - "bytes": 160, - "stagesMs": {} - }, - { - "requestID": "468538d8-6598-437b-8772-01f73d021a2d", - "route": "/api/admin/errors", - "status": 200, - "serverMs": 44, - "firstByteMs": 32.519844, - "bytes": 22552, - "stagesMs": {} - }, - { - "requestID": "007f8ca6-7efc-467a-a94c-2f8f7a47a23e", - "route": "/api/admin/errors/stats", - "status": 200, - "serverMs": 8, - "firstByteMs": 6.645792, - "bytes": 267, - "stagesMs": {} - }, - { - "requestID": "b4cbcc3f-c35c-458b-b29b-2721ee4f0f26", - "route": "/api/repo/:id", - "status": 404, - "serverMs": 6, - "firstByteMs": 6.478176, - "bytes": 26, - "stagesMs": { - "repository": 1.492635 - } - }, - { - "requestID": "c0d883d0-fac2-4388-87e5-02a43dfebc83", - "route": "/api/admin/errors/stats", - "status": 200, - "serverMs": 8, - "firstByteMs": 6.3668, - "bytes": 267, - "stagesMs": {} - }, - { - "requestID": "47d1a277-fa2f-419c-973f-073238f69d1f", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 7, - "firstByteMs": 5.89789, - "bytes": 220, - "stagesMs": {} - }, - { - "requestID": "aa9c6d17-9561-483a-baa9-f343fe0c5d3b", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 11, - "firstByteMs": 9.083232, - "bytes": 612, - "stagesMs": {} - }, - { - "requestID": "87d0b7c7-79c0-41e9-8f9b-0522274ff3e4", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 12, - "firstByteMs": 8.403326, - "bytes": 1975, - "stagesMs": {} - }, - { - "requestID": "c86ce07b-b2a5-41a8-a056-6f910a3edfb3", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 104, - "firstByteMs": 85.654233, - "bytes": 9757, - "stagesMs": {} - }, - { - "requestID": "668d5295-d607-4fef-8622-338b35f6cbb4", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 8, - "firstByteMs": 6.641426, - "bytes": 210, - "stagesMs": {} - }, - { - "requestID": "5b1e15b5-93ba-4b7c-a614-b14877267707", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 7, - "firstByteMs": 5.273578, - "bytes": 184, - "stagesMs": {} - }, - { - "requestID": "832e855a-5c5a-47a1-a1de-da2c60a6b2f7", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 6, - "firstByteMs": 4.845685, - "bytes": 232, - "stagesMs": {} - }, - { - "requestID": "685eae83-b0f2-483b-8e1f-c979276f78a6", - "route": "/api/admin/queues/metrics", - "status": 404, - "serverMs": 4, - "firstByteMs": 4.126647, - "bytes": 27, - "stagesMs": {} - }, - { - "requestID": "d1d25e0d-cfdb-4e29-b72b-c924700c0714", - "route": "/api/stat", - "status": 200, - "serverMs": 4, - "firstByteMs": 3.681464, - "bytes": 69, - "stagesMs": {} - }, - { - "requestID": "64060c5d-3f84-439c-8231-1cc46c0e851f", - "route": "/api/stat/history", - "status": 200, - "serverMs": 3, - "firstByteMs": 2.959255, - "bytes": 105, - "stagesMs": {} - }, - { - "requestID": "94b6fec2-2574-4f84-a895-9554c004526d", - "route": "/api/stat/history", - "status": 200, - "serverMs": 3, - "firstByteMs": 2.902058, - "bytes": 105, - "stagesMs": {} - }, - { - "requestID": "cdc2246f-d274-44d2-ad43-a4ff393c6780", - "route": "/api/stat/history", - "status": 200, - "serverMs": 3, - "firstByteMs": 2.962714, - "bytes": 105, - "stagesMs": {} - }, - { - "requestID": "2581f829-d790-4651-bef3-a824fbe254d0", - "route": "/api/stat/history", - "status": 200, - "serverMs": 3, - "firstByteMs": 2.692596, - "bytes": 105, - "stagesMs": {} - }, - { - "requestID": "668ab4b7-68c0-42a2-9c05-087e35a2837e", - "route": "/api/stat/history", - "status": 200, - "serverMs": 3, - "firstByteMs": 3.102504, - "bytes": 105, - "stagesMs": {} - }, - { - "requestID": "1d19cfcf-f558-4f05-a336-102f569dbd26", - "route": "/api/stat/history", - "status": 200, - "serverMs": 1, - "firstByteMs": 0.834132, - "bytes": 105, - "stagesMs": {} - }, - { - "requestID": "feec70e7-9cd6-44f5-aa0f-8fc213b11d43", - "route": "/api/stat/history", - "status": 200, - "serverMs": 1, - "firstByteMs": 0.818515, - "bytes": 105, - "stagesMs": {} - }, - { - "requestID": "4d08d212-679f-4f7a-8e9c-5285730e8caa", - "route": "/api/stat/history", - "status": 200, - "serverMs": 1, - "firstByteMs": 0.921505, - "bytes": 105, - "stagesMs": {} - }, - { - "requestID": "fbafa353-6e82-47c5-bddd-5bb6668079ad", - "route": "/api/user/dashboard", - "status": 200, - "serverMs": 28, - "firstByteMs": 28.129418, - "bytes": 64, - "stagesMs": {} - }, - { - "requestID": "075f0be3-8343-4b04-a9d8-4394bee5fa71", - "route": "/api/user/dashboard", - "status": 200, - "serverMs": 24, - "firstByteMs": 23.699666, - "bytes": 64, - "stagesMs": {} - }, - { - "requestID": "f2e8517f-cd36-4f1c-9f7a-dc457b47dd97", - "route": "/api/user/dashboard", - "status": 400, - "serverMs": 5, - "firstByteMs": 5.369061, - "bytes": 24, - "stagesMs": {} - }, - { - "requestID": "bcc47c96-df48-4eb1-a383-9cbfe7188ed4", - "route": "/api/user/dashboard", - "status": 400, - "serverMs": 5, - "firstByteMs": 5.418577, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "638ec003-4d84-4226-ab6f-1e828124f371", - "route": "/api/user/dashboard", - "status": 200, - "serverMs": 24, - "firstByteMs": 24.266988, - "bytes": 796, - "stagesMs": {} - }, - { - "requestID": "433d7820-4c6d-45b1-9e1c-325a8241661b", - "route": "/api/user/dashboard", - "status": 200, - "serverMs": 24, - "firstByteMs": 23.758569, - "bytes": 796, - "stagesMs": {} - }, - { - "requestID": "6dc40c5a-9230-438b-bf30-68b12c94b070", - "route": "/api/user/dashboard", - "status": 200, - "serverMs": 22, - "firstByteMs": 22.376239, - "bytes": 796, - "stagesMs": {} - }, - { - "requestID": "8c9950bf-d1d8-4422-a05b-28db351a1575", - "route": "/api/user/dashboard", - "status": 200, - "serverMs": 21, - "firstByteMs": 21.07192, - "bytes": 796, - "stagesMs": {} - }, - { - "requestID": "0d725769-abb8-4794-abff-8d44af2cb2d8", - "route": "/api/user/dashboard", - "status": 200, - "serverMs": 21, - "firstByteMs": 20.529742, - "bytes": 796, - "stagesMs": {} - }, - { - "requestID": "f26ffef6-16e3-424c-aa7b-763288c40993", - "route": "/api/user/dashboard", - "status": 400, - "serverMs": 5, - "firstByteMs": 5.359351, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "53278c5f-eaa6-423f-b7fe-ac1edb30c007", - "route": "/api/admin/performance", - "status": 200, - "serverMs": 78, - "firstByteMs": 73.049536, - "bytes": 7263, - "stagesMs": {} - }, - { - "requestID": "2d11ff4a-ffa6-4938-a033-9001a369b24e", - "route": "/api/admin/performance", - "status": 200, - "serverMs": 74, - "firstByteMs": 68.953448, - "bytes": 7266, - "stagesMs": {} - }, - { - "requestID": "a14d5fdd-f19e-4d43-b6ff-dd47ff835f42", - "route": "/api/admin/performance", - "status": 200, - "serverMs": 56, - "firstByteMs": 52.810276, - "bytes": 4520, - "stagesMs": {} - }, - { - "requestID": "3b65497d-e040-4c68-92f4-45903daf3b7d", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 10, - "firstByteMs": 8.655103, - "bytes": 570, - "stagesMs": {} - }, - { - "requestID": "0ff02af0-8290-4148-8932-332192d01520", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 6, - "firstByteMs": 4.846678, - "bytes": 223, - "stagesMs": {} - }, - { - "requestID": "19e659e1-9fa6-4715-988b-49653947ed94", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 4, - "firstByteMs": 3.623757, - "bytes": 51, - "stagesMs": {} - }, - { - "requestID": "64d056d6-d9a6-4762-9585-9af69fac2e44", - "route": "/api/admin/queues/metrics", - "status": 404, - "serverMs": 4, - "firstByteMs": 3.943426, - "bytes": 27, - "stagesMs": {} - }, - { - "requestID": "01571fd9-527d-431e-8c30-e32127178e0e", - "route": "/api/admin/queues", - "status": 200, - "serverMs": 21, - "firstByteMs": 19.898562, - "bytes": 784, - "stagesMs": {} - }, - { - "requestID": "dda97d3f-aa1c-420c-bee6-87e69271b49d", - "route": "/api/admin/errors", - "status": 200, - "serverMs": 8, - "firstByteMs": 6.165073, - "bytes": 652, - "stagesMs": {} - }, - { - "requestID": "225b54af-e04b-4505-8b78-068e4d4838da", - "route": "/api/repo/:owner/:repo", - "status": 400, - "serverMs": 5, - "firstByteMs": 4.675642, - "bytes": 30, - "stagesMs": {} - }, - { - "requestID": "76d63dc3-545d-41bb-9d14-8f7a3a8422d7", - "route": "/api/repo/:owner/:repo", - "status": 400, - "serverMs": 4, - "firstByteMs": 4.23682, - "bytes": 30, - "stagesMs": {} - }, - { - "requestID": "ae2be23a-0344-4994-b36b-1ae4969c54a5", - "route": "/api/repo/:owner/:repo", - "status": 400, - "serverMs": 5, - "firstByteMs": 4.563555, - "bytes": 30, - "stagesMs": {} - }, - { - "requestID": "5ecdfa39-7f05-454f-b43a-b88d6a132f24", - "route": "/api/repo/:owner/:repo", - "status": 500, - "serverMs": 6, - "firstByteMs": 5.9245, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "3ffece1a-bacd-4467-bfcc-74a440a07883", - "route": "/api/repo/:owner/:repo", - "status": 500, - "serverMs": 4, - "firstByteMs": 3.967291, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "b5c9e73f-2d7d-4d09-91ed-9f6bfe893c0a", - "route": "/api/repo/:owner/:repo", - "status": 500, - "serverMs": 5, - "firstByteMs": 4.687208, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "a2bd2ebe-f9b4-44ad-9659-760a969457db", - "route": "/api/user/search/github-users", - "status": 200, - "serverMs": 4, - "firstByteMs": 4.168474, - "bytes": 2, - "stagesMs": {} - }, - { - "requestID": "947b52fa-bd8f-41a6-9937-ba7a759aec78", - "route": "/api/user/search/github-users", - "status": 200, - "serverMs": 4, - "firstByteMs": 4.058467, - "bytes": 2, - "stagesMs": {} - }, - { - "requestID": "7a7a5f15-3cca-4faf-9b41-cb374e26b255", - "route": "/api/user/search/github-users", - "status": 500, - "serverMs": 9, - "firstByteMs": 9.163938, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "7ec747e3-6ed3-4082-8e6e-de3ded0e87e9", - "route": "/api/user/search/github-users", - "status": 500, - "serverMs": 8, - "firstByteMs": 8.021576, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "872e93dc-9e01-4346-85dd-8cfff466cdb6", - "route": "/api/user/search/github-users", - "status": 500, - "serverMs": 5, - "firstByteMs": 5.187688, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "4b57030e-a02c-487a-a2eb-9a67a9294a1f", - "route": "/api/admin/repos", - "status": 200, - "serverMs": 11, - "firstByteMs": 10.09854, - "bytes": 1039, - "stagesMs": {} - }, - { - "requestID": "18a1c29b-48e6-4b0f-9988-887fbafdcd97", - "route": "/api/admin/repos", - "status": 200, - "serverMs": 10, - "firstByteMs": 9.840329, - "bytes": 193, - "stagesMs": {} - }, - { - "requestID": "01b023bd-b119-4d0b-99a7-a540af58663d", - "route": "/api/admin/repos", - "status": 500, - "serverMs": 5, - "firstByteMs": 5.329234, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "3db51337-cdd2-4094-ab37-0a112554f7b8", - "route": "/api/admin/repos", - "status": 500, - "serverMs": 6, - "firstByteMs": 6.140133, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "280cddd2-5603-4bb3-af07-8201621b091f", - "route": "/api/admin/users", - "status": 200, - "serverMs": 10, - "firstByteMs": 9.618834, - "bytes": 106, - "stagesMs": {} - }, - { - "requestID": "f8a3608f-bf7e-48b8-8858-3987d893ec11", - "route": "/api/admin/users", - "status": 200, - "serverMs": 9, - "firstByteMs": 8.997398, - "bytes": 112, - "stagesMs": {} - }, - { - "requestID": "ab67ae6a-fd51-4bff-9a0d-45b9cec233e3", - "route": "/api/admin/users", - "status": 500, - "serverMs": 7, - "firstByteMs": 7.241658, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "d33f6f0a-2f73-4ac2-b2e7-249dff9476a6", - "route": "/api/admin/users", - "status": 500, - "serverMs": 5, - "firstByteMs": 4.813884, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "e1f2edc7-6eb9-4ccb-b882-839c44e27ee7", - "route": "/api/admin/users", - "status": 500, - "serverMs": 7, - "firstByteMs": 7.392658, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "d7775c64-6dc2-40fd-a340-988f9b69f3f5", - "route": "/api/admin/conferences", - "status": 200, - "serverMs": 10, - "firstByteMs": 10.022769, - "bytes": 80, - "stagesMs": {} - }, - { - "requestID": "1d96d6e4-87a2-42e6-8113-9b05432e77d2", - "route": "/api/admin/conferences", - "status": 200, - "serverMs": 10, - "firstByteMs": 10.421779, - "bytes": 86, - "stagesMs": {} - }, - { - "requestID": "b8554b09-5ee5-42f6-b202-3413d3d67d05", - "route": "/api/admin/conferences", - "status": 500, - "serverMs": 5, - "firstByteMs": 4.643804, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "ff5a77fe-780f-48da-84ed-78f12302464b", - "route": "/api/admin/conferences", - "status": 500, - "serverMs": 5, - "firstByteMs": 4.938965, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "37b2bfc6-2104-4d22-a7bb-66d4ee9961d7", - "route": "/api/admin/repos", - "status": 200, - "serverMs": 12, - "firstByteMs": 10.259526, - "bytes": 837, - "stagesMs": {} - }, - { - "requestID": "91bba8e1-d3a9-4493-b9bf-e23a2b3e4125", - "route": "/api/admin/repos", - "status": 200, - "serverMs": 13, - "firstByteMs": 11.460537, - "bytes": 857, - "stagesMs": {} - }, - { - "requestID": "d74d4aa3-ac32-4967-8b70-e3475074a9ba", - "route": "/api/admin/conferences", - "status": 200, - "serverMs": 9, - "firstByteMs": 8.919759, - "bytes": 80, - "stagesMs": {} - }, - { - "requestID": "e03c2601-b58f-47d4-b2b3-b74be49ceb6e", - "route": "/api/admin/conferences", - "status": 200, - "serverMs": 8, - "firstByteMs": 8.186046, - "bytes": 117, - "stagesMs": {} - }, - { - "requestID": "f2f928b4-b54c-4192-9a5a-ec10e13fb666", - "route": "/api/admin/repos", - "status": 500, - "serverMs": 5, - "firstByteMs": 4.588386, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "38d707db-111c-46cd-8e06-e18710160f88", - "route": "/api/admin/users", - "status": 500, - "serverMs": 4, - "firstByteMs": 4.483866, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "910049e5-0b15-4bd7-98b9-ddc50890505d", - "route": "/api/admin/conferences", - "status": 500, - "serverMs": 4, - "firstByteMs": 4.314188, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "39484c6c-bd84-45e0-8d14-eb052d197471", - "route": "/api/admin/users", - "status": 200, - "serverMs": 9, - "firstByteMs": 9.21267, - "bytes": 99, - "stagesMs": {} - }, - { - "requestID": "6ecebf3b-6f71-4a6e-b36f-2c45f94a5ac9", - "route": "/api/admin/users", - "status": 200, - "serverMs": 10, - "firstByteMs": 9.748586, - "bytes": 553, - "stagesMs": {} - }, - { - "requestID": "4ba48e4d-a816-4882-bfc4-06a0f3535147", - "route": "/api/admin/users", - "status": 500, - "serverMs": 4, - "firstByteMs": 4.325513, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "c88017da-3a77-41b0-ab8f-d5e7aa0aeb31", - "route": "/api/admin/users", - "status": 500, - "serverMs": 6, - "firstByteMs": 6.167603, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "9de24de7-b0d4-4ce5-a5dd-159b4557cd99", - "route": "/api/admin/repos", - "status": 500, - "serverMs": 4, - "firstByteMs": 4.329592, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "061bb9e9-da4b-4fe6-9594-7bba431a0cf4", - "route": "/api/admin/repos", - "status": 500, - "serverMs": 5, - "firstByteMs": 4.604586, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "d741f39c-540b-4123-bafd-9102c39a0214", - "route": "/api/admin/repos", - "status": 200, - "serverMs": 16, - "firstByteMs": 14.036772, - "bytes": 2382, - "stagesMs": {} - }, - { - "requestID": "744b538e-aa6e-4921-8d4d-c8a79dbf93b8", - "route": "/api/admin/repos", - "status": 200, - "serverMs": 10, - "firstByteMs": 10.068702, - "bytes": 156, - "stagesMs": {} - }, - { - "requestID": "9e82eeae-6c5e-4178-8140-2bf69243d432", - "route": "/api/admin/repos", - "status": 500, - "serverMs": 5, - "firstByteMs": 4.770102, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "7d606480-35e0-4888-81a4-943d41d2ceb0", - "route": "/api/admin/users", - "status": 200, - "serverMs": 10, - "firstByteMs": 9.59971, - "bytes": 458, - "stagesMs": {} - }, - { - "requestID": "c54af911-aed9-4603-9e51-84da130c1a6d", - "route": "/api/admin/users", - "status": 200, - "serverMs": 10, - "firstByteMs": 10.008753, - "bytes": 129, - "stagesMs": {} - }, - { - "requestID": "3c7bdc0b-9fc0-494a-9734-42782e2c2d2d", - "route": "/api/admin/users", - "status": 500, - "serverMs": 5, - "firstByteMs": 4.58098, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "d85361b8-6fdc-419a-924f-b0c7eeaf8e0b", - "route": "/api/admin/conferences", - "status": 200, - "serverMs": 10, - "firstByteMs": 9.596624, - "bytes": 138, - "stagesMs": {} - }, - { - "requestID": "0ae98985-b98e-4cdd-9f77-57335c450f43", - "route": "/api/admin/conferences", - "status": 200, - "serverMs": 8, - "firstByteMs": 8.24132, - "bytes": 138, - "stagesMs": {} - }, - { - "requestID": "a3edad0e-88d4-4ef6-ac71-f03ba358216b", - "route": "/api/admin/conferences", - "status": 500, - "serverMs": 6, - "firstByteMs": 6.213549, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "53b21ee9-39b4-47bd-898b-61b0948b5f3e", - "route": "/github/connections", - "status": 200, - "serverMs": 494, - "firstByteMs": 494.446517, - "bytes": 456, - "stagesMs": {} - }, - { - "requestID": "af059503-2428-4ea1-829d-90519251a941", - "route": "/api/admin/tokens", - "status": 200, - "serverMs": 7, - "firstByteMs": 6.565489, - "bytes": 186, - "stagesMs": {} - }, - { - "requestID": "726f9d29-54ff-4bf7-839f-a8192c97d97d", - "route": "/api/user", - "status": 200, - "serverMs": 6, - "firstByteMs": 5.721991, - "bytes": 100, - "stagesMs": {} - }, - { - "requestID": "e92b1842-d7eb-422d-b48b-c73164df24f3", - "route": "/api/admin/tokens/:id", - "status": 200, - "serverMs": 7, - "firstByteMs": 7.313204, - "bytes": 13, - "stagesMs": {} - }, - { - "requestID": "a7c08557-34b6-4ece-8968-7f78fde5bd29", - "route": "/api/user", - "status": 401, - "serverMs": 3, - "firstByteMs": 3.30016, - "bytes": 25, - "stagesMs": {} - }, - { - "requestID": "ca0013d8-6103-45a3-ba97-db164bc8403d", - "route": "/github/login-token", - "status": 200, - "serverMs": 7, - "firstByteMs": 7.160521, - "bytes": 33, - "stagesMs": {} - }, - { - "requestID": "19b71bb3-efb6-4ec8-8501-61621cce2822", - "route": "/api/user", - "status": 200, - "serverMs": 3, - "firstByteMs": 2.611496, - "bytes": 100, - "stagesMs": {} - }, - { - "requestID": "70439e9e-d990-4560-97b0-d926e9a67b82", - "route": "/api/user/logout", - "status": 302, - "serverMs": 4, - "firstByteMs": 3.523178, - "bytes": 24, - "stagesMs": {} - }, - { - "requestID": "0f4bc20b-aa09-453c-a7e7-f87a357f883f", - "route": "/api/user", - "status": 401, - "serverMs": 1, - "firstByteMs": 1.321191, - "bytes": 25, - "stagesMs": {} - }, - { - "requestID": "6270d975-1c6a-4b3f-aaa5-3a2f3e5eb1aa", - "route": "/api/anonymize-preview", - "status": 200, - "serverMs": 6, - "firstByteMs": 5.613284, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "54bd75b1-921d-4089-bdcd-dc24176112a5", - "route": "/api/providers/:provider/repository/metadata", - "status": 200, - "serverMs": 4181, - "firstByteMs": 4181.287241, - "bytes": 230, - "stagesMs": {} - }, - { - "requestID": "d97b6354-76ba-4340-9e2f-60fdd97808b5", - "route": "/api/providers/:provider/repository/branches", - "status": 200, - "serverMs": 3893, - "firstByteMs": 3891.839768, - "bytes": 998, - "stagesMs": {} - }, - { - "requestID": "2ec1959c-4186-4afe-9627-b2faeecfaa17", - "route": "/api/providers/:provider/repository/readme", - "status": 200, - "serverMs": 3142, - "firstByteMs": 3140.241054, - "bytes": 878, - "stagesMs": {} - }, - { - "requestID": "f505a581-c148-4b22-9352-66e16faeb877", - "route": "/api/repo", - "status": 200, - "serverMs": 3812, - "firstByteMs": 3812.272881, - "bytes": 22, - "stagesMs": {} - }, - { - "requestID": "72ae305c-58e0-4cd3-9d6e-70d242181b69", - "route": "/api/repo/:id", - "status": 200, - "serverMs": 8, - "firstByteMs": 7.698465, - "bytes": 510, - "stagesMs": { - "repository": 1.439927 - } - }, - { - "requestID": "a6cec650-5380-42ea-a3c3-2468b21beec6", - "route": "/api/repo/:id/file/*path", - "status": 200, - "serverMs": 893, - "firstByteMs": 889.886436, - "bytes": 672, - "stagesMs": { - "anonymize": 27.876255, - "authorization": 752.4870450000001, - "cache_fill": 71.756206, - "cache_lookup": 16.49538, - "repository": 2.063652, - "worker_wait": 0.034744 - } - }, - { - "requestID": "d369f74d-fecd-47ef-93a0-bebac30c0b8d", - "route": "/api/repo/:id/files", - "status": 200, - "serverMs": 9, - "firstByteMs": 8.610058, - "bytes": 170, - "stagesMs": { - "repository": 2.676605 - } - }, - { - "requestID": "fd295b18-a3be-4b65-b21e-9ef778fddf9b", - "route": "/api/repo/:id/zip", - "status": 200, - "serverMs": 4306, - "firstByteMs": 1083.996948, - "bytes": 7191, - "stagesMs": { - "anonymize": 93.402253, - "authorization": 4008.9351109999993, - "cache_fill": 150.713493, - "cache_lookup": 10.822088999999997, - "repository": 2.624579, - "worker_wait": 0.16653400000000002 - } - }, - { - "requestID": "f06eb5d9-969d-4ff9-8f0e-59e3e544e59d", - "route": "/api/repo/:id/file/*path", - "status": 200, - "serverMs": 746, - "firstByteMs": 742.055237, - "bytes": 672, - "stagesMs": { - "authorization": 715.369291, - "cache_lookup": 1.793412, - "repository": 3.119938 - } - }, - { - "requestID": "d8609a19-5327-4c1c-bb9a-782239026e79", - "route": "/api/repo/:id/zip", - "status": 200, - "serverMs": 4164, - "firstByteMs": 1183.704552, - "bytes": 7191, - "stagesMs": { - "authorization": 4064.352192, - "cache_lookup": 9.824442999999999, - "repository": 2.336939 - } - }, - { - "requestID": "61d1b4cc-f4b1-42a4-8a75-9afefa20668c", - "route": "/api/repo/:id/file/*path", - "status": 200, - "serverMs": 775, - "firstByteMs": 771.519567, - "bytes": 672, - "stagesMs": { - "authorization": 745.033276, - "cache_lookup": 2.046486, - "repository": 2.856819 - } - }, - { - "requestID": "7c99e12e-4ab2-4beb-921d-38985c9d5113", - "route": "/api/repo/:id/zip", - "status": 200, - "serverMs": 3991, - "firstByteMs": 1084.304867, - "bytes": 7191, - "stagesMs": { - "authorization": 3895.3846, - "cache_lookup": 10.064980000000002, - "repository": 2.229816 - } - }, - { - "requestID": "a5410fa3-955f-4ffc-acc2-a78fe3afb0db", - "route": "/api/admin/performance", - "status": 200, - "serverMs": 76, - "firstByteMs": 72.205997, - "bytes": 4541, - "stagesMs": {} - }, - { - "requestID": "d7e2aa73-317b-40b7-97eb-e0916c694424", - "route": "/api/user", - "status": 401, - "serverMs": 3, - "firstByteMs": 3.21844, - "bytes": 25, - "stagesMs": {} - }, - { - "requestID": "ed62154f-8f69-4b44-acc2-8fa67979513c", - "route": "/api/repo/:id", - "status": 200, - "serverMs": 12, - "firstByteMs": 12.009055, - "bytes": 21, - "stagesMs": { - "repository": 1.68094 - } - }, - { - "requestID": "3cd884a3-4be9-4ad6-a6ed-6958897d690e", - "route": "/api/repo/:id", - "status": 200, - "serverMs": 7, - "firstByteMs": 7.386974, - "bytes": 560, - "stagesMs": { - "repository": 1.811207 - } - }, - { - "requestID": "d261bd28-bc69-4f82-8f58-947fe35770c1", - "route": "/api/repo/:id", - "status": 200, - "serverMs": 8, - "firstByteMs": 8.033946, - "bytes": 559, - "stagesMs": { - "repository": 1.733145 - } - }, - { - "requestID": "f8032c55-bf39-4407-92f2-b519b23167dc", - "route": "/api/repo/:id/file/*path", - "status": 410, - "serverMs": 3, - "firstByteMs": 3.257188, - "bytes": 30, - "stagesMs": { - "repository": 2.15788 - } - }, - { - "requestID": "115dd032-2e6d-4a7a-a014-9fa95f174d1d", - "route": "/api/user", - "status": 401, - "serverMs": 6, - "firstByteMs": 6.289573, - "bytes": 25, - "stagesMs": {} - } - ], - "summary": { - "/api/repo/:id/file/*path": { - "serverMs": [ - 893, - 746, - 775 - ], - "medianServerMs": 775, - "authorizationMs": [ - 752.4870450000001, - 715.369291, - 745.033276 - ] - }, - "/api/repo/:id/zip": { - "serverMs": [ - 4306, - 4164, - 3991 - ], - "medianServerMs": 4164, - "authorizationMs": [ - 4008.9351109999993, - 4064.352192, - 3895.3846 - ] - } - } -} \ No newline at end of file diff --git a/backend/reports/zip-stream-before.json b/backend/reports/zip-stream-before.json deleted file mode 100644 index 0b1bf07..0000000 --- a/backend/reports/zip-stream-before.json +++ /dev/null @@ -1,2830 +0,0 @@ -{ - "deploymentChecks": { - "verifiedAt": "2026-11-03T20:16:47.721Z", - "hostname": "beta.durieux.me", - "configurationMode": "GitHub App enabled alongside legacy OAuth", - "checks": [ - { - "method": "GET", - "route": "/api/user", - "requestID": "400f0a29-e3b3-4b85-8e9b-1dbae607a274", - "status": 401, - "expected": 401, - "bytes": 25, - "headersMs": 287, - "firstBodyByteMs": 290, - "elapsedMs": 302 - }, - { - "method": "GET", - "route": "/api/user", - "requestID": "4c6a94b5-2a59-4b10-9e72-a675cd97969a", - "status": 200, - "expected": 200, - "bytes": 100, - "headersMs": 93, - "firstBodyByteMs": 98, - "elapsedMs": 99 - }, - { - "method": "GET", - "route": "/github/connections", - "requestID": "68048bd5-883a-47b5-9d14-6c36bdaf7ead", - "status": 200, - "expected": 200, - "bytes": 456, - "headersMs": 625, - "firstBodyByteMs": 631, - "elapsedMs": 632 - }, - { - "method": "GET", - "route": "/api/providers", - "requestID": "742223fa-1d4a-43ac-8388-804c3326db9c", - "status": 200, - "expected": 200, - "bytes": 144, - "headersMs": 48, - "firstBodyByteMs": 50, - "elapsedMs": 51 - }, - { - "method": "GET", - "route": "/api/user/dashboard", - "requestID": "08b394f7-5b3a-4cfd-a188-e27ffecff4ea", - "status": 200, - "expected": 200, - "bytes": 796, - "headersMs": 66, - "firstBodyByteMs": 68, - "elapsedMs": 69 - }, - { - "method": "GET", - "route": "/api/user/default", - "requestID": "3f137d13-bd72-4c22-bdb0-18a8fca2a30d", - "status": 200, - "expected": 200, - "bytes": 25, - "headersMs": 36, - "firstBodyByteMs": 36, - "elapsedMs": 37 - }, - { - "method": "GET", - "route": "/api/user/quota", - "requestID": "5b88b744-982d-424e-80d7-75a38db6001a", - "status": 200, - "expected": 200, - "bytes": 115, - "headersMs": 38, - "firstBodyByteMs": 39, - "elapsedMs": 41 - }, - { - "method": "GET", - "route": "/api/admin/overview", - "requestID": "0e7b344a-8d38-4293-8a41-d7c816792d86", - "status": 200, - "expected": 200, - "bytes": 1142, - "headersMs": 130, - "firstBodyByteMs": 132, - "elapsedMs": 137 - }, - { - "method": "GET", - "route": "/api/admin/users", - "requestID": "0427e4b2-c92a-4594-a3e2-aeee3e02fe99", - "status": 200, - "expected": 200, - "bytes": 526, - "headersMs": 49, - "firstBodyByteMs": 51, - "elapsedMs": 51 - }, - { - "method": "GET", - "route": "/api/admin/repos", - "requestID": "d1812e2b-c18e-41dc-9e56-882bd3d81efc", - "status": 200, - "expected": 200, - "bytes": 12037, - "headersMs": 68, - "firstBodyByteMs": 70, - "elapsedMs": 72 - }, - { - "method": "GET", - "route": "/api/admin/queues", - "requestID": "53938df5-7375-498d-90e7-b58aa87e2e75", - "status": 200, - "expected": 200, - "bytes": 5239, - "headersMs": 51, - "firstBodyByteMs": 52, - "elapsedMs": 53 - }, - { - "method": "GET", - "route": "/api/admin/performance", - "requestID": "762f674d-4fc8-4412-b310-436743d5fc3f", - "status": 200, - "expected": 200, - "bytes": 37207, - "headersMs": 74, - "firstBodyByteMs": 75, - "elapsedMs": 80 - }, - { - "method": "GET", - "route": "/api/admin/errors", - "requestID": "f64bff45-83fe-4c8a-83fc-a773a1f13709", - "status": 200, - "expected": 200, - "bytes": 57748, - "headersMs": 43, - "firstBodyByteMs": 44, - "elapsedMs": 48 - }, - { - "method": "GET", - "route": "/api/admin/errors/stats", - "requestID": "215f27e4-dac5-4f43-b56d-7503bde65e66", - "status": 200, - "expected": 200, - "bytes": 1394, - "headersMs": 34, - "firstBodyByteMs": 36, - "elapsedMs": 37 - }, - { - "method": "GET", - "route": "/api/admin/tokens", - "requestID": "b9eafa59-d9a2-47bd-8505-5341225f3cf3", - "status": 200, - "expected": 200, - "bytes": 160, - "headersMs": 39, - "firstBodyByteMs": 41, - "elapsedMs": 42 - }, - { - "method": "GET", - "route": "/api/admin/errors?limit=5001", - "requestID": "30f105a8-23fb-4eaa-b044-84f8b39e9199", - "status": 200, - "expected": 200, - "bytes": 148894, - "headersMs": 75, - "firstBodyByteMs": 79, - "elapsedMs": 88 - }, - { - "method": "GET", - "route": "/api/admin/errors/stats", - "requestID": "37b9fa73-855a-4631-9246-64b74097fbaf", - "status": 200, - "expected": 200, - "bytes": 1394, - "headersMs": 46, - "firstBodyByteMs": 47, - "elapsedMs": 47 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793737007722-missing", - "requestID": "27e5c6a6-bd17-47b7-946a-95d5dcc36c07", - "status": 404, - "expected": 404, - "bytes": 26, - "headersMs": 37, - "firstBodyByteMs": 37, - "elapsedMs": 39 - }, - { - "method": "GET", - "route": "/api/admin/errors/stats", - "requestID": "9e0815e3-5d8a-4155-a331-504045fcc5a2", - "status": 200, - "expected": 200, - "bytes": 1394, - "headersMs": 89, - "firstBodyByteMs": 90, - "elapsedMs": 91 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=download&range=1h", - "requestID": "3a92e15d-2e87-4569-b21f-43a875cde858", - "status": 200, - "expected": 200, - "bytes": 3416, - "headersMs": 35, - "firstBodyByteMs": 36, - "elapsedMs": 36 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=download&range=6h", - "requestID": "d53da646-dd31-47ce-ba90-6c247410835d", - "status": 200, - "expected": 200, - "bytes": 20216, - "headersMs": 63, - "firstBodyByteMs": 64, - "elapsedMs": 65 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=download&range=24h", - "requestID": "dcdd32d0-7773-4ff4-862d-6f069cadb45e", - "status": 200, - "expected": 200, - "bytes": 80726, - "headersMs": 53, - "firstBodyByteMs": 54, - "elapsedMs": 56 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=download&range=7d", - "requestID": "655a2afe-cda5-42a7-ae4d-37a9dd37554b", - "status": 200, - "expected": 200, - "bytes": 564565, - "headersMs": 140, - "firstBodyByteMs": 141, - "elapsedMs": 166 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=remove&range=1h", - "requestID": "53e752cc-060b-41d7-86fd-abfff38f1a04", - "status": 200, - "expected": 200, - "bytes": 3406, - "headersMs": 50, - "firstBodyByteMs": 51, - "elapsedMs": 51 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=cache&range=1h", - "requestID": "28926246-7b4c-4d2b-9848-46086fa0f931", - "status": 200, - "expected": 200, - "bytes": 3401, - "headersMs": 52, - "firstBodyByteMs": 53, - "elapsedMs": 53 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=download&range=unrecognized", - "requestID": "ff359870-e74c-44d3-bdb9-56377bf0b114", - "status": 200, - "expected": 200, - "bytes": 3426, - "headersMs": 47, - "firstBodyByteMs": 48, - "elapsedMs": 49 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=unknown", - "requestID": "6b6b8e76-1297-4928-b475-8cd7d6305d0f", - "status": 404, - "expected": 404, - "bytes": 27, - "headersMs": 31, - "firstBodyByteMs": 31, - "elapsedMs": 31 - }, - { - "method": "GET", - "route": "/api/stat", - "requestID": "2ad31117-6aa0-4251-a730-33c1eca6abb1", - "status": 200, - "expected": 200, - "bytes": 69, - "headersMs": 46, - "firstBodyByteMs": 48, - "elapsedMs": 48 - }, - { - "method": "GET", - "route": "/api/stat/history?days=-2", - "requestID": "482dd0fb-6414-45ce-8e45-0bbc7ffa4aaa", - "status": 200, - "expected": 200, - "bytes": 105, - "headersMs": 26, - "firstBodyByteMs": 28, - "elapsedMs": 28 - }, - { - "method": "GET", - "route": "/api/stat/history?days=0", - "requestID": "564470c3-d228-4993-99f6-6773f2fe2aab", - "status": 200, - "expected": 200, - "bytes": 105, - "headersMs": 62, - "firstBodyByteMs": 63, - "elapsedMs": 63 - }, - { - "method": "GET", - "route": "/api/stat/history?days=0x10", - "requestID": "5dcf1945-144f-4bd1-8592-39a1e3d75b44", - "status": 200, - "expected": 200, - "bytes": 105, - "headersMs": 28, - "firstBodyByteMs": 29, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/api/stat/history?days=7suffix", - "requestID": "0b20e47f-ec51-471a-b68f-965deeb38d32", - "status": 200, - "expected": 200, - "bytes": 105, - "headersMs": 37, - "firstBodyByteMs": 38, - "elapsedMs": 39 - }, - { - "method": "GET", - "route": "/api/stat/history?days=999", - "requestID": "58188d89-3466-4271-be5b-eaa06c91e6c1", - "status": 200, - "expected": 200, - "bytes": 105, - "headersMs": 30, - "firstBodyByteMs": 31, - "elapsedMs": 31 - }, - { - "method": "GET", - "route": "/api/stat/history?days[]=7&days[]=30", - "requestID": "00fd100e-b3b9-4f29-9257-ebb2e033a000", - "status": 200, - "expected": 200, - "bytes": 105, - "headersMs": 55, - "firstBodyByteMs": 56, - "elapsedMs": 57 - }, - { - "method": "GET", - "route": "/api/stat/history?days[1]=7&days[0]=1", - "requestID": "92e329a3-aea0-404a-8ae2-db2b2f9699e7", - "status": 200, - "expected": 200, - "bytes": 105, - "headersMs": 26, - "firstBodyByteMs": 27, - "elapsedMs": 27 - }, - { - "method": "GET", - "route": "/api/stat/history?days[x]=7", - "requestID": "b29d1fc4-df48-492a-85c4-f2ab3029d73e", - "status": 200, - "expected": 200, - "bytes": 105, - "headersMs": 27, - "firstBodyByteMs": 28, - "elapsedMs": 28 - }, - { - "method": "GET", - "route": "/api/user/dashboard?statuses[]=", - "requestID": "4a9e73cc-451d-40d2-9da7-b798adfd1fa1", - "status": 200, - "expected": 200, - "bytes": 64, - "headersMs": 39, - "firstBodyByteMs": 40, - "elapsedMs": 41 - }, - { - "method": "GET", - "route": "/api/user/dashboard?type[]=repo", - "requestID": "e4a80821-cc2b-4e14-af0d-2031c6fcaecd", - "status": 200, - "expected": 200, - "bytes": 64, - "headersMs": 46, - "firstBodyByteMs": 48, - "elapsedMs": 48 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort[]=", - "requestID": "59d42aa4-0892-4b9f-a7d4-e51197cacf3f", - "status": 400, - "expected": 400, - "bytes": 24, - "headersMs": 32, - "firstBodyByteMs": 32, - "elapsedMs": 32 - }, - { - "method": "GET", - "route": "/api/user/dashboard?cursor[]=", - "requestID": "1e02a6a8-b409-4ed4-8da1-c2e4edb3939a", - "status": 400, - "expected": 400, - "bytes": 26, - "headersMs": 47, - "firstBodyByteMs": 47, - "elapsedMs": 47 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort=anonymizeDate&limit=5&cursor=eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDEiLCJ2YWx1ZSI6IjIwMjQtMDMtMDFUMDA6MDA6MDAuMDAwWiJ9", - "requestID": "316462c6-698e-4d9e-96df-9f2db5e3fef8", - "status": 200, - "expected": 200, - "bytes": 796, - "headersMs": 51, - "firstBodyByteMs": 52, - "elapsedMs": 52 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort=anonymizeDate&limit=5&cursor=eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDEiLCJ2YWx1ZSI6Ik1hcmNoIDEgMjAyNCJ9", - "requestID": "bcc47d87-4981-4e42-af95-4cb851a3cc52", - "status": 200, - "expected": 200, - "bytes": 796, - "headersMs": 80, - "firstBodyByteMs": 83, - "elapsedMs": 85 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort=anonymizeDate&limit=5&cursor=eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDEiLCJ2YWx1ZSI6IjIwMjQtMDItMzAifQ", - "requestID": "789bd6d0-0954-4908-9d9d-61ec8740bebf", - "status": 200, - "expected": 200, - "bytes": 796, - "headersMs": 51, - "firstBodyByteMs": 52, - "elapsedMs": 52 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort=anonymizeDate&limit=5&cursor=eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMjQ6MDA6MDBaIn0", - "requestID": "cdd8fb80-2a97-4cfb-a7cc-5357326de718", - "status": 200, - "expected": 200, - "bytes": 796, - "headersMs": 44, - "firstBodyByteMs": 45, - "elapsedMs": 45 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort=anonymizeDate&limit=5&cursor=eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDEiLCJ2YWx1ZSI6WyIyMDI0IiwiMyIsIjEiXX0", - "requestID": "d9033b3d-1291-4623-847e-d2a3ccc0dc16", - "status": 200, - "expected": 200, - "bytes": 796, - "headersMs": 47, - "firstBodyByteMs": 48, - "elapsedMs": 48 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort=anonymizeDate&limit=5&cursor=eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDEiLCJ2YWx1ZSI6Im5vdCBhIGRhdGUifQ", - "requestID": "7aa0261d-b0a7-4c7e-aebe-be493fbaede5", - "status": 400, - "expected": 400, - "bytes": 26, - "headersMs": 44, - "firstBodyByteMs": 44, - "elapsedMs": 45 - }, - { - "method": "GET", - "route": "/api/admin/performance?minutes=6e1", - "requestID": "e19fd202-fbfe-4cb5-b7ae-aa9b180cd062", - "status": 200, - "expected": 200, - "bytes": 68445, - "headersMs": 122, - "firstBodyByteMs": 123, - "elapsedMs": 126 - }, - { - "method": "GET", - "route": "/api/admin/performance?minutes[]=60", - "requestID": "02b6241d-e704-45ce-b829-0a9c3b26b6de", - "status": 200, - "expected": 200, - "bytes": 68447, - "headersMs": 97, - "firstBodyByteMs": 98, - "elapsedMs": 100 - }, - { - "method": "GET", - "route": "/api/admin/performance?minutes[0]=15", - "requestID": "ac5906a6-e12d-43e3-8f33-a6f923418567", - "status": 200, - "expected": 200, - "bytes": 37225, - "headersMs": 78, - "firstBodyByteMs": 78, - "elapsedMs": 80 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue[]=cache&range[]=6h", - "requestID": "a3e88f48-de44-45eb-b5f2-e6382f5e2464", - "status": 200, - "expected": 200, - "bytes": 20201, - "headersMs": 41, - "firstBodyByteMs": 42, - "elapsedMs": 43 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?range[]=", - "requestID": "9afb5406-1833-427f-a36e-bff00f6fbf6a", - "status": 200, - "expected": 200, - "bytes": 3414, - "headersMs": 30, - "firstBodyByteMs": 32, - "elapsedMs": 33 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?range=toString", - "requestID": "3253067d-88ae-45cc-8ae9-a803604866bc", - "status": 200, - "expected": 200, - "bytes": 51, - "headersMs": 35, - "firstBodyByteMs": 35, - "elapsedMs": 36 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue[]=", - "requestID": "071c0f9c-1e36-4714-9e58-f6f5ab793bb6", - "status": 404, - "expected": 404, - "bytes": 27, - "headersMs": 32, - "firstBodyByteMs": 32, - "elapsedMs": 32 - }, - { - "method": "GET", - "route": "/api/admin/queues?queue[]=remove", - "requestID": "6a0f2f59-b469-4d8d-92e4-5d6395812abc", - "status": 200, - "expected": 200, - "bytes": 4965, - "headersMs": 50, - "firstBodyByteMs": 51, - "elapsedMs": 52 - }, - { - "method": "GET", - "route": "/api/admin/errors?offset[]=2&limit[]=7", - "requestID": "664cd046-32c0-4f41-a36e-6170e81e1d5c", - "status": 200, - "expected": 200, - "bytes": 2099, - "headersMs": 33, - "firstBodyByteMs": 34, - "elapsedMs": 35 - }, - { - "method": "GET", - "route": "/api/repo/octocat/Hello-World?connection=", - "requestID": "67dd2563-fd98-4212-afaa-e19f3dd35aa8", - "status": 400, - "expected": 400, - "bytes": 30, - "headersMs": 30, - "firstBodyByteMs": 30, - "elapsedMs": 31 - }, - { - "method": "GET", - "route": "/api/repo/octocat/Hello-World?connection[]=oauth", - "requestID": "d91f608f-ae9f-4bcb-9d9d-ed40572f4eb4", - "status": 400, - "expected": 400, - "bytes": 30, - "headersMs": 43, - "firstBodyByteMs": 43, - "elapsedMs": 44 - }, - { - "method": "GET", - "route": "/api/repo/octocat/Hello-World?connection=oauth&connection[]=github-app", - "requestID": "224b1694-69b6-4d3b-8515-93382230d94d", - "status": 400, - "expected": 400, - "bytes": 30, - "headersMs": 32, - "firstBodyByteMs": 32, - "elapsedMs": 32 - }, - { - "method": "GET", - "route": "/api/repo/octocat/Hello-World?repositoryID[]=invalid", - "requestID": "b723f372-a89a-4740-ba2d-9718f1099557", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 43, - "firstBodyByteMs": 44, - "elapsedMs": 44 - }, - { - "method": "GET", - "route": "/api/repo/octocat/Hello-World?repositoryID=invalid", - "requestID": "ef23be28-c074-4919-b283-c784da6063ca", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 30, - "firstBodyByteMs": 31, - "elapsedMs": 31 - }, - { - "method": "GET", - "route": "/api/repo/octocat/Hello-World?repositoryID[$exists]=true", - "requestID": "bf554fbc-0e10-46a9-9e21-42bfaebd5d7a", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 45, - "firstBodyByteMs": 45, - "elapsedMs": 46 - }, - { - "method": "GET", - "route": "/api/user/search/github-users?q[]=ab", - "requestID": "e78954f1-b638-4a7e-9724-42071ff981b3", - "status": 200, - "expected": 200, - "bytes": 2, - "headersMs": 34, - "firstBodyByteMs": 34, - "elapsedMs": 34 - }, - { - "method": "GET", - "route": "/api/user/search/github-users?q[length]=1", - "requestID": "e8ffca3f-da5c-4f4d-a4b1-180800bbb9ac", - "status": 200, - "expected": 200, - "bytes": 2, - "headersMs": 47, - "firstBodyByteMs": 47, - "elapsedMs": 48 - }, - { - "method": "GET", - "route": "/api/user/search/github-users?q=ab&q=cd", - "requestID": "58cee8bc-161d-47de-ad79-6289c6ac18bd", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 35, - "firstBodyByteMs": 36, - "elapsedMs": 36 - }, - { - "method": "GET", - "route": "/api/user/search/github-users?q[x]=ab", - "requestID": "496aae9e-8585-4318-9db3-1a35e3ef9851", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 49, - "firstBodyByteMs": 49, - "elapsedMs": 50 - }, - { - "method": "GET", - "route": "/api/user/search/github-users?q[length][toString]=1", - "requestID": "e9a8d4ba-d485-48b2-ab6b-c1d2cfe6e4d5", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 65, - "firstBodyByteMs": 65, - "elapsedMs": 65 - }, - { - "method": "GET", - "route": "/api/admin/repos?page[]=2&limit[]=2&sort[]=status&direction[]=asc&format[]=csv", - "requestID": "35f6f6de-ee0f-4da6-8cbf-a6311de775fb", - "status": 200, - "expected": 200, - "bytes": 2568, - "headersMs": 50, - "firstBodyByteMs": 51, - "elapsedMs": 52 - }, - { - "method": "GET", - "route": "/api/admin/repos?page=1000001&limit=1", - "requestID": "1992347d-af10-42e7-8efb-9a9b0f66d31c", - "status": 200, - "expected": 200, - "bytes": 193, - "headersMs": 37, - "firstBodyByteMs": 38, - "elapsedMs": 38 - }, - { - "method": "GET", - "route": "/api/admin/repos?page=-1", - "requestID": "f302d704-75a2-42ba-a939-dab47519ea56", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 30, - "firstBodyByteMs": 30, - "elapsedMs": 31 - }, - { - "method": "GET", - "route": "/api/admin/repos?page[toString]=x", - "requestID": "ee0812ec-b35a-4f24-a844-9bbd6c2fd8c4", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 28, - "firstBodyByteMs": 29, - "elapsedMs": 29 - }, - { - "method": "GET", - "route": "/api/admin/users?page[]=2&limit[]=2&sort[]=status&direction[]=asc&format[]=csv", - "requestID": "b10f0cc4-2f7e-467c-bd29-170916474ab1", - "status": 200, - "expected": 200, - "bytes": 106, - "headersMs": 35, - "firstBodyByteMs": 36, - "elapsedMs": 36 - }, - { - "method": "GET", - "route": "/api/admin/users?page=1000001&limit=1", - "requestID": "c41e92ca-204f-4297-8d7b-04bb88231342", - "status": 200, - "expected": 200, - "bytes": 112, - "headersMs": 34, - "firstBodyByteMs": 35, - "elapsedMs": 36 - }, - { - "method": "GET", - "route": "/api/admin/users?page=-1", - "requestID": "5108182d-45ee-4e44-ba04-c06a6d6fab57", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 33, - "firstBodyByteMs": 33, - "elapsedMs": 33 - }, - { - "method": "GET", - "route": "/api/admin/users?page[toString]=x", - "requestID": "d80e86fd-4cdf-4dc4-8c08-4c90f00ef19b", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 30, - "firstBodyByteMs": 30, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/api/admin/users?limit=-1", - "requestID": "20ee59bb-b0df-4cff-979e-8f3dba857017", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 33, - "firstBodyByteMs": 33, - "elapsedMs": 33 - }, - { - "method": "GET", - "route": "/api/admin/conferences?page[]=2&limit[]=2&sort[]=status&direction[]=asc&format[]=csv", - "requestID": "768a4138-683c-4396-a76d-e0bbe6996c91", - "status": 200, - "expected": 200, - "bytes": 80, - "headersMs": 36, - "firstBodyByteMs": 37, - "elapsedMs": 37 - }, - { - "method": "GET", - "route": "/api/admin/conferences?page=1000001&limit=1", - "requestID": "d720908d-ea70-4361-b9c0-55d2b843799b", - "status": 200, - "expected": 200, - "bytes": 86, - "headersMs": 35, - "firstBodyByteMs": 35, - "elapsedMs": 36 - }, - { - "method": "GET", - "route": "/api/admin/conferences?page=-1", - "requestID": "1eaec5b5-4301-461e-addc-e77b209f07e7", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 31, - "firstBodyByteMs": 31, - "elapsedMs": 31 - }, - { - "method": "GET", - "route": "/api/admin/conferences?page[toString]=x", - "requestID": "d8c3feb7-99a6-4f55-8f8f-b1edb6b12dcd", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 29, - "firstBodyByteMs": 30, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/api/admin/repos?limit=-1", - "requestID": "35e0107f-4d9f-4087-a7e7-bb7d388ceefe", - "status": 200, - "expected": 200, - "bytes": 1377, - "headersMs": 39, - "firstBodyByteMs": 40, - "elapsedMs": 40 - }, - { - "method": "GET", - "route": "/api/admin/repos?ready[]=true", - "requestID": "ef091a30-51be-4ced-81f7-62c0c5c3a84d", - "status": 200, - "expected": 200, - "bytes": 1935, - "headersMs": 39, - "firstBodyByteMs": 39, - "elapsedMs": 40 - }, - { - "method": "GET", - "route": "/api/admin/conferences?limit=-1", - "requestID": "44786c03-876e-4432-93a1-caf5493a9d99", - "status": 200, - "expected": 200, - "bytes": 80, - "headersMs": 34, - "firstBodyByteMs": 35, - "elapsedMs": 36 - }, - { - "method": "GET", - "route": "/api/admin/conferences?ready[]=true", - "requestID": "39c807ce-b8f4-4f53-88ef-4654db2de7ac", - "status": 200, - "expected": 200, - "bytes": 117, - "headersMs": 40, - "firstBodyByteMs": 41, - "elapsedMs": 41 - }, - { - "method": "GET", - "route": "/api/admin/repos?search[]=x", - "requestID": "1f127d83-451c-4e24-93ba-181483ba2b3a", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 29, - "firstBodyByteMs": 30, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/api/admin/users?search[]=x", - "requestID": "9c0a3ea6-7bd5-4725-9aab-fd4c27ad2844", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 44, - "firstBodyByteMs": 44, - "elapsedMs": 44 - }, - { - "method": "GET", - "route": "/api/admin/conferences?search[]=x", - "requestID": "16cbed09-d5d8-469a-8b38-f55b4a8a7c66", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 29, - "firstBodyByteMs": 29, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/api/admin/users?status[]=active", - "requestID": "fae413c2-21a8-4841-bd3a-5850b489fc03", - "status": 200, - "expected": 200, - "bytes": 99, - "headersMs": 36, - "firstBodyByteMs": 37, - "elapsedMs": 37 - }, - { - "method": "GET", - "route": "/api/admin/users?status[$in][]=active", - "requestID": "f516e1ff-9a65-4800-886b-113666af1ab6", - "status": 200, - "expected": 200, - "bytes": 553, - "headersMs": 38, - "firstBodyByteMs": 39, - "elapsedMs": 40 - }, - { - "method": "GET", - "route": "/api/admin/users?status[a]=active", - "requestID": "84574d4d-6d8e-4f73-bc03-3eea3f3fca41", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 32, - "firstBodyByteMs": 32, - "elapsedMs": 32 - }, - { - "method": "GET", - "route": "/api/admin/users?status[$in]=active", - "requestID": "8d889c3d-bbcd-4ccb-9422-0c6935514a9b", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 33, - "firstBodyByteMs": 33, - "elapsedMs": 34 - }, - { - "method": "GET", - "route": "/api/admin/repos?owner[a]=x", - "requestID": "269f8873-e9e3-4c95-b22e-a915fae635a4", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 61, - "firstBodyByteMs": 61, - "elapsedMs": 61 - }, - { - "method": "GET", - "route": "/api/admin/repos?conference[$unknown]=x", - "requestID": "ed96186a-3122-49fd-9dd8-041f6216f517", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 28, - "firstBodyByteMs": 28, - "elapsedMs": 28 - }, - { - "method": "GET", - "route": "/api/admin/repos?dateFrom[]=2024-02-30", - "requestID": "301692bb-cadd-45dd-b6fb-24db9bd30053", - "status": 200, - "expected": 200, - "bytes": 12099, - "headersMs": 41, - "firstBodyByteMs": 41, - "elapsedMs": 43 - }, - { - "method": "GET", - "route": "/api/admin/repos?dateTo=March%201%202024", - "requestID": "924a0d3d-1c9e-40a4-a82b-e4b56f599903", - "status": 200, - "expected": 200, - "bytes": 156, - "headersMs": 36, - "firstBodyByteMs": 37, - "elapsedMs": 37 - }, - { - "method": "GET", - "route": "/api/admin/repos?dateFrom[toString]=x", - "requestID": "5e2f4646-7da5-448d-90d1-0d16ddbf8b37", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 32, - "firstBodyByteMs": 32, - "elapsedMs": 32 - }, - { - "method": "GET", - "route": "/api/admin/users?dateFrom[]=2024-02-30", - "requestID": "97c3b60a-2fc0-4fa0-86e7-592219f3e955", - "status": 200, - "expected": 200, - "bytes": 458, - "headersMs": 81, - "firstBodyByteMs": 82, - "elapsedMs": 82 - }, - { - "method": "GET", - "route": "/api/admin/users?dateTo=March%201%202024", - "requestID": "60e611e1-ebb6-401e-b6cc-f15ad61f4c2d", - "status": 200, - "expected": 200, - "bytes": 129, - "headersMs": 35, - "firstBodyByteMs": 37, - "elapsedMs": 37 - }, - { - "method": "GET", - "route": "/api/admin/users?dateFrom[toString]=x", - "requestID": "52bcc83b-1c07-45ae-832d-ddfe3990d1e0", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 29, - "firstBodyByteMs": 30, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/api/admin/conferences?dateFrom[]=2024-02-30", - "requestID": "d4e6de71-6c05-4f74-ada0-1e2f0fd46e2d", - "status": 200, - "expected": 200, - "bytes": 138, - "headersMs": 37, - "firstBodyByteMs": 38, - "elapsedMs": 38 - }, - { - "method": "GET", - "route": "/api/admin/conferences?dateTo=March%201%202024", - "requestID": "6129a1ee-3619-41e3-814c-86ff9912854e", - "status": 200, - "expected": 200, - "bytes": 138, - "headersMs": 37, - "firstBodyByteMs": 38, - "elapsedMs": 42 - }, - { - "method": "GET", - "route": "/api/admin/conferences?dateFrom[toString]=x", - "requestID": "df527af8-8070-405b-b3dc-8855138b3d59", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 32, - "firstBodyByteMs": 32, - "elapsedMs": 32 - }, - { - "method": "GET", - "route": "/github/connections", - "requestID": "efd3a57f-2e02-41bb-84ca-06a07d5f3964", - "status": 200, - "expected": 200, - "bytes": 456, - "headersMs": 694, - "firstBodyByteMs": 695, - "elapsedMs": 696 - }, - { - "method": "POST", - "route": "/api/admin/tokens", - "requestID": "767ca39b-a227-4a67-8141-3750eab3ef1a", - "status": 200, - "expected": 200, - "bytes": 186, - "headersMs": 45, - "firstBodyByteMs": 46, - "elapsedMs": 46 - }, - { - "method": "GET", - "route": "/api/user", - "requestID": "c4b1f01f-ec03-4c41-9ef3-1c33ca9ec04e", - "status": 200, - "expected": 200, - "bytes": 100, - "headersMs": 32, - "firstBodyByteMs": 33, - "elapsedMs": 33 - }, - { - "method": "DELETE", - "route": "/api/admin/tokens/6aea4138af3a2cca466ec444", - "requestID": "3c4ec030-ef61-4ef5-a63c-b60f9af62df0", - "status": 200, - "expected": 200, - "bytes": 13, - "headersMs": 31, - "firstBodyByteMs": 31, - "elapsedMs": 31 - }, - { - "method": "GET", - "route": "/api/user", - "requestID": "95c89d13-539e-4877-9a7e-44a732760c3b", - "status": 401, - "expected": 401, - "bytes": 25, - "headersMs": 29, - "firstBodyByteMs": 30, - "elapsedMs": 30 - }, - { - "method": "POST", - "route": "/github/login-token", - "requestID": "8b88ea15-4739-4a6e-bbae-9a4de61b2b2f", - "status": 200, - "expected": 200, - "bytes": 33, - "headersMs": 35, - "firstBodyByteMs": 35, - "elapsedMs": 35 - }, - { - "method": "GET", - "route": "/api/user", - "requestID": "19c8a074-d89d-486b-b833-e1cc298bed4b", - "status": 200, - "expected": 200, - "bytes": 100, - "headersMs": 44, - "firstBodyByteMs": 45, - "elapsedMs": 45 - }, - { - "method": "GET", - "route": "/api/user/logout", - "requestID": "d28599c1-9aa2-4548-bb2d-521a6b1a31af", - "status": 302, - "expected": 302, - "bytes": 24, - "headersMs": 28, - "firstBodyByteMs": 29, - "elapsedMs": 29 - }, - { - "method": "GET", - "route": "/api/user", - "requestID": "147b5569-9d93-4017-b464-f69b07b2da59", - "status": 401, - "expected": 401, - "bytes": 25, - "headersMs": 26, - "firstBodyByteMs": 27, - "elapsedMs": 27 - }, - { - "method": "POST", - "route": "/api/anonymize-preview", - "requestID": "468437dc-75d7-42d7-8755-70ba411df6d9", - "status": 200, - "expected": 200, - "bytes": 26, - "headersMs": 33, - "firstBodyByteMs": 33, - "elapsedMs": 34 - }, - { - "method": "GET", - "route": "/api/providers/github/repository/metadata?name=tdurieux%2Fsynctex-js&connection=github-app", - "requestID": "20c8d1d2-217f-4869-a823-28e0b47eca4e", - "status": 200, - "expected": 200, - "bytes": 230, - "headersMs": 2802, - "firstBodyByteMs": 2803, - "elapsedMs": 2803 - }, - { - "method": "GET", - "route": "/api/providers/github/repository/branches?name=tdurieux%2Fsynctex-js&connection=github-app", - "requestID": "dfd07c0a-54da-4448-9747-d973d5eabab5", - "status": 200, - "expected": 200, - "bytes": 2623, - "headersMs": 3112, - "firstBodyByteMs": 3113, - "elapsedMs": 3114 - }, - { - "method": "GET", - "route": "/api/providers/github/repository/readme?name=tdurieux%2Fsynctex-js&connection=github-app", - "requestID": "4f8e1614-d078-47ae-983d-aee4e99905a6", - "status": 200, - "expected": 200, - "bytes": 2303, - "headersMs": 3133, - "firstBodyByteMs": 3136, - "elapsedMs": 3136 - }, - { - "method": "POST", - "route": "/api/repo", - "requestID": "f6072e72-8503-4771-9a68-0b1969df8205", - "status": 200, - "expected": 200, - "bytes": 22, - "headersMs": 4100, - "firstBodyByteMs": 4101, - "elapsedMs": 4101 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793737007722", - "requestID": "645956d0-43fb-4c9b-b9aa-48b329fe4763", - "status": 200, - "expected": 200, - "bytes": 510, - "headersMs": 66, - "firstBodyByteMs": 67, - "elapsedMs": 68 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793737007722", - "requestID": "62589881-b838-43ca-8d4b-5a61f62241ff", - "status": 200, - "expected": 200, - "bytes": 510, - "headersMs": 33, - "firstBodyByteMs": 34, - "elapsedMs": 34 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793737007722/file/LICENSE", - "requestID": "a8b2ad9b-fd06-4944-a42f-86eb4c4dc3f4", - "status": 200, - "expected": 200, - "bytes": 1074, - "headersMs": 856, - "firstBodyByteMs": 856, - "elapsedMs": 857 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793737007722/files", - "requestID": "d6e5cc52-ddf1-431e-b862-12ef7a68fe39", - "status": 200, - "expected": 200, - "bytes": 170, - "headersMs": 33, - "firstBodyByteMs": 34, - "elapsedMs": 34 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793737007722/zip", - "requestID": "f31d3087-a83e-441e-98f1-17f5c7fdf508", - "status": 200, - "expected": 200, - "bytes": 7166, - "headersMs": 3575, - "firstBodyByteMs": 3575, - "elapsedMs": 4396 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793737007722/file/LICENSE", - "requestID": "08494d5a-acae-4a1c-87d9-e99c9361ef8b", - "status": 200, - "expected": 200, - "bytes": 1074, - "headersMs": 839, - "firstBodyByteMs": 840, - "elapsedMs": 841 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793737007722/zip", - "requestID": "8fbf0fad-84a4-422d-a8da-75ff06606b77", - "status": 200, - "expected": 200, - "bytes": 7166, - "headersMs": 3340, - "firstBodyByteMs": 3341, - "elapsedMs": 4067 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793737007722/file/LICENSE", - "requestID": "490250a2-7148-41d5-ac20-a89a1e882557", - "status": 200, - "expected": 200, - "bytes": 1074, - "headersMs": 771, - "firstBodyByteMs": 772, - "elapsedMs": 773 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793737007722/zip", - "requestID": "464b38d9-0aed-4874-86bf-c85e91cec988", - "status": 200, - "expected": 200, - "bytes": 7166, - "headersMs": 3347, - "firstBodyByteMs": 3347, - "elapsedMs": 4125 - }, - { - "method": "GET", - "route": "/api/admin/performance", - "requestID": "336640de-c45f-494a-8761-940a654cf025", - "status": 200, - "expected": 200, - "bytes": 37236, - "headersMs": 165, - "firstBodyByteMs": 166, - "elapsedMs": 169 - }, - { - "method": "GET", - "route": "/api/user", - "requestID": "4b7a8fa3-6b24-4ceb-b577-2199422f13d9", - "status": 401, - "expected": 401, - "bytes": 25, - "headersMs": 27, - "firstBodyByteMs": 27, - "elapsedMs": 27 - }, - { - "method": "DELETE", - "route": "/api/repo/go-beta-check-1793737007722", - "requestID": "e069d4b3-e2ea-4c65-908d-c2d0f932512a", - "status": 200, - "expected": 200, - "bytes": 21, - "headersMs": 50, - "firstBodyByteMs": 51, - "elapsedMs": 51 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793737007722", - "requestID": "6bea0aa5-662f-4563-8070-c43186e4a571", - "status": 200, - "expected": 200, - "bytes": 560, - "headersMs": 33, - "firstBodyByteMs": 34, - "elapsedMs": 34 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793737007722", - "requestID": "dfa4c501-f1d6-4cc6-bb7e-5b706ee33f1c", - "status": 200, - "expected": 200, - "bytes": 559, - "headersMs": 41, - "firstBodyByteMs": 42, - "elapsedMs": 42 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793737007722/file/LICENSE", - "requestID": "edad6c79-8a5c-4271-902e-33a87227f4e4", - "status": 410, - "expected": 410, - "bytes": 30, - "headersMs": 29, - "firstBodyByteMs": 30, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/api/user", - "requestID": "d6f245d2-025d-4971-96ca-89387575ce9f", - "status": 401, - "expected": 401, - "bytes": 25, - "headersMs": 47, - "firstBodyByteMs": 47, - "elapsedMs": 47 - } - ], - "productionChanged": false, - "overviewHistoryFresh": "passed", - "overviewBrowserFields": "passed", - "queueOverviewFields": "passed", - "errorMonitoring": { - "maxEntries": 5000, - "hourlyBuckets": 24, - "routine404Counted": true - }, - "queueMetricWindows": [ - { - "queue": "download", - "range": "1h", - "points": 60 - }, - { - "queue": "download", - "range": "6h", - "points": 360 - }, - { - "queue": "download", - "range": "24h", - "points": 1440 - }, - { - "queue": "download", - "range": "7d", - "points": 10080 - }, - { - "queue": "remove", - "range": "1h", - "points": 60 - }, - { - "queue": "cache", - "range": "1h", - "points": 60 - }, - { - "queue": "download", - "range": "unrecognized", - "points": 60 - } - ], - "publicStatistics": { - "anonymousAccess": true, - "windows": [ - { - "query": "days=-2", - "days": 1, - "rows": 1 - }, - { - "query": "days=0", - "days": 30, - "rows": 1 - }, - { - "query": "days=0x10", - "days": 16, - "rows": 1 - }, - { - "query": "days=7suffix", - "days": 7, - "rows": 1 - }, - { - "query": "days=999", - "days": 365, - "rows": 1 - }, - { - "query": "days[]=7&days[]=30", - "days": 7, - "rows": 1 - }, - { - "query": "days[1]=7&days[0]=1", - "days": 1, - "rows": 1 - }, - { - "query": "days[x]=7", - "days": 30, - "rows": 1 - } - ] - }, - "dashboardExtendedQueries": "passed", - "dashboardDateCursors": "passed", - "monitoringExtendedQueries": "passed", - "adminExtendedQueries": "passed", - "previewConnectionQueries": "passed", - "previewCacheHintRejections": "passed", - "userSearchQueries": "passed", - "adminListPaginationQueries": "passed", - "adminListFilterQueries": "passed", - "adminListCastingQueries": "passed", - "adminListDateQueries": "passed", - "apiKeyLifecycle": "passed", - "sessionLoginLogout": "passed", - "exactZipContents": "passed", - "repeatedContentChecks": 3, - "performanceMonitoring": { - "requests": true, - "processSamples": true, - "runtimeHistory": true, - "stages": [ - "repository", - "authorization", - "worker_wait", - "anonymize" - ], - "upstreamObserved": true, - "upstreamNote": "Shared-cache hits need no upstream read; provider timing is checked by the integration suite." - }, - "result": "passed", - "testRepositoryRemoved": true, - "temporaryKeyRevoked": true, - "betaAccountAdmin": true, - "uniqueRequestIDsVerified": 131 - }, - "image": "sha256:e4c0f3bdc8311851f11a584616771d22a1eb5dcda2d44d115be0101c57674df2", - "traces": [ - { - "requestID": "400f0a29-e3b3-4b85-8e9b-1dbae607a274", - "route": "/api/user", - "status": 401, - "serverMs": 3, - "firstByteMs": 2.67949, - "bytes": 25, - "stagesMs": {} - }, - { - "requestID": "4c6a94b5-2a59-4b10-9e72-a675cd97969a", - "route": "/api/user", - "status": 200, - "serverMs": 6, - "firstByteMs": 6.19759, - "bytes": 100, - "stagesMs": {} - }, - { - "requestID": "68048bd5-883a-47b5-9d14-6c36bdaf7ead", - "route": "/github/connections", - "status": 200, - "serverMs": 592, - "firstByteMs": 592.483542, - "bytes": 456, - "stagesMs": {} - }, - { - "requestID": "742223fa-1d4a-43ac-8388-804c3326db9c", - "route": "/api/providers", - "status": 200, - "serverMs": 5, - "firstByteMs": 4.806279, - "bytes": 144, - "stagesMs": {} - }, - { - "requestID": "08b394f7-5b3a-4cfd-a188-e27ffecff4ea", - "route": "/api/user/dashboard", - "status": 200, - "serverMs": 24, - "firstByteMs": 23.81363, - "bytes": 796, - "stagesMs": {} - }, - { - "requestID": "3f137d13-bd72-4c22-bdb0-18a8fca2a30d", - "route": "/api/user/default", - "status": 200, - "serverMs": 6, - "firstByteMs": 6.368098, - "bytes": 25, - "stagesMs": {} - }, - { - "requestID": "5b88b744-982d-424e-80d7-75a38db6001a", - "route": "/api/user/quota", - "status": 200, - "serverMs": 6, - "firstByteMs": 6.399372, - "bytes": 115, - "stagesMs": {} - }, - { - "requestID": "0e7b344a-8d38-4293-8a41-d7c816792d86", - "route": "/api/admin/overview", - "status": 200, - "serverMs": 101, - "firstByteMs": 100.0501, - "bytes": 583, - "stagesMs": {} - }, - { - "requestID": "0427e4b2-c92a-4594-a3e2-aeee3e02fe99", - "route": "/api/admin/users", - "status": 200, - "serverMs": 10, - "firstByteMs": 10.148752, - "bytes": 526, - "stagesMs": {} - }, - { - "requestID": "d1812e2b-c18e-41dc-9e56-882bd3d81efc", - "route": "/api/admin/repos", - "status": 200, - "serverMs": 15, - "firstByteMs": 12.382567, - "bytes": 2254, - "stagesMs": {} - }, - { - "requestID": "53938df5-7375-498d-90e7-b58aa87e2e75", - "route": "/api/admin/queues", - "status": 200, - "serverMs": 25, - "firstByteMs": 24.544719, - "bytes": 809, - "stagesMs": {} - }, - { - "requestID": "762f674d-4fc8-4412-b310-436743d5fc3f", - "route": "/api/admin/performance", - "status": 200, - "serverMs": 47, - "firstByteMs": 44.121407, - "bytes": 4479, - "stagesMs": {} - }, - { - "requestID": "f64bff45-83fe-4c8a-83fc-a773a1f13709", - "route": "/api/admin/errors", - "status": 200, - "serverMs": 17, - "firstByteMs": 12.667036, - "bytes": 8649, - "stagesMs": {} - }, - { - "requestID": "215f27e4-dac5-4f43-b56d-7503bde65e66", - "route": "/api/admin/errors/stats", - "status": 200, - "serverMs": 9, - "firstByteMs": 7.60938, - "bytes": 267, - "stagesMs": {} - }, - { - "requestID": "b9eafa59-d9a2-47bd-8505-5341225f3cf3", - "route": "/api/admin/tokens", - "status": 200, - "serverMs": 6, - "firstByteMs": 6.037054, - "bytes": 160, - "stagesMs": {} - }, - { - "requestID": "30f105a8-23fb-4eaa-b044-84f8b39e9199", - "route": "/api/admin/errors", - "status": 200, - "serverMs": 46, - "firstByteMs": 23.078796, - "bytes": 21438, - "stagesMs": {} - }, - { - "requestID": "37b9fa73-855a-4631-9246-64b74097fbaf", - "route": "/api/admin/errors/stats", - "status": 200, - "serverMs": 7, - "firstByteMs": 6.224214, - "bytes": 267, - "stagesMs": {} - }, - { - "requestID": "27e5c6a6-bd17-47b7-946a-95d5dcc36c07", - "route": "/api/repo/:id", - "status": 404, - "serverMs": 6, - "firstByteMs": 6.128406, - "bytes": 26, - "stagesMs": { - "repository": 1.284957 - } - }, - { - "requestID": "9e0815e3-5d8a-4155-a331-504045fcc5a2", - "route": "/api/admin/errors/stats", - "status": 200, - "serverMs": 20, - "firstByteMs": 19.30116, - "bytes": 267, - "stagesMs": {} - }, - { - "requestID": "3a92e15d-2e87-4569-b21f-43a875cde858", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 8, - "firstByteMs": 6.380974, - "bytes": 220, - "stagesMs": {} - }, - { - "requestID": "d53da646-dd31-47ce-ba90-6c247410835d", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 19, - "firstByteMs": 17.092761, - "bytes": 607, - "stagesMs": {} - }, - { - "requestID": "dcdd32d0-7773-4ff4-862d-6f069cadb45e", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 23, - "firstByteMs": 7.727337, - "bytes": 1956, - "stagesMs": {} - }, - { - "requestID": "655a2afe-cda5-42a7-ae4d-37a9dd37554b", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 113, - "firstByteMs": 83.51172, - "bytes": 9751, - "stagesMs": {} - }, - { - "requestID": "53e752cc-060b-41d7-86fd-abfff38f1a04", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 8, - "firstByteMs": 6.875945, - "bytes": 210, - "stagesMs": {} - }, - { - "requestID": "28926246-7b4c-4d2b-9848-46086fa0f931", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 9, - "firstByteMs": 7.970269, - "bytes": 186, - "stagesMs": {} - }, - { - "requestID": "ff359870-e74c-44d3-bdb9-56377bf0b114", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 13, - "firstByteMs": 11.246351, - "bytes": 229, - "stagesMs": {} - }, - { - "requestID": "6b6b8e76-1297-4928-b475-8cd7d6305d0f", - "route": "/api/admin/queues/metrics", - "status": 404, - "serverMs": 6, - "firstByteMs": 5.827913, - "bytes": 27, - "stagesMs": {} - }, - { - "requestID": "2ad31117-6aa0-4251-a730-33c1eca6abb1", - "route": "/api/stat", - "status": 200, - "serverMs": 2, - "firstByteMs": 2.068754, - "bytes": 69, - "stagesMs": {} - }, - { - "requestID": "482dd0fb-6414-45ce-8e45-0bbc7ffa4aaa", - "route": "/api/stat/history", - "status": 200, - "serverMs": 1, - "firstByteMs": 0.77954, - "bytes": 105, - "stagesMs": {} - }, - { - "requestID": "564470c3-d228-4993-99f6-6773f2fe2aab", - "route": "/api/stat/history", - "status": 200, - "serverMs": 1, - "firstByteMs": 0.811032, - "bytes": 105, - "stagesMs": {} - }, - { - "requestID": "5dcf1945-144f-4bd1-8592-39a1e3d75b44", - "route": "/api/stat/history", - "status": 200, - "serverMs": 1, - "firstByteMs": 1.321647, - "bytes": 105, - "stagesMs": {} - }, - { - "requestID": "0b20e47f-ec51-471a-b68f-965deeb38d32", - "route": "/api/stat/history", - "status": 200, - "serverMs": 1, - "firstByteMs": 1.232782, - "bytes": 105, - "stagesMs": {} - }, - { - "requestID": "58188d89-3466-4271-be5b-eaa06c91e6c1", - "route": "/api/stat/history", - "status": 200, - "serverMs": 2, - "firstByteMs": 1.564547, - "bytes": 105, - "stagesMs": {} - }, - { - "requestID": "00fd100e-b3b9-4f29-9257-ebb2e033a000", - "route": "/api/stat/history", - "status": 200, - "serverMs": 1, - "firstByteMs": 1.046574, - "bytes": 105, - "stagesMs": {} - }, - { - "requestID": "92e329a3-aea0-404a-8ae2-db2b2f9699e7", - "route": "/api/stat/history", - "status": 200, - "serverMs": 1, - "firstByteMs": 0.941696, - "bytes": 105, - "stagesMs": {} - }, - { - "requestID": "b29d1fc4-df48-492a-85c4-f2ab3029d73e", - "route": "/api/stat/history", - "status": 200, - "serverMs": 1, - "firstByteMs": 0.736211, - "bytes": 105, - "stagesMs": {} - }, - { - "requestID": "4a9e73cc-451d-40d2-9da7-b798adfd1fa1", - "route": "/api/user/dashboard", - "status": 200, - "serverMs": 15, - "firstByteMs": 14.560177, - "bytes": 64, - "stagesMs": {} - }, - { - "requestID": "e4a80821-cc2b-4e14-af0d-2031c6fcaecd", - "route": "/api/user/dashboard", - "status": 200, - "serverMs": 19, - "firstByteMs": 18.502685, - "bytes": 64, - "stagesMs": {} - }, - { - "requestID": "59d42aa4-0892-4b9f-a7d4-e51197cacf3f", - "route": "/api/user/dashboard", - "status": 400, - "serverMs": 5, - "firstByteMs": 5.464095, - "bytes": 24, - "stagesMs": {} - }, - { - "requestID": "1e02a6a8-b409-4ed4-8da1-c2e4edb3939a", - "route": "/api/user/dashboard", - "status": 400, - "serverMs": 7, - "firstByteMs": 6.783136, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "316462c6-698e-4d9e-96df-9f2db5e3fef8", - "route": "/api/user/dashboard", - "status": 200, - "serverMs": 23, - "firstByteMs": 23.146151, - "bytes": 796, - "stagesMs": {} - }, - { - "requestID": "bcc47d87-4981-4e42-af95-4cb851a3cc52", - "route": "/api/user/dashboard", - "status": 200, - "serverMs": 22, - "firstByteMs": 21.643423, - "bytes": 796, - "stagesMs": {} - }, - { - "requestID": "789bd6d0-0954-4908-9d9d-61ec8740bebf", - "route": "/api/user/dashboard", - "status": 200, - "serverMs": 25, - "firstByteMs": 24.632539, - "bytes": 796, - "stagesMs": {} - }, - { - "requestID": "cdd8fb80-2a97-4cfb-a7cc-5357326de718", - "route": "/api/user/dashboard", - "status": 200, - "serverMs": 19, - "firstByteMs": 19.246564, - "bytes": 796, - "stagesMs": {} - }, - { - "requestID": "d9033b3d-1291-4623-847e-d2a3ccc0dc16", - "route": "/api/user/dashboard", - "status": 200, - "serverMs": 20, - "firstByteMs": 20.389605, - "bytes": 796, - "stagesMs": {} - }, - { - "requestID": "7aa0261d-b0a7-4c7e-aebe-be493fbaede5", - "route": "/api/user/dashboard", - "status": 400, - "serverMs": 5, - "firstByteMs": 4.895869, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "e19fd202-fbfe-4cb5-b7ae-aa9b180cd062", - "route": "/api/admin/performance", - "status": 200, - "serverMs": 83, - "firstByteMs": 71.367709, - "bytes": 7226, - "stagesMs": {} - }, - { - "requestID": "02b6241d-e704-45ce-b829-0a9c3b26b6de", - "route": "/api/admin/performance", - "status": 200, - "serverMs": 69, - "firstByteMs": 53.602252, - "bytes": 7245, - "stagesMs": {} - }, - { - "requestID": "ac5906a6-e12d-43e3-8f33-a6f923418567", - "route": "/api/admin/performance", - "status": 200, - "serverMs": 52, - "firstByteMs": 48.343662, - "bytes": 4520, - "stagesMs": {} - }, - { - "requestID": "a3e88f48-de44-45eb-b5f2-e6382f5e2464", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 9, - "firstByteMs": 7.9972, - "bytes": 569, - "stagesMs": {} - }, - { - "requestID": "9afb5406-1833-427f-a36e-bff00f6fbf6a", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 5, - "firstByteMs": 4.705118, - "bytes": 222, - "stagesMs": {} - }, - { - "requestID": "3253067d-88ae-45cc-8ae9-a803604866bc", - "route": "/api/admin/queues/metrics", - "status": 200, - "serverMs": 5, - "firstByteMs": 4.855755, - "bytes": 51, - "stagesMs": {} - }, - { - "requestID": "071c0f9c-1e36-4714-9e58-f6f5ab793bb6", - "route": "/api/admin/queues/metrics", - "status": 404, - "serverMs": 6, - "firstByteMs": 6.331083, - "bytes": 27, - "stagesMs": {} - }, - { - "requestID": "6a0f2f59-b469-4d8d-92e4-5d6395812abc", - "route": "/api/admin/queues", - "status": 200, - "serverMs": 26, - "firstByteMs": 24.99218, - "bytes": 761, - "stagesMs": {} - }, - { - "requestID": "664cd046-32c0-4f41-a36e-6170e81e1d5c", - "route": "/api/admin/errors", - "status": 200, - "serverMs": 8, - "firstByteMs": 6.920115, - "bytes": 651, - "stagesMs": {} - }, - { - "requestID": "67dd2563-fd98-4212-afaa-e19f3dd35aa8", - "route": "/api/repo/:owner/:repo", - "status": 400, - "serverMs": 5, - "firstByteMs": 4.965832, - "bytes": 30, - "stagesMs": {} - }, - { - "requestID": "d91f608f-ae9f-4bcb-9d9d-ed40572f4eb4", - "route": "/api/repo/:owner/:repo", - "status": 400, - "serverMs": 5, - "firstByteMs": 4.650577, - "bytes": 30, - "stagesMs": {} - }, - { - "requestID": "224b1694-69b6-4d3b-8515-93382230d94d", - "route": "/api/repo/:owner/:repo", - "status": 400, - "serverMs": 7, - "firstByteMs": 6.518101, - "bytes": 30, - "stagesMs": {} - }, - { - "requestID": "b723f372-a89a-4740-ba2d-9718f1099557", - "route": "/api/repo/:owner/:repo", - "status": 500, - "serverMs": 10, - "firstByteMs": 9.527083, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "ef23be28-c074-4919-b283-c784da6063ca", - "route": "/api/repo/:owner/:repo", - "status": 500, - "serverMs": 5, - "firstByteMs": 4.564252, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "bf554fbc-0e10-46a9-9e21-42bfaebd5d7a", - "route": "/api/repo/:owner/:repo", - "status": 500, - "serverMs": 5, - "firstByteMs": 5.265788, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "e78954f1-b638-4a7e-9724-42071ff981b3", - "route": "/api/user/search/github-users", - "status": 200, - "serverMs": 5, - "firstByteMs": 5.351231, - "bytes": 2, - "stagesMs": {} - }, - { - "requestID": "e8ffca3f-da5c-4f4d-a4b1-180800bbb9ac", - "route": "/api/user/search/github-users", - "status": 200, - "serverMs": 5, - "firstByteMs": 4.748601, - "bytes": 2, - "stagesMs": {} - }, - { - "requestID": "58cee8bc-161d-47de-ad79-6289c6ac18bd", - "route": "/api/user/search/github-users", - "status": 500, - "serverMs": 9, - "firstByteMs": 8.67156, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "496aae9e-8585-4318-9db3-1a35e3ef9851", - "route": "/api/user/search/github-users", - "status": 500, - "serverMs": 10, - "firstByteMs": 10.132656, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "e9a8d4ba-d485-48b2-ab6b-c1d2cfe6e4d5", - "route": "/api/user/search/github-users", - "status": 500, - "serverMs": 5, - "firstByteMs": 5.173657, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "35f6f6de-ee0f-4da6-8cbf-a6311de775fb", - "route": "/api/admin/repos", - "status": 200, - "serverMs": 12, - "firstByteMs": 10.223586, - "bytes": 909, - "stagesMs": {} - }, - { - "requestID": "1992347d-af10-42e7-8efb-9a9b0f66d31c", - "route": "/api/admin/repos", - "status": 200, - "serverMs": 10, - "firstByteMs": 9.832276, - "bytes": 193, - "stagesMs": {} - }, - { - "requestID": "f302d704-75a2-42ba-a939-dab47519ea56", - "route": "/api/admin/repos", - "status": 500, - "serverMs": 5, - "firstByteMs": 5.259468, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "ee0812ec-b35a-4f24-a844-9bbd6c2fd8c4", - "route": "/api/admin/repos", - "status": 500, - "serverMs": 4, - "firstByteMs": 4.288046, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "b10f0cc4-2f7e-467c-bd29-170916474ab1", - "route": "/api/admin/users", - "status": 200, - "serverMs": 9, - "firstByteMs": 9.267814, - "bytes": 106, - "stagesMs": {} - }, - { - "requestID": "c41e92ca-204f-4297-8d7b-04bb88231342", - "route": "/api/admin/users", - "status": 200, - "serverMs": 9, - "firstByteMs": 9.19513, - "bytes": 112, - "stagesMs": {} - }, - { - "requestID": "5108182d-45ee-4e44-ba04-c06a6d6fab57", - "route": "/api/admin/users", - "status": 500, - "serverMs": 7, - "firstByteMs": 7.408241, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "d80e86fd-4cdf-4dc4-8c08-4c90f00ef19b", - "route": "/api/admin/users", - "status": 500, - "serverMs": 5, - "firstByteMs": 4.969151, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "20ee59bb-b0df-4cff-979e-8f3dba857017", - "route": "/api/admin/users", - "status": 500, - "serverMs": 7, - "firstByteMs": 6.835575, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "768a4138-683c-4396-a76d-e0bbe6996c91", - "route": "/api/admin/conferences", - "status": 200, - "serverMs": 11, - "firstByteMs": 10.578438, - "bytes": 80, - "stagesMs": {} - }, - { - "requestID": "d720908d-ea70-4361-b9c0-55d2b843799b", - "route": "/api/admin/conferences", - "status": 200, - "serverMs": 9, - "firstByteMs": 8.551026, - "bytes": 86, - "stagesMs": {} - }, - { - "requestID": "1eaec5b5-4301-461e-addc-e77b209f07e7", - "route": "/api/admin/conferences", - "status": 500, - "serverMs": 5, - "firstByteMs": 4.758766, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "d8c3feb7-99a6-4f55-8f8f-b1edb6b12dcd", - "route": "/api/admin/conferences", - "status": 500, - "serverMs": 5, - "firstByteMs": 5.368532, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "35e0107f-4d9f-4087-a7e7-bb7d388ceefe", - "route": "/api/admin/repos", - "status": 200, - "serverMs": 13, - "firstByteMs": 10.810262, - "bytes": 746, - "stagesMs": {} - }, - { - "requestID": "ef091a30-51be-4ced-81f7-62c0c5c3a84d", - "route": "/api/admin/repos", - "status": 200, - "serverMs": 14, - "firstByteMs": 11.860916, - "bytes": 857, - "stagesMs": {} - }, - { - "requestID": "44786c03-876e-4432-93a1-caf5493a9d99", - "route": "/api/admin/conferences", - "status": 200, - "serverMs": 10, - "firstByteMs": 9.734349, - "bytes": 80, - "stagesMs": {} - }, - { - "requestID": "39c807ce-b8f4-4f53-88ef-4654db2de7ac", - "route": "/api/admin/conferences", - "status": 200, - "serverMs": 11, - "firstByteMs": 10.755199, - "bytes": 117, - "stagesMs": {} - }, - { - "requestID": "1f127d83-451c-4e24-93ba-181483ba2b3a", - "route": "/api/admin/repos", - "status": 500, - "serverMs": 5, - "firstByteMs": 4.613453, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "9c0a3ea6-7bd5-4725-9aab-fd4c27ad2844", - "route": "/api/admin/users", - "status": 500, - "serverMs": 5, - "firstByteMs": 4.811403, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "16cbed09-d5d8-469a-8b38-f55b4a8a7c66", - "route": "/api/admin/conferences", - "status": 500, - "serverMs": 5, - "firstByteMs": 4.707988, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "fae413c2-21a8-4841-bd3a-5850b489fc03", - "route": "/api/admin/users", - "status": 200, - "serverMs": 10, - "firstByteMs": 10.302623, - "bytes": 99, - "stagesMs": {} - }, - { - "requestID": "f516e1ff-9a65-4800-886b-113666af1ab6", - "route": "/api/admin/users", - "status": 200, - "serverMs": 9, - "firstByteMs": 9.452203, - "bytes": 553, - "stagesMs": {} - }, - { - "requestID": "84574d4d-6d8e-4f73-bc03-3eea3f3fca41", - "route": "/api/admin/users", - "status": 500, - "serverMs": 5, - "firstByteMs": 4.500942, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "8d889c3d-bbcd-4ccb-9422-0c6935514a9b", - "route": "/api/admin/users", - "status": 500, - "serverMs": 8, - "firstByteMs": 7.929314, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "269f8873-e9e3-4c95-b22e-a915fae635a4", - "route": "/api/admin/repos", - "status": 500, - "serverMs": 5, - "firstByteMs": 5.106104, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "ed96186a-3122-49fd-9dd8-041f6216f517", - "route": "/api/admin/repos", - "status": 500, - "serverMs": 5, - "firstByteMs": 4.710402, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "301692bb-cadd-45dd-b6fb-24db9bd30053", - "route": "/api/admin/repos", - "status": 200, - "serverMs": 15, - "firstByteMs": 12.833367, - "bytes": 2288, - "stagesMs": {} - }, - { - "requestID": "924a0d3d-1c9e-40a4-a82b-e4b56f599903", - "route": "/api/admin/repos", - "status": 200, - "serverMs": 10, - "firstByteMs": 10.310852, - "bytes": 156, - "stagesMs": {} - }, - { - "requestID": "5e2f4646-7da5-448d-90d1-0d16ddbf8b37", - "route": "/api/admin/repos", - "status": 500, - "serverMs": 5, - "firstByteMs": 4.883725, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "97c3b60a-2fc0-4fa0-86e7-592219f3e955", - "route": "/api/admin/users", - "status": 200, - "serverMs": 12, - "firstByteMs": 11.789919, - "bytes": 458, - "stagesMs": {} - }, - { - "requestID": "60e611e1-ebb6-401e-b6cc-f15ad61f4c2d", - "route": "/api/admin/users", - "status": 200, - "serverMs": 10, - "firstByteMs": 9.508437, - "bytes": 129, - "stagesMs": {} - }, - { - "requestID": "52bcc83b-1c07-45ae-832d-ddfe3990d1e0", - "route": "/api/admin/users", - "status": 500, - "serverMs": 4, - "firstByteMs": 4.354497, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "d4e6de71-6c05-4f74-ada0-1e2f0fd46e2d", - "route": "/api/admin/conferences", - "status": 200, - "serverMs": 10, - "firstByteMs": 9.828372, - "bytes": 138, - "stagesMs": {} - }, - { - "requestID": "6129a1ee-3619-41e3-814c-86ff9912854e", - "route": "/api/admin/conferences", - "status": 200, - "serverMs": 9, - "firstByteMs": 9.260531, - "bytes": 138, - "stagesMs": {} - }, - { - "requestID": "df527af8-8070-405b-b3dc-8855138b3d59", - "route": "/api/admin/conferences", - "status": 500, - "serverMs": 6, - "firstByteMs": 5.567107, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "efd3a57f-2e02-41bb-84ca-06a07d5f3964", - "route": "/github/connections", - "status": 200, - "serverMs": 669, - "firstByteMs": 668.744719, - "bytes": 456, - "stagesMs": {} - }, - { - "requestID": "767ca39b-a227-4a67-8141-3750eab3ef1a", - "route": "/api/admin/tokens", - "status": 200, - "serverMs": 8, - "firstByteMs": 7.802276, - "bytes": 186, - "stagesMs": {} - }, - { - "requestID": "c4b1f01f-ec03-4c41-9ef3-1c33ca9ec04e", - "route": "/api/user", - "status": 200, - "serverMs": 6, - "firstByteMs": 6.28256, - "bytes": 100, - "stagesMs": {} - }, - { - "requestID": "3c4ec030-ef61-4ef5-a63c-b60f9af62df0", - "route": "/api/admin/tokens/:id", - "status": 200, - "serverMs": 7, - "firstByteMs": 6.587839, - "bytes": 13, - "stagesMs": {} - }, - { - "requestID": "95c89d13-539e-4877-9a7e-44a732760c3b", - "route": "/api/user", - "status": 401, - "serverMs": 3, - "firstByteMs": 2.977982, - "bytes": 25, - "stagesMs": {} - }, - { - "requestID": "8b88ea15-4739-4a6e-bbae-9a4de61b2b2f", - "route": "/github/login-token", - "status": 200, - "serverMs": 7, - "firstByteMs": 7.454282, - "bytes": 33, - "stagesMs": {} - }, - { - "requestID": "19c8a074-d89d-486b-b833-e1cc298bed4b", - "route": "/api/user", - "status": 200, - "serverMs": 4, - "firstByteMs": 3.916287, - "bytes": 100, - "stagesMs": {} - }, - { - "requestID": "d28599c1-9aa2-4548-bb2d-521a6b1a31af", - "route": "/api/user/logout", - "status": 302, - "serverMs": 4, - "firstByteMs": 3.501757, - "bytes": 24, - "stagesMs": {} - }, - { - "requestID": "147b5569-9d93-4017-b464-f69b07b2da59", - "route": "/api/user", - "status": 401, - "serverMs": 2, - "firstByteMs": 1.605114, - "bytes": 25, - "stagesMs": {} - }, - { - "requestID": "468437dc-75d7-42d7-8755-70ba411df6d9", - "route": "/api/anonymize-preview", - "status": 200, - "serverMs": 5, - "firstByteMs": 5.281004, - "bytes": 26, - "stagesMs": {} - }, - { - "requestID": "20c8d1d2-217f-4869-a823-28e0b47eca4e", - "route": "/api/providers/:provider/repository/metadata", - "status": 200, - "serverMs": 2754, - "firstByteMs": 2754.096387, - "bytes": 230, - "stagesMs": {} - }, - { - "requestID": "dfd07c0a-54da-4448-9747-d973d5eabab5", - "route": "/api/providers/:provider/repository/branches", - "status": 200, - "serverMs": 3086, - "firstByteMs": 3084.542197, - "bytes": 998, - "stagesMs": {} - }, - { - "requestID": "4f8e1614-d078-47ae-983d-aee4e99905a6", - "route": "/api/providers/:provider/repository/readme", - "status": 200, - "serverMs": 3106, - "firstByteMs": 3104.791473, - "bytes": 878, - "stagesMs": {} - }, - { - "requestID": "f6072e72-8503-4771-9a68-0b1969df8205", - "route": "/api/repo", - "status": 200, - "serverMs": 4072, - "firstByteMs": 4072.071016, - "bytes": 22, - "stagesMs": {} - }, - { - "requestID": "645956d0-43fb-4c9b-b9aa-48b329fe4763", - "route": "/api/repo/:id", - "status": 200, - "serverMs": 7, - "firstByteMs": 6.769291, - "bytes": 510, - "stagesMs": { - "repository": 1.218774 - } - }, - { - "requestID": "62589881-b838-43ca-8d4b-5a61f62241ff", - "route": "/api/repo/:id", - "status": 200, - "serverMs": 6, - "firstByteMs": 6.098832, - "bytes": 510, - "stagesMs": { - "repository": 1.48448 - } - }, - { - "requestID": "a8b2ad9b-fd06-4944-a42f-86eb4c4dc3f4", - "route": "/api/repo/:id/file/*path", - "status": 200, - "serverMs": 828, - "firstByteMs": 825.566913, - "bytes": 672, - "stagesMs": { - "anonymize": 21.007587, - "authorization": 732.695871, - "cache_fill": 59.972901, - "cache_lookup": 2.024004, - "repository": 2.376043, - "worker_wait": 0.031798 - } - }, - { - "requestID": "d6e5cc52-ddf1-431e-b862-12ef7a68fe39", - "route": "/api/repo/:id/files", - "status": 200, - "serverMs": 7, - "firstByteMs": 6.634833, - "bytes": 170, - "stagesMs": { - "repository": 2.590888 - } - }, - { - "requestID": "f31d3087-a83e-441e-98f1-17f5c7fdf508", - "route": "/api/repo/:id/zip", - "status": 200, - "serverMs": 4368, - "firstByteMs": 3545.311807, - "bytes": 7166, - "stagesMs": { - "anonymize": 106.14308999999999, - "authorization": 4085.31258, - "cache_fill": 154.001525, - "cache_lookup": 11.406606, - "repository": 2.425832, - "worker_wait": 0.09090800000000002 - } - }, - { - "requestID": "08494d5a-acae-4a1c-87d9-e99c9361ef8b", - "route": "/api/repo/:id/file/*path", - "status": 200, - "serverMs": 747, - "firstByteMs": 744.944375, - "bytes": 672, - "stagesMs": { - "authorization": 720.71243, - "cache_lookup": 1.800369, - "repository": 2.390681 - } - }, - { - "requestID": "8fbf0fad-84a4-422d-a8da-75ff06606b77", - "route": "/api/repo/:id/zip", - "status": 200, - "serverMs": 4041, - "firstByteMs": 3313.499177, - "bytes": 7166, - "stagesMs": { - "authorization": 3951.782424, - "cache_lookup": 10.844503, - "repository": 2.556941 - } - }, - { - "requestID": "490250a2-7148-41d5-ac20-a89a1e882557", - "route": "/api/repo/:id/file/*path", - "status": 200, - "serverMs": 695, - "firstByteMs": 692.561204, - "bytes": 672, - "stagesMs": { - "authorization": 670.025345, - "cache_lookup": 1.717552, - "repository": 2.172126 - } - }, - { - "requestID": "464b38d9-0aed-4874-86bf-c85e91cec988", - "route": "/api/repo/:id/zip", - "status": 200, - "serverMs": 4100, - "firstByteMs": 3321.07757, - "bytes": 7166, - "stagesMs": { - "authorization": 4017.844213, - "cache_lookup": 8.501361000000001, - "repository": 2.459012 - } - }, - { - "requestID": "336640de-c45f-494a-8761-940a654cf025", - "route": "/api/admin/performance", - "status": 200, - "serverMs": 53, - "firstByteMs": 49.517061, - "bytes": 4442, - "stagesMs": {} - }, - { - "requestID": "4b7a8fa3-6b24-4ceb-b577-2199422f13d9", - "route": "/api/user", - "status": 401, - "serverMs": 3, - "firstByteMs": 2.760499, - "bytes": 25, - "stagesMs": {} - }, - { - "requestID": "e069d4b3-e2ea-4c65-908d-c2d0f932512a", - "route": "/api/repo/:id", - "status": 200, - "serverMs": 11, - "firstByteMs": 11.095014, - "bytes": 21, - "stagesMs": { - "repository": 1.67098 - } - }, - { - "requestID": "6bea0aa5-662f-4563-8070-c43186e4a571", - "route": "/api/repo/:id", - "status": 200, - "serverMs": 6, - "firstByteMs": 5.896213, - "bytes": 560, - "stagesMs": { - "repository": 1.575447 - } - }, - { - "requestID": "dfa4c501-f1d6-4cc6-bb7e-5b706ee33f1c", - "route": "/api/repo/:id", - "status": 200, - "serverMs": 9, - "firstByteMs": 8.993949, - "bytes": 559, - "stagesMs": { - "repository": 1.642664 - } - }, - { - "requestID": "edad6c79-8a5c-4271-902e-33a87227f4e4", - "route": "/api/repo/:id/file/*path", - "status": 410, - "serverMs": 3, - "firstByteMs": 3.301182, - "bytes": 30, - "stagesMs": { - "repository": 2.118166 - } - }, - { - "requestID": "d6f245d2-025d-4971-96ca-89387575ce9f", - "route": "/api/user", - "status": 401, - "serverMs": 5, - "firstByteMs": 4.71366, - "bytes": 25, - "stagesMs": {} - } - ], - "summary": { - "/api/repo/:id/file/*path": { - "serverMs": [ - 828, - 747, - 695 - ], - "medianServerMs": 747, - "authorizationMs": [ - 732.695871, - 720.71243, - 670.025345 - ] - }, - "/api/repo/:id/zip": { - "serverMs": [ - 4368, - 4041, - 4100 - ], - "medianServerMs": 4100, - "authorizationMs": [ - 4085.31258, - 3951.782424, - 4017.844213 - ] - } - } -} \ No newline at end of file diff --git a/backend/reports/zip-streaming-deployment.json b/backend/reports/zip-streaming-deployment.json deleted file mode 100644 index 7e8ce8b..0000000 --- a/backend/reports/zip-streaming-deployment.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "implementation": "One commit-pinned GitHub tar stream with bounded download/verification, transformation, and ZIP output stages. Optional provider.Archives capability; per-file fallback for other providers and archive export/LFS exceptions.", - "deployment": { - "hostname": "beta.durieux.me", - "image": "sha256:bc8d7ce53a706f7ac8d755015455542494acd1cfc8acb538d509586a1d539da9", - "healthy": true, - "checksPassed": 133, - "temporaryKeyRevoked": true, - "testRepositoryRemoved": true - }, - "sameCommitOutputParity": { - "zipEntries": 5, - "zipManifestSHA256": "e6fdc1385a4d0b50e3deea32ab2fcf34de88d1147ed5001b81cbd0968dcf5a81", - "zipSourceCommit": "912f3c897c5ac1bbc225f65cfd1387579fb3385e" - }, - "validation": [ - "Client receives first ZIP payload while test upstream is paused before second file", - "Exactly one archive request and zero individual blob requests for normal streamed fixture", - "Cancellation closes upstream and removes temporary files", - "Corrupt gzip, changed repository revision, duplicate paths and anonymized-name collisions abort without finalizing ZIP", - "Git export-ignore/export-subst fallback preserves original blobs", - "GitHub global PAX header, path validation, symlink-as-blob handling and redirect credential stripping", - "Race-enabled multi-batch ZIP and second-provider lifecycle tests passed", - "Race-enabled final streaming integration tests passed", - "Empty files and size limits for archive providers without verifiers tested", - "go vet passed" - ], - "limits": [ - "Text regex transformation still stages one complete file; not arbitrary chunk-by-chunk substitution", - "ZIP central-directory and duplicate-name metadata grow with entry count", - "Every archive download makes a fresh GitHub archive request, including when individual files are cached", - "The initial live validation fixture has 5 files. A subsequent 1,128-file streaming memory measurement is recorded separately in zip-streaming-live-memory.json. The earlier local ZIP benchmark is a different workload." - ], - "liveTiming": { - "before": [ - { - "bytes": 7176, - "firstBodyByteMs": 67, - "elapsedMs": 508 - }, - { - "bytes": 7171, - "firstBodyByteMs": 69, - "elapsedMs": 130 - }, - { - "bytes": 7171, - "firstBodyByteMs": 66, - "elapsedMs": 130 - } - ], - "after": [ - { - "bytes": 7171, - "firstBodyByteMs": 705, - "elapsedMs": 845 - }, - { - "bytes": 7171, - "firstBodyByteMs": 547, - "elapsedMs": 589 - }, - { - "bytes": 7171, - "firstBodyByteMs": 524, - "elapsedMs": 571 - } - ] - }, - "memoryMeasurement": "zip-streaming-live-memory.json" -} diff --git a/backend/reports/zip-streaming-live-after.json b/backend/reports/zip-streaming-live-after.json deleted file mode 100644 index 93149cb..0000000 --- a/backend/reports/zip-streaming-live-after.json +++ /dev/null @@ -1,1597 +0,0 @@ -{ - "verifiedAt": "2026-11-04T09:09:27.763Z", - "hostname": "beta.durieux.me", - "configurationMode": "GitHub App enabled alongside legacy OAuth", - "checks": [ - { - "method": "GET", - "route": "/api/user", - "requestID": "90a67062-23ca-4e66-8bc1-446c0f3747e8", - "status": 401, - "expected": 401, - "bytes": 25, - "headersMs": 297, - "firstBodyByteMs": 300, - "elapsedMs": 312 - }, - { - "method": "GET", - "route": "/api/user", - "requestID": "7aee5e2c-984b-4d02-a163-372f11f63e9a", - "status": 200, - "expected": 200, - "bytes": 100, - "headersMs": 108, - "firstBodyByteMs": 114, - "elapsedMs": 116 - }, - { - "method": "GET", - "route": "/github/connections", - "requestID": "9a992e6b-dded-4824-81a4-450b0276e1c7", - "status": 200, - "expected": 200, - "bytes": 456, - "headersMs": 831, - "firstBodyByteMs": 834, - "elapsedMs": 837 - }, - { - "method": "GET", - "route": "/api/providers", - "requestID": "8caa60b8-3f62-42a5-a126-b114583626b2", - "status": 200, - "expected": 200, - "bytes": 144, - "headersMs": 52, - "firstBodyByteMs": 53, - "elapsedMs": 54 - }, - { - "method": "GET", - "route": "/api/user/dashboard", - "requestID": "dffe2db8-4782-422f-b1d5-3cac882eccaa", - "status": 200, - "expected": 200, - "bytes": 797, - "headersMs": 53, - "firstBodyByteMs": 55, - "elapsedMs": 56 - }, - { - "method": "GET", - "route": "/api/user/default", - "requestID": "9f4c9f1d-dcbe-4fe1-87c5-f96200570293", - "status": 200, - "expected": 200, - "bytes": 25, - "headersMs": 44, - "firstBodyByteMs": 44, - "elapsedMs": 45 - }, - { - "method": "GET", - "route": "/api/user/quota", - "requestID": "624b02cb-50e1-4943-96a4-e4f1a339331e", - "status": 200, - "expected": 200, - "bytes": 115, - "headersMs": 49, - "firstBodyByteMs": 50, - "elapsedMs": 51 - }, - { - "method": "GET", - "route": "/api/admin/overview", - "requestID": "7cb80c65-69a5-4bc3-bd1c-554d71762e07", - "status": 200, - "expected": 200, - "bytes": 1242, - "headersMs": 125, - "firstBodyByteMs": 127, - "elapsedMs": 129 - }, - { - "method": "GET", - "route": "/api/admin/users", - "requestID": "65580391-6c53-49a9-8230-7162ee1078fa", - "status": 200, - "expected": 200, - "bytes": 526, - "headersMs": 59, - "firstBodyByteMs": 61, - "elapsedMs": 62 - }, - { - "method": "GET", - "route": "/api/admin/repos", - "requestID": "7399536c-399c-4c63-a68b-15e0b1e5d2ce", - "status": 200, - "expected": 200, - "bytes": 12509, - "headersMs": 40, - "firstBodyByteMs": 43, - "elapsedMs": 49 - }, - { - "method": "GET", - "route": "/api/admin/queues", - "requestID": "3875419e-77d7-4a3d-a770-792ec3187716", - "status": 200, - "expected": 200, - "bytes": 7979, - "headersMs": 76, - "firstBodyByteMs": 78, - "elapsedMs": 81 - }, - { - "method": "GET", - "route": "/api/admin/performance", - "requestID": "443cc022-4fe1-423b-a844-7df059bd099a", - "status": 200, - "expected": 200, - "bytes": 31898, - "headersMs": 78, - "firstBodyByteMs": 79, - "elapsedMs": 85 - }, - { - "method": "GET", - "route": "/api/admin/errors", - "requestID": "02b0c2e0-c747-4a8a-8762-29de26d41309", - "status": 200, - "expected": 200, - "bytes": 59884, - "headersMs": 48, - "firstBodyByteMs": 50, - "elapsedMs": 55 - }, - { - "method": "GET", - "route": "/api/admin/errors/stats", - "requestID": "a2cccf64-9246-4fa5-957e-92472acb34f4", - "status": 200, - "expected": 200, - "bytes": 1405, - "headersMs": 33, - "firstBodyByteMs": 35, - "elapsedMs": 36 - }, - { - "method": "GET", - "route": "/api/admin/tokens", - "requestID": "695f6819-e892-4423-aadd-1028e4fe4445", - "status": 200, - "expected": 200, - "bytes": 160, - "headersMs": 42, - "firstBodyByteMs": 43, - "elapsedMs": 43 - }, - { - "method": "GET", - "route": "/api/admin/errors?limit=5001", - "requestID": "09e1d911-c13d-4510-9633-b59876bfa243", - "status": 200, - "expected": 200, - "bytes": 229329, - "headersMs": 93, - "firstBodyByteMs": 96, - "elapsedMs": 110 - }, - { - "method": "GET", - "route": "/api/admin/errors/stats", - "requestID": "62f383b0-9f0b-4440-9723-fcd41657dafd", - "status": 200, - "expected": 200, - "bytes": 1405, - "headersMs": 33, - "firstBodyByteMs": 35, - "elapsedMs": 39 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793783367765-missing", - "requestID": "530c6e46-578d-4795-bc06-2193378dd546", - "status": 404, - "expected": 404, - "bytes": 26, - "headersMs": 31, - "firstBodyByteMs": 31, - "elapsedMs": 31 - }, - { - "method": "GET", - "route": "/api/admin/errors/stats", - "requestID": "c63cdf9c-0068-4d48-9215-9e50f0ffdb18", - "status": 200, - "expected": 200, - "bytes": 1405, - "headersMs": 50, - "firstBodyByteMs": 51, - "elapsedMs": 51 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=download&range=1h", - "requestID": "b7280c52-4c41-449e-9201-1992ae87b5b0", - "status": 200, - "expected": 200, - "bytes": 3410, - "headersMs": 50, - "firstBodyByteMs": 51, - "elapsedMs": 52 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=download&range=6h", - "requestID": "8e8d7510-d494-41cc-a17d-ab861d19652b", - "status": 200, - "expected": 200, - "bytes": 20216, - "headersMs": 37, - "firstBodyByteMs": 38, - "elapsedMs": 40 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=download&range=24h", - "requestID": "28141d24-9fe6-42f4-9ee0-e73b61e8d0c7", - "status": 200, - "expected": 200, - "bytes": 80746, - "headersMs": 39, - "firstBodyByteMs": 40, - "elapsedMs": 43 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=download&range=7d", - "requestID": "1cf633f4-e66c-43e0-9e59-ed0f3b64344f", - "status": 200, - "expected": 200, - "bytes": 564589, - "headersMs": 115, - "firstBodyByteMs": 117, - "elapsedMs": 142 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=remove&range=1h", - "requestID": "1b353d91-1cfc-4e03-8c31-b2a919adf949", - "status": 200, - "expected": 200, - "bytes": 3403, - "headersMs": 33, - "firstBodyByteMs": 34, - "elapsedMs": 34 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=cache&range=1h", - "requestID": "312f4489-928c-4a4c-a791-db3d132c8e3c", - "status": 200, - "expected": 200, - "bytes": 3401, - "headersMs": 30, - "firstBodyByteMs": 31, - "elapsedMs": 32 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=download&range=unrecognized", - "requestID": "a0636cb8-966d-41d2-9981-ec6aec7d1151", - "status": 200, - "expected": 200, - "bytes": 3420, - "headersMs": 28, - "firstBodyByteMs": 29, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=unknown", - "requestID": "94e208b8-5d9a-4bbc-a497-cd973cb3e5b5", - "status": 404, - "expected": 404, - "bytes": 27, - "headersMs": 28, - "firstBodyByteMs": 28, - "elapsedMs": 29 - }, - { - "method": "GET", - "route": "/api/stat", - "requestID": "80cd4d22-7124-48dd-b391-f6dd6056f623", - "status": 200, - "expected": 200, - "bytes": 70, - "headersMs": 41, - "firstBodyByteMs": 42, - "elapsedMs": 42 - }, - { - "method": "GET", - "route": "/api/stat/history?days=-2", - "requestID": "d7c0feec-10b0-48b9-a254-62fb0765eda4", - "status": 200, - "expected": 200, - "bytes": 106, - "headersMs": 46, - "firstBodyByteMs": 47, - "elapsedMs": 47 - }, - { - "method": "GET", - "route": "/api/stat/history?days=0", - "requestID": "2ca3694f-0c99-4606-9ea1-f1e6053e1111", - "status": 200, - "expected": 200, - "bytes": 208, - "headersMs": 26, - "firstBodyByteMs": 27, - "elapsedMs": 27 - }, - { - "method": "GET", - "route": "/api/stat/history?days=0x10", - "requestID": "098ed781-2f00-48dc-abd9-00ad5003a7db", - "status": 200, - "expected": 200, - "bytes": 208, - "headersMs": 28, - "firstBodyByteMs": 29, - "elapsedMs": 29 - }, - { - "method": "GET", - "route": "/api/stat/history?days=7suffix", - "requestID": "c1b5aca6-1581-4154-b825-5a6653821dfe", - "status": 200, - "expected": 200, - "bytes": 208, - "headersMs": 25, - "firstBodyByteMs": 26, - "elapsedMs": 26 - }, - { - "method": "GET", - "route": "/api/stat/history?days=999", - "requestID": "9d812630-f3d5-49e5-b8a3-d1ecb93f4d7a", - "status": 200, - "expected": 200, - "bytes": 208, - "headersMs": 25, - "firstBodyByteMs": 26, - "elapsedMs": 26 - }, - { - "method": "GET", - "route": "/api/stat/history?days[]=7&days[]=30", - "requestID": "855a456a-67a6-4568-988e-bae47b1c9615", - "status": 200, - "expected": 200, - "bytes": 208, - "headersMs": 23, - "firstBodyByteMs": 24, - "elapsedMs": 24 - }, - { - "method": "GET", - "route": "/api/stat/history?days[1]=7&days[0]=1", - "requestID": "43d92853-0da6-4d15-8d6a-3800dcdeed42", - "status": 200, - "expected": 200, - "bytes": 106, - "headersMs": 24, - "firstBodyByteMs": 25, - "elapsedMs": 25 - }, - { - "method": "GET", - "route": "/api/stat/history?days[x]=7", - "requestID": "f1238e09-eba0-4f42-9ca8-6705ba16ddcb", - "status": 200, - "expected": 200, - "bytes": 208, - "headersMs": 54, - "firstBodyByteMs": 55, - "elapsedMs": 55 - }, - { - "method": "GET", - "route": "/api/user/dashboard?statuses[]=", - "requestID": "7652d90b-6941-4979-aca7-091a449f66ba", - "status": 200, - "expected": 200, - "bytes": 64, - "headersMs": 47, - "firstBodyByteMs": 48, - "elapsedMs": 48 - }, - { - "method": "GET", - "route": "/api/user/dashboard?type[]=repo", - "requestID": "cd6d6bb1-e36e-44e0-b265-5d22bcbe355c", - "status": 200, - "expected": 200, - "bytes": 64, - "headersMs": 47, - "firstBodyByteMs": 48, - "elapsedMs": 48 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort[]=", - "requestID": "2ebdc229-19e4-48e6-8584-e1d58bf63d72", - "status": 400, - "expected": 400, - "bytes": 24, - "headersMs": 26, - "firstBodyByteMs": 26, - "elapsedMs": 26 - }, - { - "method": "GET", - "route": "/api/user/dashboard?cursor[]=", - "requestID": "80877fcb-0ff2-439b-937b-c035062e2c57", - "status": 400, - "expected": 400, - "bytes": 26, - "headersMs": 42, - "firstBodyByteMs": 42, - "elapsedMs": 42 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort=anonymizeDate&limit=5&cursor=eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDEiLCJ2YWx1ZSI6IjIwMjQtMDMtMDFUMDA6MDA6MDAuMDAwWiJ9", - "requestID": "a1e20c68-dbd7-487a-ab11-60f2c6fbc8e8", - "status": 200, - "expected": 200, - "bytes": 797, - "headersMs": 72, - "firstBodyByteMs": 73, - "elapsedMs": 73 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort=anonymizeDate&limit=5&cursor=eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDEiLCJ2YWx1ZSI6Ik1hcmNoIDEgMjAyNCJ9", - "requestID": "6a724ff1-39de-4169-af0a-abab6914c774", - "status": 200, - "expected": 200, - "bytes": 797, - "headersMs": 47, - "firstBodyByteMs": 48, - "elapsedMs": 49 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort=anonymizeDate&limit=5&cursor=eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDEiLCJ2YWx1ZSI6IjIwMjQtMDItMzAifQ", - "requestID": "1cbbcf24-6239-446b-8677-d8b359e60f50", - "status": 200, - "expected": 200, - "bytes": 797, - "headersMs": 48, - "firstBodyByteMs": 50, - "elapsedMs": 50 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort=anonymizeDate&limit=5&cursor=eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMjQ6MDA6MDBaIn0", - "requestID": "54f4249a-5847-46aa-bad5-83c9bd1d2a95", - "status": 200, - "expected": 200, - "bytes": 797, - "headersMs": 40, - "firstBodyByteMs": 41, - "elapsedMs": 42 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort=anonymizeDate&limit=5&cursor=eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDEiLCJ2YWx1ZSI6WyIyMDI0IiwiMyIsIjEiXX0", - "requestID": "2e592098-72a1-4117-ae5c-593e5218b29f", - "status": 200, - "expected": 200, - "bytes": 797, - "headersMs": 41, - "firstBodyByteMs": 42, - "elapsedMs": 42 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort=anonymizeDate&limit=5&cursor=eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDEiLCJ2YWx1ZSI6Im5vdCBhIGRhdGUifQ", - "requestID": "ae710288-ad98-4392-a8af-57a298e4449c", - "status": 400, - "expected": 400, - "bytes": 26, - "headersMs": 27, - "firstBodyByteMs": 27, - "elapsedMs": 27 - }, - { - "method": "GET", - "route": "/api/admin/performance?minutes=6e1", - "requestID": "df2a33dc-f2eb-40b2-a8f8-7d06af98286b", - "status": 200, - "expected": 200, - "bytes": 66638, - "headersMs": 118, - "firstBodyByteMs": 119, - "elapsedMs": 123 - }, - { - "method": "GET", - "route": "/api/admin/performance?minutes[]=60", - "requestID": "912f5662-6728-4f23-b187-36a7de191ed7", - "status": 200, - "expected": 200, - "bytes": 66638, - "headersMs": 88, - "firstBodyByteMs": 88, - "elapsedMs": 91 - }, - { - "method": "GET", - "route": "/api/admin/performance?minutes[0]=15", - "requestID": "a89f2c77-258b-4b18-9db6-17e7bc41337b", - "status": 200, - "expected": 200, - "bytes": 31908, - "headersMs": 73, - "firstBodyByteMs": 74, - "elapsedMs": 75 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue[]=cache&range[]=6h", - "requestID": "6af16d70-fe70-47a0-a4f4-9dc88bc76015", - "status": 200, - "expected": 200, - "bytes": 20201, - "headersMs": 33, - "firstBodyByteMs": 34, - "elapsedMs": 35 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?range[]=", - "requestID": "250b360f-0698-4994-8b55-86b9f383e9a7", - "status": 200, - "expected": 200, - "bytes": 3408, - "headersMs": 51, - "firstBodyByteMs": 52, - "elapsedMs": 52 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?range=toString", - "requestID": "ccb65606-9d55-4df8-b793-a055a9243fb1", - "status": 200, - "expected": 200, - "bytes": 51, - "headersMs": 28, - "firstBodyByteMs": 29, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue[]=", - "requestID": "a90c890f-318f-4d84-8664-ce014ad1e31e", - "status": 404, - "expected": 404, - "bytes": 27, - "headersMs": 28, - "firstBodyByteMs": 28, - "elapsedMs": 29 - }, - { - "method": "GET", - "route": "/api/admin/queues?queue[]=remove", - "requestID": "1e1fccc0-4e51-4e5f-b13b-9e8130aff575", - "status": 200, - "expected": 200, - "bytes": 7695, - "headersMs": 61, - "firstBodyByteMs": 62, - "elapsedMs": 63 - }, - { - "method": "GET", - "route": "/api/admin/errors?offset[]=2&limit[]=7", - "requestID": "47c88573-3dd3-4d58-94bd-a2451c1500c9", - "status": 200, - "expected": 200, - "bytes": 2293, - "headersMs": 32, - "firstBodyByteMs": 33, - "elapsedMs": 33 - }, - { - "method": "GET", - "route": "/api/repo/octocat/Hello-World?connection=", - "requestID": "b23f103c-dd73-46c3-8525-941d2f126c8e", - "status": 400, - "expected": 400, - "bytes": 30, - "headersMs": 28, - "firstBodyByteMs": 28, - "elapsedMs": 28 - }, - { - "method": "GET", - "route": "/api/repo/octocat/Hello-World?connection[]=oauth", - "requestID": "95c149f1-6262-4207-a393-df43005315ae", - "status": 400, - "expected": 400, - "bytes": 30, - "headersMs": 27, - "firstBodyByteMs": 27, - "elapsedMs": 27 - }, - { - "method": "GET", - "route": "/api/repo/octocat/Hello-World?connection=oauth&connection[]=github-app", - "requestID": "1d818a40-65b8-4695-9a1d-d08daf37357c", - "status": 400, - "expected": 400, - "bytes": 30, - "headersMs": 30, - "firstBodyByteMs": 30, - "elapsedMs": 31 - }, - { - "method": "GET", - "route": "/api/repo/octocat/Hello-World?repositoryID[]=invalid", - "requestID": "d8bb92c0-8a73-48e7-a85f-b387f5c78171", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 41, - "firstBodyByteMs": 41, - "elapsedMs": 41 - }, - { - "method": "GET", - "route": "/api/repo/octocat/Hello-World?repositoryID=invalid", - "requestID": "1abdab2c-00d1-4c97-b781-e2fe9f51080d", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 25, - "firstBodyByteMs": 25, - "elapsedMs": 25 - }, - { - "method": "GET", - "route": "/api/repo/octocat/Hello-World?repositoryID[$exists]=true", - "requestID": "831fa275-0f12-40c0-8bb8-58ccfcc59749", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 142, - "firstBodyByteMs": 142, - "elapsedMs": 142 - }, - { - "method": "GET", - "route": "/api/user/search/github-users?q[]=ab", - "requestID": "99a14fcd-1b39-4c0a-9b63-f4473524480d", - "status": 200, - "expected": 200, - "bytes": 2, - "headersMs": 29, - "firstBodyByteMs": 29, - "elapsedMs": 29 - }, - { - "method": "GET", - "route": "/api/user/search/github-users?q[length]=1", - "requestID": "8074da10-66c0-4bab-9027-0121566af393", - "status": 200, - "expected": 200, - "bytes": 2, - "headersMs": 44, - "firstBodyByteMs": 44, - "elapsedMs": 44 - }, - { - "method": "GET", - "route": "/api/user/search/github-users?q=ab&q=cd", - "requestID": "9c0ce895-017a-408a-b977-52f0ac25b795", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 33, - "firstBodyByteMs": 33, - "elapsedMs": 33 - }, - { - "method": "GET", - "route": "/api/user/search/github-users?q[x]=ab", - "requestID": "bc6e7b4a-6c44-4ae1-aeec-14489308eb73", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 32, - "firstBodyByteMs": 32, - "elapsedMs": 32 - }, - { - "method": "GET", - "route": "/api/user/search/github-users?q[length][toString]=1", - "requestID": "d2398b1e-63fd-47ac-8f05-331e69ea6ed8", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 29, - "firstBodyByteMs": 29, - "elapsedMs": 29 - }, - { - "method": "GET", - "route": "/api/admin/repos?page[]=2&limit[]=2&sort[]=status&direction[]=asc&format[]=csv", - "requestID": "e8a00c69-6a8c-48bb-9114-cb99186439bb", - "status": 200, - "expected": 200, - "bytes": 2680, - "headersMs": 34, - "firstBodyByteMs": 35, - "elapsedMs": 36 - }, - { - "method": "GET", - "route": "/api/admin/repos?page=1000001&limit=1", - "requestID": "947747c0-2683-4f2f-a52c-18f071ef0a7f", - "status": 200, - "expected": 200, - "bytes": 193, - "headersMs": 35, - "firstBodyByteMs": 36, - "elapsedMs": 37 - }, - { - "method": "GET", - "route": "/api/admin/repos?page=-1", - "requestID": "3e04e2ce-e2ef-4204-9c78-5955f98f30ea", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 26, - "firstBodyByteMs": 27, - "elapsedMs": 27 - }, - { - "method": "GET", - "route": "/api/admin/repos?page[toString]=x", - "requestID": "b1584c6b-7dc2-4b93-9daf-362d216d1e55", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 42, - "firstBodyByteMs": 43, - "elapsedMs": 43 - }, - { - "method": "GET", - "route": "/api/admin/users?page[]=2&limit[]=2&sort[]=status&direction[]=asc&format[]=csv", - "requestID": "c5e07406-5d3a-4903-b700-adf8b7335534", - "status": 200, - "expected": 200, - "bytes": 106, - "headersMs": 31, - "firstBodyByteMs": 32, - "elapsedMs": 32 - }, - { - "method": "GET", - "route": "/api/admin/users?page=1000001&limit=1", - "requestID": "cde8d480-41c7-40e0-8bf4-5b27a4b35ec2", - "status": 200, - "expected": 200, - "bytes": 112, - "headersMs": 31, - "firstBodyByteMs": 32, - "elapsedMs": 32 - }, - { - "method": "GET", - "route": "/api/admin/users?page=-1", - "requestID": "7edcb9d2-7388-4229-9693-beeb8b5022e6", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 31, - "firstBodyByteMs": 31, - "elapsedMs": 31 - }, - { - "method": "GET", - "route": "/api/admin/users?page[toString]=x", - "requestID": "0abc9a6f-4818-4c2f-ba9d-875cf0652bb0", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 27, - "firstBodyByteMs": 27, - "elapsedMs": 27 - }, - { - "method": "GET", - "route": "/api/admin/users?limit=-1", - "requestID": "491065b7-1a5b-4a4c-b70b-bb7605df03a7", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 31, - "firstBodyByteMs": 31, - "elapsedMs": 31 - }, - { - "method": "GET", - "route": "/api/admin/conferences?page[]=2&limit[]=2&sort[]=status&direction[]=asc&format[]=csv", - "requestID": "539d2c92-3b57-4862-8698-ecb40075c2a8", - "status": 200, - "expected": 200, - "bytes": 80, - "headersMs": 34, - "firstBodyByteMs": 35, - "elapsedMs": 36 - }, - { - "method": "GET", - "route": "/api/admin/conferences?page=1000001&limit=1", - "requestID": "da7d3b87-b147-4c05-bb17-f66508103b49", - "status": 200, - "expected": 200, - "bytes": 86, - "headersMs": 58, - "firstBodyByteMs": 59, - "elapsedMs": 59 - }, - { - "method": "GET", - "route": "/api/admin/conferences?page=-1", - "requestID": "d0d74caf-34f5-486e-972b-cefbc560850c", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 29, - "firstBodyByteMs": 30, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/api/admin/conferences?page[toString]=x", - "requestID": "d1630026-4ab4-4085-9679-d20c2ba6e91d", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 29, - "firstBodyByteMs": 29, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/api/admin/repos?limit=-1", - "requestID": "29486abe-361f-4154-af2d-ce71219ce489", - "status": 200, - "expected": 200, - "bytes": 1433, - "headersMs": 35, - "firstBodyByteMs": 36, - "elapsedMs": 36 - }, - { - "method": "GET", - "route": "/api/admin/repos?ready[]=true", - "requestID": "b0212776-15e2-49bf-8dc6-657cd0de5fb0", - "status": 200, - "expected": 200, - "bytes": 1936, - "headersMs": 34, - "firstBodyByteMs": 35, - "elapsedMs": 36 - }, - { - "method": "GET", - "route": "/api/admin/conferences?limit=-1", - "requestID": "c7a8822d-3a09-4e4d-b35c-97c220041afb", - "status": 200, - "expected": 200, - "bytes": 80, - "headersMs": 32, - "firstBodyByteMs": 33, - "elapsedMs": 33 - }, - { - "method": "GET", - "route": "/api/admin/conferences?ready[]=true", - "requestID": "d6b79b40-af02-4ae2-b0d2-015e6dee5319", - "status": 200, - "expected": 200, - "bytes": 117, - "headersMs": 33, - "firstBodyByteMs": 34, - "elapsedMs": 34 - }, - { - "method": "GET", - "route": "/api/admin/repos?search[]=x", - "requestID": "c63b78f7-4900-4800-b6c8-4444592a57d4", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 28, - "firstBodyByteMs": 28, - "elapsedMs": 29 - }, - { - "method": "GET", - "route": "/api/admin/users?search[]=x", - "requestID": "599832f2-036d-474e-9ce0-ee2e482ff566", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 33, - "firstBodyByteMs": 33, - "elapsedMs": 33 - }, - { - "method": "GET", - "route": "/api/admin/conferences?search[]=x", - "requestID": "ba2a38eb-1a00-4108-9a6e-61fd0ca3f655", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 27, - "firstBodyByteMs": 27, - "elapsedMs": 27 - }, - { - "method": "GET", - "route": "/api/admin/users?status[]=active", - "requestID": "211ebc76-665d-4d4b-87a1-cc2666f753ea", - "status": 200, - "expected": 200, - "bytes": 99, - "headersMs": 31, - "firstBodyByteMs": 33, - "elapsedMs": 33 - }, - { - "method": "GET", - "route": "/api/admin/users?status[$in][]=active", - "requestID": "a2688d70-fb1d-4eec-a29d-435d5739f2fd", - "status": 200, - "expected": 200, - "bytes": 553, - "headersMs": 37, - "firstBodyByteMs": 38, - "elapsedMs": 39 - }, - { - "method": "GET", - "route": "/api/admin/users?status[a]=active", - "requestID": "70940900-a93e-4c93-a395-04b04a36fe44", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 27, - "firstBodyByteMs": 27, - "elapsedMs": 27 - }, - { - "method": "GET", - "route": "/api/admin/users?status[$in]=active", - "requestID": "f8032e82-ee6b-4c99-961f-48fb2c5fcf73", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 28, - "firstBodyByteMs": 28, - "elapsedMs": 28 - }, - { - "method": "GET", - "route": "/api/admin/repos?owner[a]=x", - "requestID": "20025474-ba05-4aca-bc79-cd8d899dc921", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 30, - "firstBodyByteMs": 30, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/api/admin/repos?conference[$unknown]=x", - "requestID": "1b73d970-b40e-4581-88f7-c76689c229dd", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 26, - "firstBodyByteMs": 26, - "elapsedMs": 27 - }, - { - "method": "GET", - "route": "/api/admin/repos?dateFrom[]=2024-02-30", - "requestID": "ebb6ff32-c04b-431d-a1d6-9937ea1fb1bd", - "status": 200, - "expected": 200, - "bytes": 12571, - "headersMs": 40, - "firstBodyByteMs": 41, - "elapsedMs": 42 - }, - { - "method": "GET", - "route": "/api/admin/repos?dateTo=March%201%202024", - "requestID": "546931c4-da9d-491f-82d3-1a4d4887496e", - "status": 200, - "expected": 200, - "bytes": 156, - "headersMs": 35, - "firstBodyByteMs": 36, - "elapsedMs": 36 - }, - { - "method": "GET", - "route": "/api/admin/repos?dateFrom[toString]=x", - "requestID": "a4716592-a14c-44f5-bec9-413cf7852ba8", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 29, - "firstBodyByteMs": 29, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/api/admin/users?dateFrom[]=2024-02-30", - "requestID": "059eba86-0d18-4a9b-8697-d28eb5bd9826", - "status": 200, - "expected": 200, - "bytes": 458, - "headersMs": 31, - "firstBodyByteMs": 32, - "elapsedMs": 33 - }, - { - "method": "GET", - "route": "/api/admin/users?dateTo=March%201%202024", - "requestID": "b63c7ca7-77ed-4b22-a468-84d053ff27b6", - "status": 200, - "expected": 200, - "bytes": 129, - "headersMs": 32, - "firstBodyByteMs": 33, - "elapsedMs": 33 - }, - { - "method": "GET", - "route": "/api/admin/users?dateFrom[toString]=x", - "requestID": "888183f1-3738-423d-86e0-89c3b5891e5f", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 27, - "firstBodyByteMs": 27, - "elapsedMs": 27 - }, - { - "method": "GET", - "route": "/api/admin/conferences?dateFrom[]=2024-02-30", - "requestID": "c4baf6c7-0099-4bdd-b4d3-8098af78cb75", - "status": 200, - "expected": 200, - "bytes": 138, - "headersMs": 34, - "firstBodyByteMs": 35, - "elapsedMs": 35 - }, - { - "method": "GET", - "route": "/api/admin/conferences?dateTo=March%201%202024", - "requestID": "b9d856ee-ffe3-412f-8cef-c022e1973e1a", - "status": 200, - "expected": 200, - "bytes": 138, - "headersMs": 35, - "firstBodyByteMs": 36, - "elapsedMs": 36 - }, - { - "method": "GET", - "route": "/api/admin/conferences?dateFrom[toString]=x", - "requestID": "d44e3bfe-6dc3-4970-9228-92342fbaed9a", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 30, - "firstBodyByteMs": 30, - "elapsedMs": 31 - }, - { - "method": "GET", - "route": "/github/connections", - "requestID": "0771163c-98db-4d75-a44b-8128904fafed", - "status": 200, - "expected": 200, - "bytes": 456, - "headersMs": 620, - "firstBodyByteMs": 621, - "elapsedMs": 622 - }, - { - "method": "POST", - "route": "/api/admin/tokens", - "requestID": "1c1decc2-0f0e-4fc5-b35b-9fed74436975", - "status": 200, - "expected": 200, - "bytes": 186, - "headersMs": 43, - "firstBodyByteMs": 44, - "elapsedMs": 45 - }, - { - "method": "GET", - "route": "/api/user", - "requestID": "78bd3279-7ae6-47f0-abc9-32d2a38b0ed4", - "status": 200, - "expected": 200, - "bytes": 100, - "headersMs": 29, - "firstBodyByteMs": 30, - "elapsedMs": 30 - }, - { - "method": "DELETE", - "route": "/api/admin/tokens/6aeaf650de175e3ac6b722a8", - "requestID": "1ff0f262-0d53-4a53-b2ac-9b323887e90f", - "status": 200, - "expected": 200, - "bytes": 13, - "headersMs": 30, - "firstBodyByteMs": 30, - "elapsedMs": 31 - }, - { - "method": "GET", - "route": "/api/user", - "requestID": "74b3efbc-dd80-420d-b51a-f3cb35543972", - "status": 401, - "expected": 401, - "bytes": 25, - "headersMs": 24, - "firstBodyByteMs": 25, - "elapsedMs": 25 - }, - { - "method": "POST", - "route": "/github/login-token", - "requestID": "79b910d0-0240-4be9-bd4e-dd9407948096", - "status": 200, - "expected": 200, - "bytes": 33, - "headersMs": 31, - "firstBodyByteMs": 31, - "elapsedMs": 31 - }, - { - "method": "GET", - "route": "/api/user", - "requestID": "610d5ea6-2627-45e1-9db9-e61c40887f2a", - "status": 200, - "expected": 200, - "bytes": 100, - "headersMs": 41, - "firstBodyByteMs": 41, - "elapsedMs": 42 - }, - { - "method": "GET", - "route": "/api/user/logout", - "requestID": "7cda6088-27f7-4333-b4c5-0dd069422440", - "status": 302, - "expected": 302, - "bytes": 24, - "headersMs": 27, - "firstBodyByteMs": 27, - "elapsedMs": 28 - }, - { - "method": "GET", - "route": "/api/user", - "requestID": "3e54c7c2-d0f1-4f13-b4bf-485a2cdd9d42", - "status": 401, - "expected": 401, - "bytes": 25, - "headersMs": 27, - "firstBodyByteMs": 27, - "elapsedMs": 27 - }, - { - "method": "POST", - "route": "/api/anonymize-preview", - "requestID": "38b715b1-2ceb-41be-90c0-ca1ba69aeff4", - "status": 200, - "expected": 200, - "bytes": 26, - "headersMs": 31, - "firstBodyByteMs": 31, - "elapsedMs": 31 - }, - { - "method": "GET", - "route": "/api/providers/github/repository/metadata?name=tdurieux%2Fsynctex-js&connection=github-app", - "requestID": "ce0e68d0-3236-4708-888c-f075bf5c50d5", - "status": 200, - "expected": 200, - "bytes": 230, - "headersMs": 2735, - "firstBodyByteMs": 2737, - "elapsedMs": 2737 - }, - { - "method": "GET", - "route": "/api/providers/github/repository/branches?name=tdurieux%2Fsynctex-js&connection=github-app", - "requestID": "362bc0b8-385b-4fb6-b9be-d055cb62f0f2", - "status": 200, - "expected": 200, - "bytes": 2623, - "headersMs": 2151, - "firstBodyByteMs": 2152, - "elapsedMs": 2153 - }, - { - "method": "GET", - "route": "/api/providers/github/repository/readme?name=tdurieux%2Fsynctex-js&connection=github-app", - "requestID": "aa7b38ea-34bb-45eb-8734-f91708294288", - "status": 200, - "expected": 200, - "bytes": 2303, - "headersMs": 1974, - "firstBodyByteMs": 1975, - "elapsedMs": 1976 - }, - { - "method": "POST", - "route": "/api/repo", - "requestID": "da48a753-7a3d-4c37-b07f-419df04781d8", - "status": 200, - "expected": 200, - "bytes": 22, - "headersMs": 2710, - "firstBodyByteMs": 2711, - "elapsedMs": 2711 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793783367765", - "requestID": "fccb5533-9b15-407a-9716-5b6ad0bb9381", - "status": 200, - "expected": 200, - "bytes": 566, - "headersMs": 102, - "firstBodyByteMs": 104, - "elapsedMs": 105 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793783367765/file/LICENSE", - "requestID": "faa7b786-3fda-46ce-b268-aac23c2dd960", - "status": 200, - "expected": 200, - "bytes": 1074, - "headersMs": 157, - "firstBodyByteMs": 158, - "elapsedMs": 159 - }, - { - "method": "GET", - "route": "/w/go-beta-check-1793783367765/LICENSE", - "requestID": "afb234fb-21ac-4d87-9f57-1e6e4a75400f", - "status": 200, - "expected": 200, - "bytes": 1074, - "headersMs": 61, - "firstBodyByteMs": 62, - "elapsedMs": 63 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793783367765/files", - "requestID": "98f77f9a-0a1f-49ad-a296-13f769fe6856", - "status": 200, - "expected": 200, - "bytes": 170, - "headersMs": 32, - "firstBodyByteMs": 33, - "elapsedMs": 33 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793783367765/zip", - "requestID": "64bb8b4d-dc3f-4f97-ae46-bad7f8a39318", - "status": 200, - "expected": 200, - "bytes": 7171, - "headersMs": 704, - "firstBodyByteMs": 705, - "elapsedMs": 845 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793783367765/file/LICENSE", - "requestID": "c2e99914-6a05-4d2e-8b25-d733342fdfb9", - "status": 200, - "expected": 200, - "bytes": 1074, - "headersMs": 66, - "firstBodyByteMs": 67, - "elapsedMs": 70 - }, - { - "method": "GET", - "route": "/w/go-beta-check-1793783367765/LICENSE", - "requestID": "dd8d1e6b-fb1a-42b1-a14b-ecebfd4c9793", - "status": 200, - "expected": 200, - "bytes": 1074, - "headersMs": 51, - "firstBodyByteMs": 52, - "elapsedMs": 53 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793783367765/zip", - "requestID": "91728bca-5cd8-4bdf-947e-579dec410bb9", - "status": 200, - "expected": 200, - "bytes": 7171, - "headersMs": 547, - "firstBodyByteMs": 547, - "elapsedMs": 589 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793783367765/file/LICENSE", - "requestID": "c482c35d-6528-4670-9a71-f5f40d62e587", - "status": 200, - "expected": 200, - "bytes": 1074, - "headersMs": 66, - "firstBodyByteMs": 68, - "elapsedMs": 69 - }, - { - "method": "GET", - "route": "/w/go-beta-check-1793783367765/LICENSE", - "requestID": "3c54c339-9b20-433b-bd6f-764d747ee83c", - "status": 200, - "expected": 200, - "bytes": 1074, - "headersMs": 51, - "firstBodyByteMs": 52, - "elapsedMs": 52 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793783367765/zip", - "requestID": "9f056d3d-b92a-423d-a920-f0b2cfdf8fa2", - "status": 200, - "expected": 200, - "bytes": 7171, - "headersMs": 523, - "firstBodyByteMs": 524, - "elapsedMs": 571 - }, - { - "method": "GET", - "route": "/api/admin/performance", - "requestID": "631c07de-eeb8-474e-976a-9f618d2db90e", - "status": 200, - "expected": 200, - "bytes": 32375, - "headersMs": 85, - "firstBodyByteMs": 86, - "elapsedMs": 88 - }, - { - "method": "GET", - "route": "/api/user", - "requestID": "74e86ae2-05bb-4026-a278-86ef98aa3efc", - "status": 401, - "expected": 401, - "bytes": 25, - "headersMs": 30, - "firstBodyByteMs": 30, - "elapsedMs": 30 - }, - { - "method": "DELETE", - "route": "/api/repo/go-beta-check-1793783367765", - "requestID": "4f15b419-9449-4df2-bf73-dfe0d46b0d6c", - "status": 200, - "expected": 200, - "bytes": 21, - "headersMs": 36, - "firstBodyByteMs": 36, - "elapsedMs": 36 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793783367765", - "requestID": "5566d22a-aee6-4d58-8ece-411a8d842fb3", - "status": 200, - "expected": 200, - "bytes": 616, - "headersMs": 30, - "firstBodyByteMs": 31, - "elapsedMs": 31 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793783367765", - "requestID": "5fc16e11-fedc-4429-9a94-7f02cdd841a9", - "status": 200, - "expected": 200, - "bytes": 615, - "headersMs": 31, - "firstBodyByteMs": 32, - "elapsedMs": 32 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793783367765/file/LICENSE", - "requestID": "fcc43831-2519-480f-96b4-8c9317157362", - "status": 410, - "expected": 410, - "bytes": 30, - "headersMs": 32, - "firstBodyByteMs": 32, - "elapsedMs": 33 - }, - { - "method": "GET", - "route": "/api/user", - "requestID": "2d9558b5-c858-49b8-b7a1-a06d64af3316", - "status": 401, - "expected": 401, - "bytes": 25, - "headersMs": 46, - "firstBodyByteMs": 46, - "elapsedMs": 46 - } - ], - "productionChanged": false, - "overviewHistoryFresh": "passed", - "overviewBrowserFields": "passed", - "queueOverviewFields": "passed", - "errorMonitoring": { - "maxEntries": 5000, - "hourlyBuckets": 24, - "routine404Counted": true - }, - "queueMetricWindows": [ - { - "queue": "download", - "range": "1h", - "points": 60 - }, - { - "queue": "download", - "range": "6h", - "points": 360 - }, - { - "queue": "download", - "range": "24h", - "points": 1440 - }, - { - "queue": "download", - "range": "7d", - "points": 10080 - }, - { - "queue": "remove", - "range": "1h", - "points": 60 - }, - { - "queue": "cache", - "range": "1h", - "points": 60 - }, - { - "queue": "download", - "range": "unrecognized", - "points": 60 - } - ], - "publicStatistics": { - "anonymousAccess": true, - "windows": [ - { - "query": "days=-2", - "days": 1, - "rows": 1 - }, - { - "query": "days=0", - "days": 30, - "rows": 2 - }, - { - "query": "days=0x10", - "days": 16, - "rows": 2 - }, - { - "query": "days=7suffix", - "days": 7, - "rows": 2 - }, - { - "query": "days=999", - "days": 365, - "rows": 2 - }, - { - "query": "days[]=7&days[]=30", - "days": 7, - "rows": 2 - }, - { - "query": "days[1]=7&days[0]=1", - "days": 1, - "rows": 1 - }, - { - "query": "days[x]=7", - "days": 30, - "rows": 2 - } - ] - }, - "dashboardExtendedQueries": "passed", - "dashboardDateCursors": "passed", - "monitoringExtendedQueries": "passed", - "adminExtendedQueries": "passed", - "previewConnectionQueries": "passed", - "previewCacheHintRejections": "passed", - "userSearchQueries": "passed", - "adminListPaginationQueries": "passed", - "adminListFilterQueries": "passed", - "adminListCastingQueries": "passed", - "adminListDateQueries": "passed", - "apiKeyLifecycle": "passed", - "sessionLoginLogout": "passed", - "zipManifestSHA256": "e6fdc1385a4d0b50e3deea32ab2fcf34de88d1147ed5001b81cbd0968dcf5a81", - "zipEntries": 5, - "zipSourceCommit": "912f3c897c5ac1bbc225f65cfd1387579fb3385e", - "exactZipContents": "passed", - "repeatedContentChecks": 3, - "performanceMonitoring": { - "requests": true, - "processSamples": true, - "runtimeHistory": true, - "stages": [ - "repository", - "authorization", - "worker_wait", - "anonymize" - ], - "upstreamObserved": true, - "upstreamNote": "Shared-cache hits need no upstream read; provider timing is checked by the integration suite." - }, - "result": "passed", - "testRepositoryRemoved": true, - "temporaryKeyRevoked": true, - "betaAccountAdmin": true, - "uniqueRequestIDsVerified": 133 -} diff --git a/backend/reports/zip-streaming-live-before.json b/backend/reports/zip-streaming-live-before.json deleted file mode 100644 index df1f3ad..0000000 --- a/backend/reports/zip-streaming-live-before.json +++ /dev/null @@ -1,1597 +0,0 @@ -{ - "verifiedAt": "2026-11-04T09:01:36.647Z", - "hostname": "beta.durieux.me", - "configurationMode": "GitHub App enabled alongside legacy OAuth", - "checks": [ - { - "method": "GET", - "route": "/api/user", - "requestID": "7b1d5cee-9925-4515-a20a-7da4175112ae", - "status": 401, - "expected": 401, - "bytes": 25, - "headersMs": 330, - "firstBodyByteMs": 334, - "elapsedMs": 346 - }, - { - "method": "GET", - "route": "/api/user", - "requestID": "34ec713d-4a5c-42dc-9c05-0712d8e65b3e", - "status": 200, - "expected": 200, - "bytes": 100, - "headersMs": 163, - "firstBodyByteMs": 170, - "elapsedMs": 171 - }, - { - "method": "GET", - "route": "/github/connections", - "requestID": "a2cdd622-02c0-4294-85ab-6d2a4deab3ac", - "status": 200, - "expected": 200, - "bytes": 456, - "headersMs": 764, - "firstBodyByteMs": 767, - "elapsedMs": 771 - }, - { - "method": "GET", - "route": "/api/providers", - "requestID": "b7573e2a-135f-44f1-bf0b-46e3460d594f", - "status": 200, - "expected": 200, - "bytes": 144, - "headersMs": 44, - "firstBodyByteMs": 47, - "elapsedMs": 48 - }, - { - "method": "GET", - "route": "/api/user/dashboard", - "requestID": "8f35ee24-8e72-4015-a64e-8cddb4a9185e", - "status": 200, - "expected": 200, - "bytes": 797, - "headersMs": 59, - "firstBodyByteMs": 68, - "elapsedMs": 70 - }, - { - "method": "GET", - "route": "/api/user/default", - "requestID": "fcd55375-9b17-4b0b-be71-914670b38725", - "status": 200, - "expected": 200, - "bytes": 25, - "headersMs": 52, - "firstBodyByteMs": 53, - "elapsedMs": 53 - }, - { - "method": "GET", - "route": "/api/user/quota", - "requestID": "d970074a-798c-4f0b-8f73-acaf0ef8cc4b", - "status": 200, - "expected": 200, - "bytes": 115, - "headersMs": 52, - "firstBodyByteMs": 55, - "elapsedMs": 55 - }, - { - "method": "GET", - "route": "/api/admin/overview", - "requestID": "a37d883d-f139-48f1-b03c-bfda6120d5df", - "status": 200, - "expected": 200, - "bytes": 1241, - "headersMs": 114, - "firstBodyByteMs": 116, - "elapsedMs": 117 - }, - { - "method": "GET", - "route": "/api/admin/users", - "requestID": "ff90e617-e7a1-40c2-8ce3-d6f4a1dbb408", - "status": 200, - "expected": 200, - "bytes": 526, - "headersMs": 37, - "firstBodyByteMs": 38, - "elapsedMs": 39 - }, - { - "method": "GET", - "route": "/api/admin/repos", - "requestID": "59e1ca6c-db8a-4ded-b12b-3bb81ad870e9", - "status": 200, - "expected": 200, - "bytes": 12431, - "headersMs": 39, - "firstBodyByteMs": 40, - "elapsedMs": 42 - }, - { - "method": "GET", - "route": "/api/admin/queues", - "requestID": "65e78629-e07b-46fc-8137-9215e783d76a", - "status": 200, - "expected": 200, - "bytes": 7431, - "headersMs": 62, - "firstBodyByteMs": 63, - "elapsedMs": 65 - }, - { - "method": "GET", - "route": "/api/admin/performance", - "requestID": "c9c35749-fcda-4a5e-9555-d65f143af32f", - "status": 200, - "expected": 200, - "bytes": 17217, - "headersMs": 75, - "firstBodyByteMs": 77, - "elapsedMs": 83 - }, - { - "method": "GET", - "route": "/api/admin/errors", - "requestID": "759004b5-99f5-423b-a36e-93b5278a10de", - "status": 200, - "expected": 200, - "bytes": 59573, - "headersMs": 69, - "firstBodyByteMs": 71, - "elapsedMs": 74 - }, - { - "method": "GET", - "route": "/api/admin/errors/stats", - "requestID": "80c020f3-d51b-456a-a586-afce17233889", - "status": 200, - "expected": 200, - "bytes": 1403, - "headersMs": 33, - "firstBodyByteMs": 35, - "elapsedMs": 36 - }, - { - "method": "GET", - "route": "/api/admin/tokens", - "requestID": "ba467903-ab6e-4494-8a08-52a40ee5034a", - "status": 200, - "expected": 200, - "bytes": 160, - "headersMs": 37, - "firstBodyByteMs": 38, - "elapsedMs": 39 - }, - { - "method": "GET", - "route": "/api/admin/errors?limit=5001", - "requestID": "1a908d81-414d-4491-93aa-443355e9dbb2", - "status": 200, - "expected": 200, - "bytes": 213345, - "headersMs": 110, - "firstBodyByteMs": 114, - "elapsedMs": 130 - }, - { - "method": "GET", - "route": "/api/admin/errors/stats", - "requestID": "146a5693-1e77-4adf-b419-52613332236f", - "status": 200, - "expected": 200, - "bytes": 1403, - "headersMs": 56, - "firstBodyByteMs": 59, - "elapsedMs": 63 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793782896651-missing", - "requestID": "2a104db0-c258-40ae-9930-9ed7973cf2ac", - "status": 404, - "expected": 404, - "bytes": 26, - "headersMs": 52, - "firstBodyByteMs": 52, - "elapsedMs": 52 - }, - { - "method": "GET", - "route": "/api/admin/errors/stats", - "requestID": "f9b410f0-97a0-43fc-bc76-9fe5f5e3ea18", - "status": 200, - "expected": 200, - "bytes": 1403, - "headersMs": 49, - "firstBodyByteMs": 51, - "elapsedMs": 52 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=download&range=1h", - "requestID": "6e848d35-15b7-4048-8033-b4491f772464", - "status": 200, - "expected": 200, - "bytes": 3408, - "headersMs": 37, - "firstBodyByteMs": 38, - "elapsedMs": 38 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=download&range=6h", - "requestID": "189ff154-cc89-4f15-a6d0-b68bbb01544c", - "status": 200, - "expected": 200, - "bytes": 20212, - "headersMs": 46, - "firstBodyByteMs": 47, - "elapsedMs": 49 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=download&range=24h", - "requestID": "3425043a-3777-429d-ae6f-da99dd602855", - "status": 200, - "expected": 200, - "bytes": 80742, - "headersMs": 52, - "firstBodyByteMs": 53, - "elapsedMs": 55 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=download&range=7d", - "requestID": "182c3fc9-9c1f-439a-b563-5f4231e15375", - "status": 200, - "expected": 200, - "bytes": 564585, - "headersMs": 154, - "firstBodyByteMs": 156, - "elapsedMs": 194 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=remove&range=1h", - "requestID": "080826fb-c334-4c99-abac-69bbe949906d", - "status": 200, - "expected": 200, - "bytes": 3403, - "headersMs": 54, - "firstBodyByteMs": 55, - "elapsedMs": 56 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=cache&range=1h", - "requestID": "5f165322-c73b-4dd8-a306-4bdc7b829d20", - "status": 200, - "expected": 200, - "bytes": 3401, - "headersMs": 33, - "firstBodyByteMs": 34, - "elapsedMs": 35 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=download&range=unrecognized", - "requestID": "ab40c77f-6046-4f43-ac7d-de26f1e60606", - "status": 200, - "expected": 200, - "bytes": 3418, - "headersMs": 37, - "firstBodyByteMs": 38, - "elapsedMs": 38 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue=unknown", - "requestID": "f4bbe9e7-ddff-4a13-9483-65cdb5958219", - "status": 404, - "expected": 404, - "bytes": 27, - "headersMs": 30, - "firstBodyByteMs": 30, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/api/stat", - "requestID": "3d82e85d-308a-48ae-9f19-65d70e77f045", - "status": 200, - "expected": 200, - "bytes": 70, - "headersMs": 48, - "firstBodyByteMs": 49, - "elapsedMs": 49 - }, - { - "method": "GET", - "route": "/api/stat/history?days=-2", - "requestID": "287273ad-fe15-4dfe-ae6e-dd913011823f", - "status": 200, - "expected": 200, - "bytes": 106, - "headersMs": 26, - "firstBodyByteMs": 27, - "elapsedMs": 27 - }, - { - "method": "GET", - "route": "/api/stat/history?days=0", - "requestID": "4465363d-8049-453a-8675-213af5fb6ddd", - "status": 200, - "expected": 200, - "bytes": 208, - "headersMs": 45, - "firstBodyByteMs": 45, - "elapsedMs": 46 - }, - { - "method": "GET", - "route": "/api/stat/history?days=0x10", - "requestID": "4f01e462-d737-462e-80fa-fa0ee93154e6", - "status": 200, - "expected": 200, - "bytes": 208, - "headersMs": 24, - "firstBodyByteMs": 25, - "elapsedMs": 25 - }, - { - "method": "GET", - "route": "/api/stat/history?days=7suffix", - "requestID": "e101689a-819f-4a07-bc69-4e1e1ccad499", - "status": 200, - "expected": 200, - "bytes": 208, - "headersMs": 23, - "firstBodyByteMs": 24, - "elapsedMs": 24 - }, - { - "method": "GET", - "route": "/api/stat/history?days=999", - "requestID": "7212e075-ee08-4900-8b9f-204e547b8806", - "status": 200, - "expected": 200, - "bytes": 208, - "headersMs": 26, - "firstBodyByteMs": 27, - "elapsedMs": 27 - }, - { - "method": "GET", - "route": "/api/stat/history?days[]=7&days[]=30", - "requestID": "6edea6cd-c2a5-41cd-93a2-cfca7684c4c2", - "status": 200, - "expected": 200, - "bytes": 208, - "headersMs": 24, - "firstBodyByteMs": 24, - "elapsedMs": 25 - }, - { - "method": "GET", - "route": "/api/stat/history?days[1]=7&days[0]=1", - "requestID": "ab30d89e-4c0a-46ed-87f6-bec0787631f0", - "status": 200, - "expected": 200, - "bytes": 106, - "headersMs": 41, - "firstBodyByteMs": 43, - "elapsedMs": 43 - }, - { - "method": "GET", - "route": "/api/stat/history?days[x]=7", - "requestID": "4a7f0ca9-f8eb-47c4-8266-6de2398957dc", - "status": 200, - "expected": 200, - "bytes": 208, - "headersMs": 24, - "firstBodyByteMs": 25, - "elapsedMs": 25 - }, - { - "method": "GET", - "route": "/api/user/dashboard?statuses[]=", - "requestID": "009dfdbf-52ec-41cd-b711-618a9d45135d", - "status": 200, - "expected": 200, - "bytes": 64, - "headersMs": 50, - "firstBodyByteMs": 51, - "elapsedMs": 51 - }, - { - "method": "GET", - "route": "/api/user/dashboard?type[]=repo", - "requestID": "cde5e7ae-4965-42c9-ab0e-e7e22f7b8923", - "status": 200, - "expected": 200, - "bytes": 64, - "headersMs": 55, - "firstBodyByteMs": 57, - "elapsedMs": 57 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort[]=", - "requestID": "a9abbf12-5571-4f76-9c96-4fc5a62a7b9d", - "status": 400, - "expected": 400, - "bytes": 24, - "headersMs": 30, - "firstBodyByteMs": 30, - "elapsedMs": 31 - }, - { - "method": "GET", - "route": "/api/user/dashboard?cursor[]=", - "requestID": "ac994405-8ab5-4d8b-8769-1dbfbc891b27", - "status": 400, - "expected": 400, - "bytes": 26, - "headersMs": 29, - "firstBodyByteMs": 29, - "elapsedMs": 29 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort=anonymizeDate&limit=5&cursor=eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDEiLCJ2YWx1ZSI6IjIwMjQtMDMtMDFUMDA6MDA6MDAuMDAwWiJ9", - "requestID": "d455d7b6-8d13-4437-a441-ca6436c7a92d", - "status": 200, - "expected": 200, - "bytes": 797, - "headersMs": 60, - "firstBodyByteMs": 61, - "elapsedMs": 62 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort=anonymizeDate&limit=5&cursor=eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDEiLCJ2YWx1ZSI6Ik1hcmNoIDEgMjAyNCJ9", - "requestID": "2502fd4e-9fc6-4bd0-a4db-cdca5ea1ca81", - "status": 200, - "expected": 200, - "bytes": 797, - "headersMs": 40, - "firstBodyByteMs": 42, - "elapsedMs": 42 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort=anonymizeDate&limit=5&cursor=eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDEiLCJ2YWx1ZSI6IjIwMjQtMDItMzAifQ", - "requestID": "31ee94ea-833c-419e-b1e7-6993476c1eb0", - "status": 200, - "expected": 200, - "bytes": 797, - "headersMs": 43, - "firstBodyByteMs": 44, - "elapsedMs": 44 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort=anonymizeDate&limit=5&cursor=eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDEiLCJ2YWx1ZSI6IjIwMjQtMDItMjlUMjQ6MDA6MDBaIn0", - "requestID": "60d9bf88-42bf-4bc3-9f93-c38932b86463", - "status": 200, - "expected": 200, - "bytes": 797, - "headersMs": 49, - "firstBodyByteMs": 50, - "elapsedMs": 50 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort=anonymizeDate&limit=5&cursor=eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDEiLCJ2YWx1ZSI6WyIyMDI0IiwiMyIsIjEiXX0", - "requestID": "883d89cc-28c7-49cc-a940-62a754cee2d9", - "status": 200, - "expected": 200, - "bytes": 797, - "headersMs": 47, - "firstBodyByteMs": 48, - "elapsedMs": 48 - }, - { - "method": "GET", - "route": "/api/user/dashboard?sort=anonymizeDate&limit=5&cursor=eyJzb3J0IjoiYW5vbnltaXplRGF0ZSIsInR5cGUiOiJyZXBvIiwiaWQiOiIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDEiLCJ2YWx1ZSI6Im5vdCBhIGRhdGUifQ", - "requestID": "0b0c1490-e550-4bdd-8bcb-f12aaeb0cd82", - "status": 400, - "expected": 400, - "bytes": 26, - "headersMs": 30, - "firstBodyByteMs": 30, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/api/admin/performance?minutes=6e1", - "requestID": "927b1199-a00f-4c88-8ade-5104c3f52273", - "status": 200, - "expected": 200, - "bytes": 66227, - "headersMs": 98, - "firstBodyByteMs": 99, - "elapsedMs": 101 - }, - { - "method": "GET", - "route": "/api/admin/performance?minutes[]=60", - "requestID": "069c2a24-5788-4f7d-9837-0a9a429540ee", - "status": 200, - "expected": 200, - "bytes": 66227, - "headersMs": 86, - "firstBodyByteMs": 87, - "elapsedMs": 89 - }, - { - "method": "GET", - "route": "/api/admin/performance?minutes[0]=15", - "requestID": "81bc1de6-e0fb-4ac1-ace8-0385fb01ae2d", - "status": 200, - "expected": 200, - "bytes": 21396, - "headersMs": 54, - "firstBodyByteMs": 55, - "elapsedMs": 57 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue[]=cache&range[]=6h", - "requestID": "42713000-dfef-43df-98ac-7af378869cc7", - "status": 200, - "expected": 200, - "bytes": 20201, - "headersMs": 86, - "firstBodyByteMs": 86, - "elapsedMs": 104 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?range[]=", - "requestID": "7f81b0f1-7cbf-4a2e-8027-6518c491cdc1", - "status": 200, - "expected": 200, - "bytes": 3406, - "headersMs": 34, - "firstBodyByteMs": 35, - "elapsedMs": 36 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?range=toString", - "requestID": "d09236cd-73d6-4805-ab24-cc6e212b4249", - "status": 200, - "expected": 200, - "bytes": 51, - "headersMs": 28, - "firstBodyByteMs": 29, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/api/admin/queues/metrics?queue[]=", - "requestID": "c7186d0c-8202-4a0f-9a1e-d1eb89033a19", - "status": 404, - "expected": 404, - "bytes": 27, - "headersMs": 27, - "firstBodyByteMs": 27, - "elapsedMs": 27 - }, - { - "method": "GET", - "route": "/api/admin/queues?queue[]=remove", - "requestID": "134247dc-85cb-449a-afab-3ae344f5b4c4", - "status": 200, - "expected": 200, - "bytes": 7149, - "headersMs": 64, - "firstBodyByteMs": 65, - "elapsedMs": 66 - }, - { - "method": "GET", - "route": "/api/admin/errors?offset[]=2&limit[]=7", - "requestID": "a18baabc-ed22-40e3-b75f-06387008de52", - "status": 200, - "expected": 200, - "bytes": 2102, - "headersMs": 32, - "firstBodyByteMs": 33, - "elapsedMs": 33 - }, - { - "method": "GET", - "route": "/api/repo/octocat/Hello-World?connection=", - "requestID": "bc431aab-b830-4e6c-80d6-290a4f0ab91b", - "status": 400, - "expected": 400, - "bytes": 30, - "headersMs": 28, - "firstBodyByteMs": 28, - "elapsedMs": 28 - }, - { - "method": "GET", - "route": "/api/repo/octocat/Hello-World?connection[]=oauth", - "requestID": "cc739d49-d883-4bfe-90c9-e5693dd1ad49", - "status": 400, - "expected": 400, - "bytes": 30, - "headersMs": 46, - "firstBodyByteMs": 46, - "elapsedMs": 46 - }, - { - "method": "GET", - "route": "/api/repo/octocat/Hello-World?connection=oauth&connection[]=github-app", - "requestID": "1fd3d7d2-b529-42fa-98db-4c9eb5a2a014", - "status": 400, - "expected": 400, - "bytes": 30, - "headersMs": 32, - "firstBodyByteMs": 32, - "elapsedMs": 32 - }, - { - "method": "GET", - "route": "/api/repo/octocat/Hello-World?repositoryID[]=invalid", - "requestID": "b051fa39-b656-40be-874c-c81204ac9bd9", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 54, - "firstBodyByteMs": 54, - "elapsedMs": 55 - }, - { - "method": "GET", - "route": "/api/repo/octocat/Hello-World?repositoryID=invalid", - "requestID": "486e2536-1091-414b-8d25-5b2e65a2b86f", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 28, - "firstBodyByteMs": 28, - "elapsedMs": 28 - }, - { - "method": "GET", - "route": "/api/repo/octocat/Hello-World?repositoryID[$exists]=true", - "requestID": "3091cfd6-46ea-488e-991a-0155389de026", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 31, - "firstBodyByteMs": 31, - "elapsedMs": 31 - }, - { - "method": "GET", - "route": "/api/user/search/github-users?q[]=ab", - "requestID": "e733e56f-389d-4337-9348-90a5daad1f59", - "status": 200, - "expected": 200, - "bytes": 2, - "headersMs": 29, - "firstBodyByteMs": 29, - "elapsedMs": 29 - }, - { - "method": "GET", - "route": "/api/user/search/github-users?q[length]=1", - "requestID": "4c360db7-141b-4b5e-a7d0-1f1b6ba90a54", - "status": 200, - "expected": 200, - "bytes": 2, - "headersMs": 32, - "firstBodyByteMs": 32, - "elapsedMs": 32 - }, - { - "method": "GET", - "route": "/api/user/search/github-users?q=ab&q=cd", - "requestID": "04eda2a9-3b89-4656-ac1e-22f1daaf3450", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 32, - "firstBodyByteMs": 32, - "elapsedMs": 33 - }, - { - "method": "GET", - "route": "/api/user/search/github-users?q[x]=ab", - "requestID": "1211129f-ac2a-4fc5-9d6b-8cc5a62a1da1", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 45, - "firstBodyByteMs": 45, - "elapsedMs": 46 - }, - { - "method": "GET", - "route": "/api/user/search/github-users?q[length][toString]=1", - "requestID": "bae6129b-d01c-4caf-8ccc-b98e58afe3c6", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 31, - "firstBodyByteMs": 32, - "elapsedMs": 32 - }, - { - "method": "GET", - "route": "/api/admin/repos?page[]=2&limit[]=2&sort[]=status&direction[]=asc&format[]=csv", - "requestID": "afa39902-3b71-4c77-a1c0-ce972b398040", - "status": 200, - "expected": 200, - "bytes": 2680, - "headersMs": 53, - "firstBodyByteMs": 54, - "elapsedMs": 55 - }, - { - "method": "GET", - "route": "/api/admin/repos?page=1000001&limit=1", - "requestID": "bfe37b9f-b881-4dc3-a469-21d4de52770e", - "status": 200, - "expected": 200, - "bytes": 193, - "headersMs": 36, - "firstBodyByteMs": 37, - "elapsedMs": 37 - }, - { - "method": "GET", - "route": "/api/admin/repos?page=-1", - "requestID": "e403e13a-cfab-410a-875a-ef2c24c4e6de", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 31, - "firstBodyByteMs": 31, - "elapsedMs": 31 - }, - { - "method": "GET", - "route": "/api/admin/repos?page[toString]=x", - "requestID": "5b96647a-e890-4b65-a116-6dcb29a80064", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 32, - "firstBodyByteMs": 32, - "elapsedMs": 33 - }, - { - "method": "GET", - "route": "/api/admin/users?page[]=2&limit[]=2&sort[]=status&direction[]=asc&format[]=csv", - "requestID": "0f7ae87b-278c-4617-ba05-1218d334b99f", - "status": 200, - "expected": 200, - "bytes": 106, - "headersMs": 35, - "firstBodyByteMs": 36, - "elapsedMs": 40 - }, - { - "method": "GET", - "route": "/api/admin/users?page=1000001&limit=1", - "requestID": "b751fa87-e5d3-417e-a9a7-a53862f121a8", - "status": 200, - "expected": 200, - "bytes": 112, - "headersMs": 34, - "firstBodyByteMs": 35, - "elapsedMs": 36 - }, - { - "method": "GET", - "route": "/api/admin/users?page=-1", - "requestID": "db1a3a58-14c0-438a-b6e3-cefbf490e721", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 32, - "firstBodyByteMs": 32, - "elapsedMs": 32 - }, - { - "method": "GET", - "route": "/api/admin/users?page[toString]=x", - "requestID": "814262c0-b558-42f8-a405-9d2e8b28dec4", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 30, - "firstBodyByteMs": 30, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/api/admin/users?limit=-1", - "requestID": "d9b2d684-56ff-45d5-b793-ecbebf44c139", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 32, - "firstBodyByteMs": 32, - "elapsedMs": 32 - }, - { - "method": "GET", - "route": "/api/admin/conferences?page[]=2&limit[]=2&sort[]=status&direction[]=asc&format[]=csv", - "requestID": "aa5294df-4cb6-474d-bd06-a9ead79f4249", - "status": 200, - "expected": 200, - "bytes": 80, - "headersMs": 37, - "firstBodyByteMs": 38, - "elapsedMs": 39 - }, - { - "method": "GET", - "route": "/api/admin/conferences?page=1000001&limit=1", - "requestID": "0722f962-9332-45ad-9be3-4bb93bbf3673", - "status": 200, - "expected": 200, - "bytes": 86, - "headersMs": 32, - "firstBodyByteMs": 33, - "elapsedMs": 33 - }, - { - "method": "GET", - "route": "/api/admin/conferences?page=-1", - "requestID": "f768b85d-6557-4b48-8257-63ffbd881963", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 29, - "firstBodyByteMs": 29, - "elapsedMs": 29 - }, - { - "method": "GET", - "route": "/api/admin/conferences?page[toString]=x", - "requestID": "33d9d54d-de1d-4882-864d-b613c2bf1b47", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 28, - "firstBodyByteMs": 29, - "elapsedMs": 29 - }, - { - "method": "GET", - "route": "/api/admin/repos?limit=-1", - "requestID": "62acd1ec-8e5e-4e27-bd06-cd43cd310836", - "status": 200, - "expected": 200, - "bytes": 1433, - "headersMs": 34, - "firstBodyByteMs": 35, - "elapsedMs": 35 - }, - { - "method": "GET", - "route": "/api/admin/repos?ready[]=true", - "requestID": "ccaa438a-f633-4301-98ec-ca5dffcf36a9", - "status": 200, - "expected": 200, - "bytes": 1936, - "headersMs": 32, - "firstBodyByteMs": 33, - "elapsedMs": 34 - }, - { - "method": "GET", - "route": "/api/admin/conferences?limit=-1", - "requestID": "c3f858e3-8946-4d89-b37f-210fbccf7cc1", - "status": 200, - "expected": 200, - "bytes": 80, - "headersMs": 31, - "firstBodyByteMs": 32, - "elapsedMs": 32 - }, - { - "method": "GET", - "route": "/api/admin/conferences?ready[]=true", - "requestID": "852eb699-ce71-4075-9b90-1e1008d1ebca", - "status": 200, - "expected": 200, - "bytes": 117, - "headersMs": 34, - "firstBodyByteMs": 34, - "elapsedMs": 35 - }, - { - "method": "GET", - "route": "/api/admin/repos?search[]=x", - "requestID": "6a490e56-9c62-43a3-8f85-452bab901b7d", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 27, - "firstBodyByteMs": 28, - "elapsedMs": 28 - }, - { - "method": "GET", - "route": "/api/admin/users?search[]=x", - "requestID": "5b7f8724-4012-4b78-90a9-3430823e2a97", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 28, - "firstBodyByteMs": 28, - "elapsedMs": 28 - }, - { - "method": "GET", - "route": "/api/admin/conferences?search[]=x", - "requestID": "d0d1e704-f37b-44a3-8d2c-ad0cedc47958", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 27, - "firstBodyByteMs": 27, - "elapsedMs": 27 - }, - { - "method": "GET", - "route": "/api/admin/users?status[]=active", - "requestID": "90512f77-ed15-460b-8fec-ee16d805f49d", - "status": 200, - "expected": 200, - "bytes": 99, - "headersMs": 61, - "firstBodyByteMs": 61, - "elapsedMs": 62 - }, - { - "method": "GET", - "route": "/api/admin/users?status[$in][]=active", - "requestID": "6cec59ec-dbdd-408d-b393-e71e658f2360", - "status": 200, - "expected": 200, - "bytes": 553, - "headersMs": 35, - "firstBodyByteMs": 37, - "elapsedMs": 37 - }, - { - "method": "GET", - "route": "/api/admin/users?status[a]=active", - "requestID": "db17e64f-de61-4b72-a4a7-79414a783614", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 35, - "firstBodyByteMs": 35, - "elapsedMs": 35 - }, - { - "method": "GET", - "route": "/api/admin/users?status[$in]=active", - "requestID": "c1fc4271-cd2e-4e9e-a069-6c3184e38968", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 41, - "firstBodyByteMs": 41, - "elapsedMs": 42 - }, - { - "method": "GET", - "route": "/api/admin/repos?owner[a]=x", - "requestID": "4875e1ae-1dea-4e93-af8d-f3d3c17cc241", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 28, - "firstBodyByteMs": 28, - "elapsedMs": 28 - }, - { - "method": "GET", - "route": "/api/admin/repos?conference[$unknown]=x", - "requestID": "fb3601cf-3633-4167-9254-69f3b7030d9a", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 34, - "firstBodyByteMs": 34, - "elapsedMs": 35 - }, - { - "method": "GET", - "route": "/api/admin/repos?dateFrom[]=2024-02-30", - "requestID": "df87205a-12f3-4d8d-b928-cea5e04a75e8", - "status": 200, - "expected": 200, - "bytes": 12493, - "headersMs": 46, - "firstBodyByteMs": 47, - "elapsedMs": 47 - }, - { - "method": "GET", - "route": "/api/admin/repos?dateTo=March%201%202024", - "requestID": "f87148a6-9448-4177-877b-b0c30f0fcebd", - "status": 200, - "expected": 200, - "bytes": 156, - "headersMs": 37, - "firstBodyByteMs": 37, - "elapsedMs": 37 - }, - { - "method": "GET", - "route": "/api/admin/repos?dateFrom[toString]=x", - "requestID": "61c86bbc-b40c-44c3-83de-a828312ae065", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 36, - "firstBodyByteMs": 36, - "elapsedMs": 37 - }, - { - "method": "GET", - "route": "/api/admin/users?dateFrom[]=2024-02-30", - "requestID": "49ee3877-16ee-44b4-95e2-3728194cf40a", - "status": 200, - "expected": 200, - "bytes": 458, - "headersMs": 34, - "firstBodyByteMs": 34, - "elapsedMs": 34 - }, - { - "method": "GET", - "route": "/api/admin/users?dateTo=March%201%202024", - "requestID": "2237c1db-42ef-46a7-960e-c58b84d4289a", - "status": 200, - "expected": 200, - "bytes": 129, - "headersMs": 34, - "firstBodyByteMs": 35, - "elapsedMs": 35 - }, - { - "method": "GET", - "route": "/api/admin/users?dateFrom[toString]=x", - "requestID": "85b470b1-1018-467d-b82a-e462909b57b3", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 35, - "firstBodyByteMs": 35, - "elapsedMs": 35 - }, - { - "method": "GET", - "route": "/api/admin/conferences?dateFrom[]=2024-02-30", - "requestID": "93989a1b-9a93-484e-a673-81a1e387508f", - "status": 200, - "expected": 200, - "bytes": 138, - "headersMs": 44, - "firstBodyByteMs": 45, - "elapsedMs": 45 - }, - { - "method": "GET", - "route": "/api/admin/conferences?dateTo=March%201%202024", - "requestID": "566aa7c3-2ed6-42c2-81b6-acb5dc8361e0", - "status": 200, - "expected": 200, - "bytes": 138, - "headersMs": 31, - "firstBodyByteMs": 32, - "elapsedMs": 32 - }, - { - "method": "GET", - "route": "/api/admin/conferences?dateFrom[toString]=x", - "requestID": "e6f2888f-1c33-41b5-81cb-29328dae0ae9", - "status": 500, - "expected": 500, - "bytes": 26, - "headersMs": 28, - "firstBodyByteMs": 28, - "elapsedMs": 29 - }, - { - "method": "GET", - "route": "/github/connections", - "requestID": "0110be10-3b34-4b46-8954-22c35bf25e24", - "status": 200, - "expected": 200, - "bytes": 456, - "headersMs": 928, - "firstBodyByteMs": 929, - "elapsedMs": 932 - }, - { - "method": "POST", - "route": "/api/admin/tokens", - "requestID": "e64767ae-9ef8-4330-8369-e0c72eace6ac", - "status": 200, - "expected": 200, - "bytes": 186, - "headersMs": 42, - "firstBodyByteMs": 44, - "elapsedMs": 44 - }, - { - "method": "GET", - "route": "/api/user", - "requestID": "592b3200-757d-4bba-9921-fe98127e19bc", - "status": 200, - "expected": 200, - "bytes": 100, - "headersMs": 32, - "firstBodyByteMs": 33, - "elapsedMs": 33 - }, - { - "method": "DELETE", - "route": "/api/admin/tokens/6aeaf47a681e99cc1f7cac30", - "requestID": "79b324be-e6de-41bf-a8f9-90f51721d4b1", - "status": 200, - "expected": 200, - "bytes": 13, - "headersMs": 31, - "firstBodyByteMs": 31, - "elapsedMs": 31 - }, - { - "method": "GET", - "route": "/api/user", - "requestID": "505257c3-336d-4424-8a1d-73918bba810d", - "status": 401, - "expected": 401, - "bytes": 25, - "headersMs": 32, - "firstBodyByteMs": 33, - "elapsedMs": 33 - }, - { - "method": "POST", - "route": "/github/login-token", - "requestID": "b7af99a2-7b71-4f2c-857e-3997994fbac4", - "status": 200, - "expected": 200, - "bytes": 33, - "headersMs": 39, - "firstBodyByteMs": 39, - "elapsedMs": 39 - }, - { - "method": "GET", - "route": "/api/user", - "requestID": "efc80c19-feff-4ae9-abe1-cefde3099227", - "status": 200, - "expected": 200, - "bytes": 100, - "headersMs": 29, - "firstBodyByteMs": 30, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/api/user/logout", - "requestID": "8f8eb7d1-3f9b-4a17-8175-f7b9d5d4e47d", - "status": 302, - "expected": 302, - "bytes": 24, - "headersMs": 35, - "firstBodyByteMs": 36, - "elapsedMs": 37 - }, - { - "method": "GET", - "route": "/api/user", - "requestID": "e18cb693-a3ff-4963-a183-aaae1c99a3a9", - "status": 401, - "expected": 401, - "bytes": 25, - "headersMs": 40, - "firstBodyByteMs": 41, - "elapsedMs": 41 - }, - { - "method": "POST", - "route": "/api/anonymize-preview", - "requestID": "ba7c5261-3b3d-436f-b092-124f7a865dae", - "status": 200, - "expected": 200, - "bytes": 26, - "headersMs": 50, - "firstBodyByteMs": 50, - "elapsedMs": 50 - }, - { - "method": "GET", - "route": "/api/providers/github/repository/metadata?name=tdurieux%2Fsynctex-js&connection=github-app", - "requestID": "829bef0b-5bad-4dbf-b298-3ea9a36a72c4", - "status": 200, - "expected": 200, - "bytes": 230, - "headersMs": 2155, - "firstBodyByteMs": 2157, - "elapsedMs": 2157 - }, - { - "method": "GET", - "route": "/api/providers/github/repository/branches?name=tdurieux%2Fsynctex-js&connection=github-app", - "requestID": "86d93e78-e78a-46bf-84bb-15d2397adbd1", - "status": 200, - "expected": 200, - "bytes": 2623, - "headersMs": 2495, - "firstBodyByteMs": 2496, - "elapsedMs": 2497 - }, - { - "method": "GET", - "route": "/api/providers/github/repository/readme?name=tdurieux%2Fsynctex-js&connection=github-app", - "requestID": "74ed6f3e-f724-43c8-b333-87787f055b67", - "status": 200, - "expected": 200, - "bytes": 2303, - "headersMs": 2463, - "firstBodyByteMs": 2466, - "elapsedMs": 2467 - }, - { - "method": "POST", - "route": "/api/repo", - "requestID": "7fb7cf83-d9b6-486d-b58a-64a55dc0d8e5", - "status": 200, - "expected": 200, - "bytes": 22, - "headersMs": 3411, - "firstBodyByteMs": 3412, - "elapsedMs": 3413 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793782896651", - "requestID": "ad9dbd3c-d517-416c-8f36-0ab4d833f003", - "status": 200, - "expected": 200, - "bytes": 566, - "headersMs": 89, - "firstBodyByteMs": 91, - "elapsedMs": 92 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793782896651/file/LICENSE", - "requestID": "a7ad58cc-672a-4ce2-aa1b-ebab9ce6cc41", - "status": 200, - "expected": 200, - "bytes": 1074, - "headersMs": 190, - "firstBodyByteMs": 191, - "elapsedMs": 192 - }, - { - "method": "GET", - "route": "/w/go-beta-check-1793782896651/LICENSE", - "requestID": "5bb7988c-9d95-4900-a6c8-3e96ca40bb0c", - "status": 200, - "expected": 200, - "bytes": 1074, - "headersMs": 55, - "firstBodyByteMs": 56, - "elapsedMs": 57 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793782896651/files", - "requestID": "d812e7fe-aa06-4400-b4ad-0718009e528f", - "status": 200, - "expected": 200, - "bytes": 170, - "headersMs": 31, - "firstBodyByteMs": 32, - "elapsedMs": 33 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793782896651/zip", - "requestID": "56b791ca-1585-405a-b3c9-10467ad3db3b", - "status": 200, - "expected": 200, - "bytes": 7176, - "headersMs": 67, - "firstBodyByteMs": 67, - "elapsedMs": 508 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793782896651/file/LICENSE", - "requestID": "8dbd46f1-13b1-4eb6-adc4-f38cd7c22e26", - "status": 200, - "expected": 200, - "bytes": 1074, - "headersMs": 74, - "firstBodyByteMs": 75, - "elapsedMs": 79 - }, - { - "method": "GET", - "route": "/w/go-beta-check-1793782896651/LICENSE", - "requestID": "ffb7506a-51ad-4861-89c1-1d20cc3e518d", - "status": 200, - "expected": 200, - "bytes": 1074, - "headersMs": 76, - "firstBodyByteMs": 77, - "elapsedMs": 77 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793782896651/zip", - "requestID": "ca0c6968-d0e0-40c7-bb23-5be5dca42bc5", - "status": 200, - "expected": 200, - "bytes": 7171, - "headersMs": 69, - "firstBodyByteMs": 69, - "elapsedMs": 130 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793782896651/file/LICENSE", - "requestID": "b59a7675-4277-4ae9-ba82-65437092d0bc", - "status": 200, - "expected": 200, - "bytes": 1074, - "headersMs": 69, - "firstBodyByteMs": 69, - "elapsedMs": 70 - }, - { - "method": "GET", - "route": "/w/go-beta-check-1793782896651/LICENSE", - "requestID": "e5373ec1-1107-4d9c-8325-b2e3d31c66c2", - "status": 200, - "expected": 200, - "bytes": 1074, - "headersMs": 77, - "firstBodyByteMs": 78, - "elapsedMs": 78 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793782896651/zip", - "requestID": "65621cf3-ced0-4510-8da1-f9d87e01b0ff", - "status": 200, - "expected": 200, - "bytes": 7171, - "headersMs": 66, - "firstBodyByteMs": 66, - "elapsedMs": 130 - }, - { - "method": "GET", - "route": "/api/admin/performance", - "requestID": "530c0b31-b684-4808-82e8-9a56f480a754", - "status": 200, - "expected": 200, - "bytes": 30897, - "headersMs": 74, - "firstBodyByteMs": 74, - "elapsedMs": 76 - }, - { - "method": "GET", - "route": "/api/user", - "requestID": "b54a75a5-087e-4a77-81bf-d16d3b9ae816", - "status": 401, - "expected": 401, - "bytes": 25, - "headersMs": 33, - "firstBodyByteMs": 33, - "elapsedMs": 34 - }, - { - "method": "DELETE", - "route": "/api/repo/go-beta-check-1793782896651", - "requestID": "4dd4ab4a-3827-47de-9e63-754bc19a87ea", - "status": 200, - "expected": 200, - "bytes": 21, - "headersMs": 53, - "firstBodyByteMs": 54, - "elapsedMs": 54 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793782896651", - "requestID": "3a59b22a-5f8e-4a98-85d9-6dbf2d6ce0e9", - "status": 200, - "expected": 200, - "bytes": 616, - "headersMs": 35, - "firstBodyByteMs": 36, - "elapsedMs": 36 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793782896651", - "requestID": "046ef5b6-9683-4ad9-a3c8-dea110c2dc8d", - "status": 200, - "expected": 200, - "bytes": 615, - "headersMs": 32, - "firstBodyByteMs": 33, - "elapsedMs": 33 - }, - { - "method": "GET", - "route": "/api/repo/go-beta-check-1793782896651/file/LICENSE", - "requestID": "6592087f-0449-4d5d-8bc7-72a38e9704be", - "status": 410, - "expected": 410, - "bytes": 30, - "headersMs": 30, - "firstBodyByteMs": 30, - "elapsedMs": 30 - }, - { - "method": "GET", - "route": "/api/user", - "requestID": "f62c521f-43e1-4bd2-a167-a14c55ed1da7", - "status": 401, - "expected": 401, - "bytes": 25, - "headersMs": 31, - "firstBodyByteMs": 31, - "elapsedMs": 31 - } - ], - "productionChanged": false, - "overviewHistoryFresh": "passed", - "overviewBrowserFields": "passed", - "queueOverviewFields": "passed", - "errorMonitoring": { - "maxEntries": 5000, - "hourlyBuckets": 24, - "routine404Counted": true - }, - "queueMetricWindows": [ - { - "queue": "download", - "range": "1h", - "points": 60 - }, - { - "queue": "download", - "range": "6h", - "points": 360 - }, - { - "queue": "download", - "range": "24h", - "points": 1440 - }, - { - "queue": "download", - "range": "7d", - "points": 10080 - }, - { - "queue": "remove", - "range": "1h", - "points": 60 - }, - { - "queue": "cache", - "range": "1h", - "points": 60 - }, - { - "queue": "download", - "range": "unrecognized", - "points": 60 - } - ], - "publicStatistics": { - "anonymousAccess": true, - "windows": [ - { - "query": "days=-2", - "days": 1, - "rows": 1 - }, - { - "query": "days=0", - "days": 30, - "rows": 2 - }, - { - "query": "days=0x10", - "days": 16, - "rows": 2 - }, - { - "query": "days=7suffix", - "days": 7, - "rows": 2 - }, - { - "query": "days=999", - "days": 365, - "rows": 2 - }, - { - "query": "days[]=7&days[]=30", - "days": 7, - "rows": 2 - }, - { - "query": "days[1]=7&days[0]=1", - "days": 1, - "rows": 1 - }, - { - "query": "days[x]=7", - "days": 30, - "rows": 2 - } - ] - }, - "dashboardExtendedQueries": "passed", - "dashboardDateCursors": "passed", - "monitoringExtendedQueries": "passed", - "adminExtendedQueries": "passed", - "previewConnectionQueries": "passed", - "previewCacheHintRejections": "passed", - "userSearchQueries": "passed", - "adminListPaginationQueries": "passed", - "adminListFilterQueries": "passed", - "adminListCastingQueries": "passed", - "adminListDateQueries": "passed", - "apiKeyLifecycle": "passed", - "sessionLoginLogout": "passed", - "zipManifestSHA256": "e6fdc1385a4d0b50e3deea32ab2fcf34de88d1147ed5001b81cbd0968dcf5a81", - "zipEntries": 5, - "zipSourceCommit": "912f3c897c5ac1bbc225f65cfd1387579fb3385e", - "exactZipContents": "passed", - "repeatedContentChecks": 3, - "performanceMonitoring": { - "requests": true, - "processSamples": true, - "runtimeHistory": true, - "stages": [ - "repository", - "authorization", - "worker_wait", - "anonymize" - ], - "upstreamObserved": false, - "upstreamNote": "Shared-cache hits need no upstream read; provider timing is checked by the integration suite." - }, - "result": "passed", - "testRepositoryRemoved": true, - "temporaryKeyRevoked": true, - "betaAccountAdmin": true, - "uniqueRequestIDsVerified": 133 -} diff --git a/backend/reports/zip-streaming-live-memory.json b/backend/reports/zip-streaming-live-memory.json deleted file mode 100644 index 66211b4..0000000 --- a/backend/reports/zip-streaming-live-memory.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "recordedAt": "2026-11-04T09:17:25.870Z", - "image": "sha256:bc8d7ce53a706f7ac8d755015455542494acd1cfc8acb538d509586a1d539da9", - "url": "https://beta.durieux.me/api/repo/anonymous_github-72DE/zip", - "requestID": "1b3bef56-51d1-4030-afee-6b17ab6bd7da", - "method": "One public ZIP request against the existing beta repository. Existing warmed server; no restart or cache clearing. RSS includes server and worker descendants, sampled every 20 ms. Cgroup readings separately include filesystem page cache. MongoDB, Redis and client excluded. Validation runs after sampling.", - "samples": 2356, - "before": { - "processTreeRssBytes": 51617792, - "cgroupMemoryBytes": 46821376, - "cgroupAnonymousBytes": 32198656, - "cgroupFileCacheBytes": 12533760 - }, - "peak": { - "processTreeRssBytes": 103530496, - "cgroupMemoryBytes": 83554304, - "cgroupAnonymousBytes": 64868352, - "cgroupFileCacheBytes": 29995008 - }, - "after": { - "processTreeRssBytes": 43532288, - "cgroupMemoryBytes": 29290496, - "cgroupAnonymousBytes": 24371200, - "cgroupFileCacheBytes": 2863104 - }, - "download": { - "headersMs": 1285.546048, - "firstBodyMs": 1295.128025, - "totalMs": 48768.275719, - "bytes": 13044587, - "files": 1128, - "uncompressedBytes": 36104569, - "manifestSHA256": "3e1811510fe90fe26ec4287cd4ce84639b22f4d1bc28cc796cd12a2c49bee277", - "crcVerified": true - } -} diff --git a/backend/reports/zip-transfer-reliability.json b/backend/reports/zip-transfer-reliability.json deleted file mode 100644 index 2d8036e..0000000 --- a/backend/reports/zip-transfer-reliability.json +++ /dev/null @@ -1,119 +0,0 @@ -{ - "historicalFailure": { - "requestID": "974a5480-48d8-47f8-8fa2-443ace1a1c95", - "elapsedMs": 43612, - "bytesSent": 12425955, - "cause": "Unknown: old logs recorded interruption without a cause. Neither new fix is claimed as the proven cause of this exact request." - }, - "archiveSize": { - "uncompressedBytes": 36104569, - "publicAssetsCompressedBytes": 11954860, - "largestEntries": [ - { - "name": "public/script/external/mermaid.min.js", - "compressedBytes": 1647663, - "uncompressedBytes": 5494262 - }, - { - "name": "public/script/mermaid.min.js", - "compressedBytes": 1647663, - "uncompressedBytes": 5494262 - }, - { - "name": "public/script/markdown.min.js", - "compressedBytes": 323605, - "uncompressedBytes": 995410 - }, - { - "name": "public/script/external/pdf.worker.js", - "compressedBytes": 319085, - "uncompressedBytes": 1133581 - }, - { - "name": "public/script/external/ace/worker-xquery.js", - "compressedBytes": 277003, - "uncompressedBytes": 1624214 - }, - { - "name": "public/fonts/fa-solid-900.svg", - "compressedBytes": 267895, - "uncompressedBytes": 918991 - }, - { - "name": "public/fonts/fa-brands-400.svg", - "compressedBytes": 263631, - "uncompressedBytes": 747927 - }, - { - "name": "public/script/vendor.min.js", - "compressedBytes": 185730, - "uncompressedBytes": 660232 - }, - { - "name": "public/script/external/ace/worker-javascript.js", - "compressedBytes": 181291, - "uncompressedBytes": 506890 - }, - { - "name": "public/imgs/screenshot.png", - "compressedBytes": 167036, - "uncompressedBytes": 178933 - } - ], - "explanation": "The archive includes tracked frontend libraries/assets, including two Mermaid bundles. No tracked files were removed." - }, - "fixes": [ - "ZIP-only 30-minute request deadline; ordinary APIs retain two minutes", - "Rolling one-minute socket write deadline; stalled sockets still time out", - "Worker execution and memory reservations released once output is on disk, before slow readers close it; cold and cached paths covered", - "Stream interruption logs carry request ID, stage and fixed safe reason" - ], - "downloads": [ - { - "name": "check", - "files": 1128, - "bytes": 13044565, - "seconds": 48.593654, - "crcVerified": true, - "manifestSHA256": "3e1811510fe90fe26ec4287cd4ce84639b22f4d1bc28cc796cd12a2c49bee277" - }, - { - "name": "slow", - "files": 1128, - "bytes": 13044625, - "seconds": 197.412186, - "crcVerified": true, - "manifestSHA256": "3e1811510fe90fe26ec4287cd4ce84639b22f4d1bc28cc796cd12a2c49bee277" - }, - { - "name": "concurrent", - "files": 1128, - "bytes": 13044598, - "seconds": 89.78183, - "crcVerified": true, - "manifestSHA256": "3e1811510fe90fe26ec4287cd4ce84639b22f4d1bc28cc796cd12a2c49bee277" - }, - { - "name": "final", - "files": 1128, - "bytes": 13044462, - "seconds": 42.10229, - "crcVerified": true, - "manifestSHA256": "3e1811510fe90fe26ec4287cd4ce84639b22f4d1bc28cc796cd12a2c49bee277" - } - ], - "validation": { - "scope": "Slow and concurrent downloads tested timeout-fix image 35390fac; final full download and 133 App checks tested final worker-admission-fix image below.", - "slowDownload": "Direct origin, capped at 64 KiB/s, concurrent with public CDN download", - "raceTests": "passed: ZIP streaming/cancellation/corruption/revocation, socket deadlines, stalled clients, worker/cache admission and shared result/HTTP caches", - "vet": "passed", - "liveChecks": 133, - "temporaryKeyRevoked": true, - "testRepositoryRemoved": true - }, - "deployment": { - "hostname": "beta.durieux.me", - "image": "sha256:0244d37165a8b1217a9518219727920e56c48647cb2d5f138c197e949761db6c", - "healthy": true - } -} diff --git a/backend/scripts/benchmark-http.cjs b/backend/scripts/benchmark-http.cjs deleted file mode 100644 index 1dee504..0000000 --- a/backend/scripts/benchmark-http.cjs +++ /dev/null @@ -1,155 +0,0 @@ -'use strict'; -// Runs the actual Node and Go entrypoints. No production credentials, database, -// storage, providers or application methods are replaced by benchmark stubs. -const fs=require('node:fs'),fsp=fs.promises,path=require('node:path'),os=require('node:os'); -const http=require('node:http'),net=require('node:net'),crypto=require('node:crypto'); -const {spawn,execFileSync}=require('node:child_process'),{once}=require('node:events'); -const {performance}=require('node:perf_hooks'),{setTimeout:delay}=require('node:timers/promises'); -const assert=require('node:assert/strict'),ts=require('typescript'); -const {mongo:{MongoClient,ObjectId}}=require('mongoose'); -const root=path.resolve(__dirname,'../..'); -const children=new Set();let interrupted=false; -for(const signal of ['SIGINT','SIGTERM'])process.on(signal,()=>{interrupted=true;for(const child of children)child.kill('SIGTERM')}); -const hash=b=>crypto.createHash('sha256').update(b).digest('hex'); -const scriptSHA256=hash(fs.readFileSync(__filename)); -const percentile=(values,p)=>[...values].sort((a,b)=>a-b)[Math.ceil(values.length*p)-1]; -const ticks=Number(execFileSync('getconf',['CLK_TCK'],{encoding:'utf8'})); -const page=Number(execFileSync('getconf',['PAGESIZE'],{encoding:'utf8'})); -function usage(pid,seen=new Set()) { - if(seen.has(pid))return {rss:0,cpu:0};seen.add(pid); - try { - const text=fs.readFileSync(`/proc/${pid}/stat`,'utf8');const fields=text.slice(text.lastIndexOf(')')+2).split(' '); - let rss=Number(fields[21])*page,cpu=[11,12,13,14].reduce((sum,i)=>sum+Number(fields[i]),0)*1000/ticks; - // Go may fork workers from any OS thread, not just the main thread. - const descendants=new Set(); - for(const tid of fs.readdirSync(`/proc/${pid}/task`)){ - try{for(const child of fs.readFileSync(`/proc/${pid}/task/${tid}/children`,'utf8').trim().split(' '))if(child)descendants.add(Number(child));} - catch(error){if(error.code!=='ENOENT'&&error.code!=='ESRCH')throw error;} - } - for(const child of descendants){const value=usage(child,seen);rss+=value.rss;cpu+=value.cpu;} - return {rss,cpu}; - }catch(error){if(error.code==='ENOENT'||error.code==='ESRCH')return {rss:0,cpu:0};throw error;} -} -async function compileNode(destination) { - const digest=crypto.createHash('sha256'); - async function walk(directory,relative=''){ - for(const entry of (await fsp.readdir(directory,{withFileTypes:true})).sort((a,b)=>a.name.localeCompare(b.name))){ - const rel=path.join(relative,entry.name),source=path.join(directory,entry.name); - if(entry.isDirectory()){await walk(source,rel);continue;} - if(!entry.name.endsWith('.ts')||entry.name.endsWith('.d.ts'))continue; - const content=await fsp.readFile(source,'utf8');digest.update(rel+'\0'+content+'\0'); - const target=path.join(destination,rel.replace(/\.ts$/,'.js'));await fsp.mkdir(path.dirname(target),{recursive:true}); - await fsp.writeFile(target,ts.transpileModule(content,{compilerOptions:{module:ts.ModuleKind.CommonJS,target:ts.ScriptTarget.ES2022,preserveConstEnums:true,removeComments:true}}).outputText); - } - } - await walk(path.join(root,'src')); - const emoji=await fsp.readFile(path.join(root,'public/script/external/github-emojis.js')); - const asset=path.join(destination,'../public/script/external/github-emojis.js'); - await fsp.mkdir(path.dirname(asset),{recursive:true});await fsp.writeFile(asset,emoji);digest.update(emoji); - return digest.digest('hex'); -} -async function port(){const server=net.createServer();server.listen(0,'127.0.0.1');await once(server,'listening');const value=server.address().port;await new Promise(r=>server.close(r));return value;} -let requestID=0; -function request(address,url,expected,agent,method='GET') { - return new Promise((resolve,reject)=>{ - const start=performance.now(),id=++requestID; - const req=http.request({host:'127.0.0.1',port:address,path:url,method,agent,headers:{'accept-encoding':'identity','x-forwarded-for':`10.${(id>>>16)&255}.${(id>>>8)&255}.${id&255}`}},res=>{ - const firstByte=performance.now()-start,digest=crypto.createHash('sha256');let bytes=0; - res.on('data',chunk=>{bytes+=chunk.length;digest.update(chunk)});res.on('error',reject); - res.on('end',()=>{try{ - assert.equal(res.statusCode,200,`${method} ${url} returned ${res.statusCode}`); - assert.equal(res.headers['content-encoding'],undefined,'unexpected compression'); - const actual=digest.digest('hex');if(expected)assert.equal(actual,expected,`${url} output changed`); - resolve({ms:performance.now()-start,ttfbMs:firstByte,bytes,sha256:actual}); - }catch(error){reject(error)}}); - }); - req.setTimeout(60000,()=>req.destroy(Error('request_timeout')));req.on('error',reject);req.end(); - }); -} -async function stop(child){ - if(child.exitCode!==null||child.signalCode!==null)return; - const ended=once(child,'exit');child.kill('SIGTERM');const timer=setTimeout(()=>child.kill('SIGKILL'),35000); - try{await ended;}finally{clearTimeout(timer);} -} -async function runRuntime({runtime,spec,repeat,temp,compiled,client,mongo,redis,binary,quick}) { - const directory=await fsp.mkdtemp(path.join(temp,`${runtime}-`)),database='http_bench_'+crypto.randomBytes(8).toString('hex'); - const db=client.db(database),owner=new ObjectId(),body=spec.body,expected=hash(spec.output); - if(runtime==='node')await fsp.symlink(compiled,path.join(directory,'build'),'dir'); - await fsp.mkdir(path.join(directory,'public')); - await db.collection('users').insertOne({_id:owner,username:'benchmark-owner',status:'active',isAdmin:false}); - const coldCount=quick?2:7,repoIDs=Array.from({length:coldCount},(_,i)=>`benchmark-${i}`); - for(const repoId of repoIDs){ - await db.collection('anonymizedrepositories').insertOne({repoId,owner,status:'ready',statusDate:new Date(),anonymizeDate:new Date('2026-01-01'),settingsSavedAt:new Date('2026-01-01'),treeGeneration:'benchmark-generation',pageView:0,source:{type:'Zip',repositoryName:'team/project',branch:'main',commit:'fixture-revision'},options:{terms:spec.terms,expirationMode:'never',image:true,pdf:true,link:true,update:false}}); - await db.collection('files').insertOne({repoId,path:'',name:spec.filename,sha:hash(body),size:body.length,treeGeneration:'benchmark-generation'}); - const original=path.join(directory,'repositories',repoId,'original');await fsp.mkdir(original,{recursive:true});await fsp.writeFile(path.join(original,spec.filename),body); - } - const address=await port();const [redisHost,redisPort]=redis.split(':'); - // Deliberately construct the environment: never inherit a local credential or .env. - const env={PATH:process.env.PATH,NODE_PATH:path.join(root,'node_modules'),NODE_ENV:'production',TZ:'UTC',PORT:String(address),SESSION_SECRET:crypto.randomBytes(32).toString('hex'),CREDENTIAL_KEYS:JSON.stringify({benchmark:crypto.randomBytes(32).toString('base64')}),CREDENTIAL_ACTIVE_KEY_ID:'benchmark',GITHUB_OAUTH_ENABLED:'false',GITHUB_APP_ENABLED:'false',MONGODB_URI:mongo+'/'+database,MONGODB_DATABASE:database,REDIS_HOSTNAME:redisHost,REDIS_PORT:redisPort,FOLDER:path.join(directory,'repositories'),PUBLIC_DIR:path.join(directory,'public'),STORAGE:'filesystem',SHARED_CACHE_ENABLED:'false',CACHE_MONITORING_ENABLED:'false',COOKIE_SECURE:'false',TRUST_PROXY:'loopback',RATE_LIMIT:'1000000',ANONYMIZATION_WORKERS:'1',ANONYMIZATION_MEMORY_MB:'512',ANONYMIZATION_MASK:'XXXX',APP_HOSTNAME:'anonymous.test',TMPDIR:directory}; - const args=runtime==='node'?[path.join(compiled,'server/index.js')]:[]; - const child=spawn(runtime==='node'?process.execPath:binary,args,{cwd:directory,env,stdio:['ignore','pipe','pipe']}); - children.add(child);child.once('exit',()=>children.delete(child)); - let spawnError;child.on('error',error=>{spawnError=error;children.delete(child)}); - let logs='';for(const stream of [child.stdout,child.stderr])stream.on('data',b=>{logs=(logs+b.toString()).slice(-16000)}); - const agent=new http.Agent({keepAlive:true,maxSockets:8}); - try{ - let ready=false;for(let attempt=0;attempt<200;attempt++){ - if(spawnError)throw spawnError; - if(interrupted || child.exitCode!==null||child.signalCode!==null)throw Error(`${runtime} exited: ${logs}`); - try{await request(address,'/api/healthcheck',null,agent);ready=true;break;}catch{await delay(100);} - } - if(!ready)throw Error(`${runtime} startup timeout: ${logs}`); - // Startup jobs and index creation settle before measurement. - await delay(1000); - let delivered=0; - const fileURL=id=>`/api/repo/${id}/file/${encodeURIComponent(spec.filename.replaceAll('Alice','XXXX-1'))}`; - const drain=async()=>{for(let i=0;i<200;i++){ - const rows=await db.collection('anonymizedrepositories').aggregate([{$group:{_id:null,count:{$sum:'$pageView'}}}]).toArray(); - if(rows[0]?.count===delivered)return;await delay(10); - }throw Error('page_view_writes_did_not_drain');}; - const measure=async(count,concurrency,getID)=>{ - let next=0,peak=usage(child.pid).rss;const before=usage(child.pid);const timer=setInterval(()=>{peak=Math.max(peak,usage(child.pid).rss)},10); - const started=performance.now(),samples=[]; - try{ - await Promise.all(Array.from({length:concurrency},async()=>{for(;;){const n=next++;if(n>=count)return;samples.push(await request(address,fileURL(getID(n)),expected,agent));delivered++;}})); - const elapsedMs=performance.now()-started;await drain();const after=usage(child.pid);peak=Math.max(peak,after.rss); - return {requests:count,concurrency,elapsedMs,requestsPerSecond:count*1000/elapsedMs,p50Ms:percentile(samples.map(x=>x.ms),.5),p95Ms:percentile(samples.map(x=>x.ms),.95),maxMs:Math.max(...samples.map(x=>x.ms)),p95TTFBMs:percentile(samples.map(x=>x.ttfbMs),.95),cpuMs:Math.max(0,after.cpu-before.cpu),peakProcessTreeRssBytes:peak,samplesMs:samples.map(x=>x.ms)}; - }finally{clearInterval(timer)} - }; - const cold=await measure(coldCount,1,n=>repoIDs[n]); - for(let i=0;i<3;i++){await request(address,fileURL(repoIDs[0]),expected,agent);delivered++;}await drain(); - const warm=[];for(const concurrency of [1,8])warm.push(await measure(quick?16:100,concurrency,()=>repoIDs[0])); - return {runtime,repeat,fixture:spec.name,inputBytes:body.length,outputBytes:spec.output.length,outputSHA256:expected,cold,warm}; - }catch(error){ - await delay(25); - if(runtime==='node' && error.actual===500 && logs.includes('DataCloneError')) { - return {runtime,repeat,fixture:spec.name,inputBytes:body.length,expectedOutputSHA256:expected,status:'failed',httpStatus:500,failure:'DataCloneError: persisted term array cannot be cloned into the anonymization worker'}; - } - throw Error(`${runtime}/${spec.name}: ${error.message}\n${logs}`); - }finally{agent.destroy();if(!spawnError)await stop(child);await db.dropDatabase();await fsp.rm(directory,{recursive:true,force:true});} -} -(async()=>{ - assert.equal(process.platform,'linux','process accounting requires Linux'); - const {BENCH_MONGODB_URI:mongo,BENCH_REDIS_ADDR:redis,BENCH_GO_SERVER:binary}=process.env; - assert.match(mongo||'',/^mongodb:\/\/127\.0\.0\.1:\d+$/);assert.match(redis||'',/^127\.0\.0\.1:\d+$/);assert.ok(path.isAbsolute(binary||'')); - const quick=process.argv.includes('--quick');const output=process.argv.find(a=>a.startsWith('--output='))?.slice(9); - const temp=await fsp.mkdtemp(path.join(os.tmpdir(),'anonymous-http-bench-'));const client=new MongoClient(mongo); - try{ - const compiled=path.join(temp,'compiled'),sourceSHA256=await compileNode(compiled);await client.connect(); - const fixtures=[ - {name:'64 KiB changed text',filename:'Alice.txt',terms:['Alice'],body:Buffer.from('Alice hello world\n'.repeat(3641))}, - {name:'2 MiB absent terms',filename:'data.txt',terms:['Alice'],body:Buffer.from('0123456789abcdef\n'.repeat(123362))}, - {name:'128 KiB JS boundary regex',filename:'data.txt',terms:['\\bAlice\\b'],body:Buffer.from('éAliceé Alice\n'.repeat(8192))}, - {name:'2 MiB binary',filename:'image.png',terms:['Alice'],body:Buffer.alloc(2*1024*1024,0)}, - ]; - for(const spec of fixtures)spec.output=spec.name.endsWith('binary')?spec.body:Buffer.from(spec.body.toString().replaceAll('Alice','XXXX-1')); - const results=[];for(let repeat=0;repeat<(quick?1:3);repeat++)for(const spec of fixtures)for(const runtime of repeat%2?['go','node']:['node','go']){ - if(interrupted)throw Error('benchmark_interrupted'); - console.error(`Measuring ${runtime}: ${spec.name}, repeat ${repeat+1}`); - results.push(await runRuntime({runtime,spec,repeat,temp,compiled,client,mongo,redis,binary,quick})); - } - const cgroup={};for(const key of ['cpu.max','memory.max']){try{cgroup[key]=await fsp.readFile('/sys/fs/cgroup/'+key,'utf8')}catch{}} - const report={benchmarkScriptSHA256:scriptSHA256,recordedAt:new Date().toISOString(),node:process.version,typescript:ts.version,go:process.env.BENCH_GO_VERSION,nodeSourceSHA256:sourceSHA256,goBinarySHA256:hash(await fsp.readFile(binary)),packageLockSHA256:hash(await fsp.readFile(path.join(root,'package-lock.json'))),hardware:{kernel:os.release(),cgroup,loadAverage:os.loadavg(),platform:os.platform(),arch:os.arch(),cpu:os.cpus()[0].model,logicalCPUs:os.cpus().length,availableParallelism:os.availableParallelism(),memoryBytes:os.totalmem()},method:{entrypoints:['src/server/index.ts','backend/cmd/server'],source:'pre-seeded archive originals; no external provider calls',storage:'filesystem; shared cache disabled; process-local transformed cache enabled',encoding:'identity',client:'loopback keep-alive, distinct forwarded IPv4 per request to avoid per-client throttling; both servers trust loopback',cold:'unique repository per request, same process; filesystem page cache is warm',warm:'three warmup requests then fixed-count batches at concurrency 1 and 8',cpu:'Linux process tree user+system, including waited-for children and post-response page-view writes',memory:'process-tree RSS sampled every 10 ms; excludes MongoDB, Redis and load generator',nodeCompilation:'transpileModule ES2022/CommonJS; no ts-node in measured process',quick},results}; - const data=JSON.stringify(report,null,2)+'\n';if(output){await fsp.mkdir(path.dirname(path.resolve(output)),{recursive:true});await fsp.writeFile(output,data);}else process.stdout.write(data); - }finally{await client.close();await fsp.rm(temp,{recursive:true,force:true});} -})().catch(error=>{console.error(error);process.exitCode=1}); diff --git a/backend/scripts/benchmark-http.sh b/backend/scripts/benchmark-http.sh deleted file mode 100755 index ce3206d..0000000 --- a/backend/scripts/benchmark-http.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail -cd "$(dirname "$0")/../.." -go_binary=${GO_BINARY:-go} -project="anonymous-http-benchmark-$$" -artifacts=$(mktemp -d) -cleanup() { - docker compose -p "$project" -f backend/compose.test.yml down --volumes >/dev/null 2>&1 || true - rm -rf "$artifacts" -} -trap cleanup EXIT -server_binary=${BENCH_EXISTING_BINARY:-"$artifacts/server"} -if [[ -z "${BENCH_EXISTING_BINARY:-}" ]]; then - "$go_binary" build -C backend -o "$server_binary" ./cmd/server -fi -docker compose -p "$project" -f backend/compose.test.yml up -d -mongo_address=$(docker compose -p "$project" -f backend/compose.test.yml port mongo 27017) -redis_address=$(docker compose -p "$project" -f backend/compose.test.yml port redis 6379) -for attempt in {1..30}; do - if docker compose -p "$project" -f backend/compose.test.yml exec -T mongo mongosh --quiet --eval 'db.adminCommand({ping:1}).ok' >/dev/null 2>&1; then break; fi - sleep 1 -done -BENCH_MONGODB_URI="mongodb://$mongo_address" BENCH_REDIS_ADDR="$redis_address" BENCH_GO_SERVER="$server_binary" BENCH_GO_VERSION="$("$go_binary" version)" node "${BENCH_SCRIPT:-backend/scripts/benchmark-http.cjs}" "$@" diff --git a/backend/scripts/benchmark-repository.cjs b/backend/scripts/benchmark-repository.cjs deleted file mode 100644 index 29857b3..0000000 --- a/backend/scripts/benchmark-repository.cjs +++ /dev/null @@ -1,164 +0,0 @@ -'use strict'; -// Runs the actual Node and Go entrypoints. No production credentials, database, -// storage, providers or application methods are replaced by benchmark stubs. -const fs=require('node:fs'),fsp=fs.promises,path=require('node:path'),os=require('node:os'); -const http=require('node:http'),net=require('node:net'),crypto=require('node:crypto'); -const {spawn,execFileSync}=require('node:child_process'),{once}=require('node:events'); -const {performance}=require('node:perf_hooks'),{setTimeout:delay}=require('node:timers/promises'); -const assert=require('node:assert/strict'),ts=require('typescript'); -const {mongo:{MongoClient,ObjectId}}=require('mongoose'); -const root=path.resolve(__dirname,'../..'); -const children=new Set();let interrupted=false; -for(const signal of ['SIGINT','SIGTERM'])process.on(signal,()=>{interrupted=true;for(const child of children)child.kill('SIGTERM')}); -const hash=b=>crypto.createHash('sha256').update(b).digest('hex'); -const scriptSHA256=hash(fs.readFileSync(__filename)); -const percentile=(values,p)=>[...values].sort((a,b)=>a-b)[Math.ceil(values.length*p)-1]; -const ticks=Number(execFileSync('getconf',['CLK_TCK'],{encoding:'utf8'})); -const page=Number(execFileSync('getconf',['PAGESIZE'],{encoding:'utf8'})); -function usage(pid,seen=new Set()) { - if(seen.has(pid))return {rss:0,cpu:0};seen.add(pid); - try { - const text=fs.readFileSync(`/proc/${pid}/stat`,'utf8');const fields=text.slice(text.lastIndexOf(')')+2).split(' '); - let rss=Number(fields[21])*page,cpu=[11,12,13,14].reduce((sum,i)=>sum+Number(fields[i]),0)*1000/ticks; - // Go may fork workers from any OS thread, not just the main thread. - const descendants=new Set(); - for(const tid of fs.readdirSync(`/proc/${pid}/task`)){ - try{for(const child of fs.readFileSync(`/proc/${pid}/task/${tid}/children`,'utf8').trim().split(' '))if(child)descendants.add(Number(child));} - catch(error){if(error.code!=='ENOENT'&&error.code!=='ESRCH')throw error;} - } - for(const child of descendants){const value=usage(child,seen);rss+=value.rss;cpu+=value.cpu;} - return {rss,cpu}; - }catch(error){if(error.code==='ENOENT'||error.code==='ESRCH')return {rss:0,cpu:0};throw error;} -} -async function compileNode(destination) { - const digest=crypto.createHash('sha256'); - async function walk(directory,relative=''){ - for(const entry of (await fsp.readdir(directory,{withFileTypes:true})).sort((a,b)=>a.name.localeCompare(b.name))){ - const rel=path.join(relative,entry.name),source=path.join(directory,entry.name); - if(entry.isDirectory()){await walk(source,rel);continue;} - if(!entry.name.endsWith('.ts')||entry.name.endsWith('.d.ts'))continue; - const content=await fsp.readFile(source,'utf8');digest.update(rel+'\0'+content+'\0'); - const target=path.join(destination,rel.replace(/\.ts$/,'.js'));await fsp.mkdir(path.dirname(target),{recursive:true}); - await fsp.writeFile(target,ts.transpileModule(content,{compilerOptions:{module:ts.ModuleKind.CommonJS,target:ts.ScriptTarget.ES2022,preserveConstEnums:true,removeComments:true}}).outputText); - } - } - await walk(path.join(root,'src')); - const emoji=await fsp.readFile(path.join(root,'public/script/external/github-emojis.js')); - const asset=path.join(destination,'../public/script/external/github-emojis.js'); - await fsp.mkdir(path.dirname(asset),{recursive:true});await fsp.writeFile(asset,emoji);digest.update(emoji); - return digest.digest('hex'); -} -async function port(){const server=net.createServer();server.listen(0,'127.0.0.1');await once(server,'listening');const value=server.address().port;await new Promise(r=>server.close(r));return value;} -let requestID=0; -function request(address,url,expected,agent,method='GET') { - return new Promise((resolve,reject)=>{ - const start=performance.now(),id=++requestID; - const req=http.request({host:'127.0.0.1',port:address,path:url,method,agent,headers:{'accept-encoding':'identity','x-forwarded-for':`10.${(id>>>16)&255}.${(id>>>8)&255}.${id&255}`}},res=>{ - const firstByte=performance.now()-start,digest=crypto.createHash('sha256');let bytes=0; - res.on('data',chunk=>{bytes+=chunk.length;digest.update(chunk)});res.on('error',reject); - res.on('end',()=>{try{ - assert.equal(res.statusCode,200,`${method} ${url} returned ${res.statusCode}`); - assert.equal(res.headers['content-encoding'],undefined,'unexpected compression'); - const actual=digest.digest('hex');if(expected)assert.equal(actual,expected,`${url} output changed`); - resolve({ms:performance.now()-start,ttfbMs:firstByte,bytes,sha256:actual}); - }catch(error){reject(error)}}); - }); - req.setTimeout(60000,()=>req.destroy(Error('request_timeout')));req.on('error',reject);req.end(); - }); -} -async function stop(child){ - if(child.exitCode!==null||child.signalCode!==null)return; - const ended=once(child,'exit');child.kill('SIGTERM');const timer=setTimeout(()=>child.kill('SIGKILL'),35000); - try{await ended;}finally{clearTimeout(timer);} -} -async function fetchSample(address,url,agent,method='GET',token='') { - return new Promise((resolve,reject)=>{ - const start=performance.now(),id=++requestID; - const req=http.request({host:'127.0.0.1',port:address,path:url,method,agent,headers:{...(token?{authorization:'Bearer '+token}:{}),'accept-encoding':'identity','x-forwarded-for':`10.${(id>>>16)&255}.${(id>>>8)&255}.${id&255}`}},res=>{ - const headersMs=performance.now()-start;let firstBodyMs=null;const chunks=[]; - res.on('data',chunk=>{firstBodyMs??=performance.now()-start;chunks.push(chunk)});res.on('error',reject); - res.on('end',()=>resolve({status:res.statusCode,ms:performance.now()-start,headersMs,firstBodyMs,body:Buffer.concat(chunks)})); - });req.setTimeout(120000,()=>req.destroy(Error('request_timeout')));req.on('error',reject);req.end(); - }); -} -function signature(sample,kind) { - if(sample.status!==200)return {status:sample.status,error:sample.body.toString().slice(0,200)}; - if(kind==='json') { - function stable(v){if(Array.isArray(v))return v.map(stable).sort((a,b)=>JSON.stringify(a).localeCompare(JSON.stringify(b)));if(v&&typeof v==='object')return Object.fromEntries(Object.keys(v).sort().filter(k=>k!=='_id').map(k=>[k,stable(v[k])]));return v;} - const value=JSON.parse(sample.body);return {status:200,sha256:hash(Buffer.from(JSON.stringify(stable(value)))),entries:Array.isArray(value)?value.length:Object.keys(value).length}; - } - if(kind==='zip'){ - const manifest=execFileSync('python3',['-c',`import sys,io,zipfile,json,hashlib -with zipfile.ZipFile(io.BytesIO(sys.stdin.buffer.read())) as z: - assert z.testzip() is None - print(json.dumps(sorted([[n,hashlib.sha256(z.read(n)).hexdigest()] for n in z.namelist() if not n.endswith('/')]),separators=(',',':'))) -`],{input:sample.body,maxBuffer:20*1024*1024});return {status:200,sha256:hash(manifest),entries:JSON.parse(manifest).length}; - } - return {status:200,sha256:hash(sample.body)}; -} -async function run({runtime,repeat,temp,compiled,client,mongo,redis,binary,snapshot,rows,cases}) { - if(interrupted)throw Error('benchmark_interrupted'); - const directory=await fsp.mkdtemp(path.join(temp,runtime+'-')),database='repo_bench_'+crypto.randomBytes(8).toString('hex'),db=client.db(database),owner=new ObjectId(); - if(runtime==='node')await fsp.symlink(compiled,path.join(directory,'build'),'dir');await fsp.mkdir(path.join(directory,'public')); - const repoId='same-repository',adminToken=crypto.randomBytes(32).toString('hex'); - await db.collection('users').insertOne({_id:owner,username:'benchmark-owner',status:'active',isAdmin:true,apiTokens:[{_id:new ObjectId(),name:'isolated benchmark',tokenHash:hash(Buffer.from(adminToken)),createdAt:new Date()}]}); - await db.collection('anonymizedrepositories').insertOne({repoId,owner,status:'ready',statusDate:new Date(),anonymizeDate:new Date('2026-01-01'),settingsSavedAt:new Date('2026-01-01'),treeGeneration:'fixture',pageView:0,source:{type:'Zip',repositoryName:'tdurieux/anonymous_github',branch:'main',commit:snapshot.commit},options:{terms:['tdurieux'],expirationMode:'never',image:true,pdf:true,link:true,update:false,page:true,pageSource:{branch:'main',path:'/'}}}); - await db.collection('files').insertMany(rows.map(r=>({...r,repoId,treeGeneration:'fixture'}))); - const original=path.join(directory,'repositories',repoId,'original');await fsp.mkdir(original,{recursive:true});await fsp.cp(snapshot.path,original,{recursive:true}); - const address=await port(),[redisHost,redisPort]=redis.split(':'); - const env={PATH:process.env.PATH,NODE_PATH:path.join(root,'node_modules'),NODE_ENV:'production',TZ:'UTC',PORT:String(address),SESSION_SECRET:crypto.randomBytes(32).toString('hex'),CREDENTIAL_KEYS:JSON.stringify({benchmark:crypto.randomBytes(32).toString('base64')}),CREDENTIAL_ACTIVE_KEY_ID:'benchmark',GITHUB_OAUTH_ENABLED:'false',GITHUB_APP_ENABLED:'false',MONGODB_URI:mongo+'/'+database,MONGODB_DATABASE:database,REDIS_HOSTNAME:redisHost,REDIS_PORT:redisPort,FOLDER:path.join(directory,'repositories'),PUBLIC_DIR:path.join(directory,'public'),STORAGE:'filesystem',SHARED_CACHE_ENABLED:'true',SHARED_CACHE_PATH:path.join(directory,'shared-cache'),SHARED_CACHE_FREE_BYTES:'0',CACHE_MONITORING_ENABLED:'false',COOKIE_SECURE:'false',TRUST_PROXY:'loopback',RATE_LIMIT:'1000000',ANONYMIZATION_WORKERS:'1',ANONYMIZATION_MEMORY_MB:'512',ANONYMIZATION_MASK:'XXXX',APP_HOSTNAME:'anonymous.test',TMPDIR:directory}; - if(process.env.BENCH_PROFILE_DIR)env.BENCH_PROFILE_DIR=process.env.BENCH_PROFILE_DIR; - const child=spawn(runtime==='node'?process.execPath:binary,runtime==='node'?[path.join(compiled,'server/index.js')]:[],{cwd:directory,env,stdio:['ignore','pipe','pipe']});children.add(child);child.once('exit',()=>children.delete(child));let logs='';for(const stream of [child.stdout,child.stderr])stream.on('data',b=>{logs=(logs+b).slice(-24000)}); - const agent=new http.Agent({keepAlive:true,maxSockets:8}),results=[]; - try{ - let ready=false;for(let i=0;i<200;i++){if(child.exitCode!==null)throw Error(logs);try{await request(address,'/api/healthcheck',null,agent);ready=true;break}catch{await delay(100)}}assert(ready,'startup timeout');await delay(1000); - for(const spec of cases){ - console.error(`Measuring ${runtime} round ${repeat+1}: ${spec.name}`); - const url=spec.url.replaceAll('{id}',repoId),cold=await fetchSample(address,url,agent,'GET',spec.kind==='zip'?adminToken:'').catch(e=>({status:0,ms:0,firstBodyMs:null,body:Buffer.from('incomplete response: '+e.message)})),expected=signature(cold,spec.kind); - if(interrupted)throw Error('benchmark_interrupted'); - const item={name:spec.name,cold:{ms:cold.ms,firstBodyMs:cold.firstBodyMs,status:cold.status,bytes:cold.body.length},output:expected,warm:[]};results.push(item); - if(cold.status!==200){item.diagnostic=logs.includes('DataCloneError')?'DataCloneError in TypeScript anonymization worker':expected.error;continue;} - for(const concurrency of spec.kind==='zip'?[1]:[1,8]){ - const count=Number(process.env.BENCH_REQUESTS)||(spec.kind==='zip'?3:32);let next=0,peak=usage(child.pid).rss;const before=usage(child.pid),start=performance.now(),samples=[];const timer=setInterval(()=>{peak=Math.max(peak,usage(child.pid).rss)},20); - try{await Promise.all(Array.from({length:concurrency},async()=>{for(;;){if(next++>=count)return;const r=await fetchSample(address,url,agent,'GET',spec.kind==='zip'?adminToken:'');assert.equal(r.status,200);samples.push(r)}}));}finally{clearInterval(timer)} - const elapsed=performance.now()-start,after=usage(child.pid); - // Validate outside timed load generation so ZIP decoding does not throttle either runtime. - for(const r of samples)assert.deepEqual(signature(r,spec.kind),expected,'output changed between repeated requests'); - item.warm.push({concurrency,requests:count,p50Ms:percentile(samples.map(x=>x.ms),.5),p95Ms:percentile(samples.map(x=>x.ms),.95),p50FirstBodyMs:percentile(samples.map(x=>x.firstBodyMs),.5),requestsPerSecond:count*1000/elapsed,cpuMs:Math.max(0,after.cpu-before.cpu),peakProcessTreeRssBytes:Math.max(peak,after.rss),bytes:samples[0].body.length}); - } - } - return {runtime,repeat,results}; - }catch(e){throw Error(e.message+'\n'+logs)}finally{agent.destroy();await stop(child);await db.dropDatabase();await fsp.rm(directory,{recursive:true,force:true})} -} -(async()=>{ - const {BENCH_MONGODB_URI:mongo,BENCH_REDIS_ADDR:redis,BENCH_GO_SERVER:binary}=process.env;assert.match(mongo||'',/^mongodb:\/\/127\.0\.0\.1:\d+$/);assert.match(redis||'',/^127\.0\.0\.1:\d+$/); - const temp=await fsp.mkdtemp(path.join(os.tmpdir(),'repository-comparison-')),client=new MongoClient(mongo);let upstream; - try{ - const compiled=path.join(temp,'compiled'),nodeSourceSHA256=await compileNode(compiled);await client.connect(); - const snapshot={path:path.join(temp,'snapshot'),commit:execFileSync('git',['rev-parse','HEAD'],{cwd:root,encoding:'utf8'}).trim()};await fsp.mkdir(snapshot.path); - const archive=execFileSync('git',['archive','HEAD'],{cwd:root,maxBuffer:200*1024*1024});execFileSync('tar',['-xf','-','-C',snapshot.path],{input:archive}); - const rows=[];let originalFiles=0,originalBytes=0; - async function walk(dir,relative=''){for(const e of await fsp.readdir(dir,{withFileTypes:true})){const name=path.posix.join(relative,e.name);if(e.isDirectory()){rows.push({path:relative,name:e.name});await walk(path.join(dir,e.name),name)}else if(e.isFile()){const body=await fsp.readFile(path.join(dir,e.name));rows.push({path:relative,name:e.name,sha:hash(body),size:body.length});originalFiles++;originalBytes+=body.length;}}}await walk(snapshot.path); - await fsp.mkdir(path.join(snapshot.path,'benchmark-1000'));rows.push({path:'',name:'benchmark-1000'}); - const js=await fsp.readFile(path.join(snapshot.path,'gulpfile.js')); - for(let i=0;i<1000;i++){const name=`file-${String(i).padStart(4,'0')}.js`;rows.push({path:'benchmark-1000',name,sha:hash(js),size:js.length});await fsp.writeFile(path.join(snapshot.path,'benchmark-1000',name),js);} - if(process.env.BENCH_LOCAL_ZIP==='1') { - const fixtureZip=path.join(temp,'fixture.zip'); - execFileSync('python3',['-c',`import os,sys,zipfile -with zipfile.ZipFile(sys.argv[2],'w',zipfile.ZIP_DEFLATED) as z: - for parent,dirs,files in os.walk(sys.argv[1]): - for name in sorted(files): - p=os.path.join(parent,name);z.write(p,'fixture/'+os.path.relpath(p,sys.argv[1])) -`,snapshot.path,fixtureZip]); - upstream=http.createServer((req,res)=>{res.setHeader('Content-Type','application/zip');fs.createReadStream(fixtureZip).pipe(res)}); - upstream.listen(0,'127.0.0.1');await once(upstream,'listening'); - const target=path.join(compiled,'core/zipStream.js'),source=await fsp.readFile(target,'utf8'); - assert(source.includes('https://codeload.github.com/')); - await fsp.writeFile(target,source.replaceAll('https://codeload.github.com/',`http://127.0.0.1:${upstream.address().port}/`)); - } - const cases=[{name:'root directory',url:'/api/repo/{id}/files',kind:'json'},{name:'src directory',url:'/api/repo/{id}/files?path=src',kind:'json'},{name:'1000-file directory',url:'/api/repo/{id}/files?path=benchmark-1000',kind:'json'},{name:'file counts',url:'/api/repo/{id}/files/counts',kind:'json'},{name:'gulpfile.js',url:'/api/repo/{id}/file/gulpfile.js',kind:'file'},{name:'src/config.ts',url:'/api/repo/{id}/file/src/config.ts',kind:'file'},{name:'website gulpfile.js',url:'/w/{id}/gulpfile.js',kind:'file'},{name:'repository ZIP',url:'/api/repo/{id}/zip',kind:'zip'}]; - const results=[];for(let repeat=0;repeat<(Number(process.env.BENCH_ROUNDS)||2);repeat++)for(const runtime of (process.env.BENCH_RUNTIMES?process.env.BENCH_RUNTIMES.split(','):repeat?['go','node']:['node','go']))results.push(await run({runtime,repeat,temp,compiled,client,mongo,redis,binary,snapshot,rows,cases:process.env.BENCH_CASE?cases.filter(x=>x.name===process.env.BENCH_CASE):process.env.BENCH_SKIP_ZIP==='1'?cases.filter(x=>x.kind!=='zip'):cases})); - const report={recordedAt:new Date().toISOString(),node:process.version,go:process.env.BENCH_GO_VERSION,nodeSourceSHA256,goBinarySHA256:hash(await fsp.readFile(binary)),benchmarkScriptSHA256:scriptSHA256,fixture:{repository:'tdurieux/anonymous_github',commit:snapshot.commit,originalFiles,originalBytes,terms:['tdurieux'],addedFixture:'1000 copies of snapshot gulpfile.js in benchmark-1000'},method:{entrypoints:['src/server/index.ts','backend/cmd/server'],provider:'Same pre-seeded archive snapshot; no GitHub API calls or production database',localZipOrigin:process.env.BENCH_LOCAL_ZIP==='1'?'Only codeload origin in temporary compiled TS redirected to loopback serving the identical snapshot ZIP; no tracked TS sources changed':false,zipAuthorization:'Disposable admin API key to allow the TypeScript local ZIP route',sharedCache:true,encoding:'identity',cold:'First endpoint request per fresh process/storage; earlier cases may warm shared dependencies',warm:process.env.BENCH_REQUESTS?`${Number(process.env.BENCH_REQUESTS)} requests per tested concurrency`:'32 requests per concurrency 1 and 8; ZIP 3 requests at concurrency 1',rounds:Number(process.env.BENCH_ROUNDS)||2,order:process.env.BENCH_RUNTIMES||'Node then Go; Go then Node',resources:'Process tree CPU and RSS; excludes MongoDB, Redis and client; CPU may include background work',scope:'HTTP backend only; excludes browser rendering, CDN, GitHub authorization and network fetch'},results}; - await fsp.writeFile(path.join(root,process.env.BENCH_OUTPUT||'backend/reports/repository-runtime-comparison.json'),JSON.stringify(report,null,2));console.log('Saved '+(process.env.BENCH_OUTPUT||'backend/reports/repository-runtime-comparison.json')); - }finally{if(upstream)await new Promise(r=>upstream.close(r));await client.close();await fsp.rm(temp,{recursive:true,force:true})} -})().catch(e=>{console.error(e);process.exitCode=1}); diff --git a/backend/scripts/check-shadow-auth.cjs b/backend/scripts/check-shadow-auth.cjs deleted file mode 100644 index 1c265cd..0000000 --- a/backend/scripts/check-shadow-auth.cjs +++ /dev/null @@ -1,377 +0,0 @@ -'use strict'; -// Explicitly authorized beta-only admin bootstrap and authenticated deployment checks. -// Credentials remain in memory. The temporary key is removed even when a check fails. -const assert = require('node:assert/strict'); -const {randomBytes, createHash} = require('node:crypto'); -const {spawnSync} = require('node:child_process'); -const fs = require('node:fs'); -const path = require('node:path'); -const root = path.resolve(__dirname, '../..'); -const base = 'https://beta.durieux.me'; -const compose = ['compose', '--env-file', '.env.go-shadow', '-f', 'backend/compose.shadow.yml', '-f', 'backend/compose.shadow-beta.yml']; -const appFlow = process.argv.includes('--app-flow'); -const monitoringOnly = process.argv.includes('--monitoring-only'); -const app = appFlow || process.argv.includes('--app'); -if(app) compose.push('-f','backend/compose.shadow-app.yml'); -function docker(args, input) { - const r = spawnSync('docker', args, {cwd:root, input, encoding:'utf8', timeout:30000}); - if (r.error || r.status !== 0) throw Error('Shadow Docker operation failed'); - return r.stdout.trim(); -} -function db(script) { - return docker([...compose, 'exec', '-T', 'mongodb', 'mongosh', '--quiet', '--nodb', '--file', '/dev/stdin'], ` -const c = new Mongo('mongodb://' + encodeURIComponent(process.env.MONGO_INITDB_ROOT_USERNAME) + ':' + encodeURIComponent(process.env.MONGO_INITDB_ROOT_PASSWORD) + '@127.0.0.1:27017/?authSource=admin'); -const d = c.getDB('shadow'); -${script} -`); -} -const report = {verifiedAt:new Date().toISOString(), hostname:'beta.durieux.me', configurationMode:app?'GitHub App enabled alongside legacy OAuth':'legacy OAuth only', checks:[], productionChanged:false}; -const key = randomBytes(32).toString('hex'); -const hash = createHash('sha256').update(key).digest('hex'); -const id = randomBytes(12).toString('hex'); -const repoId = 'go-beta-check-' + Date.now(); -let bootstrapped = false, createdRepo = false; -const requestIDs=new Set(); -const fixture = appFlow ? {name:'tdurieux/synctex-js',branch:'master',file:'LICENSE',term:'MIT'} : {name:'octocat/Hello-World',branch:'master',file:'README',term:'Hello'}; -async function call(method, route, body, expected=200, token=key, extraHeaders={}, binary=false) { - const start = performance.now(); - const response = await fetch(base+route, {method, headers:{...(token ? {Authorization:'Bearer '+token}:{}), 'Content-Type':'application/json', ...extraHeaders}, body:body===undefined?undefined:JSON.stringify(body), signal:AbortSignal.timeout(45000), redirect:'manual'}); - assert.equal(response.status, expected, method+' '+route+' unexpected status; deployment='+response.headers.get('x-anonymous-deployment')); - const requestID=response.headers.get('x-request-id'); - assert(/^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}$/.test(requestID||''),'missing generated request ID on '+method+' '+route+' (status '+response.status+', deployment '+response.headers.get('x-anonymous-deployment')+')'); - assert(!requestIDs.has(requestID),'request ID reused'); - requestIDs.add(requestID); - const headersMs=Math.round(performance.now()-start); - const chunks=[]; - let firstBodyByteMs=null; - for await (const chunk of response.body) { - if(chunk.length && firstBodyByteMs===null) firstBodyByteMs=Math.round(performance.now()-start); - chunks.push(chunk); - } - const bytes = Buffer.concat(chunks); - const text = bytes.toString('utf8'); - let value; try {value=JSON.parse(text);} catch {value=text;} - report.checks.push({method, route, requestID, status:response.status, expected, bytes:bytes.length, headersMs, firstBodyByteMs, elapsedMs:Math.round(performance.now()-start)}); - assert.equal(response.headers.get('x-anonymous-deployment'), 'go-shadow-beta', 'wrong deployment'); - assert.equal(response.status, expected, method+' '+route+' unexpected status'); - assert(!text.includes(key) && !text.includes(hash), 'credential exposure'); - return {value:binary?bytes:value,response}; -} -(async () => { - assert(process.argv.includes('--bootstrap-admin'), 'Explicit --bootstrap-admin required; leaves the sole real beta account as admin'); - for (const service of ['app','mongodb']) { - const info=JSON.parse(docker(['inspect',docker([...compose,'ps','-q',service])]))[0]; - assert.equal(info.Config.Labels['com.docker.compose.project'],'anonymous-go-shadow'); - assert(Object.values(info.NetworkSettings.Ports||{}).every(v=>!v)); - assert(info.Mounts.every(m=>(m.Type==='volume' && m.Name.startsWith('anonymous-go-shadow_')) || (app && service==='app' && m.Type==='bind' && m.Source===path.join(root,'secrets/github-app-beta.pem') && m.Destination==='/run/secrets/github-app-beta.pem' && !m.RW))); - if(service==='mongodb') assert.deepEqual(Object.keys(info.NetworkSettings.Networks),['anonymous-go-shadow_default']); - if(service==='app') { - const env=Object.fromEntries(info.Config.Env.map(v=>{const i=v.indexOf('=');return [v.slice(0,i),v.slice(i+1)];})); - const uri=new URL(env.MONGODB_URI); - assert.equal(uri.hostname,'mongodb');assert.equal(uri.pathname,'/shadow'); - assert.equal(env.APP_HOSTNAME,'beta.durieux.me'); - } - } - await call('GET','/api/user',undefined,401,''); - db(`const users=d.users.find({'externalIDs.github':{$exists:true},status:'active'}).toArray(); -if(users.length!==1) throw Error('Expected exactly one active GitHub beta account'); -const result=d.users.updateOne({_id:users[0]._id,status:'active'},{$set:{isAdmin:true},$push:{apiTokens:{_id:ObjectId('${id}'),name:'Temporary beta deployment validation',tokenHash:'${hash}',createdAt:new Date()}}}); -if(result.modifiedCount!==1) throw Error('Bootstrap failed');`); - bootstrapped=true; - const {value:user}=await call('GET','/api/user'); - assert.equal(user.isAdmin,true); - for(const route of (monitoringOnly ? ['/api/admin/overview','/api/admin/queues','/api/admin/performance','/api/admin/errors','/api/admin/errors/stats'] : ['/github/connections','/api/providers','/api/user/dashboard','/api/user/default','/api/user/quota','/api/admin/overview','/api/admin/users','/api/admin/repos','/api/admin/queues','/api/admin/performance','/api/admin/errors','/api/admin/errors/stats','/api/admin/tokens'])) { - const {value}=await call('GET',route); - if(route==='/api/admin/queues') { - for(const queue of value.queues) { - for(const field of ['workers','completed24h','failed24h']) assert(Number.isFinite(queue[field]),'missing queue overview '+field); - assert(queue.workers>=1,'beta worker not registered: '+queue.key); - assert.equal(queue.concurrency,queue.key==='download'?3:5,'wrong beta worker concurrency'); - } - report.queueOverviewFields='passed'; - } - if(route==='/api/admin/overview') { - for(const [group,field] of [['repos','activeRepos24h'],['repos','newRepos24h'],['users','newUsers24h'],['system','cpuPercent'],['system','memPercent'],['system','diskPercent']]) { - assert(Number.isFinite(value[group]?.[field]),'Missing overview field '+group+'.'+field); - } - const today=new Date();today.setUTCHours(0,0,0,0); - const current=value.history.filter(row=>new Date(row.date).getTime()===today.getTime()); - assert.equal(current.length,1,'admin history should contain one current-day snapshot'); - assert.equal(current[0].nbRepositories,value.repos.total,'admin history uses stale totals'); - report.overviewHistoryFresh='passed'; - report.overviewBrowserFields='passed'; - } - } - const {value:errorList}=await call('GET','/api/admin/errors?limit=5001'); - assert.equal(errorList.max,5000);assert.equal(errorList.limit,5000);assert.equal(errorList.available,true); - const {value:beforeErrors}=await call('GET','/api/admin/errors/stats'); - await call('GET','/api/repo/'+repoId+'-missing',undefined,404); - const {value:afterErrors}=await call('GET','/api/admin/errors/stats'); - assert.equal(afterErrors.available,true);assert.equal(afterErrors.buckets.length,24); - assert(afterErrors.severity.info>=beforeErrors.severity.info+1,'missing routine 404 counter'); - report.errorMonitoring={maxEntries:5000,hourlyBuckets:24,routine404Counted:true}; - const windows=[]; - for(const [queue,range,count] of [['download','1h',60],['download','6h',360],['download','24h',1440],['download','7d',10080],['remove','1h',60],['cache','1h',60],['download','unrecognized',60]]) { - const {value:history}=await call('GET','/api/admin/queues/metrics?queue='+queue+'&range='+range); - assert.equal(history.queue,queue);assert.equal(history.range,range);assert.equal(history.points.length,count); - assert.equal(history.points.at(-1).ts-history.points[0].ts,(count-1)*60000); - for(const point of history.points) for(const field of ['ts','completed','failed','avgMs']) assert(Number.isFinite(point[field]),'invalid queue point '+field); - windows.push({queue,range,points:count}); - } - await call('GET','/api/admin/queues/metrics?queue=unknown',undefined,404); - report.queueMetricWindows=windows; - const statFields=['nbRepositories','nbUsers','nbPageViews','nbPullRequests']; - const {value:publicStats}=await call('GET','/api/stat',undefined,200,''); - for(const field of statFields) assert(Number.isFinite(publicStats[field]) && publicStats[field]>=0,'invalid public statistic '+field); - const publicWindows=[]; - for(const [query,days] of [['days=-2',1],['days=0',30],['days=0x10',16],['days=7suffix',7],['days=999',365],['days[]=7&days[]=30',7],['days[1]=7&days[0]=1',1],['days[x]=7',30]]) { - const started=new Date();started.setUTCHours(0,0,0,0); - const {value:history}=await call('GET','/api/stat/history?'+query,undefined,200,''); - assert(Array.isArray(history) && history.length>0,'missing public history'); - const lower=started.getTime()-(days-1)*86400000; - let previous=-Infinity; - for(const row of history) { - const date=Date.parse(row.date); - assert(Number.isFinite(date) && date>=lower && date>=previous,'invalid history window/order'); - previous=date; - for(const field of statFields) assert(Number.isFinite(row[field]) && row[field]>=0,'invalid history statistic '+field); - } - publicWindows.push({query,days,rows:history.length}); - } - report.publicStatistics={anonymousAccess:true,windows:publicWindows}; - for(const query of ['statuses[]=','type[]=repo']) { - const {value:dashboard}=await call('GET','/api/user/dashboard?'+query); - assert.deepEqual(dashboard.items,[],'array-valued dashboard filter not preserved'); - assert.equal(dashboard.filtered,0); - } - for(const query of ['sort[]=','cursor[]=']) await call('GET','/api/user/dashboard?'+query,undefined,400); - report.dashboardExtendedQueries='passed'; - const dateCursor=value=>Buffer.from(JSON.stringify({sort:'anonymizeDate',type:'repo',id:'000000000000000000000001',value})).toString('base64url'); - const cursorRoute=value=>'/api/user/dashboard?sort=anonymizeDate&limit=5&cursor='+dateCursor(value); - const {value:canonicalDates}=await call('GET',cursorRoute('2024-03-01T00:00:00.000Z')); - for(const date of ['March 1 2024','2024-02-30','2024-02-29T24:00:00Z',['2024','3','1']]) { - const {value}=await call('GET',cursorRoute(date)); - assert.deepEqual(value.items,canonicalDates.items);assert.equal(value.cursor,canonicalDates.cursor); - } - await call('GET',cursorRoute('not a date'),undefined,400); - report.dashboardDateCursors='passed'; - for(const [query,expected] of [['minutes=6e1',60],['minutes[]=60',60],['minutes[0]=15',15]]) { - const {value:performance}=await call('GET','/api/admin/performance?'+query); - assert.equal(performance.windowMinutes,expected,'monitoring query window mismatch'); - } - report.monitoringExtendedQueries='passed'; - for(const [query,queue,range,count] of [['queue[]=cache&range[]=6h','cache','6h',360],['range[]=','download','',60],['range=toString','download','toString',0]]) { - const {value:history}=await call('GET','/api/admin/queues/metrics?'+query); - assert.equal(history.queue,queue);assert.equal(history.range,range);assert.equal(history.points.length,count); - } - await call('GET','/api/admin/queues/metrics?queue[]=',undefined,404); - const {value:arrayQueue}=await call('GET','/api/admin/queues?queue[]=remove'); - assert.equal(arrayQueue.selectedQueue,'remove'); - const {value:arrayErrors}=await call('GET','/api/admin/errors?offset[]=2&limit[]=7'); - assert.equal(arrayErrors.offset,2);assert.equal(arrayErrors.limit,7);assert(arrayErrors.entries.length<=7); - report.adminExtendedQueries='passed'; - for(const query of ['connection=','connection[]=oauth','connection=oauth&connection[]=github-app']) { - const {value:rejected}=await call('GET','/api/repo/octocat/Hello-World?'+query,undefined,400); - assert.equal(rejected.error,'invalid_connection'); - } - report.previewConnectionQueries='passed'; - for(const query of ['repositoryID[]=invalid','repositoryID=invalid','repositoryID[$exists]=true']) { - const {value:rejected}=await call('GET','/api/repo/octocat/Hello-World?'+query,undefined,500); - assert.equal(rejected.error,'internal_error'); - } - report.previewCacheHintRejections='passed'; - for(const query of ['q[]=ab','q[length]=1']) { - const {value}=await call('GET','/api/user/search/github-users?'+query); - assert.deepEqual(value,[]); - } - for(const query of ['q=ab&q=cd','q[x]=ab','q[length][toString]=1']) { - const {value}=await call('GET','/api/user/search/github-users?'+query,undefined,500); - assert.equal(value.error,'internal_error'); - } - report.userSearchQueries='passed'; - for(const kind of ['repos','users','conferences']) { - const {value}=await call('GET','/api/admin/'+kind+'?page[]=2&limit[]=2&sort[]=status&direction[]=asc&format[]=csv'); - assert.equal(value.page,2);assert.deepEqual(value.sort,{_id:-1}); - const {value:large}=await call('GET','/api/admin/'+kind+'?page=1000001&limit=1'); - assert.equal(large.page,1000001); - for(const query of ['page=-1','page[toString]=x',...(kind==='users'?['limit=-1']:[])]) { - const {value:rejected}=await call('GET','/api/admin/'+kind+'?'+query,undefined,500); - assert.equal(rejected.error,'internal_error'); - } - } - report.adminListPaginationQueries='passed'; - for(const kind of ['repos','conferences']) { - const {value}=await call('GET','/api/admin/'+kind+'?limit=-1'); - assert(value.results.length<=1); - const {value:flags}=await call('GET','/api/admin/'+kind+'?ready[]=true'); - assert.deepEqual(flags.query,{$and:[{$or:[{status:'ready'}]}]}); - } - for(const kind of ['repos','users','conferences']) { - const {value}=await call('GET','/api/admin/'+kind+'?search[]=x',undefined,500); - assert.equal(value.error,'internal_error'); - } - report.adminListFilterQueries='passed'; - const {value:arrayStatus}=await call('GET','/api/admin/users?status[]=active'); - assert.deepEqual(arrayStatus.query.status,['active']); - assert.deepEqual(arrayStatus.results,[]);assert(arrayStatus.total>=1); - const {value:operatorStatus}=await call('GET','/api/admin/users?status[$in][]=active'); - assert.deepEqual(operatorStatus.query.status,{$in:['active']}); - assert(operatorStatus.results.length>=1); - for(const route of ['/api/admin/users?status[a]=active','/api/admin/users?status[$in]=active','/api/admin/repos?owner[a]=x','/api/admin/repos?conference[$unknown]=x']) { - const {value}=await call('GET',route,undefined,500);assert.equal(value.error,'internal_error'); - } - report.adminListCastingQueries='passed'; - for(const [kind,field] of [['repos','anonymizeDate'],['users','dateOfEntry'],['conferences','startDate']]) { - const {value}=await call('GET','/api/admin/'+kind+'?dateFrom[]=2024-02-30'); - const filter=kind==='users'?value.query:value.query.$and[0]; - assert.deepEqual(filter[field],{$gte:'2024-03-01T00:00:00.000Z'}); - const {value:legacy}=await call('GET','/api/admin/'+kind+'?dateTo=March%201%202024'); - const legacyFilter=kind==='users'?legacy.query:legacy.query.$and[0]; - assert.deepEqual(legacyFilter[field],{$lte:'2024-03-01T00:00:00.000Z'}); - const {value:invalid}=await call('GET','/api/admin/'+kind+'?dateFrom[toString]=x',undefined,500); - assert.equal(invalid.error,'internal_error'); - } - report.adminListDateQueries='passed'; - if(monitoringOnly) {report.result='passed';return;} - - if(appFlow) { - const {value:connections}=await call('GET','/github/connections'); - assert(connections.appConnected && !connections.appError && connections.installations.length>0,'App authorization or installation unavailable'); - } - const {value:issued}=await call('POST','/api/admin/tokens',{name:'Temporary API lifecycle check'}); - assert(typeof issued.id==='string' && /^[a-f0-9]{24}$/.test(issued.id), 'invalid issued key ID'); - try { - assert(typeof issued.token==='string' && issued.token.length===64,'invalid issued key'); - await call('GET','/api/user',undefined,200,issued.token); - } finally { - await call('DELETE','/api/admin/tokens/'+issued.id); - } - await call('GET','/api/user',undefined,401,issued.token); - report.apiKeyLifecycle='passed'; - const {response:login}=await call('POST','/github/login-token',{}); - const setCookie=login.headers.get('set-cookie')||''; - const cookie=setCookie.split(';')[0]; - assert(cookie.startsWith('connect.sid='),'session cookie missing'); - try { - assert(/;\s*Secure/i.test(setCookie),'session cookie must be Secure'); - assert(/;\s*HttpOnly/i.test(setCookie),'session cookie must be HttpOnly'); - assert(/;\s*Max-Age=2592000(?:;|$)/i.test(setCookie),'session cookie must persist for 30 days'); - assert(/;\s*Expires=/i.test(setCookie),'persistent session cookie must have an expiry'); - assert(/;\s*SameSite=Lax/i.test(setCookie),'session cookie must use SameSite=Lax'); - const {value:sessionUser}=await call('GET','/api/user',undefined,200,'',{Cookie:cookie}); - assert(sessionUser.isAdmin===true && sessionUser.username===user.username,'session identity mismatch'); - } finally { - await call('GET','/api/user/logout',undefined,302,'',{Cookie:cookie}); - } - await call('GET','/api/user',undefined,401,'',{Cookie:cookie}); - report.sessionLoginLogout='passed'; - const {value:preview}=await call('POST','/api/anonymize-preview',{content:'hello Alice',options:{terms:['Alice']}}); - assert.equal(preview.content,'hello XXXX-1'); - const prefix='/api/providers/github/repository/'; - const query='?name='+encodeURIComponent(fixture.name)+'&connection='+(appFlow?'github-app':'oauth'); - await call('GET',prefix+'metadata'+query); - const {value:branches}=await call('GET',prefix+'branches'+query); - await call('GET',prefix+'readme'+query); - const branch=branches.find(b=>b.name===fixture.branch); - assert(branch && typeof branch.commit==='string' && /^[a-f0-9]{40}$/.test(branch.commit), 'public fixture branch missing'); - let expected='XXXX-1 World!\n'; - if(appFlow) { - const source=await fetch('https://raw.githubusercontent.com/'+fixture.name+'/'+branch.commit+'/'+fixture.file,{signal:AbortSignal.timeout(15000)}); - assert.equal(source.status,200,'public fixture source unavailable'); - const original=await source.text(); - assert(original.includes('MIT'),'fixture no longer exercises anonymization'); - expected=original.replace(/\bMIT\b/gi,'XXXX-1'); - } - await call('POST','/api/repo',{repoId,fullName:fixture.name,connection:appFlow?'github-app':'oauth',source:{provider:'github',branch:fixture.branch,commit:branch.commit},terms:[fixture.term],options:{expirationMode:'never',image:true,pdf:true,link:true}}); - createdRepo=true; - if(process.argv.includes('--website')) db(`d.anonymizedrepositories.updateOne({repoId:'${repoId}'},{$set:{'options.page':true,'options.pageSource':{branch:'${fixture.branch}',path:'/'}}});`); - if(appFlow) db(`const row=d.anonymizedrepositories.findOne({repoId:'${repoId}'}); if(row?.githubAccess?.kind!=='github-app') throw Error('App binding missing');`); - let ready=false; - for(let i=0;i<30;i++) { - const {value:r}=await call('GET','/api/repo/'+repoId); - if(r.status==='ready') {ready=true;break;} - assert(r.status!=='error','repository processing failed'); - await new Promise(r=>setTimeout(r,1000)); - } - assert(ready,'repository did not become ready'); - const {value:content}=await call('GET','/api/repo/'+repoId+'/file/'+fixture.file,undefined,200,''); - assert.equal(content,expected); - async function checkWebsite() { - if(!process.argv.includes('--website')) return; - const page=await call('GET','/w/'+repoId+'/'+fixture.file,undefined,200,'',{'Accept-Encoding':'gzip'}); - assert.equal(page.value,expected,'website output differs from file'); - assert(page.response.headers.get('content-security-policy').includes('sandbox'),'website sandbox missing'); - } - await checkWebsite(); - await call('GET','/api/repo/'+repoId+'/files',undefined,200,''); - const {value:zip}=await call('GET','/api/repo/'+repoId+'/zip',undefined,200,'',{},true); - function zipManifest(archive) { - const unzip=spawnSync('python3',['-c',`import io,sys,zipfile,json,base64,hashlib -v=json.load(sys.stdin) -with zipfile.ZipFile(io.BytesIO(base64.b64decode(v['zip']))) as z: - assert z.testzip() is None - files=[n for n in z.namelist() if not n.endswith('/')] - if v['single']: assert len(files)==1 - matches=[n for n in files if n==v['file'] or n.endswith('/'+v['file'])] - assert len(matches)==1 - assert z.read(matches[0])==v['expected'].encode('utf8') - print(json.dumps([[n, hashlib.sha256(z.read(n)).hexdigest()] for n in z.namelist()])) -`],{input:JSON.stringify({zip:archive.toString('base64'),file:fixture.file,expected,single:!appFlow}),timeout:10000}); - assert(!unzip.error && unzip.status===0,'ZIP CRC, entries or anonymized bytes mismatch'); - return JSON.parse(unzip.stdout.toString()); - } - const originalManifest=zipManifest(zip); - report.zipManifestSHA256=createHash('sha256').update(JSON.stringify([...originalManifest].sort((a,b)=>a[0].localeCompare(b[0])))).digest('hex'); - report.zipEntries=originalManifest.length; - report.zipSourceCommit=branch.commit; - report.exactZipContents='passed'; - if(process.argv.includes('--repeat-content')) { - for(let i=0;i<2;i++) { - const again=await call('GET','/api/repo/'+repoId+'/file/'+fixture.file,undefined,200,''); - assert.equal(again.value,expected,'repeated file changed'); - await checkWebsite(); - const archive=await call('GET','/api/repo/'+repoId+'/zip',undefined,200,'',{},true); - // Timed streaming flushes can change deflate framing, but not archive contents. - assert.deepEqual(zipManifest(archive.value),originalManifest,'repeated ZIP contents changed'); - } - report.repeatedContentChecks=3; - } - const {value:metrics}=await call('GET','/api/admin/performance'); - assert.equal(metrics.available,true,'performance history unavailable'); - assert(metrics.routes.some(row=>row.metric==='request' && row.count>0),'missing request metrics'); - assert(metrics.instances.some(row=>row.runtime==='go' && row.memory?.rss>0),'missing Go process sample'); - assert(metrics.runtimeSeries.length>0,'missing runtime history'); - for(const stage of ['repository','authorization','worker_wait','anonymize']) { - assert(metrics.stages.some(row=>row.metric===stage && row.count>0),'missing stage '+stage); - } - report.performanceMonitoring={requests:true,processSamples:true,runtimeHistory:true,stages:['repository','authorization','worker_wait','anonymize'],upstreamObserved:metrics.stages.some(row=>row.metric==='upstream' && row.count>0),upstreamNote:'Shared-cache hits need no upstream read; provider timing is checked by the integration suite.'}; - await call('GET','/api/user',undefined,401,randomBytes(32).toString('hex')); - report.result='passed'; -})().catch(e=>{report.result='failed';report.failure=e.message;process.exitCode=1;}).finally(async()=>{ - try { - if(createdRepo) { - await call('DELETE','/api/repo/'+repoId); - let removed=false; - for(let i=0;i<30;i++) { - const {value:r}=await call('GET','/api/repo/'+repoId); - if(r.status==='removed') {removed=true;break;} - await new Promise(r=>setTimeout(r,1000)); - } - assert(removed,'test repository removal did not finish'); - await call('GET','/api/repo/'+repoId+'/file/'+fixture.file,undefined,410,''); - report.testRepositoryRemoved=true; - } - } catch {report.testRepositoryRemoved=false;process.exitCode=1;} - if(bootstrapped) { - try { - db(`d.users.updateOne({'apiTokens._id':ObjectId('${id}')},{$pull:{apiTokens:{_id:ObjectId('${id}')}}});`); - await call('GET','/api/user',undefined,401); - report.temporaryKeyRevoked=true; - report.betaAccountAdmin=true; - } catch {report.temporaryKeyRevoked=false;process.exitCode=1;} - } - report.uniqueRequestIDsVerified=requestIDs.size; - if(process.exitCode) report.result='failed'; - fs.writeFileSync(path.join(root,monitoringOnly?'backend/reports/shadow-monitoring-authenticated-deployment.json':appFlow?'backend/reports/shadow-app-authenticated-deployment.json':'backend/reports/shadow-authenticated-deployment.json'),JSON.stringify(report,null,2)+'\n'); - console.log(JSON.stringify(report,null,2)); -}); diff --git a/backend/scripts/check-shadow-file-query.cjs b/backend/scripts/check-shadow-file-query.cjs deleted file mode 100644 index 1876d72..0000000 --- a/backend/scripts/check-shadow-file-query.cjs +++ /dev/null @@ -1,36 +0,0 @@ -'use strict'; -// Read-only checks against the existing synthetic shadow-demo repository. -const assert=require('node:assert/strict'),fs=require('node:fs'); -const base='https://beta.durieux.me'; -const report={verifiedAt:new Date().toISOString(),hostname:'beta.durieux.me',checks:[],productionChanged:false}; -(async()=>{ - for(const [query,attachment] of [['download=',false],['download[]=',true],['download[x]=',true],['download=&download=',true]]) { - const response=await fetch(base+'/api/repo/shadow-demo/file/README.md?'+query,{method:'HEAD',redirect:'manual',signal:AbortSignal.timeout(15000)}); - assert.equal(response.status,200);assert.equal(response.headers.get('x-anonymous-deployment'),'go-shadow-beta'); - assert.equal(!!response.headers.get('content-disposition'),attachment); - assert.equal((await response.arrayBuffer()).byteLength,0); - report.checks.push({query,status:response.status,attachment}); - } - for(const [query,status,found] of [['q=README',200,true],['q=%EF%BB%BFREADME%EF%BB%BF',200,true],['q=%C3%A9',200,false],['q[]=README',500,false]]) { - const response=await fetch(base+'/api/repo/shadow-demo/files/search?'+query,{redirect:'manual',signal:AbortSignal.timeout(15000)}); - assert.equal(response.status,status);assert.equal(response.headers.get('x-anonymous-deployment'),'go-shadow-beta'); - assert.equal(response.headers.get('cache-control'),status===200?'no-cache':'no-store'); - const body=await response.json(); - if(status===500) assert.deepEqual(body,{error:'internal_error'}); - else if(found) assert.ok(body.some(file=>file.name==='README.md')); - else assert.deepEqual(body,[]); - report.checks.push({query,status:response.status,found}); - } - for(const [query,status] of [['',200],['path[]=docs',500]]) { - const response=await fetch(base+'/api/repo/shadow-demo/files?'+query,{signal:AbortSignal.timeout(15000)}); - assert.equal(response.status,status);assert.equal(response.headers.get('x-anonymous-deployment'),'go-shadow-beta'); - const body=await response.json(); - if(status===500) assert.deepEqual(body,{error:'internal_error'}); - else { - const readme=body.find(file=>file.name==='README.md');assert.ok(readme); - assert.equal(readme.sha,require('node:crypto').createHash('sha1').update('fixture-readme').digest('hex').slice(0,8)); - } - report.checks.push({endpoint:'files',query,status}); - } - report.result='passed';fs.writeFileSync('backend/reports/shadow-file-query-deployment.json',JSON.stringify(report,null,2)+'\n');console.log(JSON.stringify(report,null,2)); -})().catch(error=>{console.error(error.message);process.exitCode=1}); diff --git a/backend/scripts/check-shadow-oauth-query.cjs b/backend/scripts/check-shadow-oauth-query.cjs deleted file mode 100644 index 126b355..0000000 --- a/backend/scripts/check-shadow-oauth-query.cjs +++ /dev/null @@ -1,54 +0,0 @@ -'use strict'; -// Beta-only rejection checks. State and cookies remain in memory and are not -// included in reports. Invalid parameters must stop before token exchange. -const assert=require('node:assert/strict'),fs=require('node:fs'); -const base='https://beta.durieux.me'; -const trace=[]; -const local=process.argv.includes('--local'); -const dispatcher=local?new (require('undici').Agent)({connect:{lookup:(_host,options,callback)=>options.all?callback(null,[{address:'127.0.0.1',family:4}]):callback(null,'127.0.0.1',4)}}):undefined; -const report={verifiedAt:new Date().toISOString(),hostname:'beta.durieux.me',accessMode:local?'local TLS proxy with hostname verification':'public DNS',checks:[],productionChanged:false}; -async function request(path,cookie='') { - const response=await fetch(base+path,{dispatcher,headers:cookie?{Cookie:cookie}:{},redirect:'manual',signal:AbortSignal.timeout(45000)}); - trace.push({path:path.split('?')[0],status:response.status,deployment:response.headers.get('x-anonymous-deployment'),hasCookie:!!response.headers.get('set-cookie')}); - assert.equal(response.headers.get('x-anonymous-deployment'),'go-shadow-beta'); - return response; -} -async function begin(cookie='') { - const response=await request('/github/app/login',cookie);assert.equal(response.status,302); - const state=new URL(response.headers.get('location')).searchParams.get('state');assert(state); - const nextCookie=(response.headers.get('set-cookie')||'').split(';')[0];assert(nextCookie); - return {state,cookie:nextCookie}; -} -async function reject(path,cookie,error) { - const response=await request(path,cookie);assert.equal(response.status,400);assert.equal((await response.json()).error,error); -} -(async()=>{ - for(const [name,extra,error] of [['mixed-state','&state[]=extra','invalid_auth_state'],['mixed-code','&code[]=extra','github_app_authorization_cancelled'],['empty-array-error','&error[]=','github_app_authorization_cancelled']]) { - const start=await request('/github/app/login');assert.equal(start.status,302); - const state=new URL(start.headers.get('location')).searchParams.get('state');assert(state); - const cookie=(start.headers.get('set-cookie')||'').split(';')[0];assert(cookie); - try { - const callback='/github/app/callback?state='+encodeURIComponent(state)+'&code=synthetic-invalid-code'; - const rejected=await request(callback+extra,cookie);assert.equal(rejected.status,400);assert.equal((await rejected.json()).error,error); - const replay=await request(callback,cookie);assert.equal(replay.status,400);assert.equal((await replay.json()).error,'invalid_auth_state'); - report.checks.push({name,status:400,error,replayRejected:true}); - } finally {const user=await request('/api/user',cookie);assert.equal(user.status,401);} - } - for(const [name,query] of [['missing-state',''],['bracket-only-state','state[]='],['wrong-state','state=wrong']]) { - const flow=await begin(); - await reject('/github/app/callback?'+query+'&code=synthetic-invalid-code',flow.cookie,'invalid_auth_state'); - await reject('/github/app/callback?state='+flow.state+'&code=synthetic-invalid-code',flow.cookie,'invalid_auth_state'); - report.checks.push({name,status:400,replayRejected:true}); - } - const first=await begin(),second=await begin(first.cookie); - await reject('/github/app/callback?state='+first.state+'&code=synthetic-invalid-code',second.cookie,'invalid_auth_state'); - await reject('/github/app/callback?state='+second.state+'&code=synthetic-invalid-code',second.cookie,'invalid_auth_state'); - report.checks.push({name:'superseded-attempt',status:400,replayRejected:true}); - const owner=await begin(),other=await begin(); - await reject('/github/app/callback?state='+owner.state+'&code=synthetic-invalid-code',other.cookie,'invalid_auth_state'); - await reject('/github/app/callback?state='+owner.state+'&error=cancelled',owner.cookie,'github_app_authorization_cancelled'); - report.checks.push({name:'foreign-session-cannot-consume-owner-flow',status:400}); - report.result='passed'; - fs.writeFileSync('backend/reports/shadow-oauth-query-deployment.json',JSON.stringify(report,null,2)+'\n'); - console.log(JSON.stringify(report,null,2)); -})().catch(()=>{console.error('Beta OAuth query rejection check failed; credentials and state omitted.');console.error(JSON.stringify(trace));process.exitCode=1}).finally(()=>dispatcher?.close()); diff --git a/backend/scripts/check-shadow.cjs b/backend/scripts/check-shadow.cjs deleted file mode 100644 index c87f5ee..0000000 --- a/backend/scripts/check-shadow.cjs +++ /dev/null @@ -1,103 +0,0 @@ -'use strict'; -// Seed and check synthetic data only after proving this is the isolated stack. -const assert = require('node:assert/strict'); -const {spawnSync} = require('node:child_process'); -const path = require('node:path'); -const root = path.resolve(__dirname, '../..'); -const app = process.argv.includes('--app'); -const beta = app || process.argv.includes('--beta'); -const compose = ['compose', '--env-file', '.env.go-shadow', '-f', 'backend/compose.shadow.yml']; -if (beta) compose.push('-f', 'backend/compose.shadow-beta.yml'); -if (app) compose.push('-f', 'backend/compose.shadow-app.yml'); -function docker(args, input) { - const result = spawnSync('docker', args, {cwd: root, input, encoding: 'utf8', timeout: 30000}); - if (result.error || result.status !== 0) throw Error('Shadow Docker operation failed'); - return result.stdout.trim(); -} -(async () => { - const cid = docker([...compose, 'ps', '-q', 'app']); - assert(cid, 'shadow app must be running'); - const info = JSON.parse(docker(['inspect', cid]))[0]; - assert.equal(info.Config.Labels['com.docker.compose.project'], 'anonymous-go-shadow'); - assert.equal(info.Config.User, '10001:10001'); - assert.equal(info.HostConfig.ReadonlyRootfs, true); - assert(Object.values(info.NetworkSettings.Ports || {}).every(p => !p)); - const gateway = JSON.parse(docker(['inspect', docker([...compose,'ps','-q','gateway'])]))[0]; - assert.equal(gateway.Config.Labels['com.docker.compose.project'], 'anonymous-go-shadow'); - assert.deepEqual(gateway.NetworkSettings.Ports['8080/tcp'], [{HostIp:'127.0.0.1',HostPort:'5001'}]); - for (const service of ['mongodb','redis']) { - const database = JSON.parse(docker(['inspect',docker([...compose,'ps','-q',service])]))[0]; - assert.equal(database.Config.Labels['com.docker.compose.project'], 'anonymous-go-shadow'); - assert.deepEqual(Object.keys(database.NetworkSettings.Networks), ['anonymous-go-shadow_default']); - assert(Object.values(database.NetworkSettings.Ports || {}).every(p => !p)); - assert(database.Mounts.every(m => m.Type==='volume' && m.Name.startsWith('anonymous-go-shadow_'))); - } - const networks = Object.keys(info.NetworkSettings.Networks); - assert.deepEqual(networks.sort(), beta ? ['anonymous-go-shadow_default','anonymous-go-shadow_outbound'] : ['anonymous-go-shadow_default']); - assert.equal(JSON.parse(docker(['network', 'inspect', networks[0]]))[0].Internal, true); - assert(info.Mounts.every(m => (m.Type === 'volume' && m.Name.startsWith('anonymous-go-shadow_')) || (app && m.Type === 'bind' && m.Source === path.join(root,'secrets/github-app-beta.pem') && m.Destination === '/run/secrets/github-app-beta.pem' && !m.RW))); - const env = Object.fromEntries(info.Config.Env.map(x => {const i=x.indexOf('=');return [x.slice(0,i),x.slice(i+1)];})); - const mongo = new URL(env.MONGODB_URI); - assert.equal(mongo.hostname, 'mongodb'); - assert.equal(mongo.pathname, '/shadow'); - assert.equal(env.REDIS_HOSTNAME, 'redis'); - assert.equal(env.GITHUB_APP_ENABLED, app ? 'true' : 'false'); - assert.equal(env.GITHUB_OAUTH_ENABLED, beta ? 'true' : 'false'); - if(beta) { - assert(env.CLIENT_ID && env.CLIENT_SECRET); - assert.equal(env.AUTH_CALLBACK,'https://beta.durieux.me/github/auth'); - assert.equal(env.COOKIE_SECURE,'true'); - assert.equal(env.TRUST_PROXY,'2'); - } else assert(!env.CLIENT_SECRET); - for (const key of ['GITHUB_TOKEN','GITHUB_APP_PRIVATE_KEY','S3_CLIENT_SECRET',...(!app?['GITHUB_APP_CLIENT_SECRET']:[])]) assert(!env[key], 'no unexpected upstream credentials'); - if(app) {assert(env.GITHUB_APP_CLIENT_SECRET);assert.equal(env.GITHUB_APP_PRIVATE_KEY_FILE,'/run/secrets/github-app-beta.pem');assert.equal(env.GITHUB_APP_CALLBACK,'https://beta.durieux.me/github/app/callback');} - const body = '# Alice shadow demo\n\nhello Alice\n'; - docker([...compose, 'exec', '-T', 'app', 'sh', '-ec', 'mkdir -p /app/repositories/shadow-demo/original; cat > /app/repositories/shadow-demo/original/README.md'], body); - const script = ` - const connection = new Mongo('mongodb://' + encodeURIComponent(process.env.MONGO_INITDB_ROOT_USERNAME) + ':' + encodeURIComponent(process.env.MONGO_INITDB_ROOT_PASSWORD) + '@127.0.0.1:27017/?authSource=admin'); - const shadow = connection.getDB('shadow'); - const owner = ObjectId('000000000000000000000001'); - const existing = shadow.anonymizedrepositories.findOne({repoId:'shadow-demo'}); - if (existing && existing.owner.toString() !== owner.toString()) throw Error('unexpected fixture owner'); - shadow.users.updateOne({_id:owner},{$setOnInsert:{username:'shadow-fixture-owner',status:'active',isAdmin:false}},{upsert:true}); - shadow.anonymizedrepositories.updateOne({repoId:'shadow-demo'},{$setOnInsert:{owner,status:'ready',statusDate:new Date(),anonymizeDate:new Date('2026-01-01'),settingsSavedAt:new Date('2026-01-01'),treeGeneration:'shadow-fixture-v1',pageView:0,source:{type:'Zip',repositoryName:'fixture/project',branch:'main',commit:'fixture-v1'},options:{terms:['Alice'],expirationMode:'never',image:true,pdf:true,link:true,update:false}}},{upsert:true}); - shadow.files.updateOne({repoId:'shadow-demo',path:'',name:'README.md'},{$setOnInsert:{sha:'fixture-readme',size:${Buffer.byteLength(body)},treeGeneration:'shadow-fixture-v1'}},{upsert:true}); - `; - docker([...compose,'exec','-T','mongodb','mongosh','--quiet','--nodb'], script); - const base = beta ? 'https://beta.durieux.me' : 'http://127.0.0.1:5001'; - for (const route of ['/api/healthcheck','/','/r/shadow-demo/']) { - const response = await fetch(base+route,{headers:{Accept:'text/html'},signal:AbortSignal.timeout(10000)}); - assert.equal(response.status,200,route);await response.arrayBuffer(); - } - const options = await (await fetch(base+'/api/options')).json(); - assert.equal(options.GITHUB_APP_ENABLED,app);assert.equal(options.GITHUB_OAUTH_ENABLED,beta); - if(beta) { - const login = await fetch(base+'/github/login',{redirect:'manual'}); - assert.equal(login.status,302); - const target=new URL(login.headers.get('location')); - assert.equal(target.origin,'https://github.com'); - assert.equal(target.pathname,'/login/oauth/authorize'); - assert.equal(target.searchParams.get('client_id'),env.CLIENT_ID); - assert.equal(target.searchParams.get('redirect_uri'),env.AUTH_CALLBACK); - assert.match(login.headers.get('set-cookie'),/;\s*Secure/i); - assert.match(login.headers.get('set-cookie'),/;\s*HttpOnly/i); - assert.match(login.headers.get('set-cookie'),/;\s*SameSite=Lax/i); - } - if(app) { - const login=await fetch(base+'/github/app/login',{redirect:'manual'}); - assert.equal(login.status,302); - const target=new URL(login.headers.get('location')); - assert.equal(target.origin,'https://github.com'); - assert.equal(target.searchParams.get('client_id'),env.GITHUB_APP_CLIENT_ID); - assert.equal(target.searchParams.get('redirect_uri'),env.GITHUB_APP_CALLBACK); - assert(!target.searchParams.has('scope')); - } - assert.equal((await fetch(base+'/api/user')).status,401); - const expected = body.replaceAll('Alice','XXXX-1'); - const file = base+'/api/repo/shadow-demo/file/README.md'; - const cold = await fetch(file);assert.equal(cold.status,200);assert.equal(await cold.text(),expected); - await Promise.all(Array.from({length:8},async()=>{const r=await fetch(file);assert.equal(r.status,200);assert.equal(await r.text(),expected);})); - const zip=await fetch(base+'/api/repo/shadow-demo/zip');assert.equal(zip.status,200); - const bytes=Buffer.from(await zip.arrayBuffer());assert.equal(bytes.readUInt32LE(0),0x04034b50); - console.log(JSON.stringify({isolation:'passed',health:'passed',authentication:beta?(app?'App and legacy OAuth redirects verified; App authorization pending':'legacy OAuth redirect and secure cookie verified; user sign-in still required'):'disabled until a separate callback is configured',exactAnonymizedFileChecks:9,zip:'passed',demo:base+'/r/shadow-demo/'},null,2)); -})().catch(error => {console.error(error.message);process.exitCode=1;}); diff --git a/backend/scripts/generate-mime.cjs b/backend/scripts/generate-mime.cjs deleted file mode 100644 index 2cad349..0000000 --- a/backend/scripts/generate-mime.cjs +++ /dev/null @@ -1,8 +0,0 @@ -// Run from repository root after npm ci. Update the vendored MIT notice when updating mime-db. -const fs=require('node:fs'); -const mime=require('mime-types'); -const result={}; -for(const [ext,type] of Object.entries(mime.types).sort()) result[ext]=mime.contentType(type)||type; -fs.writeFileSync('backend/internal/filetype/mime.json',JSON.stringify(result)); -fs.copyFileSync('node_modules/mime-db/LICENSE','backend/internal/filetype/LICENSE.mime-db'); -fs.copyFileSync('node_modules/isbinaryfile/LICENSE.txt','backend/internal/filetype/LICENSE.isbinaryfile'); diff --git a/backend/scripts/init-shadow.cjs b/backend/scripts/init-shadow.cjs deleted file mode 100644 index 85b604e..0000000 --- a/backend/scripts/init-shadow.cjs +++ /dev/null @@ -1,18 +0,0 @@ -'use strict'; -const fs = require('node:fs'); -const path = require('node:path'); -const crypto = require('node:crypto'); -const file = path.resolve(__dirname, '../../.env.go-shadow'); -const values = { - SHADOW_SESSION_SECRET: crypto.randomBytes(48).toString('hex'), - SHADOW_DB_PASSWORD: crypto.randomBytes(24).toString('hex'), - SHADOW_CREDENTIAL_KEYS: JSON.stringify({'shadow-v1':crypto.randomBytes(32).toString('base64')}), -}; -try { - fs.writeFileSync(file, Object.entries(values).map(([key,value])=>`${key}=${value}\n`).join(''), {flag:'wx',mode:0o600}); - console.log('Created isolated shadow secrets in .env.go-shadow'); -} catch (error) { - if(error.code !== 'EEXIST') throw error; - console.log('Keeping existing .env.go-shadow secrets'); -} -fs.chmodSync(file,0o600); diff --git a/backend/scripts/measure-streaming-zip-memory.cjs b/backend/scripts/measure-streaming-zip-memory.cjs deleted file mode 100644 index a4a662a..0000000 --- a/backend/scripts/measure-streaming-zip-memory.cjs +++ /dev/null @@ -1,70 +0,0 @@ -'use strict'; -// Read-only measurement of one existing beta ZIP download. No credentials. -const fs=require('node:fs'),fsp=fs.promises,os=require('node:os'),path=require('node:path'); -const {execFileSync}=require('node:child_process'); -const {Readable}=require('node:stream'); -const {pipeline}=require('node:stream/promises'); -const assert=require('node:assert/strict'); -const container='anonymous-go-shadow-app-1'; -const pid=Number(execFileSync('docker',['inspect','--format','{{.State.Pid}}',container],{encoding:'utf8'}).trim()); -const image=execFileSync('docker',['inspect','--format','{{.Image}}',container],{encoding:'utf8'}).trim(); -const page=Number(execFileSync('getconf',['PAGESIZE'],{encoding:'utf8'})); -function rss(pid,seen=new Set()) { - if(seen.has(pid))return 0;seen.add(pid); - try { - const raw=fs.readFileSync(`/proc/${pid}/stat`,'utf8'),fields=raw.slice(raw.lastIndexOf(')')+2).split(' '); - let bytes=Number(fields[21])*page; - const children=new Set(); - for(const tid of fs.readdirSync(`/proc/${pid}/task`)) { - try {for(const child of fs.readFileSync(`/proc/${pid}/task/${tid}/children`,'utf8').trim().split(' '))if(child)children.add(Number(child));}catch(e){if(!['ENOENT','ESRCH'].includes(e.code))throw e;} - } - for(const child of children)bytes+=rss(child,seen); - return bytes; - }catch(e){if(['ENOENT','ESRCH'].includes(e.code))return 0;throw e;} -} -const cgroup=fs.readFileSync(`/proc/${pid}/cgroup`,'utf8').trim().split('\n').find(x=>x.startsWith('0::'))?.slice(3); -function memory() { - const result={processTreeRssBytes:rss(pid)}; - if(cgroup) { - const root=path.join('/sys/fs/cgroup',cgroup); - const stats=Object.fromEntries(fs.readFileSync(path.join(root,'memory.stat'),'utf8').trim().split('\n').map(s=>{const [k,v]=s.split(' ');return [k,Number(v)]})); - result.cgroupMemoryBytes=Number(fs.readFileSync(path.join(root,'memory.current'),'utf8')); - result.cgroupAnonymousBytes=stats.anon; - result.cgroupFileCacheBytes=stats.file; - } - return result; -} -(async()=>{ - const directory=await fsp.mkdtemp(path.join(os.tmpdir(),'zip-stream-memory-')); - const zip=path.join(directory,'download.zip'); - const before=memory(),peak={...before};let samples=0,firstBodyMs=null,bytes=0; - const start=performance.now(); - const timer=setInterval(()=>{const m=memory();samples++;for(const key of Object.keys(m))peak[key]=Math.max(peak[key],m[key]);},20); - let report; - try { - const url='https://beta.durieux.me/api/repo/anonymous_github-72DE/zip'; - const response=await fetch(url,{headers:{'Accept-Encoding':'identity'},signal:AbortSignal.timeout(300000)}); - assert.equal(response.status,200);assert.equal(response.headers.get('x-anonymous-deployment'),'go-shadow-beta'); - const headersMs=performance.now()-start; - const input=Readable.fromWeb(response.body); - input.on('data',b=>{firstBodyMs??=performance.now()-start;bytes+=b.length}); - await pipeline(input,fs.createWriteStream(zip)); - const totalMs=performance.now()-start; - clearInterval(timer); - const after=memory();for(const key of Object.keys(after))peak[key]=Math.max(peak[key],after[key]); - const verification=JSON.parse(execFileSync('python3',['-c',`import sys,zipfile,json,hashlib -with zipfile.ZipFile(sys.argv[1]) as z: - manifest=[];size=0 - for e in z.infolist(): - if e.is_dir(): continue - h=hashlib.sha256() - with z.open(e) as f: - for chunk in iter(lambda:f.read(65536),b''): h.update(chunk);size+=len(chunk) - manifest.append([e.filename,h.hexdigest()]) - print(json.dumps({'files':len(manifest),'uncompressedBytes':size,'manifestSHA256':hashlib.sha256(json.dumps(sorted(manifest),separators=(',',':')).encode()).hexdigest(),'crcVerified':True})) -`,zip],{encoding:'utf8',timeout:60000})); - report={recordedAt:new Date().toISOString(),image,url,requestID:response.headers.get('x-request-id'),method:'One public ZIP request against the existing beta repository. Existing warmed server; no restart or cache clearing. RSS includes server and worker descendants, sampled every 20 ms. Cgroup readings separately include filesystem page cache. MongoDB, Redis and client excluded. Validation runs after sampling.',samples,before,peak,after,download:{headersMs,firstBodyMs,totalMs,bytes,...verification}}; - await fsp.writeFile(path.join(__dirname,'../reports/zip-streaming-live-memory.json'),JSON.stringify(report,null,2)+'\n'); - console.log(JSON.stringify(report,null,2)); - }finally{clearInterval(timer);await fsp.rm(directory,{recursive:true,force:true});} -})().catch(e=>{console.error(e.message);process.exitCode=1}); diff --git a/backend/scripts/migrate-bullmq.cjs b/backend/scripts/migrate-bullmq.cjs deleted file mode 100644 index 79d22fd..0000000 --- a/backend/scripts/migrate-bullmq.cjs +++ /dev/null @@ -1,215 +0,0 @@ -#!/usr/bin/env node -'use strict'; -// Offline cutover only. Uses BullMQ's public API; no private Redis key decoding. -const { Queue } = require('bullmq'); -const { mongo: { MongoClient } } = require('mongoose'); -const { createHash, randomUUID } = require('node:crypto'); - -const definitions = [ - {name: 'repository download', key: 'download', action: 'prepare'}, - {name: 'repository removal', key: 'remove', action: 'remove'}, - {name: 'cache removal', key: 'cache', action: 'cache'}, -]; -const states = ['waiting', 'paused', 'delayed', 'prioritized', 'waiting-children', 'active', 'failed', 'completed']; -const live = new Set(['waiting', 'paused', 'delayed', 'prioritized']); -const terminal = new Set(['archived', 'removing', 'removed', 'expiring', 'expired']); -const hash = value => createHash('sha256').update(JSON.stringify(value)).digest('hex'); -const refuse = code => { throw Object.assign(new Error(code), {safeCode: code}); }; -function integer(value, code, min = 0, max = Number.MAX_SAFE_INTEGER) { - if (!Number.isSafeInteger(value) || value < min || value > max) refuse(code); - return value; -} -function date(value, code) { return new Date(integer(value, code, 0, 253402300799000)); } -function normalize(job, state, definition, queueOrder = 0) { - const id = job.data?.repoId; - if (typeof job.id !== 'string' || !job.id || job.id.length > 2048) refuse('invalid_source_job_id'); - if (typeof id !== 'string' || !id || id.length > 512) refuse('invalid_repository_job_payload'); - if (state === 'active' || state === 'waiting-children' || !states.includes(state)) refuse('unsupported_or_active_job_state'); - const opts = job.opts || {}; - if (opts.repeat || job.repeatJobKey || opts.parent || opts.lifo || opts.failParentOnFailure || opts.continueParentOnFailure || opts.removeDependencyOnFailure) refuse('unsupported_job_dependency_or_schedule'); - let backoff = opts.backoff ?? {type: 'fixed', delay: 0}; - if (typeof backoff === 'number') backoff = {type: 'fixed', delay: backoff}; - if (!['fixed', 'exponential'].includes(backoff.type) || (backoff.jitter ?? 0) !== 0) refuse('unsupported_job_backoff'); - const timestamp = integer(job.timestamp, 'invalid_job_timestamp', 0, 253402300799000); - const delay = integer(job.delay ?? 0, 'invalid_job_delay', 0, 253402300799000 - timestamp); - const item = { - sourceQueue: definition.name, sourceId: String(job.id), timestamp, - resourceId: id, action: definition.action, state, queueOrder, - availableAt: state === 'delayed' ? timestamp + delay : 0, - priority: integer(opts.priority ?? 0, 'invalid_job_priority', 0, 2097152), - attempts: integer(job.attemptsMade ?? 0, 'invalid_job_attempts'), - maxAttempts: Math.max(1, integer(opts.attempts ?? 1, 'invalid_job_attempt_limit')), - backoffType: backoff.type, - backoffDelay: integer(backoff.delay ?? 0, 'invalid_job_backoff', 0, 9223372036854), - finishedAt: job.finishedOn == null ? null : integer(job.finishedOn, 'invalid_job_finished_at', 0, 253402300799000), - }; - item.id = 'bull:' + hash([item.sourceQueue, item.sourceId, timestamp]); - item.fingerprint = hash(item); - return item; -} - -async function snapshot(queues, guard = async () => {}) { - const jobs = []; - for (let i = 0; i < queues.length; i++) { - const queue = queues[i]; - await guard(); - if (!(await queue.isPaused())) refuse('bullmq_queue_not_paused'); - if ((await queue.getWorkers()).length) refuse('bullmq_workers_still_connected'); - if ((await queue.getRepeatableJobs(0, 0)).length || (await queue.getJobSchedulers(0, 0)).length) refuse('bullmq_schedules_require_separate_migration'); - const seen = new Set(); - for (const state of states) { - for (let offset = 0; ; offset += 500) { - await guard(); - const page = await queue.getJobs([state], offset, offset + 499, true); - for (const job of page) { - if (!job) refuse('bullmq_snapshot_changed'); - if (seen.has(String(job.id))) continue; - seen.add(String(job.id)); - if (seen.size % 32 === 0) await guard(); - jobs.push(normalize(job, await job.getState(), definitions[i], seen.size - 1)); - } - if (page.length < 500) break; - } - } - } - jobs.sort((a,b) => a.id.localeCompare(b.id)); - return {jobs, digest: hash(jobs)}; -} - -function revision(resource) { - const filter = {_id: resource._id, status: resource.status === undefined ? {$exists:false} : resource.status}; - for (const field of ['statusDate', 'settingsSavedAt', 'treeGeneration']) filter[field] = resource[field] === undefined ? {$exists: false} : resource[field]; - for (const field of ['githubAccess', 'providerAccess']) filter[field + '.revision'] = resource[field]?.revision === undefined ? {$exists: false} : resource[field].revision; - return filter; -} - -async function plan(db, input, guard = async () => {}) { - const resources = new Map(); - const plans = []; - for (const item of input.jobs) { - await guard(); - const imported = await db.collection('gojobimports').findOne({_id: item.id}); - if (imported && imported.fingerprint !== item.fingerprint) refuse('import_checkpoint_conflict'); - const existing = await db.collection('gojobs').findOne({_id: item.id}); - if (existing && existing.migration?.fingerprint !== item.fingerprint) refuse('target_job_conflict'); - let resource = await db.collection('anonymizedrepositories').findOne({repoId: item.resourceId}, {collation: {locale:'en', strength:2}, projection:{_id:1,repoId:1,status:1,statusDate:1,settingsSavedAt:1,treeGeneration:1,'githubAccess.revision':1,'providerAccess.revision':1}}); - if (resource) { - const conflict = await db.collection('gojobs').findOne({kind:'repo',resourceId:resource.repoId,action:item.action,state:{$in:['active','waiting','delayed']},migration:{$exists:false}}); - if (conflict) refuse('existing_go_work_conflicts_with_source'); - const canonical = resource._id.toString(); - if (!resources.has(canonical)) resources.set(canonical, {resource, actions: new Set()}); - if (live.has(item.state)) resources.get(canonical).actions.add(item.action); - } - let state = item.state === 'delayed' ? 'delayed' : live.has(item.state) ? 'waiting' : item.state; - let error; - if (!resource && live.has(item.state)) {state = 'failed'; error = 'repository_not_found';} - if (resource && live.has(item.state) && ((item.action === 'prepare' && terminal.has(resource.status)) || (item.action === 'remove' && resource.status === 'removed'))) state = 'completed'; - plans.push({item, imported:imported?.state === 'complete', job: { - _id:item.id, kind:'repo', resourceId:resource?.repoId || item.resourceId, action:item.action, - state, attempts:item.attempts, maxAttempts:item.maxAttempts, priority:item.priority, queueOrder:item.queueOrder, - backoffType:item.backoffType, backoffDelay:item.backoffDelay, - availableAt:date(item.availableAt,'invalid_job_date'), createdAt:date(item.timestamp,'invalid_job_date'), - ...(state === 'failed' ? {error:error || 'job_failed'} : {}), - ...(['failed','completed'].includes(state) ? {finishedAt:date(item.finishedAt ?? item.timestamp,'invalid_job_date')} : {}), - migration:{version:1, sourceQueue:item.sourceQueue, sourceId:item.sourceId, fingerprint:item.fingerprint}, - }}); - } - const transitions = []; - for (const {resource, actions} of resources.values()) { - let target; - if (actions.has('remove') && resource.status !== 'removed') target = 'removing'; - else if (actions.has('prepare') && !terminal.has(resource.status)) target = 'preparing'; - const id = 'resource:' + resource._id.toString(); - const checkpoint = await db.collection('gojobimports').findOne({_id:id}); - if (checkpoint) {transitions.push(checkpoint); continue;} - if (!target || resource.status === target) continue; - transitions.push({_id:id, resourceId:resource._id, original:revision(resource), target, targetDate:new Date(), state:'pending'}); - } - return {plans, transitions}; -} - -async function quiescent(db, redis) { - for (const definition of definitions) if (!(await redis.exists('go:pause:' + definition.key))) refuse('go_queues_not_paused'); - if (await db.collection('gojobs').countDocuments({state:'active'}, {limit:1})) refuse('go_jobs_still_active'); -} - -async function migrate({db, redis, queues, apply = false, afterWrite}) { - const token = randomUUID(); - const lock = 'go:bullmq-handoff'; - let locked = false; - const guard = async () => { - if (!apply) return; - const held = await redis.eval("if redis.call('GET',KEYS[1])==ARGV[1] then return redis.call('PEXPIRE',KEYS[1],60000) else return 0 end",1,lock,token); - if (held !== 1) refuse('handoff_lock_lost'); - }; - try { - if (apply) { - locked = (await redis.set(lock,token,'PX',60000,'NX')) === 'OK'; - if (!locked) refuse('handoff_already_running'); - } - await quiescent(db,redis); - const input = await snapshot(queues,guard); - const head = await db.collection('gojobimports').findOne({_id:'bullmq-v1'}); - if (head && head.digest !== input.digest) refuse('source_snapshot_changed_since_handoff'); - const prepared = await plan(db,input,guard); - const again = await snapshot(queues,guard); - if (again.digest !== input.digest) refuse('bullmq_snapshot_changed'); - const pending=prepared.plans.filter(entry=>!entry.imported); - const summary = {mode:apply?'apply':'dry-run', jobs:input.jobs.length, alreadyImported:input.jobs.length-pending.length, pendingJobs:pending.length, transitions:prepared.transitions.filter(entry=>entry.state!=='complete').length, counts:{}, sourceDigest:input.digest}; - for (const {job} of pending) summary.counts[job.state] = (summary.counts[job.state] || 0) + 1; - if (!apply) return summary; - await quiescent(db,redis); - await guard(); - await db.collection('gojobimports').updateOne({_id:'bullmq-v1'}, {$setOnInsert:{digest:input.digest,createdAt:new Date(),state:'pending'}}, {upsert:true}); - const writeDone = async () => { if (afterWrite) await afterWrite(); }; - for (const transition of prepared.transitions) { - await guard(); - await db.collection('gojobimports').updateOne({_id:transition._id}, {$setOnInsert:transition}, {upsert:true}); - if (transition.state === 'complete') continue; - const result = await db.collection('anonymizedrepositories').updateOne(transition.original, {$set:{status:transition.target,statusDate:transition.targetDate},$unset:{statusMessage:''}}); - if (!result.matchedCount) { - const already = await db.collection('anonymizedrepositories').findOne({_id:transition.resourceId,status:transition.target,statusDate:transition.targetDate}); - if (!already) refuse('resource_changed_during_handoff'); - } - await writeDone(); - await db.collection('gojobimports').updateOne({_id:transition._id}, {$set:{state:'complete'}}); - } - for (const {item,job} of prepared.plans) { - await guard(); - const checkpoint = await db.collection('gojobimports').findOne({_id:item.id}); - if (checkpoint?.state === 'complete') continue; - await db.collection('gojobimports').updateOne({_id:item.id}, {$setOnInsert:{fingerprint:item.fingerprint,state:'pending'}}, {upsert:true}); - await db.collection('gojobs').updateOne({_id:item.id}, {$setOnInsert:job}, {upsert:true}); - await writeDone(); - await db.collection('gojobimports').updateOne({_id:item.id}, {$set:{state:'complete'}}); - } - if ((await snapshot(queues,guard)).digest !== input.digest) refuse('source_changed_during_handoff'); - await quiescent(db,redis); - await db.collection('gojobimports').updateOne({_id:'bullmq-v1'}, {$set:{state:'complete',finishedAt:new Date()}}); - return {...summary, complete:true}; - } finally { - if (locked) await redis.eval("if redis.call('GET',KEYS[1])==ARGV[1] then return redis.call('DEL',KEYS[1]) else return 0 end",1,lock,token).catch(()=>{}); - } -} - -async function main() { - const command = process.argv[2] || 'dry-run'; - if (!['pause','dry-run','apply'].includes(command) || process.argv.length > 3) refuse('usage: node backend/scripts/migrate-bullmq.cjs [pause|dry-run|apply]'); - if (!process.env.MONGODB_URI || !process.env.MONGODB_DATABASE) refuse('MONGODB_URI_and_MONGODB_DATABASE_required'); - const port = Number(process.env.REDIS_PORT || 6379); - integer(port,'invalid_redis_port',1,65535); - const connection = {host:process.env.REDIS_HOSTNAME || '127.0.0.1',port,maxRetriesPerRequest:1,connectTimeout:5000,commandTimeout:15000}; - const queues = definitions.map(d=>new Queue(d.name,{connection,skipMetasUpdate:true})); - for (const queue of queues) queue.on('error',()=>{}); - const mongo = new MongoClient(process.env.MONGODB_URI,{serverSelectionTimeoutMS:10000,socketTimeoutMS:15000}); - try { - await mongo.connect(); - const redis = await queues[0].client; - if (command === 'pause') { - for (let i=0;iq.close()));await mongo.close();} -} -module.exports = {definitions,normalize,snapshot,migrate}; -if (require.main === module) main().catch(error=>{console.error(error.safeCode || 'queue_handoff_failed');process.exitCode=1;}); diff --git a/backend/scripts/migrate-cache-telemetry.cjs b/backend/scripts/migrate-cache-telemetry.cjs deleted file mode 100644 index 105ae40..0000000 --- a/backend/scripts/migrate-cache-telemetry.cjs +++ /dev/null @@ -1,116 +0,0 @@ -#!/usr/bin/env node -'use strict'; -// Offline import of one deployment's shared TypeScript telemetry database. -const { DatabaseSync } = require('node:sqlite'); -const { createHash } = require('node:crypto'); -const { mongo: { MongoClient } } = require('mongoose'); -const { lstatSync } = require('node:fs'); - -const names = new Set([ - 'decision_hit', 'decision_miss', 'decision_bypass', 'rewrite_changed', 'rewrite_unchanged', - 'rewrite_binary', 'rewrite_changed_cached', 'rewrite_unchanged_cached', 'compress', 'decompress', - 'legacy_source_hit', 'legacy_source_miss', - 'legacy_result_hit', 'legacy_result_miss', 'source_legacy_promotion', - 'inspected_changed', 'inspected_unchanged', 'inspected_passthrough', 'inspected_binary', - ...['source','result'].flatMap(prefix => ['hit','miss','fill','stored','fill_wait','bypass','error', - 'deduplicated','corrupt','refetch','known_miss','first_seen_miss','reuse_1h','reuse_1d','reuse_7d','eviction'].map(event => `${prefix}_${event}`)), -]); -const traffic = new Set(['file','website','zip','monitor','background']); -const fields = ['count','bytes','ms','b0','b1','b2','b3','b4','b5','b6']; -const manifestID = 'node-cache-telemetry-v1'; -const refuse = code => { throw Object.assign(new Error(code), {safeCode:code}); }; -const hash = value => createHash('sha256').update(JSON.stringify(value)).digest('hex'); -function integer(value) { - if (!Number.isSafeInteger(value) || value < 0) refuse('invalid_telemetry_counter'); - return value; -} -function timestamp(value) { - integer(value); - if (value > 253402300799000) refuse('invalid_telemetry_timestamp'); - return value; -} -function metric(row) { - if (![60000,3600000].includes(row.period) || timestamp(row.bucket) % row.period !== 0) refuse('invalid_telemetry_bucket'); - if (!names.has(row.name) || !traffic.has(row.traffic)) refuse('unknown_telemetry_label'); - for (const field of fields) { - if (field === 'ms') { - if (!Number.isFinite(row.ms) || row.ms < 0) refuse('invalid_telemetry_duration'); - } else integer(row[field]); - } - const retention = row.period === 60000 ? 48*3600000 : 30*86400000; - return {_id:'node-cache:'+hash([row.period,row.bucket,row.name,row.traffic]), ...row, expires:new Date(row.bucket+retention)}; -} -function health(row) { - if (typeof row.id !== 'string' || !row.id || row.id.length > 1024) refuse('invalid_telemetry_health'); - timestamp(row.updated); integer(row.dropped); - // Do not copy Node hostnames or PIDs to MongoDB or command output. - return {_id:'node-cache-health:'+hash(row.id), period:0, dropped:row.dropped, expires:new Date(row.updated+30*86400000)}; -} - -async function migrate({db, file, apply=false, writersStopped=false, afterBatch}) { - if (apply && !writersStopped) refuse('stop_node_writers_before_import'); - if (!lstatSync(file).isFile()) refuse('telemetry_source_must_be_regular_file'); - const source = new DatabaseSync(file, {readOnly:true}); - try { - source.exec('PRAGMA busy_timeout=50; BEGIN'); - const metrics = source.prepare('SELECT period,bucket,name,traffic,count,bytes,ms,b0,b1,b2,b3,b4,b5,b6 FROM metrics ORDER BY period,bucket,name,traffic'); - const checks = source.prepare('SELECT id,updated,dropped FROM health ORDER BY id'); - const digest = createHash('sha256'); - let rows = 0, healthRows = 0; - // Validate the entire consistent snapshot before making any destination writes. - // Iterators keep memory bounded even with thirty days of history. - for (const [statement, normalize] of [[metrics,metric],[checks,health]]) { - for (const row of statement.iterate()) { - const document = normalize(row); - if (++rows > 2000000) refuse('telemetry_snapshot_too_large'); - if (document.period === 0) healthRows++; - digest.update(JSON.stringify(document)+'\n'); - } - } - const fingerprint = digest.digest('hex'); - const imports = db.collection('gocacheimports'); - const prior = await imports.findOne({_id:manifestID}); - if (prior && prior.digest !== fingerprint) refuse('telemetry_snapshot_changed_since_import'); - const summary = {mode:apply?'apply':'dry-run', rows:rows-healthRows, healthRows, sourceDigest:fingerprint, alreadyComplete:prior?.state === 'complete'}; - if (!apply || summary.alreadyComplete) return summary; - // Digest in the unique-key claim rejects competing importers with another snapshot. - try { - await imports.updateOne({_id:manifestID,digest:fingerprint}, {$setOnInsert:{state:'pending',createdAt:new Date()}}, {upsert:true}); - } catch (error) { - if (error.code === 11000) refuse('telemetry_snapshot_changed_since_import'); - throw error; - } - const collection = db.collection('gocachemetrics'); - let batch = []; - const flush = async () => { - if (!batch.length) return; - await collection.bulkWrite(batch, {ordered:false}); - batch = []; - if (afterBatch) await afterBatch(); - }; - for (const [statement,normalize] of [[metrics,metric],[checks,health]]) { - for (const row of statement.iterate()) { - const document = normalize(row); - batch.push({updateOne:{filter:{_id:document._id},update:{$setOnInsert:document},upsert:true}}); - if (batch.length === 500) await flush(); - } - } - await flush(); - await imports.updateOne({_id:manifestID,digest:fingerprint}, {$set:{state:'complete',finishedAt:new Date()}}); - return {...summary,complete:true}; - } finally {source.close();} -} - -async function main() { - const command = process.argv[2] || 'dry-run'; - if (!['dry-run','apply'].includes(command) || process.argv.length > 3) refuse('usage: node backend/scripts/migrate-cache-telemetry.cjs [dry-run|apply]'); - const {MONGODB_URI, MONGODB_DATABASE, CACHE_TELEMETRY_FILE} = process.env; - if (!MONGODB_URI || !MONGODB_DATABASE || !CACHE_TELEMETRY_FILE) refuse('MONGODB_URI_MONGODB_DATABASE_CACHE_TELEMETRY_FILE_required'); - const client = new MongoClient(MONGODB_URI,{serverSelectionTimeoutMS:10000,socketTimeoutMS:15000}); - try { - await client.connect(); - console.log(JSON.stringify(await migrate({db:client.db(MONGODB_DATABASE),file:CACHE_TELEMETRY_FILE,apply:command==='apply',writersStopped:process.env.NODE_CACHE_WRITERS_STOPPED === '1'}))); - } finally {await client.close();} -} -module.exports = {migrate,metric,health}; -if (require.main === module) main().catch(error => {console.error(error.safeCode || 'cache_telemetry_import_failed');process.exitCode=1;}); diff --git a/backend/scripts/render-http-benchmark.cjs b/backend/scripts/render-http-benchmark.cjs deleted file mode 100644 index ba42d3a..0000000 --- a/backend/scripts/render-http-benchmark.cjs +++ /dev/null @@ -1,27 +0,0 @@ -'use strict'; -const fs=require('node:fs'),path=require('node:path'),assert=require('node:assert/strict'); -const input=process.argv[2]||'backend/reports/http-archive-benchmark.json'; -const report=JSON.parse(fs.readFileSync(input,'utf8')); -const median=values=>[...values].sort((a,b)=>a-b)[Math.floor(values.length/2)]; -const fixtures=[...new Set(report.results.map(r=>r.fixture))]; -const rows=fixtures.map(fixture=>({fixture,...Object.fromEntries(['node','go'].map(runtime=>{ - const samples=report.results.filter(r=>r.fixture===fixture&&r.runtime===runtime); - assert.ok(samples.length); - if(samples.some(r=>r.status==='failed'))return [runtime,{failure:samples.find(r=>r.status==='failed').failure}]; - return [runtime,Object.fromEntries([1,8].map(concurrency=>{ - const batches=samples.map(r=>r.warm.find(w=>w.concurrency===concurrency));assert.ok(batches.every(Boolean)); - return [concurrency,Object.fromEntries(['p95Ms','requestsPerSecond','peakProcessTreeRssBytes','cpuMsPerRequest'].map(metric=>[metric,median(batches.map(w=>metric==='cpuMsPerRequest'?w.cpuMs/w.requests:w[metric]))]))]; - }))]; -}))})); -const data=JSON.stringify(rows).replaceAll('<','\\u003c'); -const title='Node and Go: archive file requests'; -const html=`${title}

    ${title}

    Real server entrypoints, disposable MongoDB and Redis, synthetic archive originals. Every successful response was checked by SHA-256.

    FixtureNodeGoGo / Node

    Node returned HTTP 500 for the 2 MiB text fixture: its persisted term array could not be cloned into the worker. No speedup is assigned to that failed baseline.

    ${report.method.quick?'Smoke run; 16 warm requests per batch.':'Three alternating-order rounds; 100 warm requests per batch.'} CPU includes worker processes and post-response view writes. RSS is sampled every 10 ms and excludes MongoDB, Redis and the load generator. Shared gzip caching, remote providers, S3 and startup are outside this workload.

    ${report.node} · ${report.go} · ${report.hardware.cpu} · ${report.recordedAt}
    `; -const target=input.replace(/\.json$/,'.html');assert.notEqual(target,input);fs.writeFileSync(target,html); -console.log(target); -for(const row of rows)console.log(JSON.stringify(row)); diff --git a/backend/scripts/render-repository-comparison.cjs b/backend/scripts/render-repository-comparison.cjs deleted file mode 100644 index 05fea35..0000000 --- a/backend/scripts/render-repository-comparison.cjs +++ /dev/null @@ -1,30 +0,0 @@ -const fs=require('fs'),path=require('path'); -const source=path.join(__dirname,'../reports/repository-runtime-comparison.json'); -const r=JSON.parse(fs.readFileSync(source)); -const zipSource=path.join(__dirname,'../reports/repository-zip-node-comparison.json'); -if(fs.existsSync(zipSource)){const zip=JSON.parse(fs.readFileSync(zipSource));for(const run of r.results.filter(x=>x.runtime==='node')){const correction=zip.results.find(x=>x.repeat===run.repeat);if(correction)run.results=run.results.map(x=>x.name==='repository ZIP'?correction.results[0]:x);}} -const median=a=>{a=[...a].sort((a,b)=>a-b);return (a[Math.floor((a.length-1)/2)]+a[Math.floor(a.length/2)])/2}; -const names=r.results[0].results.map(x=>x.name); -const summary=names.map(name=>{ - const out={name}; - for(const runtime of ['node','go']){ - const runs=r.results.filter(x=>x.runtime===runtime).map(x=>x.results.find(y=>y.name===name)); - out[runtime]={status:runs[0].output.status,output:runs[0].output,coldMs:median(runs.map(x=>x.cold.ms)),diagnostic:runs.find(x=>x.diagnostic)?.diagnostic,warm:[1,8].map(c=>{ - const batches=runs.flatMap(x=>x.warm.filter(y=>y.concurrency===c));if(!batches.length)return null; - return {concurrency:c,p50Ms:median(batches.map(x=>x.p50Ms)),p95Ms:median(batches.map(x=>x.p95Ms)),firstBodyMs:median(batches.map(x=>x.p50FirstBodyMs)),requestsPerSecond:median(batches.map(x=>x.requestsPerSecond)),cpuMsPerRequest:median(batches.map(x=>x.cpuMs/x.requests)),peakRSSMiB:Math.max(...batches.map(x=>x.peakProcessTreeRssBytes))/1048576}; - }).filter(Boolean)}; - } - out.outputParity=out.node.status===200&&out.go.status===200&&out.node.output.sha256===out.go.output.sha256; - return out; -}); -fs.writeFileSync(source.replace('.json','-summary.json'),JSON.stringify({fixture:r.fixture,summary},null,2)); -const html=`

    Go vs TypeScript · same repository snapshot

    ${r.fixture.originalFiles.toLocaleString()} repository files plus a synthetic 1,000-file directory. Two rounds with runtime order reversed.

    Use caseTypeScriptGoGo / TS

    Loopback HTTP, identical archive originals, filesystem storage, shared caches enabled, one anonymization worker, identity encoding. No CDN, GitHub round trips or browser rendering. TypeScript ZIP was retested with a temporary admin key and the same source ZIP served over loopback; its worker aborted both attempts. These are backend measurements, not beta page-load times.

    Validation and limits

    Commit ${r.fixture.commit}. Node ${r.node}; ${r.go}. Warm results are medians of each round's p50, not pooled percentiles. Each round uses 32 requests per concurrency for normal endpoints and 3 sequential ZIP downloads. First requests can share dependencies warmed by earlier endpoints. RSS includes application workers but excludes MongoDB, Redis and the client. CPU includes background work. RSS includes caches retained from earlier cases. The OS page cache was not dropped. The selected small files contain no occurrence of the configured anonymization term; these timings do not measure replacement-heavy text.

    `; -fs.writeFileSync(source.replace('.json','.html'),html);console.log(JSON.stringify(summary,null,2)); diff --git a/backend/scripts/render-slower-path-optimization.cjs b/backend/scripts/render-slower-path-optimization.cjs deleted file mode 100644 index d045b9f..0000000 --- a/backend/scripts/render-slower-path-optimization.cjs +++ /dev/null @@ -1,23 +0,0 @@ -const fs=require('fs'),assert=require('assert/strict'); -const before=JSON.parse(fs.readFileSync('backend/reports/repository-runtime-comparison.json')); -const after=JSON.parse(fs.readFileSync('backend/reports/repository-runtime-comparison-after.json')); -const median=a=>{a=[...a].sort((a,b)=>a-b);return (a[Math.floor((a.length-1)/2)]+a[Math.floor(a.length/2)])/2}; -const summary=after.results[0].results.map(x=>{ - const row={name:x.name}; - for(const [label,report,runtime] of [['ts',after,'node'],['goBefore',before,'go'],['goAfter',after,'go']]){ - const runs=report.results.filter(x=>x.runtime===runtime).map(run=>run.results.find(y=>y.name===row.name)); - assert(runs.every(x=>x.output.status===200)); - row[label]={output:runs[0].output,coldMs:median(runs.map(x=>x.cold.ms)),warm:Object.fromEntries([1,8].map(c=>[c,Object.fromEntries(['p50Ms','p95Ms','cpuMs','peakProcessTreeRssBytes','requestsPerSecond'].map(m=>[m,median(runs.map(x=>x.warm.find(w=>w.concurrency===c)[m]))]))]))}; - } - assert.deepEqual(row.ts.output,row.goBefore.output);assert.deepEqual(row.ts.output,row.goAfter.output); - return row; -}); -const report={fixture:after.fixture,method:after.method,validation:{outputs:'All seven response signatures match TypeScript, Go before and Go after in both rounds.',tests:['Targeted race suites passed: large tree scans, index parity/eviction/collisions, website lookup, shared HTTP authorization and representations.','go vet passed.']},summary}; -fs.writeFileSync('backend/reports/slower-path-optimization.json',JSON.stringify(report,null,2)); -const html=`

    Go’s slower paths, corrected

    Same repository snapshot and 1,000-file directory fixture. Both runtimes rerun in alternating order; all seven successful response signatures still match.

    Use caseTypeScriptGo beforeGo after

    Other measured endpoints
    Use caseTypeScriptGo beforeGo after

    Counts now aggregate by directory in MongoDB. Website files use verified direct lookups or a collision-aware path index, with live snapshot and authorization checks.

    Loopback backend timings, identity encoding, shared caches enabled, one worker. Two rounds; medians of per-round medians. Excludes GitHub, CDN and browser rendering. First masked/custom-path requests can still build an index. ZIP was not rerun because these changes do not alter its serving path.

    `; -fs.writeFileSync('backend/reports/slower-path-optimization.html',html); -console.log(JSON.stringify(summary.filter(x=>['file counts','website gulpfile.js'].includes(x.name)),null,2)); diff --git a/backend/scripts/test-blob-index.cjs b/backend/scripts/test-blob-index.cjs deleted file mode 100644 index e649286..0000000 --- a/backend/scripts/test-blob-index.cjs +++ /dev/null @@ -1,115 +0,0 @@ -const {Readable} = require('node:stream'); -const assert = require('node:assert/strict'); -process.env.SESSION_SECRET = 'synthetic-blob-index'; -require('ts-node/register/transpile-only'); -const config = require('../../src/config').default; -config.CACHE_MONITORING_ENABLED = false; -const {BlobCache} = require('../../src/core/blob-cache'); -(async () => { - const [mode, root] = process.argv.slice(2); - assert.ok(['seed', 'seed-legacy', 'seed-readers', 'seed-maintenance', 'maintain', 'crash-publisher', 'refill', 'evict', 'inspect', 'mutate', 'read-go', 'wait-go'].includes(mode)); - const cache = new BlobCache({root, budget: 65536, maxObject: 4096, gzip: true}); - try { - if (mode.startsWith('seed')) { - const stream = await cache.getOrFill('node-alias', async () => Readable.from('shared payload\n'.repeat(150))); - for await (const _chunk of stream) {} - await new Promise(resolve => setImmediate(resolve)); - cache.saveDecision('node-decision', 'source-digest', false); - cache.db.prepare('INSERT INTO fills VALUES(?,?,?,?)').run('pending-key', 'pending-token', Date.now()+3600000, 13312); - cache.db.prepare('INSERT INTO readers VALUES(?,?,?)').run('reader-token', stream.cachedBlob.record.digest, Date.now()+3600000); - cache.db.prepare('INSERT INTO publications VALUES(?,?,?)').run('pending-token', stream.cachedBlob.record.digest, 'pending.raw'); - } - if (mode === 'seed-readers' || mode === 'seed-maintenance') { - cache.db.exec('DELETE FROM readers; DELETE FROM fills; DELETE FROM publications;'); - const identity = await cache.getOrFill('node-identity', async () => Readable.from('identity payload'), async proof => `git-${proof.gitSha}`); - for await (const _chunk of identity) {} - await new Promise(resolve => setImmediate(resolve)); - } - if (mode === 'seed-maintenance') { - const third = await cache.getOrFill('node-third', async () => Readable.from('third payload')); - for await (const _chunk of third) {} - await new Promise(resolve => setImmediate(resolve)); - cache.db.exec(`UPDATE blobs SET accessed=CASE - WHEN digest=(SELECT digest FROM aliases WHERE key='node-alias') THEN 1 - WHEN digest=(SELECT digest FROM aliases WHERE key='node-identity') THEN 2 ELSE 3 END`); - } - if (mode === 'crash-publisher') { - const {fork} = require('node:child_process'); - const path = require('node:path'); - const worker = fork(path.join(__dirname, '../../test/fixtures/shared-cache-worker.js'), [], { - env: {...process.env, NODE_ENV: 'test', BLOB_TEST_OPTIONS: JSON.stringify(cache.options), BLOB_TEST_CRASH_AFTER_RENAME: '1'}, - stdio: ['ignore', 'ignore', 'pipe', 'ipc'] - }); - let timeout; - try { - await new Promise((resolve, reject) => { - let stderr = ''; - timeout = setTimeout(() => reject(Error('publisher timeout')), 15000); - worker.stderr.on('data', chunk => { stderr=(stderr+chunk).slice(-4000); }); - worker.on('error', reject); - worker.on('exit', code => reject(Error('publisher exited '+code+': '+stderr))); - worker.on('message', message => { - if (message === 'ready') worker.send('start'); - if (message.renamed) resolve(); - if (message.error) reject(Error(message.error)); - }); - }); - const exited = new Promise(resolve => worker.once('exit', resolve)); - worker.kill('SIGKILL'); await exited; - assert.ok(cache.stats().reservedBytes > 0); - assert.equal(cache.stats().blobs, 0); - assert.equal(cache.db.prepare('SELECT COUNT(*) n FROM publications').get().n, 1); - cache.db.exec('UPDATE fills SET expires=1'); - } finally { clearTimeout(timeout); worker.kill(); } - } - if (mode === 'refill') { - const stream = await cache.getOrFill('multiprocess', async () => Readable.from('recovered')); - let body = ''; for await (const chunk of stream) body += chunk; - assert.equal(body, 'recovered'); - await new Promise(resolve => setImmediate(resolve)); - } - if (mode === 'wait-go') { - const metric = cache.metric.bind(cache); - let signalled = false; - cache.metric = (event, ...args) => { - metric(event, ...args); - if (event === 'fill_wait' && !signalled) { - signalled = true; process.stdout.write('waiting\n'); - } - }; - const stream = await cache.getOrFill('shared-process-key', async () => { throw Error('duplicate Node producer'); }); - let body = ''; for await (const chunk of stream) body += chunk; - assert.equal(body, 'one cross-process producer'); - assert.ok(signalled, 'Node never waited for the Go fill'); - await new Promise(resolve => setImmediate(resolve)); - } - if (mode === 'read-go') { - for (const [key, expected, encoding] of [ - ['go-identity', 'identity from Go', 'identity'], - ['go-gzip', 'Go gzip payload\n'.repeat(150), 'gzip'] - ]) { - const stream = await cache.getOrFill(key, async () => { throw Error('unexpected Node producer'); }); - assert.equal(stream.cachedBlob.record.encoding, encoding); - let body = ''; for await (const chunk of stream) body += chunk; - assert.equal(body, expected); - await new Promise(resolve => setImmediate(resolve)); - } - assert.equal(cache.stats().activeReaders, 0); - assert.equal(cache.stats().reservedBytes, 0); - } - if (mode === 'maintain') { cache.options.budget=4096; await cache.maintain(); } - if (mode === 'evict') { cache.options.budget = 1; await cache.maintain(); } - if (mode === 'mutate') cache.saveDecision('go-decision', 'node-replaced', false); - const summary = cache.db.prepare('SELECT * FROM summary WHERE id=1').get(); - const expected = cache.db.prepare(`SELECT COUNT(*) blobs,COALESCE(SUM(size),0) originalBytes,COALESCE(SUM(stored),0) storedBytes, - COALESCE(SUM(allocated),0) allocatedBytes,(SELECT COUNT(*) FROM readers) activeReaders,(SELECT COUNT(*) FROM decisions) decisions, - (SELECT COUNT(*) FROM aliases) aliases,(SELECT COUNT(*) FROM history) history,(SELECT COALESCE(SUM(reserved),0) FROM fills) reservedBytes FROM blobs`).get(); - for (const [key, value] of Object.entries(expected)) assert.equal(summary[key], value, key); - const result = {stats: cache.stats(), decision: cache.decision('go-decision') || null}; - if (mode === 'seed-legacy') { - for (const {name} of cache.db.prepare("SELECT name FROM sqlite_master WHERE type='trigger' AND name LIKE 'summary_%'").all()) cache.db.exec(`DROP TRIGGER ${name}`); - cache.db.exec('DROP TABLE summary; DROP TRIGGER blob_added; DROP TRIGGER blob_removed; DROP TABLE totals;'); - } - console.log(JSON.stringify(result)); - } finally { cache.close(); } -})().catch(error => { console.error(error); process.exitCode=1; }); diff --git a/backend/scripts/test-bullmq-handoff.cjs b/backend/scripts/test-bullmq-handoff.cjs deleted file mode 100644 index d1e6872..0000000 --- a/backend/scripts/test-bullmq-handoff.cjs +++ /dev/null @@ -1,113 +0,0 @@ -'use strict'; -const assert = require('node:assert/strict'); -const {Queue, Worker, QueueEvents} = require('bullmq'); -const {mongo:{MongoClient}} = require('mongoose'); -const {randomUUID} = require('node:crypto'); -const fs = require('node:fs'); -const path = require('node:path'); -const ts = require('typescript'); -const {definitions,migrate} = require('./migrate-bullmq.cjs'); - -(async()=>{ - // Read the real queue declarations so a renamed/added TypeScript queue - // cannot silently disappear from the handoff. - const sourcePath=path.resolve(__dirname,'../../src/queue/index.ts'); - const source=ts.createSourceFile(sourcePath,fs.readFileSync(sourcePath,'utf8'),ts.ScriptTarget.Latest,true); - const declared=[]; - function visit(node){if(ts.isNewExpression(node)&&node.expression.getText(source)==='Queue'){ - assert.ok(ts.isStringLiteral(node.arguments[0]));declared.push(node.arguments[0].text); - }ts.forEachChild(node,visit);} - visit(source);assert.deepEqual(declared.sort(),definitions.map(d=>d.name).sort()); - const uri=process.env.GO_TEST_MONGODB_URI, address=process.env.GO_TEST_REDIS_ADDR, database=process.env.GO_TEST_MONGODB_DATABASE; - assert.ok(uri?.startsWith('mongodb://127.0.0.1:')&&address?.startsWith('127.0.0.1:')&&database?.startsWith('bull_handoff_'),'disposable services required'); - const connection={host:'127.0.0.1',port:Number(address.split(':')[1]),maxRetriesPerRequest:null}; - const prefix='handoff-test-'+randomUUID(); - const queues=definitions.map(d=>new Queue(d.name,{connection,prefix})); - const client=new MongoClient(uri);await client.connect();const db=client.db(database); - const redis=await queues[0].client; - const events=new QueueEvents(queues[0].name,{connection,prefix});await events.waitUntilReady(); - let worker; - try { - worker=new Worker(queues[0].name,async job=>{if(job.name==='failed-history')throw new Error('synthetic private failure');return 'done';},{connection,prefix}); - const failed=await queues[0].add('failed-history',{repoId:'history'},{attempts:1,removeOnFail:false}); - const completed=await queues[0].add('completed-history',{repoId:'history'},{removeOnComplete:false}); - await failed.waitUntilFinished(events,10000).catch(error=>assert.match(error.message,/synthetic private failure/)); - await completed.waitUntilFinished(events,10000); - await worker.close();worker=null; - const removalEvents=new QueueEvents(queues[1].name,{connection,prefix});await removalEvents.waitUntilReady(); - try { - worker=new Worker(queues[1].name,async()=>{throw new Error('synthetic removal failure');},{connection,prefix}); - const failedRemoval=await queues[1].add('failed-removal',{repoId:'handoff-failed-remove'},{attempts:1,removeOnFail:false}); - await failedRemoval.waitUntilFinished(removalEvents,10000).catch(error=>assert.match(error.message,/synthetic removal failure/)); - await worker.close();worker=null; - } finally {await removalEvents.close();} - for(const queue of queues)await queue.pause(); - await assert.rejects(migrate({db,redis,queues}),/go_queues_not_paused/); - for(const d of definitions)await redis.set('go:pause:'+d.key,'1'); - // A connected paused worker still prevents a handoff. - worker=new Worker(queues[0].name,async()=>{}, {connection,prefix});await worker.waitUntilReady(); - await assert.rejects(migrate({db,redis,queues}),/bullmq_workers_still_connected/); - await worker.close();worker=null; - const resources=['handoff-ready','handoff-duplicate','handoff-delayed','handoff-remove','handoff-cache','handoff-high','handoff-low','handoff-terminal','handoff-failed-remove','handoff-retry','handoff-exhausted','history']; - for(const repoId of resources)await db.collection('anonymizedrepositories').insertOne({repoId,status:repoId==='handoff-terminal'?'removed':repoId==='handoff-failed-remove'?'error':'ready',statusDate:new Date(1700000000000),source:{provider:'fixture',repositoryName:'team/subgroup/project',providerRepositoryId:'project:123',commit:'opaque:1'},providerAccess:{provider:'fixture',kind:'fixture-grant',revision:'grant:1'}}); - await queues[0].add('ready',{repoId:'handoff-ready',credential:'synthetic-never-copy'},{attempts:4,backoff:{type:'exponential',delay:250}}); - await queues[0].add('retry',{repoId:'handoff-retry'},{attempts:2,backoff:{type:'fixed',delay:25}}); - await queues[0].add('exhausted',{repoId:'handoff-exhausted'},{attempts:1}); - for(let i=0;i<2;i++)await queues[0].add('duplicate',{repoId:'handoff-duplicate'}); - const delayed=await queues[0].add('delayed',{repoId:'handoff-delayed'},{delay:3600000,attempts:2}); - await queues[0].add('low',{repoId:'handoff-low'},{priority:5}); - await queues[0].add('high',{repoId:'handoff-high'},{priority:1}); - await queues[0].add('terminal',{repoId:'handoff-terminal'}); - await queues[1].add('remove',{repoId:'handoff-remove'},{attempts:3,backoff:{type:'exponential',delay:1000}}); - await queues[2].add('cache',{repoId:'handoff-cache'}); - const unsupported=await queues[0].add('custom',{repoId:'handoff-ready'},{backoff:{type:'custom',delay:5}}); - await assert.rejects(migrate({db,redis,queues}),/unsupported_job_backoff/);await unsupported.remove(); - const scheduled=await queues[0].upsertJobScheduler('recurring',{every:60000},{name:'scheduled',data:{repoId:'handoff-ready'}}); - await assert.rejects(migrate({db,redis,queues}),/schedules_require_separate_migration/);await queues[0].removeJobScheduler('recurring');const remaining=await queues[0].getJob(scheduled.id);if(remaining)await remaining.remove(); - await db.collection('gojobs').insertOne({_id:'active-fixture',state:'active'}); - await assert.rejects(migrate({db,redis,queues}),/go_jobs_still_active/);await db.collection('gojobs').deleteOne({_id:'active-fixture'}); - await db.collection('gojobs').insertOne({_id:'conflict',kind:'repo',resourceId:'handoff-ready',action:'prepare',state:'waiting'}); - await assert.rejects(migrate({db,redis,queues}),/existing_go_work_conflicts_with_source/);await db.collection('gojobs').deleteOne({_id:'conflict'}); - await queues[0].resume();await assert.rejects(migrate({db,redis,queues}),/bullmq_queue_not_paused/);await queues[0].pause(); - await redis.set('go:bullmq-handoff','other-process','PX',60000);await assert.rejects(migrate({db,redis,queues,apply:true}),/handoff_already_running/);await redis.del('go:bullmq-handoff'); - const summary=await migrate({db,redis,queues}); - assert.equal(summary.jobs,14);assert.equal(summary.counts.delayed,1);assert.equal(summary.counts.failed,2); - assert.equal(await db.collection('gojobs').countDocuments(),0);assert.equal(await db.collection('gojobimports').countDocuments(),0); - assert.equal((await db.collection('anonymizedrepositories').findOne({repoId:'handoff-ready'})).status,'ready'); - // Crash after the resource CAS, then after the first job insert. - await assert.rejects(migrate({db,redis,queues,apply:true,afterWrite:async()=>{throw new Error('injected resource crash');}}),/injected resource crash/); - await assert.rejects(migrate({db,redis,queues,apply:true,afterWrite:async()=>{if(await db.collection('gojobs').countDocuments())throw new Error('injected job crash');}}),/injected job crash/); - const applied=await migrate({db,redis,queues,apply:true});assert.equal(applied.complete,true); - assert.equal(await db.collection('gojobs').countDocuments(),14); - const importedDelay=await db.collection('gojobs').findOne({resourceId:'handoff-delayed'}); - assert.equal(importedDelay.state,'delayed');assert.equal(+importedDelay.availableAt,delayed.timestamp+delayed.delay); - const prepare=await db.collection('gojobs').findOne({resourceId:'handoff-ready'}); - assert.equal(prepare.maxAttempts,4);assert.equal(prepare.backoffType,'exponential');assert.equal(prepare.backoffDelay,250); - assert.equal(await db.collection('gojobs').countDocuments({resourceId:'handoff-duplicate'}),2); - assert.equal((await db.collection('anonymizedrepositories').findOne({repoId:'handoff-remove'})).status,'removing'); - assert.equal((await db.collection('anonymizedrepositories').findOne({repoId:'handoff-terminal'})).status,'removed'); - const failedJob=await db.collection('gojobs').findOne({resourceId:'history',state:'failed'}); - assert.equal(failedJob.error,'job_failed');assert.equal(failedJob.attempts,1); - const storedJobs=JSON.stringify(await db.collection('gojobs').find().toArray()); - assert.ok(!storedJobs.includes('synthetic private failure'));assert.ok(!storedJobs.includes('synthetic removal failure'));assert.ok(!storedJobs.includes('synthetic-never-copy')); - const history=await db.collection('gojobs').findOne({resourceId:'history',state:'completed'}); - await db.collection('gojobs').deleteOne({_id:history._id}); - // Simulate a resource/job being changed after its checkpoint completed. - await db.collection('gojobs').updateOne({_id:failedJob._id},{$set:{attempts:9}}); - const repeated=await migrate({db,redis,queues,apply:true});assert.equal(repeated.pendingJobs,0);assert.equal(repeated.alreadyImported,14);assert.equal(repeated.transitions,0); - assert.equal(await db.collection('gojobs').countDocuments({_id:history._id}),0); - assert.equal((await db.collection('gojobs').findOne({_id:failedJob._id})).attempts,9); - assert.equal((await queues[0].getJob(delayed.id)).delay,3600000); - for(const queue of queues)assert.equal(await queue.isPaused(),true); - for(const d of definitions)assert.equal(await redis.get('go:pause:'+d.key),'1'); - const added=await queues[0].add('after-snapshot',{repoId:'handoff-ready'}); - await assert.rejects(migrate({db,redis,queues,apply:true}),/source_snapshot_changed_since_handoff/);await added.remove(); - console.log(JSON.stringify({jobs:14,complete:true})); - }finally{ - if(worker)await worker.close(true); - await events.close(); - for(const queue of queues)await queue.obliterate({force:true}); - for(const d of definitions)await redis.del('go:pause:'+d.key); - await Promise.all(queues.map(q=>q.close()));await client.close(); - } -})().catch(error=>{console.error(error);process.exitCode=1;}); diff --git a/backend/scripts/test-cache-telemetry-import.cjs b/backend/scripts/test-cache-telemetry-import.cjs deleted file mode 100644 index 2c10121..0000000 --- a/backend/scripts/test-cache-telemetry-import.cjs +++ /dev/null @@ -1,79 +0,0 @@ -'use strict'; -const assert = require('node:assert/strict'); -const fs = require('node:fs'); -const os = require('node:os'); -const path = require('node:path'); -const vm = require('node:vm'); -const ts = require('typescript'); -const {DatabaseSync} = require('node:sqlite'); -const {mongo:{MongoClient}} = require('mongoose'); -const {migrate} = require('./migrate-cache-telemetry.cjs'); - -(async () => { - const uri=process.env.GO_TEST_MONGODB_URI, database=process.env.GO_TEST_MONGODB_DATABASE; - assert.ok(uri?.startsWith('mongodb://127.0.0.1:') && database?.startsWith('cache_import_')); - const root=fs.mkdtempSync(path.join(os.tmpdir(),'cache-telemetry-')); - const client=new MongoClient(uri); - try { - await client.connect(); const db=client.db(database); - const source=fs.readFileSync(path.resolve(__dirname,'../../src/core/cache-observability.ts'),'utf8'); - const code=ts.transpileModule(source,{compilerOptions:{module:ts.ModuleKind.CommonJS,target:ts.ScriptTarget.ES2022}}).outputText; - const fixture={exports:{}}; const now=Date.now(); let clock=now; - class Clock extends Date {static now(){return clock;}} - const dependencies={os:{hostname:()=> 'private-host'},'node:sqlite':{DatabaseSync},fs,path,'../config':{default:{CACHE_MONITORING_ENABLED:true,SHARED_CACHE_PATH:root}},'./request-monitoring':{cacheTraffic:()=> 'background'}}; - vm.runInNewContext(code,{exports:fixture.exports,module:fixture,require:name=>{assert.ok(dependencies[name],name);return dependencies[name]},Date:Clock,process:{pid:123},setInterval(){return {unref(){}}},clearInterval(){}}); - const api=fixture.exports; - // Actual TS flushes create both minute and hour aggregates. Keep samples away - // from report cutoffs so wall-clock time during the Go handoff cannot move them. - for(let i=0;i<620;i++){ - clock=now-(i*3+3)*60000; - if([15,60,1440].some(minutes=>Math.abs(now-clock-minutes*60000)<3*60000))continue; - api.observeCache(['source_hit','rewrite_changed','inspected_changed','inspected_unchanged','inspected_passthrough','inspected_binary','legacy_source_hit','legacy_source_miss'][i%8],i+1,[0,0.5,5,50,500,5000,50000][i%7],['file','website','zip','monitor','background'][i%5]); - api.flushCacheMetrics(); - } - // Overflow pending capacity to exercise persisted dropped counters as well. - for(let i=0;i<514;i++){ - clock=now-(i*3+3)*60000; - if([15,60,1440].some(minutes=>Math.abs(now-clock-minutes*60000)<3*60000)) clock-=10000*60000; - api.observeCache('source_miss',1,1,'background'); - } - clock=now; - const expected={}; - for(const minutes of [15,60,1440,10080]){ - const report=api.cacheMetricsReport(minutes); - expected[minutes]={rows:report.rows,dropped:report.dropped}; - } - api.closeCacheMetrics(); - const file=path.join(root,'telemetry.sqlite'); - const options={db,file,apply:true,writersStopped:true}; - const before=fs.readFileSync(file); - const dry=await migrate({...options,apply:false}); - assert.ok(dry.rows>500); - assert.equal(await db.collection('gocachemetrics').countDocuments(),0); - assert.equal(await db.collection('gocacheimports').countDocuments(),0); - await assert.rejects(migrate({...options,writersStopped:false}),/stop_node_writers/); - let calls=0; - await assert.rejects(migrate({...options,afterBatch:()=>{if(++calls===1)throw Error('interrupted');}}),/interrupted/); - assert.equal(await db.collection('gocachemetrics').countDocuments(),500); - assert.equal((await db.collection('gocacheimports').findOne({})).state,'pending'); - await Promise.all([migrate(options),migrate(options)]); - assert.equal(await db.collection('gocachemetrics').countDocuments(),dry.rows+dry.healthRows); - const applied=await migrate(options); assert.equal(applied.alreadyComplete,true); - assert.deepEqual(fs.readFileSync(file),before); - assert.ok(!JSON.stringify(await db.collection('gocachemetrics').find().toArray()).includes('private-host')); - // A completed replay does not resurrect a row removed by retention. - const retired=await db.collection('gocachemetrics').findOne({period:60000,bucket:{$lt:now-1440*60000}}); - assert.ok(retired); - await db.collection('gocachemetrics').deleteOne({_id:retired._id}); - await migrate(options); - assert.equal(await db.collection('gocachemetrics').findOne({_id:retired._id}),null); - // A new or malformed snapshot cannot mutate the destination, even in dry-run. - const sql=new DatabaseSync(file); - sql.exec('UPDATE health SET dropped=dropped+1'); - await assert.rejects(migrate(options),/snapshot_changed/); - sql.exec("UPDATE metrics SET name='private/path' WHERE rowid=(SELECT MIN(rowid) FROM metrics)"); - await assert.rejects(migrate({...options,apply:false}),/unknown_telemetry_label/); - sql.close(); - console.log(JSON.stringify(expected)); - } finally {await client.close();fs.rmSync(root,{recursive:true,force:true});} -})().catch(error=>{console.error(error);process.exitCode=1;}); diff --git a/backend/scripts/test-deployment.py b/backend/scripts/test-deployment.py deleted file mode 100644 index fb46807..0000000 --- a/backend/scripts/test-deployment.py +++ /dev/null @@ -1,96 +0,0 @@ -#!/usr/bin/env python3 -"""Smoke-test the root Go Compose model with disposable data and random ports. - -Build first: docker build -t anonymous-github-go:deployment-test . -Run: python3 backend/scripts/test-deployment.py [image] -""" -import base64 -import json -import os -from pathlib import Path -import secrets -import subprocess -import sys -import tempfile -import urllib.request - -ROOT = Path(__file__).resolve().parents[2] -IMAGE = sys.argv[1] if len(sys.argv) > 1 else 'anonymous-github-go:deployment-test' -PROJECT = 'go-deployment-test-' + secrets.token_hex(6) -ENV = {key: os.environ[key] for key in ('PATH', 'HOME', 'DOCKER_HOST', 'DOCKER_CONTEXT', 'DOCKER_CONFIG') if key in os.environ} -ENV.update(DB_USERNAME='smoke', DB_PASSWORD=secrets.token_hex(20), EXPOSED_PORT='5000') - - -def run(*args, capture=True): - return subprocess.run(args, cwd=ROOT, env=ENV, check=True, text=True, - stdout=subprocess.PIPE if capture else None).stdout - - -with tempfile.TemporaryDirectory(prefix=PROJECT) as directory: - envfile = Path(directory) / 'app.env' - envfile.write_text('\n'.join([ - 'SESSION_SECRET=' + secrets.token_hex(32), - 'CREDENTIAL_KEYS=' + json.dumps({'smoke': base64.b64encode(secrets.token_bytes(32)).decode()}), - 'CREDENTIAL_ACTIVE_KEY_ID=smoke', 'GITHUB_OAUTH_ENABLED=false', - 'GITHUB_APP_ENABLED=false', 'COOKIE_SECURE=false', - 'SHARED_CACHE_ENABLED=true', 'SHARED_CACHE_FREE_BYTES=0', - 'DB_USERNAME=' + ENV['DB_USERNAME'], 'DB_PASSWORD=' + ENV['DB_PASSWORD'], - ]) + '\n') - envfile.chmod(0o600) - ENV['APP_ENV_FILE'] = str(envfile) - base = ['docker', 'compose', '--env-file', '/dev/null'] - model = json.loads(run(*base, '-f', 'docker-compose.yml', 'config', '--format', 'json')) - assert set(model['services']) == {'anonymous_github', 'mongodb', 'redis', 'mongodb-backup'} - for files, expected in [(['docker-compose.yml', 'docker-compose.github-app.yml'], 4), - (['docker-compose.node.yml', 'docker-compose.node.github-app.yml'], 5)]: - flags = [arg for file in files for arg in ('-f', file)] - other = json.loads(run(*base, *flags, 'config', '--no-env-resolution', '--format', 'json')) - assert len(other['services']) == expected - app = model['services']['anonymous_github'] - assert app['read_only'] and app['init'] - assert app['healthcheck']['test'] == ['CMD', '/usr/local/bin/anonymous-server', 'healthcheck'] - assert app['pids_limit'] == 128 and app['cap_drop'] == ['ALL'] - assert 'streamer' not in app['depends_on'] - # Replace all persisted data and host bindings before starting any container. - del model['services']['mongodb-backup'] - app.pop('build', None) - app['image'] = IMAGE - app['ports'] = [{'target': 5000, 'published': '0', 'host_ip': '127.0.0.1', 'protocol': 'tcp'}] - app['volumes'] = [{'type': 'volume', 'source': 'test_repositories', 'target': '/app/repositories'}] - mongo = model['services']['mongodb'] - mongo['image'] = 'mongo:7' - mongo.pop('ports', None) - mongo['volumes'] = [{'type': 'volume', 'source': 'test_mongo', 'target': '/data/db'}] - model['services']['redis'].pop('ports', None) - model['volumes'] = {'test_repositories': {}, 'test_mongo': {}} - model['networks'] = {'default': {}} - model['name'] = PROJECT - for service in model['services'].values(): - service['restart'] = 'no' - assert all(v['type'] == 'volume' for v in service.get('volumes', [])) - config = Path(directory) / 'compose.json' - config.write_text(json.dumps(model)) - config.chmod(0o600) - compose = base + ['-p', PROJECT, '-f', str(config)] - try: - run(*compose, 'up', '-d', '--no-build', '--wait', '--wait-timeout', '120', capture=False) - cid = run(*compose, 'ps', '-q', 'anonymous_github').strip() - info = json.loads(run('docker', 'inspect', cid))[0] - assert info['Config']['User'] == '10001:10001' - assert info['HostConfig']['ReadonlyRootfs'] - run(*compose, 'exec', '-T', 'anonymous_github', 'sh', '-ec', - 'test "$(id -u)" = 10001; touch /tmp/smoke /app/repositories/smoke; ' - 'test ! -w /app/public; test ! -e /usr/local/bin/node; ' - 'rm /tmp/smoke /app/repositories/smoke') - address = run(*compose, 'port', 'anonymous_github', '5000').strip() - for path in ('/healthcheck', '/', '/llms.txt', '/maintenance-openapi.json'): - with urllib.request.urlopen('http://' + address + path, timeout=10) as response: - assert response.status == 200 - assert response.read(), path - run(*compose, 'stop', 'anonymous_github', capture=False) - state = json.loads(run('docker', 'inspect', cid))[0]['State'] - assert state['ExitCode'] == 0 and not state['OOMKilled'], state - print('PASS: Go default, Node rollback models, isolated startup, non-root writes, static routes, graceful shutdown') - finally: - # Only this randomly named test project owns these disposable volumes. - run(*compose, 'down', '--volumes', '--timeout', '45', capture=False) diff --git a/backend/scripts/test-integration.sh b/backend/scripts/test-integration.sh deleted file mode 100755 index 3c6cb4a..0000000 --- a/backend/scripts/test-integration.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail -cd "$(dirname "$0")/.." -go_binary=${GO_BINARY:-go} -project="anonymous-go-test-$$" -artifacts=$(mktemp -d) -cleanup() { - docker compose -p "$project" -f compose.test.yml down --volumes >/dev/null 2>&1 || true - rm -rf "$artifacts" -} -trap cleanup EXIT -"$go_binary" build -o "$artifacts/server" ./cmd/server -docker compose -p "$project" -f compose.test.yml up -d -mongo_address=$(docker compose -p "$project" -f compose.test.yml port mongo 27017) -redis_address=$(docker compose -p "$project" -f compose.test.yml port redis 6379) -for attempt in {1..30}; do - if docker compose -p "$project" -f compose.test.yml exec -T mongo mongosh --quiet --eval 'db.adminCommand({ping:1}).ok' >/dev/null 2>&1; then break; fi - sleep 1 -done -GO_TEST_MONGODB_URI="mongodb://$mongo_address" GO_TEST_REDIS_ADDR="$redis_address" GO_TEST_SERVER_BINARY="$artifacts/server" "$go_binary" test -race -count=1 ./... "$@" diff --git a/backend/scripts/test-node-rollback.cjs b/backend/scripts/test-node-rollback.cjs deleted file mode 100644 index dac934e..0000000 --- a/backend/scripts/test-node-rollback.cjs +++ /dev/null @@ -1,16 +0,0 @@ -'use strict'; -// Run on stdin inside the rollback image, with no network or application secrets. -const assert = require('node:assert/strict'); -const { DatabaseSync } = require('node:sqlite'); -const zstd = require('@mongodb-js/zstd'); -(async () => { - const original = Buffer.from('rollback native dependency check'); - assert.deepEqual(await zstd.decompress(await zstd.compress(original, 3)), original); - const db = new DatabaseSync(':memory:'); - try { - db.exec('CREATE TABLE smoke(value TEXT)'); - db.prepare('INSERT INTO smoke(value) VALUES (?)').run('round trip'); - assert.equal(db.prepare('SELECT value FROM smoke').get().value, 'round trip'); - } finally { db.close(); } - console.log('PASS: rollback native Zstandard and SQLite round trips'); -})().catch(error => { console.error(error); process.exitCode = 1; }); diff --git a/backend/scripts/test-shared-http-cache.cjs b/backend/scripts/test-shared-http-cache.cjs deleted file mode 100644 index 0ac6917..0000000 --- a/backend/scripts/test-shared-http-cache.cjs +++ /dev/null @@ -1,15 +0,0 @@ -const {Readable}=require('node:stream'); -const path=require('node:path'); -process.env.SESSION_SECRET='synthetic-shared-http'; -require('ts-node/register/transpile-only'); -const config=require('../../src/config').default;config.CACHE_MONITORING_ENABLED=false; -const {BlobCache}=require('../../src/core/blob-cache'); -(async()=>{ - for(const mode of ['identity','gzip']){ - const cache=new BlobCache({root:path.join(process.argv[2],mode),budget:65536,maxObject:4096,gzip:mode==='gzip'}); - try{for(const size of mode==='gzip'?[2250]:[0,17,2250]){ - const result=await cache.getOrFill(`payload-${size}`,async()=>Readable.from([Buffer.alloc(size,120)])); - for await(const chunk of result){};await new Promise(r=>setImmediate(r)); - }}finally{cache.close()} - } -})().catch(e=>{console.error(e);process.exitCode=1}); diff --git a/backend/shadow-beta-nginx.conf b/backend/shadow-beta-nginx.conf deleted file mode 100644 index b133fe9..0000000 --- a/backend/shadow-beta-nginx.conf +++ /dev/null @@ -1,30 +0,0 @@ -worker_processes 1; -pid /tmp/nginx.pid; -error_log /dev/stderr warn; -events { worker_connections 256; } -http { - map $http_x_forwarded_proto $forwarded_scheme { - default $scheme; - https https; - } - log_format shadow '$remote_addr "$request_method $uri" $status $body_bytes_sent'; - access_log /dev/stdout shadow; - client_body_temp_path /tmp/client_body; - proxy_temp_path /tmp/proxy; - fastcgi_temp_path /tmp/fastcgi; - uwsgi_temp_path /tmp/uwsgi; - scgi_temp_path /tmp/scgi; - server { - listen 8080; - server_name _; - client_max_body_size 100m; - location / { - proxy_pass http://app:5000; - proxy_http_version 1.1; - proxy_set_header Host $http_host; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $forwarded_scheme; - proxy_read_timeout 60s; - } - } -} diff --git a/backend/shadow-beta.caddy b/backend/shadow-beta.caddy deleted file mode 100644 index 191b75e..0000000 --- a/backend/shadow-beta.caddy +++ /dev/null @@ -1,5 +0,0 @@ -# Isolated Go rehearsal; production runs on a different origin. -beta.durieux.me { - header X-Anonymous-Deployment go-shadow-beta - reverse_proxy 127.0.0.1:5001 -} diff --git a/backend/shadow-nginx.conf b/backend/shadow-nginx.conf deleted file mode 100644 index e2f87d9..0000000 --- a/backend/shadow-nginx.conf +++ /dev/null @@ -1,26 +0,0 @@ -worker_processes 1; -pid /tmp/nginx.pid; -error_log /dev/stderr warn; -events { worker_connections 256; } -http { - log_format shadow '$remote_addr "$request_method $uri" $status $body_bytes_sent'; - access_log /dev/stdout shadow; - client_body_temp_path /tmp/client_body; - proxy_temp_path /tmp/proxy; - fastcgi_temp_path /tmp/fastcgi; - uwsgi_temp_path /tmp/uwsgi; - scgi_temp_path /tmp/scgi; - server { - listen 8080; - server_name _; - client_max_body_size 100m; - location / { - proxy_pass http://app:5000; - proxy_http_version 1.1; - proxy_set_header Host $http_host; - proxy_set_header X-Forwarded-For $remote_addr; - proxy_set_header X-Forwarded-Proto $scheme; - proxy_read_timeout 60s; - } - } -} diff --git a/docker-compose.github-app.yml b/docker-compose.github-app.yml index d24adbc..753d66e 100644 --- a/docker-compose.github-app.yml +++ b/docker-compose.github-app.yml @@ -1,6 +1,9 @@ # Enable with: docker compose -f docker-compose.yml -f docker-compose.github-app.yml up -d -# App settings are supplied through the existing .env file for the Go service. +# App settings are supplied through the existing .env file for both services. services: anonymous_github: volumes: - ./secrets/github-app.pem:/run/secrets/github-app.pem:ro + streamer: + volumes: + - ./secrets/github-app.pem:/run/secrets/github-app.pem:ro diff --git a/docker-compose.node.github-app.yml b/docker-compose.node.github-app.yml deleted file mode 100644 index 533bba3..0000000 --- a/docker-compose.node.github-app.yml +++ /dev/null @@ -1,9 +0,0 @@ -# Enable with: docker compose -f docker-compose.node.yml -f docker-compose.node.github-app.yml up -d -# App settings are supplied through the existing .env file for both services. -services: - anonymous_github: - volumes: - - ./secrets/github-app.pem:/run/secrets/github-app.pem:ro - streamer: - volumes: - - ./secrets/github-app.pem:/run/secrets/github-app.pem:ro diff --git a/docker-compose.node.yml b/docker-compose.node.yml deleted file mode 100644 index 56057d1..0000000 --- a/docker-compose.node.yml +++ /dev/null @@ -1,143 +0,0 @@ -# Explicit Node rollback stack. Read backend/README.md before switching runtimes. -services: - anonymous_github: - logging: - driver: json-file - options: - max-size: "25m" - max-file: "4" - build: - context: . - dockerfile: Dockerfile.node - restart: always - image: anonymous-github-node:${NODE_IMAGE_TAG:-rollback} - ports: - - $EXPOSED_PORT:5000 - deploy: - resources: - limits: - memory: 3G - env_file: - - ./.env - volumes: - - ./repositories:/app/repositories/ - environment: - - PORT=5000 - - REDIS_HOSTNAME=redis - - DB_HOSTNAME=mongodb - - STREAMER_ENTRYPOINT=http://streamer:5000/ - healthcheck: - test: - - CMD - - node - - healthcheck.js - interval: 5s - timeout: 5s - retries: 3 - start_period: 2s - depends_on: - mongodb: - condition: service_healthy - redis: - condition: service_healthy - streamer: - condition: service_healthy - - streamer: - logging: - driver: json-file - options: - max-size: "25m" - max-file: "4" - build: - context: . - dockerfile: Dockerfile.node - restart: always - image: anonymous-github-node:${NODE_IMAGE_TAG:-rollback} - deploy: - mode: replicated - replicas: 4 - endpoint_mode: dnsrr - resources: - limits: - memory: 768M - entrypoint: ["node", "--max-old-space-size=512", "./build/streamer/index.js"] - env_file: - - ./.env - volumes: - - ./repositories:/app/repositories/ - environment: - - PORT=5000 - - SERVICE_NAME=Streamer - - DB_HOSTNAME=mongodb - - REDIS_HOSTNAME=redis - depends_on: - mongodb: - condition: service_healthy - redis: - condition: service_healthy - healthcheck: - test: - - CMD - - node - - healthcheck.js - interval: 5s - timeout: 5s - retries: 3 - start_period: 2s - - redis: - image: "redis:alpine" - restart: always - ports: - - 127.0.0.1:6379:6379 - healthcheck: - test: - - CMD - - redis-cli - - ping - interval: 10s - timeout: 10s - retries: 5 - - mongodb: - image: ${MONGO_IMAGE:-mongo:latest} - restart: on-failure - environment: - MONGO_INITDB_ROOT_USERNAME: $DB_USERNAME - MONGO_INITDB_ROOT_PASSWORD: $DB_PASSWORD - volumes: - - mongodb_data_container:/data/db - ports: - - ${MONGO_BIND_ADDRESS:-127.0.0.1}:27017:27017 - command: --quiet - healthcheck: - test: - - CMD - - mongosh - - --eval - - "db.adminCommand('ping')" - interval: 10s - timeout: 10s - retries: 5 - - mongodb-backup: - image: tiredofit/db-backup - links: - - mongodb - env_file: - - ./.env - volumes: - - ./db_backups:/backup - environment: - - DB_TYPE=mongo - - DB_HOST=mongodb - - DB_DUMP_FREQ=120 - - DB_CLEANUP_TIME=500 - - COMPRESSION=XZ - - DB_USER=$DB_USERNAME - - DB_PASS=$DB_PASSWORD - - restart: always -volumes: - mongodb_data_container: diff --git a/docker-compose.yml b/docker-compose.yml index 753b1ec..98054ca 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,47 +6,80 @@ services: max-size: "25m" max-file: "4" build: . - init: true - stop_grace_period: 45s - read_only: true - tmpfs: - - /tmp:size=2147483648,mode=1777 - pids_limit: 128 - cap_drop: [ALL] - security_opt: [no-new-privileges:true] restart: always - image: anonymous-github-go:${GO_IMAGE_TAG:-local} + image: tdurieux/anonymous_github:v2 ports: - - ${EXPOSED_PORT:-5000}:5000 + - $EXPOSED_PORT:5000 deploy: resources: limits: memory: 3G - pids: 128 env_file: - - ${APP_ENV_FILE:-./.env} + - ./.env volumes: - - ${REPOSITORIES_DIR:-./repositories}:/app/repositories/ + - ./repositories:/app/repositories/ environment: - PORT=5000 - REDIS_HOSTNAME=redis - DB_HOSTNAME=mongodb - - GOMEMLIMIT=768MiB - - ANONYMIZATION_MEMORY_MB=512 + - STREAMER_ENTRYPOINT=http://streamer:5000/ healthcheck: test: - CMD - - /usr/local/bin/anonymous-server - - healthcheck + - node + - healthcheck.js interval: 5s timeout: 5s retries: 3 - start_period: 20s + start_period: 2s depends_on: mongodb: condition: service_healthy redis: condition: service_healthy + streamer: + condition: service_healthy + + streamer: + logging: + driver: json-file + options: + max-size: "25m" + max-file: "4" + build: . + restart: always + image: tdurieux/anonymous_github:v2 + deploy: + mode: replicated + replicas: 4 + endpoint_mode: dnsrr + resources: + limits: + memory: 768M + entrypoint: ["node", "--max-old-space-size=512", "./build/streamer/index.js"] + env_file: + - ./.env + volumes: + - ./repositories:/app/repositories/ + environment: + - PORT=5000 + - SERVICE_NAME=Streamer + - DB_HOSTNAME=mongodb + - REDIS_HOSTNAME=redis + depends_on: + mongodb: + condition: service_healthy + redis: + condition: service_healthy + healthcheck: + test: + - CMD + - node + - healthcheck.js + interval: 5s + timeout: 5s + retries: 3 + start_period: 2s redis: image: "redis:alpine" @@ -88,7 +121,7 @@ services: links: - mongodb env_file: - - ${APP_ENV_FILE:-./.env} + - ./.env volumes: - ./db_backups:/backup environment: